1 #ifndef RBUTILCTRLS_H_INCLUDED
2 #define RBUTILCTRLS_H_INCLUDED
7 class ImageCtrl
: public wxControl
9 DECLARE_DYNAMIC_CLASS(ImageCtrl
)
15 ImageCtrl(wxWindow
* parent
, wxWindowID id
,
16 const wxPoint
& pos
= wxDefaultPosition
,
17 const wxSize
& size
= wxDefaultSize
,
18 long style
= wxNO_BORDER
,
19 const wxValidator
& validator
= wxDefaultValidator
)
21 Create(parent
, id
, pos
, size
, style
, validator
);
24 bool Create(wxWindow
* parent
, wxWindowID id
,
25 const wxPoint
& pos
= wxDefaultPosition
,
26 const wxSize
& size
= wxDefaultSize
,
27 long style
= wxNO_BORDER
,
28 const wxValidator
& validator
= wxDefaultValidator
);
31 void OnPaint(wxPaintEvent
& event
);
33 wxSize
DoGetBestSize() const ;
35 void SetBitmap(wxBitmap bmp
);
42 class ThemeCtrl
: public wxPanel
44 DECLARE_DYNAMIC_CLASS(ThemeCtrl
)
50 ID_INSTALLCHECKBOX
= 10003,
51 ID_PREVIEW_BITMAP
= 10004,
53 ID_THEME_SELECT_ALL
= 10006
58 ThemeCtrl() { Init(); }
59 ThemeCtrl(wxWindow
* parent
, wxWindowID id
,
60 const wxPoint
& pos
= wxDefaultPosition
,
61 const wxSize
& size
= wxDefaultSize
,
62 long style
= wxNO_BORDER
|wxTAB_TRAVERSAL
,
63 const wxString title
= wxT(""))
66 Create(parent
, id
, pos
, size
, style
, title
);
69 bool Create(wxWindow
* parent
, wxWindowID id
,
70 const wxPoint
& pos
= wxDefaultPosition
,
71 const wxSize
& size
= wxDefaultSize
,
72 long style
= wxNO_BORDER
|wxTAB_TRAVERSAL
,
73 const wxString title
= wxT(""));
75 // Creates the controls and sizers
76 void CreateControls();
77 // Common initialization
80 void OnThemesLst(wxCommandEvent
& event
);
81 void OnSelectAll(wxCommandEvent
& event
);
82 void OnCheckBox(wxCommandEvent
& event
);
84 void setDevice(wxString device
);
85 wxArrayString
getThemesToInstall();
88 void ThemePreview(void);
90 wxString m_currentimage
;
91 wxString m_currentResolution
;
94 wxListBox
* m_themeList
;
95 wxButton
* m_selectAllThemes
;
97 wxTextCtrl
* m_themedesc
;
98 ImageCtrl
* m_PreviewBitmap
;
100 wxArrayString m_Themes
;
101 wxArrayString m_Themes_path
;
102 wxArrayString m_Themes_size
;
103 wxArrayString m_Themes_image
;
104 wxArrayString m_Themes_desc
;
108 class OkCancelCtrl
: public wxPanel
110 DECLARE_DYNAMIC_CLASS(OkCancelCtrl
)
111 DECLARE_EVENT_TABLE()
115 OkCancelCtrl() { Init(); }
116 OkCancelCtrl(wxWindow
* parent
, wxWindowID id
,
117 const wxPoint
& pos
= wxDefaultPosition
,
118 const wxSize
& size
= wxDefaultSize
,
119 long style
= wxNO_BORDER
|wxTAB_TRAVERSAL
,
120 const wxString title
= wxT(""))
123 Create(parent
, id
, pos
, size
, style
, title
);
126 bool Create(wxWindow
* parent
, wxWindowID id
,
127 const wxPoint
& pos
= wxDefaultPosition
,
128 const wxSize
& size
= wxDefaultSize
,
129 long style
= wxNO_BORDER
|wxTAB_TRAVERSAL
,
130 const wxString title
= wxT(""));
132 // Creates the controls and sizers
133 void CreateControls();
134 // Common initialization
139 wxButton
* m_CancelBtn
;
143 class DeviceSelectorCtrl
: public wxPanel
145 DECLARE_DYNAMIC_CLASS(DeviceSelectorCtrl
)
146 DECLARE_EVENT_TABLE()
149 ID_DEVICE_CBX
= 10001,
150 ID_AUTODETECT_BTN
= 10002,
155 DeviceSelectorCtrl() { }
156 DeviceSelectorCtrl(wxWindow
* parent
, wxWindowID id
,
157 const wxPoint
& pos
= wxDefaultPosition
,
158 const wxSize
& size
= wxDefaultSize
,
159 long style
= wxNO_BORDER
|wxTAB_TRAVERSAL
,
160 const wxString title
= wxT(""))
162 Create(parent
, id
, pos
, size
, style
, title
);
165 bool Create(wxWindow
* parent
, wxWindowID id
,
166 const wxPoint
& pos
= wxDefaultPosition
,
167 const wxSize
& size
= wxDefaultSize
,
168 long style
= wxNO_BORDER
|wxTAB_TRAVERSAL
,
169 const wxString title
= wxT(""));
171 // Creates the controls and sizers
172 void CreateControls();
174 void OnAutoDetect(wxCommandEvent
& event
);
175 void OnComboBox(wxCommandEvent
& event
);
177 wxString
getDevice();
183 wxString m_currentDevice
;
184 wxComboBox
* m_deviceCbx
;
185 wxStaticText
* m_desc
;
186 wxButton
* m_autodetectBtn
;
191 class DevicePositionCtrl
: public wxPanel
193 DECLARE_DYNAMIC_CLASS(DevicePositionCtrl
)
194 DECLARE_EVENT_TABLE()
197 ID_BROWSE_BTN
= 10003,
202 DevicePositionCtrl() { Init(); }
203 DevicePositionCtrl(wxWindow
* parent
, wxWindowID id
,
204 const wxPoint
& pos
= wxDefaultPosition
,
205 const wxSize
& size
= wxDefaultSize
,
206 long style
= wxNO_BORDER
|wxTAB_TRAVERSAL
,
207 const wxString title
= wxT(""))
210 Create(parent
, id
, pos
, size
, style
, title
);
213 bool Create(wxWindow
* parent
, wxWindowID id
,
214 const wxPoint
& pos
= wxDefaultPosition
,
215 const wxSize
& size
= wxDefaultSize
,
216 long style
= wxNO_BORDER
|wxTAB_TRAVERSAL
,
217 const wxString title
= wxT(""));
219 // Creates the controls and sizers
220 void CreateControls();
221 // Common initialization
224 void OnBrowseBtn(wxCommandEvent
& event
);
226 wxString
getDevicePos();
231 wxTextCtrl
* m_devicePos
;
232 wxStaticText
* m_desc
;
233 wxButton
* m_browseBtn
;
238 class FirmwarePositionCtrl
: public wxPanel
240 DECLARE_DYNAMIC_CLASS(FirmwarePositionCtrl
)
241 DECLARE_EVENT_TABLE()
244 ID_BROWSE_BTN
= 10004,
249 FirmwarePositionCtrl() { Init(); }
250 FirmwarePositionCtrl(wxWindow
* parent
, wxWindowID id
,
251 const wxPoint
& pos
= wxDefaultPosition
,
252 const wxSize
& size
= wxDefaultSize
,
253 long style
= wxNO_BORDER
|wxTAB_TRAVERSAL
,
254 const wxString title
= wxT(""))
257 Create(parent
, id
, pos
, size
, style
, title
);
260 bool Create(wxWindow
* parent
, wxWindowID id
,
261 const wxPoint
& pos
= wxDefaultPosition
,
262 const wxSize
& size
= wxDefaultSize
,
263 long style
= wxNO_BORDER
|wxTAB_TRAVERSAL
,
264 const wxString title
= wxT(""));
266 // Creates the controls and sizers
267 void CreateControls();
268 // Common initialization
271 void OnBrowseBtn(wxCommandEvent
& event
);
273 wxString
getFirmwarePos();
277 wxTextCtrl
* m_firmwarePos
;
278 wxStaticText
* m_desc
;
279 wxButton
* m_browseBtn
;