]> git.saurik.com Git - wxWidgets.git/blob - utils/screenshotgen/src/guiframe.cpp
fix doxygen warnings
[wxWidgets.git] / utils / screenshotgen / src / guiframe.cpp
1 ///////////////////////////////////////////////////////////////////////////
2 // C++ code generated with wxFormBuilder (version Apr 21 2008)
3 // http://www.wxformbuilder.org/
4 //
5 // PLEASE DO "NOT" EDIT THIS FILE!
6 ///////////////////////////////////////////////////////////////////////////
7
8 // ----------------------------------------------------------------------------
9 // headers
10 // ----------------------------------------------------------------------------
11
12 // For compilers that support precompilation, includes "wx/wx.h".
13 #include "wx/wxprec.h"
14
15 #ifdef __BORLANDC__
16 #pragma hdrstop
17 #endif
18
19 // for all others, include the necessary headers wxWidgets headers)
20 #ifndef WX_PRECOMP
21 #include "wx/wx.h"
22 #endif
23
24 #include "bitmaps/play.xpm"
25 #include "bitmaps/stop.xpm"
26
27
28 #include "guiframe.h"
29
30 ///////////////////////////////////////////////////////////////////////////
31
32 GUIFrame::GUIFrame( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxFrame( parent, id, title, pos, size, style )
33 {
34 this->SetSizeHints( wxDefaultSize, wxDefaultSize );
35
36 mbar = new wxMenuBar( 0 );
37 fileMenu = new wxMenu();
38 wxMenuItem* m_menuSeeScr;
39 m_menuSeeScr = new wxMenuItem( fileMenu, wxID_ZOOM_IN, wxString( _("&Open screenshots folder...") ) + wxT('\t') + wxT("Ctrl+O"), _("Opens the directory where the screenshots are saved."), wxITEM_NORMAL );
40 fileMenu->Append( m_menuSeeScr );
41
42 fileMenu->AppendSeparator();
43
44 wxMenuItem* m_menuFileQuit;
45 m_menuFileQuit = new wxMenuItem( fileMenu, wxID_EXIT, wxString( _("&Quit") ) + wxT('\t') + wxT("Alt+F4"), _("Quits the application."), wxITEM_NORMAL );
46 fileMenu->Append( m_menuFileQuit );
47
48 mbar->Append( fileMenu, _("&File") );
49
50 captureMenu = new wxMenu();
51 wxMenuItem* m_menuCapFullScreen;
52 m_menuCapFullScreen = new wxMenuItem( captureMenu, idMenuCapFullScreen, wxString( _("&Full Screen") ) + wxT('\t') + wxT("Ctrl+Alt+F"), _("Takes a screenshot of the entire screen."), wxITEM_NORMAL );
53 captureMenu->Append( m_menuCapFullScreen );
54
55 wxMenuItem* m_menuCapRect;
56 m_menuCapRect = new wxMenuItem( captureMenu, idMenuCapRect, wxString( _("Regions<Begin>") ) + wxT('\t') + wxT("Ctrl+Alt+R"), _("Manually specify rectangular regions for the screenshots."), wxITEM_NORMAL );
57 #ifdef __WXMSW__
58 m_menuCapRect->SetBitmaps( wxICON( play ) );
59 #elif defined( __WXGTK__ )
60 m_menuCapRect->SetBitmap( wxICON( play ) );
61 #endif
62 captureMenu->Append( m_menuCapRect );
63
64 wxMenuItem* m_menuEndCapRect;
65 m_menuEndCapRect = new wxMenuItem( captureMenu, idMenuEndCapRect, wxString( _("Regions<End>") ) + wxT('\t') + wxT("Ctrl+Alt+E"), _("Stop manually generating screenshots."), wxITEM_NORMAL );
66 #ifdef __WXMSW__
67 m_menuEndCapRect->SetBitmaps( wxICON( stop ) );
68 #elif defined( __WXGTK__ )
69 m_menuEndCapRect->SetBitmap( wxICON( stop ) );
70 #endif
71 captureMenu->Append( m_menuEndCapRect );
72 m_menuEndCapRect->Enable( false );
73
74 wxMenuItem* m_menuCapAll;
75 m_menuCapAll = new wxMenuItem( captureMenu, idMenuCapAll, wxString( _("Capture All") ) + wxT('\t') + wxT("Ctrl+Alt+A"), _("Takes screenshots for all controls automatically."), wxITEM_NORMAL );
76 captureMenu->Append( m_menuCapAll );
77
78 mbar->Append( captureMenu, _("&Capture") );
79
80 helpMenu = new wxMenu();
81 wxMenuItem* m_menuHelpAbout;
82 m_menuHelpAbout = new wxMenuItem( helpMenu, wxID_ABOUT, wxString( _("&About...") ) + wxT('\t') + wxT("F1"), _("Shows info about this application."), wxITEM_NORMAL );
83 helpMenu->Append( m_menuHelpAbout );
84
85 mbar->Append( helpMenu, _("&Help") );
86
87 this->SetMenuBar( mbar );
88
89 wxBoxSizer* bSizer0;
90 bSizer0 = new wxBoxSizer( wxVERTICAL );
91
92 m_notebook1 = new wxNotebook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
93 m_panel1 = new wxPanel( m_notebook1, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
94 wxFlexGridSizer* fgSizer1;
95 fgSizer1 = new wxFlexGridSizer( 5, 2, 0, 0 );
96 fgSizer1->SetFlexibleDirection( wxBOTH );
97 fgSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_NONE );
98
99 m_button1 = new wxButton( m_panel1, wxID_ANY, _("wxButton"), wxDefaultPosition, wxDefaultSize, 0 );
100 fgSizer1->Add( m_button1, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 20 );
101
102 m_staticText1 = new wxStaticText( m_panel1, wxID_ANY, _("wxStaticText"), wxDefaultPosition, wxDefaultSize, 0 );
103 m_staticText1->Wrap( -1 );
104 fgSizer1->Add( m_staticText1, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 20 );
105
106 m_checkBox1 = new wxCheckBox( m_panel1, wxID_ANY, _("Checked"), wxDefaultPosition, wxDefaultSize, 0 );
107 m_checkBox1->SetValue(true);
108
109 m_checkBox1->SetToolTip( _("wxCheckBox") );
110
111 fgSizer1->Add( m_checkBox1, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 20 );
112
113 m_checkBox2 = new wxCheckBox( m_panel1, wxID_ANY, _("Unchecked"), wxDefaultPosition, wxDefaultSize, 0 );
114
115 m_checkBox2->SetToolTip( _("wxCheckBox") );
116
117 fgSizer1->Add( m_checkBox2, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 20 );
118
119 m_radioBtn1 = new wxRadioButton( m_panel1, wxID_ANY, _("Checked"), wxDefaultPosition, wxDefaultSize, 0 );
120 m_radioBtn1->SetValue( true );
121 m_radioBtn1->SetToolTip( _("wxRadioButton") );
122
123 fgSizer1->Add( m_radioBtn1, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 20 );
124
125 m_radioBtn2 = new wxRadioButton( m_panel1, wxID_ANY, _("Unchecked"), wxDefaultPosition, wxDefaultSize, 0 );
126 m_radioBtn2->SetToolTip( _("wxRadioButton") );
127
128 fgSizer1->Add( m_radioBtn2, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 20 );
129
130 m_bpButton1 = new wxBitmapButton( m_panel1, wxID_ANY, wxBitmap( wxT("bitmaps/wxwin32x32.png"), wxBITMAP_TYPE_ANY ), wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW );
131 m_bpButton1->SetToolTip( _("wxBitmapButton") );
132
133 m_bpButton1->SetToolTip( _("wxBitmapButton") );
134
135 fgSizer1->Add( m_bpButton1, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 20 );
136
137 m_bitmap1 = new wxStaticBitmap( m_panel1, wxID_ANY, wxBitmap( wxT("bitmaps/wxwin32x32.png"), wxBITMAP_TYPE_ANY ), wxDefaultPosition, wxDefaultSize, 0 );
138 m_bitmap1->SetToolTip( _("wxStaticBitmap") );
139
140 fgSizer1->Add( m_bitmap1, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 20 );
141
142 m_gauge1 = new wxGauge( m_panel1, wxID_ANY, 100, wxDefaultPosition, wxDefaultSize, wxGA_HORIZONTAL, wxDefaultValidator, wxT("_Gauge") );
143 m_gauge1->SetValue( 50 );
144 m_gauge1->SetToolTip( _("wxGauge") );
145
146 fgSizer1->Add( m_gauge1, 1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 20 );
147
148 m_slider1 = new wxSlider( m_panel1, wxID_ANY, 50, 0, 100, wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL );
149 m_slider1->SetToolTip( _("wxSlider") );
150
151 fgSizer1->Add( m_slider1, 1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 20 );
152
153 m_toggleBtn1 = new wxToggleButton( m_panel1, wxID_ANY, _("Untoggled"), wxDefaultPosition, wxDefaultSize, 0 );
154 m_toggleBtn1->SetToolTip( _("wxToggleButton") );
155
156 fgSizer1->Add( m_toggleBtn1, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 20 );
157
158 m_toggleBtn2 = new wxToggleButton( m_panel1, wxID_ANY, _("Toggled"), wxDefaultPosition, wxDefaultSize, 0 );
159 m_toggleBtn2->SetValue( true );
160 m_toggleBtn2->SetToolTip( _("wxToggleButton") );
161
162 fgSizer1->Add( m_toggleBtn2, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 20 );
163
164 m_hyperlink1 = new wxHyperlinkCtrl( m_panel1, wxID_ANY, _("www.wxwidgets.org"), wxT("http://www.wxwidgets.org"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE );
165 m_hyperlink1->SetToolTip( _("wxHyperlinkCtrl") );
166
167 fgSizer1->Add( m_hyperlink1, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 20 );
168
169 m_spinCtrl1 = new wxSpinCtrl( m_panel1, wxID_ANY, wxT("5"), wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 0, 10, 0 );
170 m_spinCtrl1->SetToolTip( _("wxSpinCtrl") );
171
172 fgSizer1->Add( m_spinCtrl1, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 20 );
173
174 m_spinBtn1 = new wxSpinButton( m_panel1, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
175 m_spinBtn1->SetToolTip( _("wxSpinButton") );
176
177 fgSizer1->Add( m_spinBtn1, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 20 );
178
179 m_scrollBar1 = new wxScrollBar( m_panel1, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSB_HORIZONTAL );
180 m_scrollBar1->SetToolTip( _("wxScrollBar") );
181
182 fgSizer1->Add( m_scrollBar1, 1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 20 );
183
184 m_panel1->SetSizer( fgSizer1 );
185 m_panel1->Layout();
186 fgSizer1->Fit( m_panel1 );
187 m_notebook1->AddPage( m_panel1, _("Tiny Controls"), true );
188 m_panel2 = new wxPanel( m_notebook1, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
189 wxFlexGridSizer* fgSizer2;
190 fgSizer2 = new wxFlexGridSizer( 5, 2, 0, 0 );
191 fgSizer2->SetFlexibleDirection( wxBOTH );
192 fgSizer2->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
193
194 wxString m_checkList1Choices[] = { _("wxCheckListBox"), _("Item1"), _("Item2") };
195 int m_checkList1NChoices = sizeof( m_checkList1Choices ) / sizeof( wxString );
196 m_checkList1 = new wxCheckListBox( m_panel2, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_checkList1NChoices, m_checkList1Choices, 0 );
197 fgSizer2->Add( m_checkList1, 1, wxALL|wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 20 );
198
199 m_listBox1 = new wxListBox( m_panel2, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 );
200 m_listBox1->Append( _("wxListBox") );
201 m_listBox1->Append( _("Item1") );
202 m_listBox1->Append( _("Item2") );
203 fgSizer2->Add( m_listBox1, 1, wxALL|wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 20 );
204
205 wxString m_radioBox1Choices[] = { _("Item1"), _("Item2") };
206 int m_radioBox1NChoices = sizeof( m_radioBox1Choices ) / sizeof( wxString );
207 m_radioBox1 = new wxRadioBox( m_panel2, wxID_ANY, _("wxRadioBox"), wxDefaultPosition, wxDefaultSize, m_radioBox1NChoices, m_radioBox1Choices, 1, wxRA_SPECIFY_COLS );
208 m_radioBox1->SetSelection( 0 );
209 fgSizer2->Add( m_radioBox1, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 20 );
210
211 m_staticBox1 = new wxStaticBox(m_panel2,wxID_ANY, _("wxStaticBox"), wxDefaultPosition, wxDefaultSize, 0, _("_StaticBox"));
212
213
214 fgSizer2->Add( m_staticBox1, 1, wxALL|wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 20 );
215
216 m_treeCtrl1 = new wxTreeCtrl( m_panel2, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTR_DEFAULT_STYLE|wxSUNKEN_BORDER );
217 fgSizer2->Add( m_treeCtrl1, 1, wxALL|wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 20 );
218
219 m_listCtrl1 = new wxListCtrl( m_panel2, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0|wxSUNKEN_BORDER );
220 m_listCtrl1->SetToolTip( _("wxListCtrl") );
221
222 fgSizer2->Add( m_listCtrl1, 1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 20 );
223
224 m_animationCtrl1 = new wxAnimationCtrl(m_panel2, wxID_ANY);
225 m_animationCtrl1->SetToolTip(_("wxAnimationCtrl"));
226 if (m_animationCtrl1->LoadFile(wxT("bitmaps/throbber.gif")))
227 m_animationCtrl1->Play();
228 fgSizer2->Add( m_animationCtrl1, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 20 );
229
230 m_collPane1 = new wxCollapsiblePane(m_panel2, -1, wxT("Collapsed"));
231 wxWindow *win = m_collPane1->GetPane();
232 m_collPane1->SetToolTip(_("wxCollapsiblePane"));
233
234 wxBoxSizer * collbSizer = new wxBoxSizer(wxVERTICAL);
235 wxStaticText* m_collSText = new wxStaticText(win, -1, wxT("You can place"));
236 wxButton* m_collBut = new wxButton(win, -1, wxT("anything"));
237 wxTextCtrl* m_collText = new wxTextCtrl(win, -1, wxT("inside a wxCollapsiblePane"));
238 collbSizer->Add( m_collSText, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 0 );
239 collbSizer->Add( m_collBut, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 0 );
240 collbSizer->Add( m_collText, 0, wxALL|wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 0 );
241 win->SetSizer(collbSizer);
242 fgSizer2->Add( m_collPane1, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
243
244 m_collPane2 = new wxCollapsiblePane(m_panel2, -1, wxT("Expanded"));
245 wxWindow *win2 = m_collPane2->GetPane();
246 m_collPane2->SetToolTip(_("wxCollapsiblePane"));
247
248 wxBoxSizer * collbSizer2 = new wxBoxSizer(wxVERTICAL);
249 wxStaticText* m_collSText2 = new wxStaticText(win2, -1, wxT("You can place"));
250 wxButton* m_collBut2 = new wxButton(win2, -1, wxT("anything"));
251 wxTextCtrl* m_collText2 = new wxTextCtrl(win2, -1, wxT("inside a wxCollapsiblePane"));
252 collbSizer2->Add( m_collSText2, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 0 );
253 collbSizer2->Add( m_collBut2, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 0 );
254 collbSizer2->Add( m_collText2, 0, wxALL|wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 0 );
255 win2->SetSizer(collbSizer2);
256
257 m_collPane2->Expand();
258 fgSizer2->Add( m_collPane2, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
259
260 m_panel2->SetSizer( fgSizer2 );
261 m_panel2->Layout();
262 fgSizer2->Fit( m_panel2 );
263 m_notebook1->AddPage( m_panel2, _("Multiple choice Controls"), false );
264 m_panel3 = new wxPanel( m_notebook1, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
265 wxBoxSizer* bSizer2;
266 bSizer2 = new wxBoxSizer( wxVERTICAL );
267
268 m_textCtrl1 = new wxTextCtrl( m_panel3, wxID_ANY, _("Single-line"), wxDefaultPosition, wxDefaultSize, 0 );
269 m_textCtrl1->SetToolTip( _("wxTextCtrl") );
270
271 bSizer2->Add( m_textCtrl1, 0, wxTOP|wxRIGHT|wxLEFT, 20 );
272
273
274 bSizer2->Add( 0, 10, 0, 0, 5 );
275
276 m_textCtrl2 = new wxTextCtrl( m_panel3, wxID_ANY, _("Multi-line\nLine1\nLine2\n"), wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE );
277 m_textCtrl2->SetToolTip( _("wxTextCtrl") );
278
279 bSizer2->Add( m_textCtrl2, 0, wxBOTTOM|wxRIGHT|wxLEFT, 20 );
280
281 m_richText1 = new wxRichTextCtrl( m_panel3, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1,-1 ), 0|wxVSCROLL|wxHSCROLL|wxNO_BORDER|wxWANTS_CHARS );
282 m_richText1->SetToolTip( _("wxRichTextCtrl") );
283 m_richText1->SetMinSize( wxSize( 200,200 ) );
284
285 bSizer2->Add( m_richText1, 0, wxALL, 20 );
286
287 m_panel3->SetSizer( bSizer2 );
288 m_panel3->Layout();
289 bSizer2->Fit( m_panel3 );
290 m_notebook1->AddPage( m_panel3, _("[Rich]Text Controls"), false );
291 m_panel4 = new wxPanel( m_notebook1, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
292 wxFlexGridSizer* fgSizer5;
293 fgSizer5 = new wxFlexGridSizer( 2, 2, 10, 10 );
294 fgSizer5->SetFlexibleDirection( wxBOTH );
295 fgSizer5->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
296
297 m_colourPicker1 = new wxColourPickerCtrl( m_panel4, wxID_ANY, *wxBLACK, wxDefaultPosition, wxDefaultSize, wxCLRP_DEFAULT_STYLE );
298 m_colourPicker1->SetToolTip( _("wxColourPickerCtrl") );
299
300 fgSizer5->Add( m_colourPicker1, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 20 );
301
302 m_fontPicker1 = new wxFontPickerCtrl( m_panel4, wxID_ANY, wxNullFont, wxDefaultPosition, wxDefaultSize, wxFNTP_DEFAULT_STYLE );
303 m_fontPicker1->SetMaxPointSize( 100 );
304 m_fontPicker1->SetToolTip( _("wxFontPickerCtrl") );
305
306 fgSizer5->Add( m_fontPicker1, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 20 );
307
308 m_filePicker1 = new wxFilePickerCtrl( m_panel4, wxID_ANY, wxEmptyString, _("Select a file"), wxT("*.*"), wxDefaultPosition, wxDefaultSize, wxFLP_DEFAULT_STYLE, wxDefaultValidator, wxT("_FilePickerCtrl") );
309 m_filePicker1->SetToolTip( _("wxFilePickerCtrl") );
310
311 fgSizer5->Add( m_filePicker1, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 20 );
312
313
314 fgSizer5->Add( 0, 0, 1, wxEXPAND, 5 );
315
316 m_calendar1 = new wxCalendarCtrl( m_panel4, wxID_ANY, wxDefaultDateTime, wxDefaultPosition, wxDefaultSize, wxCAL_SHOW_HOLIDAYS );
317 m_calendar1->SetToolTip( _("wxCalendarCtrl") );
318
319 fgSizer5->Add( m_calendar1, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 20 );
320
321 m_datePicker1 = new wxDatePickerCtrl( m_panel4, wxID_ANY, wxDefaultDateTime, wxDefaultPosition, wxDefaultSize, wxDP_DEFAULT );
322 m_datePicker1->SetToolTip( _("wxDatePickerCtrl") );
323
324 fgSizer5->Add( m_datePicker1, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 20 );
325
326 m_genericDirCtrl1 = new wxGenericDirCtrl( m_panel4, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxDIRCTRL_3D_INTERNAL|wxSUNKEN_BORDER, wxEmptyString, 0, wxT("_GenericDirCtrl") );
327
328 m_genericDirCtrl1->ShowHidden( false );
329 m_genericDirCtrl1->SetToolTip( _("wxGenericDirCtrl") );
330 m_genericDirCtrl1->SetMinSize( wxSize( -1,150 ) );
331
332 fgSizer5->Add( m_genericDirCtrl1, 1, wxEXPAND|wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 20 );
333
334 m_dirPicker1 = new wxDirPickerCtrl( m_panel4, wxID_ANY, wxEmptyString, _("Select a folder"), wxDefaultPosition, wxDefaultSize, wxDIRP_DEFAULT_STYLE, wxDefaultValidator, wxT("_DirPickerCtrl") );
335 m_dirPicker1->SetToolTip( _("wxDirPickerCtrl") );
336
337 fgSizer5->Add( m_dirPicker1, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 20 );
338
339 m_panel4->SetSizer( fgSizer5 );
340 m_panel4->Layout();
341 fgSizer5->Fit( m_panel4 );
342 m_notebook1->AddPage( m_panel4, _("Picker Controls"), false );
343 m_panel5 = new wxPanel( m_notebook1, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
344 wxFlexGridSizer* fgSizer4;
345 fgSizer4 = new wxFlexGridSizer( 2, 2, 0, 0 );
346 fgSizer4->SetFlexibleDirection( wxBOTH );
347 fgSizer4->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
348
349 wxString m_choice1Choices[] = { _("wxChoice"), _("Item1"), _("Item2"), _("Item3"), _("Item4") };
350 int m_choice1NChoices = sizeof( m_choice1Choices ) / sizeof( wxString );
351 m_choice1 = new wxChoice( m_panel5, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choice1NChoices, m_choice1Choices, 0 );
352 m_choice1->SetSelection( 0 );
353 fgSizer4->Add( m_choice1, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 20 );
354
355 m_comboBox1 = new wxComboBox( m_panel5, wxID_ANY, _("wxComboBox"), wxDefaultPosition, wxDefaultSize, 0, NULL, 0 );
356 m_comboBox1->Append( _("wxComboBox") );
357 m_comboBox1->Append( _("Item1") );
358 m_comboBox1->Append( _("Item2") );
359 m_comboBox1->Append( _("Item3") );
360 m_comboBox1->Append( _("Item4") );
361 fgSizer4->Add( m_comboBox1, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 20 );
362
363
364 fgSizer4->Add( 0, 120, 1, wxEXPAND, 5 );
365
366
367 fgSizer4->Add( 0, 120, 1, wxEXPAND, 5 );
368
369 m_bmpComboBox1 = new wxBitmapComboBox(m_panel5, wxID_ANY,_("Item1"));
370 m_bmpComboBox1->Append(_("Item1"), wxBitmap(_T("bitmaps/bell.png"),wxBITMAP_TYPE_PNG));
371 m_bmpComboBox1->Append(_("Item2"), wxBitmap(_T("bitmaps/sound.png"),wxBITMAP_TYPE_PNG));
372 m_bmpComboBox1->Append(_("Item3"), wxBitmap(_T("bitmaps/bell.png"),wxBITMAP_TYPE_PNG));
373 m_bmpComboBox1->Append(_("Item4"), wxBitmap(_T("bitmaps/sound.png"),wxBITMAP_TYPE_PNG));
374 m_bmpComboBox1->SetToolTip(_("wxBitmapComboBox"));
375 fgSizer4->Add( m_bmpComboBox1, 1, wxALL|wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 20 );
376
377 m_ownerDrawnComboBox1 = PenStyleComboBox::CreateSample(m_panel5);
378 m_ownerDrawnComboBox1->SetToolTip(_("wxOwnerDrawnComboBox"));
379 fgSizer4->Add( m_ownerDrawnComboBox1, 1, wxALL|wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 20 );
380
381
382 fgSizer4->Add( 0, 90, 1, wxEXPAND, 5 );
383
384
385 fgSizer4->Add( 0, 90, 1, wxEXPAND, 5 );
386
387 m_comboCtrl1 = new wxComboCtrl(m_panel5,wxID_ANY,wxEmptyString);
388 // first of all, set the popup control!
389 ListViewComboPopup* popupList = new ListViewComboPopup();
390 m_comboCtrl1->SetPopupControl(popupList);
391 m_comboCtrl1->SetPopupMaxHeight(80);
392
393 m_comboCtrl1->SetText(wxT("wxComboCtrl"));
394 m_comboCtrl1->SetToolTip(_("wxComboCtrl"));
395
396 // Populate using wxListView methods
397 popupList->InsertItem(popupList->GetItemCount(),wxT("wxComboCtrl"));
398 popupList->InsertItem(popupList->GetItemCount(),wxT("with"));
399 popupList->InsertItem(popupList->GetItemCount(),wxT("wxListView"));
400 popupList->InsertItem(popupList->GetItemCount(),wxT("popup"));
401 popupList->InsertItem(popupList->GetItemCount(),wxT("Item1"));
402 popupList->InsertItem(popupList->GetItemCount(),wxT("Item2"));
403 popupList->InsertItem(popupList->GetItemCount(),wxT("Item3"));
404
405 popupList->Select(0, true);
406 fgSizer4->Add( m_comboCtrl1, 1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 20 );
407
408 m_comboCtrl2 = new wxComboCtrl(m_panel5,wxID_ANY,wxEmptyString);
409 // first of all, set the popup control!
410 TreeCtrlComboPopup* popupTree = new TreeCtrlComboPopup();
411 m_comboCtrl2->SetPopupControl(popupTree);
412 m_comboCtrl2->SetPopupMaxHeight(80);
413
414 m_comboCtrl2->SetText(wxT("wxComboCtrl"));
415 m_comboCtrl2->SetToolTip(_("wxComboCtrl"));
416
417 //Add a root and some nodes using wxTreeCtrl methods
418 wxTreeItemId root = popupTree->AddRoot(_("wxComboCtrl"));
419
420 popupTree->AppendItem(root, _("with"));
421 popupTree->AppendItem(root, _("wxTreeCtrl"));
422
423 wxTreeItemId node2 = popupTree->AppendItem(root, _("popout"));
424 popupTree->AppendItem(node2, _("Node1"));
425 popupTree->AppendItem(node2, _("Node2"));
426
427 popupTree->ExpandAll();
428 fgSizer4->Add( m_comboCtrl2, 1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 20 );
429
430 m_panel5->SetSizer( fgSizer4 );
431 m_panel5->Layout();
432 fgSizer4->Fit( m_panel5 );
433 m_notebook1->AddPage( m_panel5, _("Drop-down Controls"), false );
434
435 bSizer0->Add( m_notebook1, 1, wxEXPAND | wxALL, 0 );
436
437 this->SetSizer( bSizer0 );
438 this->Layout();
439 bSizer0->Fit( this );
440 statusBar = this->CreateStatusBar( 1, wxST_SIZEGRIP, wxID_ANY );
441
442 // Connect Events
443 this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( GUIFrame::OnClose ) );
444 this->Connect( m_menuSeeScr->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( GUIFrame::OnSeeScreenshots ) );
445 this->Connect( m_menuFileQuit->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( GUIFrame::OnQuit ) );
446 this->Connect( m_menuCapFullScreen->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( GUIFrame::OnCaptureFullScreen ) );
447 this->Connect( m_menuCapRect->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( GUIFrame::OnCaptureRect ) );
448 this->Connect( m_menuEndCapRect->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( GUIFrame::OnEndCaptureRect ) );
449 this->Connect( m_menuCapAll->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( GUIFrame::OnCaptureAllControls ) );
450 this->Connect( m_menuHelpAbout->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( GUIFrame::OnAbout ) );
451 m_notebook1->Connect( wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED, wxNotebookEventHandler( GUIFrame::OnNotebookPageChanged ), NULL, this );
452 m_notebook1->Connect( wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING, wxNotebookEventHandler( GUIFrame::OnNotebookPageChanging ), NULL, this );
453 }
454
455 GUIFrame::~GUIFrame()
456 {
457 // Disconnect Events
458 this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( GUIFrame::OnClose ) );
459 this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( GUIFrame::OnSeeScreenshots ) );
460 this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( GUIFrame::OnQuit ) );
461 this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( GUIFrame::OnCaptureFullScreen ) );
462 this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( GUIFrame::OnCaptureRect ) );
463 this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( GUIFrame::OnEndCaptureRect ) );
464 this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( GUIFrame::OnCaptureAllControls ) );
465 this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( GUIFrame::OnAbout ) );
466 m_notebook1->Disconnect( wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED, wxNotebookEventHandler( GUIFrame::OnNotebookPageChanged ), NULL, this );
467 m_notebook1->Disconnect( wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING, wxNotebookEventHandler( GUIFrame::OnNotebookPageChanging ), NULL, this );
468 }