Cache was intended to be disabled per default. Also make the "disable download cache...
[Rockbox.git] / rbutil / rbutilCtrls.h
blob7998dc69a4bfd5b08a08b7c6112a7ca3035e8e17
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 wxPanel
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 ID_THEME_SELECT_ALL = 10006
54 }; //End of Enum
56 public:
57 // Constructors
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(""))
65 Init();
66 Create(parent, id, pos, size, style, title);
68 // Creation
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
78 void Init();
79 // Event handlers
80 void OnThemesLst(wxCommandEvent& event);
81 void OnSelectAll(wxCommandEvent& event);
82 void OnCheckBox(wxCommandEvent& event);
84 void setDevice(wxString device);
85 wxArrayString getThemesToInstall();
87 protected:
88 void ThemePreview(void);
90 wxString m_currentimage;
91 wxString m_currentResolution;
93 wxStaticText* m_desc;
94 wxListBox* m_themeList;
95 wxButton* m_selectAllThemes;
96 wxStaticText* m_size;
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()
113 public:
114 // Constructors
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(""))
122 Init();
123 Create(parent, id, pos, size, style, title);
125 // Creation
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
135 void Init() { }
137 protected:
138 wxButton* m_OkBtn;
139 wxButton* m_CancelBtn;
143 class DeviceSelectorCtrl: public wxPanel
145 DECLARE_DYNAMIC_CLASS(DeviceSelectorCtrl)
146 DECLARE_EVENT_TABLE()
147 public:
148 enum {
149 ID_DEVICE_CBX = 10001,
150 ID_AUTODETECT_BTN= 10002,
151 }; //End of Enum
153 public:
154 // Constructors
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);
164 // Creation
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();
173 // Event handlers
174 void OnAutoDetect(wxCommandEvent& event);
175 void OnComboBox(wxCommandEvent& event);
176 // Accessors
177 wxString getDevice();
178 void setDefault();
180 bool AutoDetect();
182 protected:
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()
195 public:
196 enum {
197 ID_BROWSE_BTN = 10003,
198 }; //End of Enum
200 public:
201 // Constructors
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(""))
209 Init();
210 Create(parent, id, pos, size, style, title);
212 // Creation
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
222 void Init() { }
223 // Event handlers
224 void OnBrowseBtn(wxCommandEvent& event);
225 // Accessors
226 wxString getDevicePos();
228 void setDefault();
230 protected:
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()
242 public:
243 enum {
244 ID_BROWSE_BTN = 10004,
245 }; //End of Enum
247 public:
248 // Constructors
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(""))
256 Init();
257 Create(parent, id, pos, size, style, title);
259 // Creation
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
269 void Init() { }
270 // Event handlers
271 void OnBrowseBtn(wxCommandEvent& event);
272 // Accessors
273 wxString getFirmwarePos();
274 void setDefault();
276 protected:
277 wxTextCtrl* m_firmwarePos;
278 wxStaticText* m_desc;
279 wxButton* m_browseBtn;
285 #endif