]>
Commit | Line | Data |
---|---|---|
d7463f75 JS |
1 | ///////////////////////////////////////////////////////////////////////////// |
2 | // Name: custompropertydialog.h | |
3 | // Purpose: Custom property dialog | |
4 | // Author: Julian Smart | |
5 | // Modified by: | |
6 | // Created: 2003-06-04 | |
7 | // RCS-ID: $Id$ | |
8 | // Copyright: (c) Julian Smart | |
9 | // Licence: | |
10 | ///////////////////////////////////////////////////////////////////////////// | |
11 | ||
12 | #ifndef _CUSTOMPROPERTYDIALOG_H_ | |
13 | #define _CUSTOMPROPERTYDIALOG_H_ | |
14 | ||
d7463f75 JS |
15 | /*! |
16 | * Includes | |
17 | */ | |
18 | ||
19 | ////@begin includes | |
20 | ////@end includes | |
21 | ||
22 | /*! | |
23 | * Forward declarations | |
24 | */ | |
25 | ||
26 | ////@begin forward declarations | |
27 | ////@end forward declarations | |
28 | ||
29 | /*! | |
30 | * Control identifiers | |
31 | */ | |
32 | ||
33 | ////@begin control identifiers | |
34 | #define ID_CUSTOMPROPERTYDIALOG 10000 | |
d7463f75 JS |
35 | #define ID_PROPERTY_CHOICES 10001 |
36 | #define ID_PROPERTY_CHOICE_ADD 10005 | |
37 | #define ID_PROPERTY_CHOICE_REMOVE 10006 | |
d7463f75 JS |
38 | ////@end control identifiers |
39 | ||
40 | /*! | |
41 | * ctCustomPropertyDialog class declaration | |
42 | */ | |
43 | ||
44 | class ctCustomPropertyDialog: public wxDialog | |
45 | { | |
46 | public: | |
47 | /// Constructor | |
d9ab621e | 48 | ctCustomPropertyDialog( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& caption = _("Edit Custom Property")); |
d7463f75 JS |
49 | |
50 | /// Creates the controls and sizers | |
51 | void CreateControls(); | |
52 | ||
53 | ////@begin ctCustomPropertyDialog event handler declarations | |
54 | ||
55 | /// Update event handler for ID_PROPERTY_CHOICES | |
56 | void OnUpdatePropertyChoices( wxUpdateUIEvent& event ); | |
57 | ||
58 | /// Event handler for ID_PROPERTY_CHOICE_ADD | |
59 | void OnPropertyChoiceAdd( wxCommandEvent& event ); | |
60 | ||
61 | /// Update event handler for ID_PROPERTY_CHOICE_ADD | |
62 | void OnUpdatePropertyChoiceAdd( wxUpdateUIEvent& event ); | |
63 | ||
64 | /// Event handler for ID_PROPERTY_CHOICE_REMOVE | |
65 | void OnPropertyChoiceRemove( wxCommandEvent& event ); | |
66 | ||
67 | /// Update event handler for ID_PROPERTY_CHOICE_REMOVE | |
68 | void OnUpdatePropertyChoiceRemove( wxUpdateUIEvent& event ); | |
69 | ||
70 | ////@end ctCustomPropertyDialog event handler declarations | |
71 | ||
72 | ////@begin ctCustomPropertyDialog member function declarations | |
73 | ||
74 | ////@end ctCustomPropertyDialog member function declarations | |
75 | ||
76 | /// Should we show tooltips? | |
77 | static bool ShowToolTips(); | |
78 | ||
79 | void SetPropertyName(const wxString& name) { m_name = name; } | |
80 | wxString GetPropertyName() { return m_name; } | |
81 | ||
82 | void SetPropertyType(const wxString& type) { m_type = type; } | |
83 | wxString GetPropertyType() { return m_type; } | |
84 | ||
85 | void SetEditorType(const wxString& type) { m_editorType = type; } | |
86 | wxString GetEditorType() { return m_editorType; } | |
87 | ||
88 | void SetPropertyDescription(const wxString& descr) { m_description = descr; } | |
89 | wxString GetPropertyDescription() { return m_description; } | |
90 | ||
91 | void SetChoices(const wxArrayString& choices) ; | |
92 | wxArrayString GetChoices() { return m_choices; } | |
93 | ||
94 | DECLARE_CLASS( ctCustomPropertyDialog ) | |
95 | DECLARE_EVENT_TABLE() | |
96 | ||
d9ab621e WS |
97 | protected: |
98 | wxString m_name; | |
99 | wxString m_type; | |
100 | wxString m_description; | |
101 | wxString m_editorType; | |
d7463f75 | 102 | wxArrayString m_choices; |
d9ab621e WS |
103 | |
104 | // Dialog controls | |
105 | wxTextCtrl* m_customPropertyName; | |
106 | wxTextCtrl* m_customPropertyDescription; | |
107 | wxChoice* m_customPrototype; | |
108 | wxChoice* m_customPropertyEditorType; | |
109 | wxListBox* m_propertyChoices; | |
d7463f75 JS |
110 | }; |
111 | ||
112 | #endif | |
113 | // _CUSTOMPROPERTYDIALOG_H_ |