2001-05-22 18:41:15 +04:00
|
|
|
#ifndef FLTKPROPERTYLIST_H
|
|
|
|
#define FLTKPROPERTYLIST_H
|
|
|
|
|
|
|
|
#include "../cmStandardIncludes.h"
|
|
|
|
#include <string>
|
|
|
|
|
|
|
|
|
2001-06-21 16:41:14 +04:00
|
|
|
class CMakeSetupGUIImplementation;
|
|
|
|
|
|
|
|
|
2001-05-22 18:41:15 +04:00
|
|
|
namespace fltk {
|
|
|
|
|
|
|
|
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
//PropertyList Items
|
2001-06-11 02:19:16 +04:00
|
|
|
class PropertyItem
|
2001-05-22 18:41:15 +04:00
|
|
|
{
|
|
|
|
// Attributes
|
|
|
|
public:
|
2001-06-13 08:16:35 +04:00
|
|
|
std::string m_HelpString;
|
|
|
|
std::string m_propName;
|
|
|
|
std::string m_curValue;
|
2001-05-22 18:41:15 +04:00
|
|
|
int m_nItemType;
|
2001-06-13 08:16:35 +04:00
|
|
|
std::string m_cmbItems;
|
2001-05-22 18:41:15 +04:00
|
|
|
bool m_Removed;
|
|
|
|
public:
|
2001-06-13 08:16:35 +04:00
|
|
|
PropertyItem( std::string propName,
|
|
|
|
std::string curValue,
|
|
|
|
std::string helpString,
|
|
|
|
int nItemType,
|
|
|
|
std::string cmbItems )
|
2001-05-22 18:41:15 +04:00
|
|
|
{
|
|
|
|
m_HelpString = helpString;
|
|
|
|
m_Removed = false;
|
|
|
|
m_propName = propName;
|
|
|
|
m_curValue = curValue;
|
|
|
|
m_nItemType = nItemType;
|
|
|
|
m_cmbItems = cmbItems;
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2001-06-21 16:41:14 +04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2001-05-22 18:41:15 +04:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// PropertyList window
|
|
|
|
|
|
|
|
class PropertyList
|
|
|
|
{
|
|
|
|
// Construction
|
|
|
|
public:
|
|
|
|
enum ItemType
|
|
|
|
{
|
|
|
|
COMBO = 0,
|
|
|
|
EDIT,
|
|
|
|
COLOR,
|
|
|
|
FONT,
|
|
|
|
FILE,
|
|
|
|
CHECKBOX,
|
|
|
|
PATH
|
|
|
|
};
|
2001-06-21 16:41:14 +04:00
|
|
|
|
|
|
|
PropertyList( CMakeSetupGUIImplementation * );
|
2001-05-22 18:41:15 +04:00
|
|
|
|
|
|
|
// Attributes
|
|
|
|
public:
|
|
|
|
|
|
|
|
// Operations
|
|
|
|
public:
|
2001-06-13 08:16:35 +04:00
|
|
|
int AddItem( std::string txt );
|
2001-05-22 18:41:15 +04:00
|
|
|
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();
|
|
|
|
|
|
|
|
protected:
|
|
|
|
|
|
|
|
int AddPropItem(PropertyItem* pItem);
|
|
|
|
|
|
|
|
std::set<PropertyItem*> m_PropertyItems;
|
|
|
|
|
2001-06-21 16:41:14 +04:00
|
|
|
CMakeSetupGUIImplementation * m_CMakeSetup;
|
|
|
|
|
2001-05-22 18:41:15 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
} // end namespace fltk
|
|
|
|
|
|
|
|
#endif
|