1 ///////////////////////////////////////////////////////////////////////////
2 // C++ code generated with wxFormBuilder (version Apr 21 2008)
3 // http://www.wxformbuilder.org/
5 // PLEASE DO "NOT" EDIT THIS FILE!
6 ///////////////////////////////////////////////////////////////////////////
8 // ----------------------------------------------------------------------------
10 // ----------------------------------------------------------------------------
12 // For compilers that support precompilation, includes "wx/wx.h".
13 #include "wx/wxprec.h"
19 // for all others, include the necessary headers wxWidgets headers)
24 #include "bitmaps/play.xpm"
25 #include "bitmaps/stop.xpm"
30 ///////////////////////////////////////////////////////////////////////////
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
)
34 this->SetSizeHints( wxDefaultSize
, wxDefaultSize
);
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
);
42 fileMenu
->AppendSeparator();
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
);
48 mbar
->Append( fileMenu
, _("&File") );
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
);
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
);
58 m_menuCapRect
->SetBitmaps( wxICON( play
) );
59 #elif defined( __WXGTK__ )
60 m_menuCapRect
->SetBitmap( wxICON( play
) );
62 captureMenu
->Append( m_menuCapRect
);
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
);
67 m_menuEndCapRect
->SetBitmaps( wxICON( stop
) );
68 #elif defined( __WXGTK__ )
69 m_menuEndCapRect
->SetBitmap( wxICON( stop
) );
71 captureMenu
->Append( m_menuEndCapRect
);
72 m_menuEndCapRect
->Enable( false );
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
);
78 mbar
->Append( captureMenu
, _("&Capture") );
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
);
85 mbar
->Append( helpMenu
, _("&Help") );
87 this->SetMenuBar( mbar
);
90 bSizer0
= new wxBoxSizer( wxVERTICAL
);
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
);
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 );
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 );
106 m_checkBox1
= new wxCheckBox( m_panel1
, wxID_ANY
, _("Checked"), wxDefaultPosition
, wxDefaultSize
, 0 );
107 m_checkBox1
->SetValue(true);
109 m_checkBox1
->SetToolTip( _("wxCheckBox") );
111 fgSizer1
->Add( m_checkBox1
, 0, wxALL
|wxALIGN_CENTER_HORIZONTAL
|wxALIGN_CENTER_VERTICAL
, 20 );
113 m_checkBox2
= new wxCheckBox( m_panel1
, wxID_ANY
, _("Unchecked"), wxDefaultPosition
, wxDefaultSize
, 0 );
115 m_checkBox2
->SetToolTip( _("wxCheckBox") );
117 fgSizer1
->Add( m_checkBox2
, 0, wxALL
|wxALIGN_CENTER_VERTICAL
|wxALIGN_CENTER_HORIZONTAL
, 20 );
119 m_radioBtn1
= new wxRadioButton( m_panel1
, wxID_ANY
, _("Checked"), wxDefaultPosition
, wxDefaultSize
, 0 );
120 m_radioBtn1
->SetValue( true );
121 m_radioBtn1
->SetToolTip( _("wxRadioButton") );
123 fgSizer1
->Add( m_radioBtn1
, 0, wxALL
|wxALIGN_CENTER_HORIZONTAL
|wxALIGN_CENTER_VERTICAL
, 20 );
125 m_radioBtn2
= new wxRadioButton( m_panel1
, wxID_ANY
, _("Unchecked"), wxDefaultPosition
, wxDefaultSize
, 0 );
126 m_radioBtn2
->SetToolTip( _("wxRadioButton") );
128 fgSizer1
->Add( m_radioBtn2
, 0, wxALL
|wxALIGN_CENTER_HORIZONTAL
|wxALIGN_CENTER_VERTICAL
, 20 );
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") );
133 m_bpButton1
->SetToolTip( _("wxBitmapButton") );
135 fgSizer1
->Add( m_bpButton1
, 0, wxALL
|wxALIGN_CENTER_HORIZONTAL
|wxALIGN_CENTER_VERTICAL
, 20 );
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") );
140 fgSizer1
->Add( m_bitmap1
, 0, wxALL
|wxALIGN_CENTER_HORIZONTAL
|wxALIGN_CENTER_VERTICAL
, 20 );
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") );
146 fgSizer1
->Add( m_gauge1
, 1, wxALL
|wxALIGN_CENTER_HORIZONTAL
|wxALIGN_CENTER_VERTICAL
|wxEXPAND
, 20 );
148 m_slider1
= new wxSlider( m_panel1
, wxID_ANY
, 50, 0, 100, wxDefaultPosition
, wxDefaultSize
, wxSL_HORIZONTAL
);
149 m_slider1
->SetToolTip( _("wxSlider") );
151 fgSizer1
->Add( m_slider1
, 1, wxALL
|wxALIGN_CENTER_HORIZONTAL
|wxALIGN_CENTER_VERTICAL
|wxEXPAND
, 20 );
153 m_toggleBtn1
= new wxToggleButton( m_panel1
, wxID_ANY
, _("Untoggled"), wxDefaultPosition
, wxDefaultSize
, 0 );
154 m_toggleBtn1
->SetToolTip( _("wxToggleButton") );
156 fgSizer1
->Add( m_toggleBtn1
, 0, wxALL
|wxALIGN_CENTER_HORIZONTAL
|wxALIGN_CENTER_VERTICAL
, 20 );
158 m_toggleBtn2
= new wxToggleButton( m_panel1
, wxID_ANY
, _("Toggled"), wxDefaultPosition
, wxDefaultSize
, 0 );
159 m_toggleBtn2
->SetValue( true );
160 m_toggleBtn2
->SetToolTip( _("wxToggleButton") );
162 fgSizer1
->Add( m_toggleBtn2
, 0, wxALL
|wxALIGN_CENTER_VERTICAL
|wxALIGN_CENTER_HORIZONTAL
, 20 );
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") );
167 fgSizer1
->Add( m_hyperlink1
, 0, wxALL
|wxALIGN_CENTER_VERTICAL
|wxALIGN_CENTER_HORIZONTAL
, 20 );
169 m_spinCtrl1
= new wxSpinCtrl( m_panel1
, wxID_ANY
, wxT("5"), wxDefaultPosition
, wxDefaultSize
, wxSP_ARROW_KEYS
, 0, 10, 0 );
170 m_spinCtrl1
->SetToolTip( _("wxSpinCtrl") );
172 fgSizer1
->Add( m_spinCtrl1
, 0, wxALL
|wxALIGN_CENTER_HORIZONTAL
|wxALIGN_CENTER_VERTICAL
, 20 );
174 m_spinBtn1
= new wxSpinButton( m_panel1
, wxID_ANY
, wxDefaultPosition
, wxDefaultSize
, 0 );
175 m_spinBtn1
->SetToolTip( _("wxSpinButton") );
177 fgSizer1
->Add( m_spinBtn1
, 0, wxALL
|wxALIGN_CENTER_HORIZONTAL
|wxALIGN_CENTER_VERTICAL
, 20 );
179 m_scrollBar1
= new wxScrollBar( m_panel1
, wxID_ANY
, wxDefaultPosition
, wxDefaultSize
, wxSB_HORIZONTAL
);
180 m_scrollBar1
->SetToolTip( _("wxScrollBar") );
182 fgSizer1
->Add( m_scrollBar1
, 1, wxALL
|wxALIGN_CENTER_HORIZONTAL
|wxALIGN_CENTER_VERTICAL
|wxEXPAND
, 20 );
184 m_panel1
->SetSizer( fgSizer1
);
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
);
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 );
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 );
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 );
211 m_staticBox1
= new wxStaticBox(m_panel2
,wxID_ANY
, _("wxStaticBox"), wxDefaultPosition
, wxDefaultSize
, 0, _("_StaticBox"));
214 fgSizer2
->Add( m_staticBox1
, 1, wxALL
|wxALIGN_CENTER_VERTICAL
|wxALIGN_CENTER_HORIZONTAL
|wxEXPAND
, 20 );
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 );
219 m_listCtrl1
= new wxListCtrl( m_panel2
, wxID_ANY
, wxDefaultPosition
, wxDefaultSize
, 0|wxSUNKEN_BORDER
);
220 m_listCtrl1
->SetToolTip( _("wxListCtrl") );
222 fgSizer2
->Add( m_listCtrl1
, 1, wxALL
|wxALIGN_CENTER_HORIZONTAL
|wxALIGN_CENTER_VERTICAL
|wxEXPAND
, 20 );
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 );
230 m_collPane1
= new wxCollapsiblePane(m_panel2
, -1, wxT("Collapsed"));
231 wxWindow
*win
= m_collPane1
->GetPane();
232 m_collPane1
->SetToolTip(_("wxCollapsiblePane"));
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 );
244 m_collPane2
= new wxCollapsiblePane(m_panel2
, -1, wxT("Expanded"));
245 wxWindow
*win2
= m_collPane2
->GetPane();
246 m_collPane2
->SetToolTip(_("wxCollapsiblePane"));
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
);
257 m_collPane2
->Expand();
258 fgSizer2
->Add( m_collPane2
, 0, wxALL
|wxALIGN_CENTER_HORIZONTAL
|wxALIGN_CENTER_VERTICAL
|wxEXPAND
, 5 );
260 m_panel2
->SetSizer( fgSizer2
);
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
);
266 bSizer2
= new wxBoxSizer( wxVERTICAL
);
268 m_textCtrl1
= new wxTextCtrl( m_panel3
, wxID_ANY
, _("Single-line"), wxDefaultPosition
, wxDefaultSize
, 0 );
269 m_textCtrl1
->SetToolTip( _("wxTextCtrl") );
271 bSizer2
->Add( m_textCtrl1
, 0, wxTOP
|wxRIGHT
|wxLEFT
, 20 );
274 bSizer2
->Add( 0, 10, 0, 0, 5 );
276 m_textCtrl2
= new wxTextCtrl( m_panel3
, wxID_ANY
, _("Multi-line\nLine1\nLine2\n"), wxDefaultPosition
, wxDefaultSize
, wxTE_MULTILINE
);
277 m_textCtrl2
->SetToolTip( _("wxTextCtrl") );
279 bSizer2
->Add( m_textCtrl2
, 0, wxBOTTOM
|wxRIGHT
|wxLEFT
, 20 );
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 ) );
285 bSizer2
->Add( m_richText1
, 0, wxALL
, 20 );
287 m_panel3
->SetSizer( bSizer2
);
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
);
297 m_colourPicker1
= new wxColourPickerCtrl( m_panel4
, wxID_ANY
, *wxBLACK
, wxDefaultPosition
, wxDefaultSize
, wxCLRP_DEFAULT_STYLE
);
298 m_colourPicker1
->SetToolTip( _("wxColourPickerCtrl") );
300 fgSizer5
->Add( m_colourPicker1
, 0, wxALL
|wxALIGN_CENTER_HORIZONTAL
|wxALIGN_CENTER_VERTICAL
, 20 );
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") );
306 fgSizer5
->Add( m_fontPicker1
, 0, wxALIGN_CENTER_HORIZONTAL
|wxALIGN_CENTER_VERTICAL
|wxALL
, 20 );
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") );
311 fgSizer5
->Add( m_filePicker1
, 0, wxALIGN_CENTER_HORIZONTAL
|wxALIGN_CENTER_VERTICAL
|wxALL
, 20 );
314 fgSizer5
->Add( 0, 0, 1, wxEXPAND
, 5 );
316 m_calendar1
= new wxCalendarCtrl( m_panel4
, wxID_ANY
, wxDefaultDateTime
, wxDefaultPosition
, wxDefaultSize
, wxCAL_SHOW_HOLIDAYS
);
317 m_calendar1
->SetToolTip( _("wxCalendarCtrl") );
319 fgSizer5
->Add( m_calendar1
, 0, wxALL
|wxALIGN_CENTER_HORIZONTAL
|wxALIGN_CENTER_VERTICAL
, 20 );
321 m_datePicker1
= new wxDatePickerCtrl( m_panel4
, wxID_ANY
, wxDefaultDateTime
, wxDefaultPosition
, wxDefaultSize
, wxDP_DEFAULT
);
322 m_datePicker1
->SetToolTip( _("wxDatePickerCtrl") );
324 fgSizer5
->Add( m_datePicker1
, 0, wxALL
|wxALIGN_CENTER_HORIZONTAL
|wxALIGN_CENTER_VERTICAL
, 20 );
326 m_genericDirCtrl1
= new wxGenericDirCtrl( m_panel4
, wxID_ANY
, wxEmptyString
, wxDefaultPosition
, wxDefaultSize
, wxDIRCTRL_3D_INTERNAL
|wxSUNKEN_BORDER
, wxEmptyString
, 0, wxT("_GenericDirCtrl") );
328 m_genericDirCtrl1
->ShowHidden( false );
329 m_genericDirCtrl1
->SetToolTip( _("wxGenericDirCtrl") );
330 m_genericDirCtrl1
->SetMinSize( wxSize( -1,150 ) );
332 fgSizer5
->Add( m_genericDirCtrl1
, 1, wxEXPAND
|wxALL
|wxALIGN_CENTER_HORIZONTAL
|wxALIGN_CENTER_VERTICAL
, 20 );
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") );
337 fgSizer5
->Add( m_dirPicker1
, 0, wxALL
|wxALIGN_CENTER_HORIZONTAL
|wxALIGN_CENTER_VERTICAL
, 20 );
339 m_panel4
->SetSizer( fgSizer5
);
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
);
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 );
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 );
364 fgSizer4
->Add( 0, 120, 1, wxEXPAND
, 5 );
367 fgSizer4
->Add( 0, 120, 1, wxEXPAND
, 5 );
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 );
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 );
382 fgSizer4
->Add( 0, 90, 1, wxEXPAND
, 5 );
385 fgSizer4
->Add( 0, 90, 1, wxEXPAND
, 5 );
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);
393 m_comboCtrl1
->SetText(wxT("wxComboCtrl"));
394 m_comboCtrl1
->SetToolTip(_("wxComboCtrl"));
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"));
405 popupList
->Select(0, true);
406 fgSizer4
->Add( m_comboCtrl1
, 1, wxALL
|wxALIGN_CENTER_HORIZONTAL
|wxALIGN_CENTER_VERTICAL
|wxEXPAND
, 20 );
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);
414 m_comboCtrl2
->SetText(wxT("wxComboCtrl"));
415 m_comboCtrl2
->SetToolTip(_("wxComboCtrl"));
417 //Add a root and some nodes using wxTreeCtrl methods
418 wxTreeItemId root
= popupTree
->AddRoot(_("wxComboCtrl"));
420 popupTree
->AppendItem(root
, _("with"));
421 popupTree
->AppendItem(root
, _("wxTreeCtrl"));
423 wxTreeItemId node2
= popupTree
->AppendItem(root
, _("popout"));
424 popupTree
->AppendItem(node2
, _("Node1"));
425 popupTree
->AppendItem(node2
, _("Node2"));
427 popupTree
->ExpandAll();
428 fgSizer4
->Add( m_comboCtrl2
, 1, wxALL
|wxALIGN_CENTER_HORIZONTAL
|wxALIGN_CENTER_VERTICAL
|wxEXPAND
, 20 );
430 m_panel5
->SetSizer( fgSizer4
);
432 fgSizer4
->Fit( m_panel5
);
433 m_notebook1
->AddPage( m_panel5
, _("Drop-down Controls"), false );
435 bSizer0
->Add( m_notebook1
, 1, wxEXPAND
| wxALL
, 0 );
437 this->SetSizer( bSizer0
);
439 bSizer0
->Fit( this );
440 statusBar
= this->CreateStatusBar( 1, wxST_SIZEGRIP
, wxID_ANY
);
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 );
455 GUIFrame::~GUIFrame()
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 );