diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2002-03-20 18:16:16 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2002-03-20 18:16:16 (GMT) |
commit | 49bcc1ad51e25b0d7c08a2861b997a9d10cf6379 (patch) | |
tree | 5081912d7925b370dd196c9632f3d231ffdf05e6 /Source/FLTKDialog/FLTKPropertyList.cxx | |
parent | 2990c3db571a29a00fc59b5c572d5aa6cbe8d117 (diff) | |
download | CMake-49bcc1ad51e25b0d7c08a2861b997a9d10cf6379.zip CMake-49bcc1ad51e25b0d7c08a2861b997a9d10cf6379.tar.gz CMake-49bcc1ad51e25b0d7c08a2861b997a9d10cf6379.tar.bz2 |
ENH: remove fltk dialog as it is no longer supported
Diffstat (limited to 'Source/FLTKDialog/FLTKPropertyList.cxx')
-rw-r--r-- | Source/FLTKDialog/FLTKPropertyList.cxx | 184 |
1 files changed, 0 insertions, 184 deletions
diff --git a/Source/FLTKDialog/FLTKPropertyList.cxx b/Source/FLTKDialog/FLTKPropertyList.cxx deleted file mode 100644 index 6913abe..0000000 --- a/Source/FLTKDialog/FLTKPropertyList.cxx +++ /dev/null @@ -1,184 +0,0 @@ -/*========================================================================= - - Program: Insight Segmentation & Registration Toolkit - Module: $RCSfile$ - Language: C++ - Date: $Date$ - Version: $Revision$ - - Copyright (c) 2002 Insight Consortium. All rights reserved. - See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details. - - This software is distributed WITHOUT ANY WARRANTY; without even - the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - PURPOSE. See the above copyright notices for more information. - -=========================================================================*/ -// FLTKPropertyList.cxx : implementation file -// - -#include "FLTKPropertyList.h" -#include "../cmCacheManager.h" -#include "FLTKPropertyItemRow.h" -#include "FL/filename.H" -#include "FL/fl_file_chooser.H" -#include "FL/Fl_Color_Chooser.H" -#include "FL/fl_ask.H" -#include "FL/Fl_Button.H" -#include "CMakeSetupGUIImplementation.h" - - -namespace fltk { - -///////////////////////////////////////////////////////////////////////////// -// PropertyList - -PropertyList::PropertyList( CMakeSetupGUIImplementation * cmakeSetup ) -{ - m_CMakeSetup = cmakeSetup; - PropertyItemRow::SetCMakeSetupGUI( cmakeSetup ); - m_Dirty = false; -} - - - -PropertyList::~PropertyList() -{ - for(std::set<PropertyItem*>::iterator i = m_PropertyItems.begin(); - i != m_PropertyItems.end(); ++i) - { - delete *i; - } -} - - - - -int PropertyList::AddItem( std::string txt) -{ - int nIndex =0; - return nIndex; -} - - - -int PropertyList::AddPropItem(PropertyItem* pItem, bool reverseOrder) -{ - - int nIndex =0; - if(reverseOrder) - { - nIndex = 0; - } - else - { - nIndex = m_PropertyItems.size(); - } - - 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, - bool reverseOrder) -{ - - PropertyItem* pItem = 0; - for(int i =0; i < this->GetCount(); ++i) - { - PropertyItem* item = this->GetItem(i); - if(item->m_propName == name) - { - pItem = item; - if(pItem->m_curValue != value) - { - pItem->m_curValue = value; - pItem->m_HelpString = helpString; - Invalidate(); - } - return i; - } - } - // if it is not found, then create a new one - if(!pItem) - { - pItem = new PropertyItem(name, value, helpString, type, comboItems); - } - 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() -{ - int c = this->GetCount(); - for(int i =0; i < c; ++i) - { - PropertyItem* pItem = (PropertyItem*) GetItemDataPtr(0); - cmCacheManager::GetInstance()->RemoveCacheEntry(pItem->m_propName.c_str()); - m_PropertyItems.erase(pItem); - delete pItem; - } - Invalidate(); -} - - - -PropertyItem * PropertyList::GetItemDataPtr(int index) -{ - std::set<PropertyItem*>::iterator it = m_PropertyItems.begin(); - for(int i=0; it != m_PropertyItems.end() && i<index; i++) - { - ++it; - } - return *it; -} - - -PropertyItem * PropertyList::GetItem(int index) -{ - std::set<PropertyItem*>::iterator it = m_PropertyItems.begin(); - for(int i=0; it != m_PropertyItems.end() && i<index; i++) - { - ++it; - } - return *it; -} - -void -PropertyList -::InvalidateList(void) -{ - Invalidate(); - m_Dirty = true; -} - - -} // end fltk namespace - - - |