1 /////////////////////////////////////////////////////////////////////////////
2 // Name: custompropertydialog.h
3 // Purpose: Custom property dialog
4 // Author: Julian Smart
8 // Copyright: (c) Julian Smart
10 /////////////////////////////////////////////////////////////////////////////
12 #ifndef _CUSTOMPROPERTYDIALOG_H_
13 #define _CUSTOMPROPERTYDIALOG_H_
23 * Forward declarations
26 ////@begin forward declarations
27 ////@end forward declarations
33 ////@begin control identifiers
34 #define ID_CUSTOMPROPERTYDIALOG 10000
35 #define ID_PROPERTY_CHOICES 10001
36 #define ID_PROPERTY_CHOICE_ADD 10005
37 #define ID_PROPERTY_CHOICE_REMOVE 10006
38 ////@end control identifiers
41 * ctCustomPropertyDialog class declaration
44 class ctCustomPropertyDialog
: public wxDialog
48 ctCustomPropertyDialog( wxWindow
* parent
, wxWindowID id
= wxID_ANY
, const wxString
& caption
= _("Edit Custom Property"));
50 /// Creates the controls and sizers
51 void CreateControls();
53 ////@begin ctCustomPropertyDialog event handler declarations
55 /// Update event handler for ID_PROPERTY_CHOICES
56 void OnUpdatePropertyChoices( wxUpdateUIEvent
& event
);
58 /// Event handler for ID_PROPERTY_CHOICE_ADD
59 void OnPropertyChoiceAdd( wxCommandEvent
& event
);
61 /// Update event handler for ID_PROPERTY_CHOICE_ADD
62 void OnUpdatePropertyChoiceAdd( wxUpdateUIEvent
& event
);
64 /// Event handler for ID_PROPERTY_CHOICE_REMOVE
65 void OnPropertyChoiceRemove( wxCommandEvent
& event
);
67 /// Update event handler for ID_PROPERTY_CHOICE_REMOVE
68 void OnUpdatePropertyChoiceRemove( wxUpdateUIEvent
& event
);
70 ////@end ctCustomPropertyDialog event handler declarations
72 ////@begin ctCustomPropertyDialog member function declarations
74 ////@end ctCustomPropertyDialog member function declarations
76 /// Should we show tooltips?
77 static bool ShowToolTips();
79 void SetPropertyName(const wxString
& name
) { m_name
= name
; }
80 wxString
GetPropertyName() { return m_name
; }
82 void SetPropertyType(const wxString
& type
) { m_type
= type
; }
83 wxString
GetPropertyType() { return m_type
; }
85 void SetEditorType(const wxString
& type
) { m_editorType
= type
; }
86 wxString
GetEditorType() { return m_editorType
; }
88 void SetPropertyDescription(const wxString
& descr
) { m_description
= descr
; }
89 wxString
GetPropertyDescription() { return m_description
; }
91 void SetChoices(const wxArrayString
& choices
) ;
92 wxArrayString
GetChoices() { return m_choices
; }
94 DECLARE_CLASS( ctCustomPropertyDialog
)
100 wxString m_description
;
101 wxString m_editorType
;
102 wxArrayString m_choices
;
105 wxTextCtrl
* m_customPropertyName
;
106 wxTextCtrl
* m_customPropertyDescription
;
107 wxChoice
* m_customPrototype
;
108 wxChoice
* m_customPropertyEditorType
;
109 wxListBox
* m_propertyChoices
;
113 // _CUSTOMPROPERTYDIALOG_H_