1 /////////////////////////////////////////////////////////////////////////////
2 // Name: configitemselector.h
3 // Purpose: Selector for one or more config items
4 // Author: Julian Smart
8 // Copyright: (c) Julian Smart
10 /////////////////////////////////////////////////////////////////////////////
12 #ifndef _CONFIGITEMSELECTOR_H_
13 #define _CONFIGITEMSELECTOR_H_
15 #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
16 #pragma interface "configitemselector.cpp"
27 * Forward declarations
30 ////@begin forward declarations
31 ////@end forward declarations
37 ////@begin control identifiers
38 #define ID_DIALOG 10000
39 #define ID_AVAILABLE_CONFIG_ITEMS 10002
40 #define ID_CONFIG_ITEMS 10005
41 #define ID_CONFIG_ADD 10006
42 #define ID_CONFIG_REMOVE 10007
43 ////@end control identifiers
48 * ctConfigItemsSelector class declaration
51 class ctConfigItemsSelector
: public wxDialog
55 ctConfigItemsSelector( wxWindow
* parent
, wxWindowID id
= wxID_ANY
, const wxString
& caption
= _("Configuration Items Selector"));
57 /// Creates the controls and sizers
58 void CreateControls();
60 ////@begin ctConfigItemsSelector event handler declarations
62 /// Event handler for ID_CONFIG_ADD
63 void OnConfigAdd( wxCommandEvent
& event
);
65 /// Update event handler for ID_CONFIG_ADD
66 void OnUpdateConfigAdd( wxUpdateUIEvent
& event
);
68 /// Event handler for ID_CONFIG_REMOVE
69 void OnConfigRemove( wxCommandEvent
& event
);
71 /// Update event handler for ID_CONFIG_REMOVE
72 void OnUpdateConfigRemove( wxUpdateUIEvent
& event
);
74 /// Event handler for wxID_OK
75 void OnOk( wxCommandEvent
& event
);
77 ////@end ctConfigItemsSelector event handler declarations
79 ////@begin ctConfigItemsSelector member function declarations
81 ////@end ctConfigItemsSelector member function declarations
83 /// Initialise the master list
84 void InitSourceConfigList(ctConfigItem
* item
= NULL
);
86 /// Set the initial list
87 void SetConfigList(const wxArrayString
& items
);
90 const wxArrayString
& GetConfigList() const { return m_configItems
; }
92 /// Should we show tooltips?
93 static bool ShowToolTips();
95 DECLARE_CLASS( ctConfigItemsSelector
)
99 wxArrayString m_configItems
;
104 // _CONFIGITEMSELECTOR_H_