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 wxControl
44 DECLARE_DYNAMIC_CLASS(ThemeCtrl
)
50 ID_INSTALLCHECKBOX
= 10003,
51 ID_PREVIEW_BITMAP
= 10004,
57 ThemeCtrl() { Init(); }
58 ThemeCtrl(wxWindow
* parent
, wxWindowID id
,
59 const wxPoint
& pos
= wxDefaultPosition
,
60 const wxSize
& size
= wxDefaultSize
,
61 long style
= wxNO_BORDER
,
62 const wxValidator
& validator
= wxDefaultValidator
)
65 Create(parent
, id
, pos
, size
, style
, validator
);
68 bool Create(wxWindow
* parent
, wxWindowID id
,
69 const wxPoint
& pos
= wxDefaultPosition
,
70 const wxSize
& size
= wxDefaultSize
,
71 long style
= wxNO_BORDER
,
72 const wxValidator
& validator
= wxDefaultValidator
);
74 // Creates the controls and sizers
75 void CreateControls();
76 // Common initialization
79 void OnThemesLst(wxCommandEvent
& event
);
80 void OnCheckBox(wxCommandEvent
& event
);
82 void setDevice(wxString device
);
83 wxArrayString
getThemesToInstall();
86 wxString m_currentimage
;
87 wxString m_currentResolution
;
90 wxListBox
* m_themeList
;
92 wxTextCtrl
* m_themedesc
;
93 ImageCtrl
* m_PreviewBitmap
;
95 wxArrayString m_Themes
;
96 wxArrayString m_Themes_path
;
97 wxArrayString m_Themes_size
;
98 wxArrayString m_Themes_image
;
99 wxArrayString m_Themes_desc
;
103 class OkCancelCtrl
: public wxControl
105 DECLARE_DYNAMIC_CLASS(OkCancelCtrl
)
106 DECLARE_EVENT_TABLE()
110 OkCancelCtrl() { Init(); }
111 OkCancelCtrl(wxWindow
* parent
, wxWindowID id
,
112 const wxPoint
& pos
= wxDefaultPosition
,
113 const wxSize
& size
= wxDefaultSize
,
114 long style
= wxNO_BORDER
,
115 const wxValidator
& validator
= wxDefaultValidator
)
118 Create(parent
, id
, pos
, size
, style
, validator
);
121 bool Create(wxWindow
* parent
, wxWindowID id
,
122 const wxPoint
& pos
= wxDefaultPosition
,
123 const wxSize
& size
= wxDefaultSize
,
124 long style
= wxNO_BORDER
,
125 const wxValidator
& validator
= wxDefaultValidator
);
127 // Creates the controls and sizers
128 void CreateControls();
129 // Common initialization
134 wxButton
* m_CancelBtn
;
138 class DeviceSelectorCtrl
: public wxControl
140 DECLARE_DYNAMIC_CLASS(DeviceSelectorCtrl
)
141 DECLARE_EVENT_TABLE()
144 ID_DEVICE_CBX
= 10001,
145 ID_AUTODETECT_BTN
= 10002,
150 DeviceSelectorCtrl() { }
151 DeviceSelectorCtrl(wxWindow
* parent
, wxWindowID id
,
152 const wxPoint
& pos
= wxDefaultPosition
,
153 const wxSize
& size
= wxDefaultSize
,
154 long style
= wxNO_BORDER
,
155 const wxValidator
& validator
= wxDefaultValidator
)
157 Create(parent
, id
, pos
, size
, style
, validator
);
160 bool Create(wxWindow
* parent
, wxWindowID id
,
161 const wxPoint
& pos
= wxDefaultPosition
,
162 const wxSize
& size
= wxDefaultSize
,
163 long style
= wxNO_BORDER
,
164 const wxValidator
& validator
= wxDefaultValidator
);
166 // Creates the controls and sizers
167 void CreateControls();
169 void OnAutoDetect(wxCommandEvent
& event
);
170 void OnComboBox(wxCommandEvent
& event
);
172 wxString
getDevice();
176 wxString m_currentDevice
;
177 wxComboBox
* m_deviceCbx
;
178 wxStaticText
* m_desc
;
179 wxButton
* m_autodetectBtn
;
184 class DevicePositionCtrl
: public wxControl
186 DECLARE_DYNAMIC_CLASS(DevicePositionCtrl
)
187 DECLARE_EVENT_TABLE()
190 ID_BROWSE_BTN
= 10003,
195 DevicePositionCtrl() { Init(); }
196 DevicePositionCtrl(wxWindow
* parent
, wxWindowID id
,
197 const wxPoint
& pos
= wxDefaultPosition
,
198 const wxSize
& size
= wxDefaultSize
,
199 long style
= wxNO_BORDER
,
200 const wxValidator
& validator
= wxDefaultValidator
)
203 Create(parent
, id
, pos
, size
, style
, validator
);
206 bool Create(wxWindow
* parent
, wxWindowID id
,
207 const wxPoint
& pos
= wxDefaultPosition
,
208 const wxSize
& size
= wxDefaultSize
,
209 long style
= wxNO_BORDER
,
210 const wxValidator
& validator
= wxDefaultValidator
);
212 // Creates the controls and sizers
213 void CreateControls();
214 // Common initialization
217 void OnBrowseBtn(wxCommandEvent
& event
);
219 wxString
getDevicePos();
224 wxTextCtrl
* m_devicePos
;
225 wxStaticText
* m_desc
;
226 wxButton
* m_browseBtn
;
231 class FirmwarePositionCtrl
: public wxControl
233 DECLARE_DYNAMIC_CLASS(FirmwarePositionCtrl
)
234 DECLARE_EVENT_TABLE()
237 ID_BROWSE_BTN
= 10004,
242 FirmwarePositionCtrl() { Init(); }
243 FirmwarePositionCtrl(wxWindow
* parent
, wxWindowID id
,
244 const wxPoint
& pos
= wxDefaultPosition
,
245 const wxSize
& size
= wxDefaultSize
,
246 long style
= wxNO_BORDER
,
247 const wxValidator
& validator
= wxDefaultValidator
)
250 Create(parent
, id
, pos
, size
, style
, validator
);
253 bool Create(wxWindow
* parent
, wxWindowID id
,
254 const wxPoint
& pos
= wxDefaultPosition
,
255 const wxSize
& size
= wxDefaultSize
,
256 long style
= wxNO_BORDER
,
257 const wxValidator
& validator
= wxDefaultValidator
);
259 // Creates the controls and sizers
260 void CreateControls();
261 // Common initialization
264 void OnBrowseBtn(wxCommandEvent
& event
);
266 wxString
getFirmwarePos();
270 wxTextCtrl
* m_firmwarePos
;
271 wxStaticText
* m_desc
;
272 wxButton
* m_browseBtn
;
280 #ifndef RBUTILCTRLS_H_INCLUDED
281 #define RBUTILCTRLS_H_INCLUDED
286 class ImageCtrl
: public wxControl
288 DECLARE_DYNAMIC_CLASS(ImageCtrl
)
289 DECLARE_EVENT_TABLE()
294 ImageCtrl(wxWindow
* parent
, wxWindowID id
,
295 const wxPoint
& pos
= wxDefaultPosition
,
296 const wxSize
& size
= wxDefaultSize
,
297 long style
= wxNO_BORDER
,
298 const wxValidator
& validator
= wxDefaultValidator
)
300 Create(parent
, id
, pos
, size
, style
, validator
);
303 bool Create(wxWindow
* parent
, wxWindowID id
,
304 const wxPoint
& pos
= wxDefaultPosition
,
305 const wxSize
& size
= wxDefaultSize
,
306 long style
= wxNO_BORDER
,
307 const wxValidator
& validator
= wxDefaultValidator
);
310 void OnPaint(wxPaintEvent
& event
);
312 wxSize
DoGetBestSize() const ;
314 void SetBitmap(wxBitmap bmp
);
321 class ThemeCtrl
: public wxControl
323 DECLARE_DYNAMIC_CLASS(ThemeCtrl
)
324 DECLARE_EVENT_TABLE()
329 ID_INSTALLCHECKBOX
= 10003,
330 ID_PREVIEW_BITMAP
= 10004,
331 ID_THEME_LST
= 10005,
336 ThemeCtrl() { Init(); }
337 ThemeCtrl(wxWindow
* parent
, wxWindowID id
,
338 const wxPoint
& pos
= wxDefaultPosition
,
339 const wxSize
& size
= wxDefaultSize
,
340 long style
= wxNO_BORDER
,
341 const wxValidator
& validator
= wxDefaultValidator
)
344 Create(parent
, id
, pos
, size
, style
, validator
);
347 bool Create(wxWindow
* parent
, wxWindowID id
,
348 const wxPoint
& pos
= wxDefaultPosition
,
349 const wxSize
& size
= wxDefaultSize
,
350 long style
= wxNO_BORDER
,
351 const wxValidator
& validator
= wxDefaultValidator
);
353 // Creates the controls and sizers
354 void CreateControls();
355 // Common initialization
358 void OnThemesLst(wxCommandEvent
& event
);
359 void OnCheckBox(wxCommandEvent
& event
);
361 void setDevice(wxString device
);
362 wxArrayString
getThemesToInstall();
365 wxString m_currentimage
;
366 wxString m_currentResolution
;
368 wxStaticText
* m_desc
;
369 wxListBox
* m_themeList
;
370 wxStaticText
* m_size
;
371 wxStaticText
* m_themedesc
;
372 ImageCtrl
* m_PreviewBitmap
;
374 wxArrayString m_Themes
;
375 wxArrayString m_Themes_path
;
376 wxArrayString m_Themes_size
;
377 wxArrayString m_Themes_image
;
378 wxArrayString m_Themes_desc
;
380 wxCriticalSection m_setDeviceSection
;
381 wxCriticalSection m_ThemeSelectSection
;
385 class OkCancelCtrl
: public wxControl
387 DECLARE_DYNAMIC_CLASS(OkCancelCtrl
)
388 DECLARE_EVENT_TABLE()
392 OkCancelCtrl() { Init(); }
393 OkCancelCtrl(wxWindow
* parent
, wxWindowID id
,
394 const wxPoint
& pos
= wxDefaultPosition
,
395 const wxSize
& size
= wxDefaultSize
,
396 long style
= wxNO_BORDER
,
397 const wxValidator
& validator
= wxDefaultValidator
)
400 Create(parent
, id
, pos
, size
, style
, validator
);
403 bool Create(wxWindow
* parent
, wxWindowID id
,
404 const wxPoint
& pos
= wxDefaultPosition
,
405 const wxSize
& size
= wxDefaultSize
,
406 long style
= wxNO_BORDER
,
407 const wxValidator
& validator
= wxDefaultValidator
);
409 // Creates the controls and sizers
410 void CreateControls();
411 // Common initialization
416 wxButton
* m_CancelBtn
;
420 class DeviceSelectorCtrl
: public wxControl
422 DECLARE_DYNAMIC_CLASS(DeviceSelectorCtrl
)
423 DECLARE_EVENT_TABLE()
426 ID_DEVICE_CBX
= 10001,
427 ID_AUTODETECT_BTN
= 10002,
432 DeviceSelectorCtrl() { }
433 DeviceSelectorCtrl(wxWindow
* parent
, wxWindowID id
,bool bootmode
,
434 const wxPoint
& pos
= wxDefaultPosition
,
435 const wxSize
& size
= wxDefaultSize
,
436 long style
= wxNO_BORDER
,
437 const wxValidator
& validator
= wxDefaultValidator
)
439 Create(parent
, id
,bootmode
, pos
, size
, style
, validator
);
442 bool Create(wxWindow
* parent
, wxWindowID id
,bool bootmode
,
443 const wxPoint
& pos
= wxDefaultPosition
,
444 const wxSize
& size
= wxDefaultSize
,
445 long style
= wxNO_BORDER
,
446 const wxValidator
& validator
= wxDefaultValidator
);
448 // Creates the controls and sizers
449 void CreateControls(bool bootmode
);
451 void OnAutoDetect(wxCommandEvent
& event
);
452 void OnComboBox(wxCommandEvent
& event
);
454 wxString
getDevice();
458 wxString m_currentDevice
;
459 wxComboBox
* m_deviceCbx
;
460 wxStaticText
* m_desc
;
461 wxButton
* m_autodetectBtn
;
466 class DevicePositionCtrl
: public wxControl
468 DECLARE_DYNAMIC_CLASS(DevicePositionCtrl
)
469 DECLARE_EVENT_TABLE()
472 ID_BROWSE_BTN
= 10003,
477 DevicePositionCtrl() { Init(); }
478 DevicePositionCtrl(wxWindow
* parent
, wxWindowID id
,
479 const wxPoint
& pos
= wxDefaultPosition
,
480 const wxSize
& size
= wxDefaultSize
,
481 long style
= wxNO_BORDER
,
482 const wxValidator
& validator
= wxDefaultValidator
)
485 Create(parent
, id
, pos
, size
, style
, validator
);
488 bool Create(wxWindow
* parent
, wxWindowID id
,
489 const wxPoint
& pos
= wxDefaultPosition
,
490 const wxSize
& size
= wxDefaultSize
,
491 long style
= wxNO_BORDER
,
492 const wxValidator
& validator
= wxDefaultValidator
);
494 // Creates the controls and sizers
495 void CreateControls();
496 // Common initialization
499 void OnBrowseBtn(wxCommandEvent
& event
);
501 wxString
getDevicePos();
506 wxTextCtrl
* m_devicePos
;
507 wxStaticText
* m_desc
;
508 wxButton
* m_browseBtn
;
513 class FirmwarePositionCtrl
: public wxControl
515 DECLARE_DYNAMIC_CLASS(FirmwarePositionCtrl
)
516 DECLARE_EVENT_TABLE()
519 ID_BROWSE_BTN
= 10004,
524 FirmwarePositionCtrl() { Init(); }
525 FirmwarePositionCtrl(wxWindow
* parent
, wxWindowID id
,
526 const wxPoint
& pos
= wxDefaultPosition
,
527 const wxSize
& size
= wxDefaultSize
,
528 long style
= wxNO_BORDER
,
529 const wxValidator
& validator
= wxDefaultValidator
)
532 Create(parent
, id
, pos
, size
, style
, validator
);
535 bool Create(wxWindow
* parent
, wxWindowID id
,
536 const wxPoint
& pos
= wxDefaultPosition
,
537 const wxSize
& size
= wxDefaultSize
,
538 long style
= wxNO_BORDER
,
539 const wxValidator
& validator
= wxDefaultValidator
);
541 // Creates the controls and sizers
542 void CreateControls();
543 // Common initialization
546 void OnBrowseBtn(wxCommandEvent
& event
);
548 wxString
getFirmwarePos();
552 wxTextCtrl
* m_firmwarePos
;
553 wxStaticText
* m_desc
;
554 wxButton
* m_browseBtn
;