Hungarian translation update by Imre herceg (FS #6888)
[Rockbox.git] / rbutil / rbutilCtrls.h
blob89e2b0b3d1cf73e03ba532010dfdc1991c9dd424
1 #ifndef RBUTILCTRLS_H_INCLUDED
2 #define RBUTILCTRLS_H_INCLUDED
4 #include "rbutil.h"
7 class ImageCtrl: public wxControl
9 DECLARE_DYNAMIC_CLASS(ImageCtrl)
10 DECLARE_EVENT_TABLE()
12 public:
13 // Constructors
14 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);
23 // Creation
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);
30 // Event handlers
31 void OnPaint(wxPaintEvent& event);
33 wxSize DoGetBestSize() const ;
35 void SetBitmap(wxBitmap bmp);
37 protected:
38 wxBitmap m_bitmap;
42 class ThemeCtrl: public wxControl
44 DECLARE_DYNAMIC_CLASS(ThemeCtrl)
45 DECLARE_EVENT_TABLE()
46 public:
47 enum {
48 ID_DESC = 10001,
49 ID_FILESIZE= 10002,
50 ID_INSTALLCHECKBOX= 10003,
51 ID_PREVIEW_BITMAP = 10004,
52 ID_THEME_LST = 10005,
53 }; //End of Enum
55 public:
56 // Constructors
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)
64 Init();
65 Create(parent, id, pos, size, style, validator);
67 // Creation
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
77 void Init();
78 // Event handlers
79 void OnThemesLst(wxCommandEvent& event);
80 void OnCheckBox(wxCommandEvent& event);
82 void setDevice(wxString device);
83 wxArrayString getThemesToInstall();
85 protected:
86 wxString m_currentimage;
87 wxString m_currentResolution;
89 wxStaticText* m_desc;
90 wxListBox* m_themeList;
91 wxStaticText* m_size;
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()
108 public:
109 // Constructors
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)
117 Init();
118 Create(parent, id, pos, size, style, validator);
120 // Creation
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
130 void Init() { }
132 protected:
133 wxButton* m_OkBtn;
134 wxButton* m_CancelBtn;
138 class DeviceSelectorCtrl: public wxControl
140 DECLARE_DYNAMIC_CLASS(DeviceSelectorCtrl)
141 DECLARE_EVENT_TABLE()
142 public:
143 enum {
144 ID_DEVICE_CBX = 10001,
145 ID_AUTODETECT_BTN= 10002,
146 }; //End of Enum
148 public:
149 // Constructors
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);
159 // Creation
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();
168 // Event handlers
169 void OnAutoDetect(wxCommandEvent& event);
170 void OnComboBox(wxCommandEvent& event);
171 // Accessors
172 wxString getDevice();
173 void setDefault();
175 protected:
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()
188 public:
189 enum {
190 ID_BROWSE_BTN = 10003,
191 }; //End of Enum
193 public:
194 // Constructors
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)
202 Init();
203 Create(parent, id, pos, size, style, validator);
205 // Creation
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
215 void Init() { }
216 // Event handlers
217 void OnBrowseBtn(wxCommandEvent& event);
218 // Accessors
219 wxString getDevicePos();
221 void setDefault();
223 protected:
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()
235 public:
236 enum {
237 ID_BROWSE_BTN = 10004,
238 }; //End of Enum
240 public:
241 // Constructors
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)
249 Init();
250 Create(parent, id, pos, size, style, validator);
252 // Creation
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
262 void Init() { }
263 // Event handlers
264 void OnBrowseBtn(wxCommandEvent& event);
265 // Accessors
266 wxString getFirmwarePos();
267 void setDefault();
269 protected:
270 wxTextCtrl* m_firmwarePos;
271 wxStaticText* m_desc;
272 wxButton* m_browseBtn;
278 #endif
280 #ifndef RBUTILCTRLS_H_INCLUDED
281 #define RBUTILCTRLS_H_INCLUDED
283 #include "rbutil.h"
286 class ImageCtrl: public wxControl
288 DECLARE_DYNAMIC_CLASS(ImageCtrl)
289 DECLARE_EVENT_TABLE()
291 public:
292 // Constructors
293 ImageCtrl() { }
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);
302 // Creation
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);
309 // Event handlers
310 void OnPaint(wxPaintEvent& event);
312 wxSize DoGetBestSize() const ;
314 void SetBitmap(wxBitmap bmp);
316 protected:
317 wxBitmap m_bitmap;
321 class ThemeCtrl: public wxControl
323 DECLARE_DYNAMIC_CLASS(ThemeCtrl)
324 DECLARE_EVENT_TABLE()
325 public:
326 enum {
327 ID_DESC = 10001,
328 ID_FILESIZE= 10002,
329 ID_INSTALLCHECKBOX= 10003,
330 ID_PREVIEW_BITMAP = 10004,
331 ID_THEME_LST = 10005,
332 }; //End of Enum
334 public:
335 // Constructors
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)
343 Init();
344 Create(parent, id, pos, size, style, validator);
346 // Creation
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
356 void Init();
357 // Event handlers
358 void OnThemesLst(wxCommandEvent& event);
359 void OnCheckBox(wxCommandEvent& event);
361 void setDevice(wxString device);
362 wxArrayString getThemesToInstall();
364 protected:
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()
390 public:
391 // Constructors
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)
399 Init();
400 Create(parent, id, pos, size, style, validator);
402 // Creation
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
412 void Init() { }
414 protected:
415 wxButton* m_OkBtn;
416 wxButton* m_CancelBtn;
420 class DeviceSelectorCtrl: public wxControl
422 DECLARE_DYNAMIC_CLASS(DeviceSelectorCtrl)
423 DECLARE_EVENT_TABLE()
424 public:
425 enum {
426 ID_DEVICE_CBX = 10001,
427 ID_AUTODETECT_BTN= 10002,
428 }; //End of Enum
430 public:
431 // Constructors
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);
441 // Creation
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);
450 // Event handlers
451 void OnAutoDetect(wxCommandEvent& event);
452 void OnComboBox(wxCommandEvent& event);
453 // Accessors
454 wxString getDevice();
455 void setDefault();
457 protected:
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()
470 public:
471 enum {
472 ID_BROWSE_BTN = 10003,
473 }; //End of Enum
475 public:
476 // Constructors
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)
484 Init();
485 Create(parent, id, pos, size, style, validator);
487 // Creation
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
497 void Init() { }
498 // Event handlers
499 void OnBrowseBtn(wxCommandEvent& event);
500 // Accessors
501 wxString getDevicePos();
503 void setDefault();
505 protected:
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()
517 public:
518 enum {
519 ID_BROWSE_BTN = 10004,
520 }; //End of Enum
522 public:
523 // Constructors
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)
531 Init();
532 Create(parent, id, pos, size, style, validator);
534 // Creation
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
544 void Init() { }
545 // Event handlers
546 void OnBrowseBtn(wxCommandEvent& event);
547 // Accessors
548 wxString getFirmwarePos();
549 void setDefault();
551 protected:
552 wxTextCtrl* m_firmwarePos;
553 wxStaticText* m_desc;
554 wxButton* m_browseBtn;
560 #endif