| 1 |
#ifndef PROPERTIESLISTVIEW_H |
| 2 |
#define PROPERTIESLISTVIEW_H |
| 3 |
|
| 4 |
#include "custom_pg_properties.h" |
| 5 |
#include "wxc_widget.h" |
| 6 |
#include "wxgui_helpers.h" |
| 7 |
#include <map> |
| 8 |
#include <vector> |
| 9 |
#include <wx/propgrid/manager.h> |
| 10 |
#include <wx/propgrid/propgrid.h> |
| 11 |
|
| 12 |
class wxcWidget; |
| 13 |
class PropertiesListView : public wxPanel |
| 14 |
{ |
| 15 |
public: |
| 16 |
typedef std::vector<PropertyBase*> PropVec_t; |
| 17 |
enum DisplayType { Type_Control, Type_Project_Metadata }; |
| 18 |
|
| 19 |
protected: |
| 20 |
wxcWidget* m_wxcWidget; |
| 21 |
PropVec_t m_properties; |
| 22 |
wxPropertyGrid* m_pg; |
| 23 |
wxPropertyGridManager* m_pgMgr; |
| 24 |
DisplayType m_type; |
| 25 |
|
| 26 |
void DoClear(); |
| 27 |
|
| 28 |
void OnCellChanged(wxPropertyGridEvent& e); |
| 29 |
void OnCellChanging(wxPropertyGridEvent& e); |
| 30 |
void OnPropertyGridUpdateUI(wxUpdateUIEvent& event); |
| 31 |
|
| 32 |
public: |
| 33 |
PropertiesListView(wxWindow* win); |
| 34 |
virtual ~PropertiesListView(); |
| 35 |
|
| 36 |
wxPGProperty* AddBoolProp(const wxString& label, bool checked, const wxString& tip); |
| 37 |
wxPGProperty* AddIntegerProp(const wxString& label, int value, const wxString& tip); |
| 38 |
wxPGProperty* AddIntegerProp(const wxString& label, const wxString& tip); |
| 39 |
wxPGProperty* AddTextProp(const wxString& label, const wxString& value, const wxString& tip); |
| 40 |
wxPGProperty* AddChoiceProp(const wxString& label, const wxArrayString& value, int sel, const wxString& tip); |
| 41 |
wxPGProperty* AddFilePicker(const wxString& label, const wxString& value, const wxString& tip); |
| 42 |
wxPGProperty* AddLongTextProp(const wxString& label, const wxString& value, const wxString& tip); |
| 43 |
wxPGProperty* AddColorProp(const wxString& label, const wxString& value, const wxString& tip); |
| 44 |
wxPGProperty* AddComboxProp(const wxString& label, const wxArrayString& options, const wxString& value, |
| 45 |
const wxString& tip); |
| 46 |
wxPGProperty* AddFlags(const wxString& label, const wxArrayString& strings, const wxArrayInt& values, long value, |
| 47 |
const wxString& tip); |
| 48 |
wxPGProperty* AddFontProp(const wxString& label, const wxString& value, const wxString& tip); |
| 49 |
wxPGProperty* AddVDPicker(const wxString& label, const wxString& value, const wxString& tip); |
| 50 |
wxPGProperty* AddBmpTextPicker(const wxString& label, const wxString& value, const wxString& tip); |
| 51 |
wxPGProperty* AddDirPicker(const wxString& label, const wxString& value, const wxString& tip); |
| 52 |
wxPGProperty* AddBitmapPicker(const wxString& label, const wxString& value, const wxString& tip); |
| 53 |
|
| 54 |
void Construct(wxcWidget* wb); |
| 55 |
void ConstructProjectSettings(); |
| 56 |
}; |
| 57 |
|
| 58 |
#endif // PROPERTIESLISTVIEW_H |