summaryrefslogtreecommitdiffstats
path: root/Source/FLTKDialog/FLTKPropertyList.h
diff options
context:
space:
mode:
authorLuis Ibanez <luis.ibanez@kitware.com>2001-05-22 14:41:15 (GMT)
committerLuis Ibanez <luis.ibanez@kitware.com>2001-05-22 14:41:15 (GMT)
commitee8859be70286c4b78ed9ff7ded79ede5a5dd645 (patch)
tree2230d6ef34351a626da18725e124a5ebfc6ab6cc /Source/FLTKDialog/FLTKPropertyList.h
parent1631b200aa1d07a47e704ea675b3ee32bcc779d1 (diff)
downloadCMake-ee8859be70286c4b78ed9ff7ded79ede5a5dd645.zip
CMake-ee8859be70286c4b78ed9ff7ded79ede5a5dd645.tar.gz
CMake-ee8859be70286c4b78ed9ff7ded79ede5a5dd645.tar.bz2
Class to manage the list of properties displayed on the scroller
Diffstat (limited to 'Source/FLTKDialog/FLTKPropertyList.h')
-rw-r--r--Source/FLTKDialog/FLTKPropertyList.h118
1 files changed, 118 insertions, 0 deletions
diff --git a/Source/FLTKDialog/FLTKPropertyList.h b/Source/FLTKDialog/FLTKPropertyList.h
new file mode 100644
index 0000000..8c79616
--- /dev/null
+++ b/Source/FLTKDialog/FLTKPropertyList.h
@@ -0,0 +1,118 @@
+#ifndef FLTKPROPERTYLIST_H
+#define FLTKPROPERTYLIST_H
+
+#include "../cmStandardIncludes.h"
+#include <string>
+
+
+namespace fltk {
+
+using std::string;
+
+/////////////////////////////////////////////////////////////////////////////
+//PropertyList Items
+class PropertyItem
+{
+// Attributes
+public:
+ string m_HelpString;
+ string m_propName;
+ string m_curValue;
+ int m_nItemType;
+ string m_cmbItems;
+ bool m_Removed;
+public:
+ PropertyItem(string propName, string curValue,
+ string helpString,
+ int nItemType, string cmbItems)
+ {
+ m_HelpString = helpString;
+ m_Removed = false;
+ m_propName = propName;
+ m_curValue = curValue;
+ m_nItemType = nItemType;
+ m_cmbItems = cmbItems;
+ }
+};
+
+/////////////////////////////////////////////////////////////////////////////
+// PropertyList window
+
+class PropertyList
+{
+// Construction
+public:
+ enum ItemType
+ {
+ COMBO = 0,
+ EDIT,
+ COLOR,
+ FONT,
+ FILE,
+ CHECKBOX,
+ PATH
+ };
+ PropertyList();
+
+// Attributes
+public:
+
+// Operations
+public:
+ int AddItem(string txt);
+ int AddProperty(const char* name,
+ const char* value,
+ const char* helpString,
+ int type,
+ const char* comboItems);
+ std::set<PropertyItem*> GetItems()
+ {
+ return m_PropertyItems;
+ }
+ void Invalidate(void)
+ {
+ // fltk redraw();
+ }
+
+ int GetCount(void) const
+ {
+ return m_PropertyItems.size();
+ }
+ void OnButton(void);
+ void OnHelp(void);
+ void RemoveAll();
+ PropertyItem* GetItem(int index);
+ PropertyItem* GetItemDataPtr(int m_curSel);
+
+// Implementation
+public:
+ virtual ~PropertyList();
+
+ // Generated message map functions
+protected:
+
+ int AddPropItem(PropertyItem* pItem);
+
+// CComboBox m_cmbBox;
+// CEdit m_editBox;
+// CButton m_btnCtrl;
+// CButton m_CheckBoxControl;
+
+
+ bool m_Dirty;
+ int m_curSel;
+ int m_prevSel;
+ int m_nDivider;
+ int m_nDivTop;
+ int m_nDivBtm;
+ int m_nOldDivX;
+ int m_nLastBox;
+
+ std::set<PropertyItem*> m_PropertyItems;
+
+};
+
+
+} // end namespace fltk
+
+#endif