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"
26 #include "wx/dialog.h"
31 * Forward declarations
34 ////@begin forward declarations
35 ////@end forward declarations
41 ////@begin control identifiers
42 #define ID_DIALOG 10000
43 #define ID_AVAILABLE_CONFIG_ITEMS 10002
44 #define ID_CONFIG_ITEMS 10005
45 #define ID_CONFIG_ADD 10006
46 #define ID_CONFIG_REMOVE 10007
47 ////@end control identifiers
52 * ctConfigItemsSelector class declaration
55 class ctConfigItemsSelector
: public wxDialog
59 ctConfigItemsSelector( wxWindow
* parent
, wxWindowID id
= wxID_ANY
, const wxString
& caption
= _("Configuration Items Selector"));
61 /// Creates the controls and sizers
62 void CreateControls();
64 ////@begin ctConfigItemsSelector event handler declarations
66 /// Event handler for ID_CONFIG_ADD
67 void OnConfigAdd( wxCommandEvent
& event
);
69 /// Update event handler for ID_CONFIG_ADD
70 void OnUpdateConfigAdd( wxUpdateUIEvent
& event
);
72 /// Event handler for ID_CONFIG_REMOVE
73 void OnConfigRemove( wxCommandEvent
& event
);
75 /// Update event handler for ID_CONFIG_REMOVE
76 void OnUpdateConfigRemove( wxUpdateUIEvent
& event
);
78 /// Event handler for wxID_OK
79 void OnOk( wxCommandEvent
& event
);
81 ////@end ctConfigItemsSelector event handler declarations
83 ////@begin ctConfigItemsSelector member function declarations
85 ////@end ctConfigItemsSelector member function declarations
87 /// Initialise the master list
88 void InitSourceConfigList(ctConfigItem
* item
= NULL
);
90 /// Set the initial list
91 void SetConfigList(const wxArrayString
& items
);
94 const wxArrayString
& GetConfigList() const { return m_configItems
; }
96 /// Should we show tooltips?
97 static bool ShowToolTips();
99 DECLARE_CLASS( ctConfigItemsSelector
)
100 DECLARE_EVENT_TABLE()
103 wxArrayString m_configItems
;
108 // _CONFIGITEMSELECTOR_H_