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_
15 #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
16 #pragma interface "custompropertydialog.cpp"
27 * Forward declarations
30 ////@begin forward declarations
31 ////@end forward declarations
37 ////@begin control identifiers
38 #define ID_CUSTOMPROPERTYDIALOG 10000
39 #define ID_PROPERTY_CHOICES 10001
40 #define ID_PROPERTY_CHOICE_ADD 10005
41 #define ID_PROPERTY_CHOICE_REMOVE 10006
42 ////@end control identifiers
45 * ctCustomPropertyDialog class declaration
48 class ctCustomPropertyDialog
: public wxDialog
52 ctCustomPropertyDialog( wxWindow
* parent
, wxWindowID id
= wxID_ANY
, const wxString
& caption
= _("Edit Custom Property"));
54 /// Creates the controls and sizers
55 void CreateControls();
57 ////@begin ctCustomPropertyDialog event handler declarations
59 /// Update event handler for ID_PROPERTY_CHOICES
60 void OnUpdatePropertyChoices( wxUpdateUIEvent
& event
);
62 /// Event handler for ID_PROPERTY_CHOICE_ADD
63 void OnPropertyChoiceAdd( wxCommandEvent
& event
);
65 /// Update event handler for ID_PROPERTY_CHOICE_ADD
66 void OnUpdatePropertyChoiceAdd( wxUpdateUIEvent
& event
);
68 /// Event handler for ID_PROPERTY_CHOICE_REMOVE
69 void OnPropertyChoiceRemove( wxCommandEvent
& event
);
71 /// Update event handler for ID_PROPERTY_CHOICE_REMOVE
72 void OnUpdatePropertyChoiceRemove( wxUpdateUIEvent
& event
);
74 ////@end ctCustomPropertyDialog event handler declarations
76 ////@begin ctCustomPropertyDialog member function declarations
78 ////@end ctCustomPropertyDialog member function declarations
80 /// Should we show tooltips?
81 static bool ShowToolTips();
83 void SetPropertyName(const wxString
& name
) { m_name
= name
; }
84 wxString
GetPropertyName() { return m_name
; }
86 void SetPropertyType(const wxString
& type
) { m_type
= type
; }
87 wxString
GetPropertyType() { return m_type
; }
89 void SetEditorType(const wxString
& type
) { m_editorType
= type
; }
90 wxString
GetEditorType() { return m_editorType
; }
92 void SetPropertyDescription(const wxString
& descr
) { m_description
= descr
; }
93 wxString
GetPropertyDescription() { return m_description
; }
95 void SetChoices(const wxArrayString
& choices
) ;
96 wxArrayString
GetChoices() { return m_choices
; }
98 DECLARE_CLASS( ctCustomPropertyDialog
)
104 wxString m_description
;
105 wxString m_editorType
;
106 wxArrayString m_choices
;
109 wxTextCtrl
* m_customPropertyName
;
110 wxTextCtrl
* m_customPropertyDescription
;
111 wxChoice
* m_customPrototype
;
112 wxChoice
* m_customPropertyEditorType
;
113 wxListBox
* m_propertyChoices
;
117 // _CUSTOMPROPERTYDIALOG_H_