summaryrefslogtreecommitdiffstats
path: root/Source/FLTKDialog/FLTKPropertyList.cxx
diff options
context:
space:
mode:
authorLuis Ibanez <luis.ibanez@kitware.com>2001-10-28 03:47:23 (GMT)
committerLuis Ibanez <luis.ibanez@kitware.com>2001-10-28 03:47:23 (GMT)
commitf90e25894157601d9776f3bf2f04407ce19eebab (patch)
tree24c6cea2286a2028b270c8b9aa25db475e3fd1fd /Source/FLTKDialog/FLTKPropertyList.cxx
parent0fb47ad240d3a3a0cb2ff12c5c34aef27095a041 (diff)
downloadCMake-f90e25894157601d9776f3bf2f04407ce19eebab.zip
CMake-f90e25894157601d9776f3bf2f04407ce19eebab.tar.gz
CMake-f90e25894157601d9776f3bf2f04407ce19eebab.tar.bz2
ENH: Updated with respect to MFC CMakeSetup. New cache entries are now
colored in red. The browsers for recent directories only popup if there is at least one in the list.
Diffstat (limited to 'Source/FLTKDialog/FLTKPropertyList.cxx')
-rw-r--r--Source/FLTKDialog/FLTKPropertyList.cxx49
1 files changed, 41 insertions, 8 deletions
diff --git a/Source/FLTKDialog/FLTKPropertyList.cxx b/Source/FLTKDialog/FLTKPropertyList.cxx
index 70a6255..8072a60 100644
--- a/Source/FLTKDialog/FLTKPropertyList.cxx
+++ b/Source/FLTKDialog/FLTKPropertyList.cxx
@@ -21,6 +21,7 @@ PropertyList::PropertyList( CMakeSetupGUIImplementation * cmakeSetup )
{
m_CMakeSetup = cmakeSetup;
PropertyItemRow::SetCMakeSetupGUI( cmakeSetup );
+ m_Dirty = false;
}
@@ -39,28 +40,40 @@ PropertyList::~PropertyList()
int PropertyList::AddItem( std::string txt)
{
- int nIndex =0;// = AddString(txt);
+ int nIndex =0;
return nIndex;
}
-int PropertyList::AddPropItem(PropertyItem* pItem)
+
+
+int PropertyList::AddPropItem(PropertyItem* pItem, bool reverseOrder)
{
- int nIndex =0; //= AddString(_T(""));
- // SetItemDataPtr(nIndex,pItem);
+ int nIndex =0;
+ if(reverseOrder)
+ {
+ nIndex = 0;
+ }
+ else
+ {
+ nIndex = m_PropertyItems.size();
+ }
- new PropertyItemRow( pItem ); // GUI of the property row
+ new PropertyItemRow( pItem ); // GUI of the new property row
m_PropertyItems.insert(pItem);
return nIndex;
}
+
+
int PropertyList::AddProperty(const char* name,
const char* value,
const char* helpString,
int type,
- const char* comboItems)
+ const char* comboItems,
+ bool reverseOrder)
{
PropertyItem* pItem = 0;
@@ -84,10 +97,24 @@ int PropertyList::AddProperty(const char* name,
{
pItem = new PropertyItem(name, value, helpString, type, comboItems);
}
- return this->AddPropItem(pItem);
+ return this->AddPropItem(pItem,reverseOrder);
}
+void PropertyList::RemoveProperty(const char* name)
+{
+ for(int i =0; i < this->GetCount(); ++i)
+ {
+ PropertyItem* pItem = (PropertyItem*) GetItemDataPtr(i);
+ if(pItem->m_propName == name)
+ {
+ m_PropertyItems.erase(pItem);
+ delete pItem;
+ return;
+ }
+ }
+}
+
void PropertyList::RemoveAll()
@@ -99,7 +126,6 @@ void PropertyList::RemoveAll()
cmCacheManager::GetInstance()->RemoveCacheEntry(pItem->m_propName.c_str());
m_PropertyItems.erase(pItem);
delete pItem;
- // this->DeleteString(0);
}
Invalidate();
}
@@ -127,6 +153,13 @@ PropertyItem * PropertyList::GetItem(int index)
return *it;
}
+void
+PropertyList
+::InvalidateList(void)
+{
+ Invalidate();
+ m_Dirty = true;
+}
} // end fltk namespace