From f978831f3780667a6b08a3b59b7dcc8a16e4e3dc Mon Sep 17 00:00:00 2001 From: Bryan Petty Date: Wed, 15 Oct 2008 18:49:22 +0000 Subject: [PATCH] Removed traces of wxFormBuilder from the screenshotgen utility, cleaned up some dependencies in headers, and replaced a few sparse tabs with spaces. Also applied patch #10083 (VC6 build fixes for screenshotgen). git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@56343 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- utils/screenshotgen/src/autocapture.cpp | 12 +- utils/screenshotgen/src/autocapture.h | 10 +- utils/screenshotgen/src/ctrlmaskout.cpp | 28 +- utils/screenshotgen/src/ctrlmaskout.h | 8 +- utils/screenshotgen/src/guidesign.fbp | 2963 ------------------- utils/screenshotgen/src/guiframe.cpp | 857 +++--- utils/screenshotgen/src/guiframe.h | 260 +- utils/screenshotgen/src/screenshot_app.cpp | 8 +- utils/screenshotgen/src/screenshot_app.h | 8 +- utils/screenshotgen/src/screenshot_main.cpp | 57 +- utils/screenshotgen/src/screenshot_main.h | 10 +- 11 files changed, 600 insertions(+), 3621 deletions(-) delete mode 100644 utils/screenshotgen/src/guidesign.fbp diff --git a/utils/screenshotgen/src/autocapture.cpp b/utils/screenshotgen/src/autocapture.cpp index 3f33fa69cc..62ae1b88dc 100644 --- a/utils/screenshotgen/src/autocapture.cpp +++ b/utils/screenshotgen/src/autocapture.cpp @@ -10,15 +10,16 @@ #include "wx/wxprec.h" #ifdef __BORLANDC__ - #pragma hdrstop +#pragma hdrstop #endif -// for all others, include the necessary headers +// for all others, include the necessary headers wxWidgets headers) #ifndef WX_PRECOMP - #include "wx/wx.h" +#include "wx/wx.h" #endif -#include +#include "wx/filename.h" + #include "autocapture.h" #ifdef __WXMAC__ @@ -33,8 +34,7 @@ /* static */ void AutoCaptureMechanism::Delay(int seconds) { - using std::clock; - using std::clock_t; + // TODO: Switch this to use wxTimer. // Wait for 3 seconds clock_t start = clock(); diff --git a/utils/screenshotgen/src/autocapture.h b/utils/screenshotgen/src/autocapture.h index 29d01734aa..e0aed4d36e 100644 --- a/utils/screenshotgen/src/autocapture.h +++ b/utils/screenshotgen/src/autocapture.h @@ -6,14 +6,14 @@ // Licence: wxWindows license ///////////////////////////////////////////////////////////////////////////// -#ifndef AUTOCAP_H -#define AUTOCAP_H +#ifndef _AUTOCAPTURE_H_ +#define _AUTOCAPTURE_H_ -#include -#include #include #include +#include + // TODO: document what these flags mean enum AdjustFlags @@ -112,6 +112,6 @@ private: // internal utils int m_border; }; -#endif // AUTOCAP_H +#endif // _AUTOCAPTURE_H_ diff --git a/utils/screenshotgen/src/ctrlmaskout.cpp b/utils/screenshotgen/src/ctrlmaskout.cpp index c4b51abae8..3db49ee923 100644 --- a/utils/screenshotgen/src/ctrlmaskout.cpp +++ b/utils/screenshotgen/src/ctrlmaskout.cpp @@ -10,23 +10,24 @@ #include "wx/wxprec.h" #ifdef __BORLANDC__ - #pragma hdrstop +#pragma hdrstop #endif -// for all others, include the necessary headers +// for all others, include the necessary headers wxWidgets headers) #ifndef WX_PRECOMP - #include "wx/wx.h" +#include "wx/wx.h" #endif +#include "ctrlmaskout.h" + #ifdef __WXMAC__ // See CreateMask() - #include - #include +#include +#include #endif -#include -#include - -#include "ctrlmaskout.h" +// use a set to make sure the same control won't be inserted twice +#include "wx/hashset.h" +WX_DECLARE_HASH_SET(wxWindow*, wxPointerHash, wxPointerEqual, CtrlSet); // It's copied from src/aui/framemanager.cpp and modified, a failed attempt to @@ -75,11 +76,11 @@ public: // return; // } // -// Show(false); +// Show(false); // -// GetParent()->Update(); +// GetParent()->Update(); // -// Show(true); +// Show(true); // // // m_lastWidth = event.GetSize().GetWidth(); @@ -280,9 +281,6 @@ void CtrlMaskOut::DetermineCtrlNameAndRect() wxString ctrlName; wxRect ctrlSize; - // use a set to make sure the same control won't be inserted twice - WX_DECLARE_HASH_SET(wxWindow*, wxPointerHash, wxPointerEqual, CtrlSet); - CtrlSet ctrls; int i, j; diff --git a/utils/screenshotgen/src/ctrlmaskout.h b/utils/screenshotgen/src/ctrlmaskout.h index 660d96df91..1e0ec6832e 100644 --- a/utils/screenshotgen/src/ctrlmaskout.h +++ b/utils/screenshotgen/src/ctrlmaskout.h @@ -6,10 +6,10 @@ // Licence: wxWindows license ///////////////////////////////////////////////////////////////////////////// -#ifndef WX_CTRL_MASK_OUT -#define WX_CTRL_MASK_OUT +#ifndef _CTRLMASKOUT_H_ +#define _CTRLMASKOUT_H_ -#include +#include "wx/filename.h" // ---------------------------------------------------------------------------- @@ -60,6 +60,6 @@ private: bool m_isTiming; }; -#endif // WX_CTRL_MASK_OUT +#endif // _CTRLMASKOUT_H_ diff --git a/utils/screenshotgen/src/guidesign.fbp b/utils/screenshotgen/src/guidesign.fbp deleted file mode 100644 index 02c8386e69..0000000000 --- a/utils/screenshotgen/src/guidesign.fbp +++ /dev/null @@ -1,2963 +0,0 @@ - - - - - - C++ - 1 - UTF-8 - connect - guiframe - 1000 - none - 1 - MyProject - - . - // ---------------------------------------------------------------------------- // headers // ---------------------------------------------------------------------------- // For compilers that support precompilation, includes "wx/wx.h". #include "wx/wxprec.h" #ifdef __BORLANDC__ #pragma hdrstop #endif // for all others, include the necessary headers wxWidgets headers) #ifndef WX_PRECOMP #include "wx/wx.h" #endif #include "bitmaps/play.xpm" #include "bitmaps/stop.xpm" - 1 - 1 - 0 - - - - - 1 - - - - 0 - wxID_ANY - - - GUIFrame - - -1,-1 - wxDEFAULT_FRAME_STYLE - - wxWidgets Control Screenshot Generator - - - - wxTAB_TRAVERSAL - 1 - - - - OnClose - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 1 - - - 0 - wxID_ANY - - - - mbar - protected - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - &File - fileMenu - protected - - - 0 - 1 - Opens the directory where the screenshots are saved. - wxID_ZOOM_IN - wxITEM_NORMAL - &Open screenshots folder... - m_menuSeeScr - none - Ctrl+O - - OnSeeScreenshots - - - - none - - - - 0 - 1 - Quits the application. - wxID_EXIT - wxITEM_NORMAL - &Quit - m_menuFileQuit - none - Alt+F4 - - OnQuit - - - - - &Capture - captureMenu - protected - - - 0 - 1 - Takes a screenshot of the entire screen. - idMenuCapFullScreen - wxITEM_NORMAL - &Full Screen - m_menuCapFullScreen - none - Ctrl+Alt+F - - OnCaptureFullScreen - - - - ; Load From File - 0 - 1 - Manually specify rectangular regions for the screenshots. - idMenuCapRect - wxITEM_NORMAL - Regions<Begin> - m_menuCapRect - protected - Ctrl+Alt+R - - OnCaptureRect - - - - ; Load From Icon Resource [-1; -1] - 0 - 0 - Stop manually generating screenshots. - idMenuEndCapRect - wxITEM_NORMAL - Regions<End> - m_menuEndCapRect - protected - Ctrl+Alt+E - - OnEndCaptureRect - - - - ; Load From Resource - 0 - 1 - Takes screenshots for all controls automatically. - idMenuCapAll - wxITEM_NORMAL - Capture All - m_menuCapAll - none - Ctrl+Alt+A - - OnCaptureAllControls - - - - - &Help - helpMenu - protected - - - 0 - 1 - Shows info about this application. - wxID_ABOUT - wxITEM_NORMAL - &About... - m_menuHelpAbout - none - F1 - - OnAbout - - - - - - - bSizer0 - wxVERTICAL - none - - 0 - wxEXPAND | wxALL - 1 - - - - - 1 - - - 0 - wxID_ANY - - - m_notebook1 - protected - - - - - - - - - - - - - - - - - - - - - - - - - OnNotebookPageChanged - OnNotebookPageChanging - - - - - - - - - - Tiny Controls - 1 - - - - 1 - - - 0 - wxID_ANY - - - m_panel1 - protected - - - - - - - wxTAB_TRAVERSAL - - - - - - - - - - - - - - - - - - - - - - - - - 2 - wxBOTH - - - 0 - - fgSizer1 - wxFLEX_GROWMODE_NONE - none - 5 - 0 - - 20 - wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL - 0 - - - - 0 - 1 - - - 0 - wxID_ANY - wxButton - - - m_button1 - protected - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 20 - wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL - 0 - - - - 1 - - - 0 - wxID_ANY - wxStaticText - - - m_staticText1 - protected - - - - - - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - 20 - wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL - 0 - - - 1 - - 1 - - - 0 - wxID_ANY - Checked - - - m_checkBox1 - protected - - - - - wxCheckBox - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 20 - wxALL|wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL - 0 - - - 0 - - 1 - - - 0 - wxID_ANY - Unchecked - - - m_checkBox2 - protected - - - - - wxCheckBox - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 20 - wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL - 0 - - - - 1 - - - 0 - wxID_ANY - Checked - - - m_radioBtn1 - protected - - - wxRB_GROUP - - wxRadioButton - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 20 - wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL - 0 - - - - 1 - - - 0 - wxID_ANY - Unchecked - - - m_radioBtn2 - protected - - - - - wxRadioButton - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 20 - wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL - 0 - - - bitmaps/wxwin32x32.png; Load From File - - 0 - - 1 - - - - 0 - - wxID_ANY - wxBitmapButton - - - m_bpButton1 - protected - - - - wxBU_AUTODRAW - - wxBitmapButton - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 20 - wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL - 0 - - - bitmaps/wxwin32x32.png; Load From File - - 1 - - - 0 - wxID_ANY - - - m_bitmap1 - protected - - - - wxStaticBitmap - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 20 - wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxEXPAND - 1 - - - - 1 - - - 0 - wxID_ANY - - - m_gauge1 - protected - - 100 - - wxGA_HORIZONTAL - - wxGauge - 50 - - _Gauge - - - - - - - - - - - - - - - - - - - - - - - - - - - - 20 - wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxEXPAND - 1 - - - - 1 - - - 0 - wxID_ANY - 100 - - 0 - - m_slider1 - protected - - - wxSL_HORIZONTAL - - wxSlider - 50 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 20 - wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL - 0 - - - - 1 - - - 0 - wxID_ANY - Untoggled - - - m_toggleBtn1 - protected - - - - wxToggleButton - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 20 - wxALL|wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL - 0 - - - - 1 - - - 0 - wxID_ANY - Toggled - - - m_toggleBtn2 - protected - - - - wxToggleButton - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 20 - wxALL|wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL - 0 - - - - 1 - - - 0 - - wxID_ANY - www.wxwidgets.org - - - m_hyperlink1 - - protected - - - wxHL_DEFAULT_STYLE - - wxHyperlinkCtrl - http://www.wxwidgets.org - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 20 - wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL - 0 - - - - 1 - - - 0 - wxID_ANY - 0 - 10 - - 0 - - m_spinCtrl1 - protected - - - wxSP_ARROW_KEYS - - wxSpinCtrl - 5 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 20 - wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL - 0 - - - - 1 - - - 0 - wxID_ANY - - - m_spinBtn1 - protected - - - - - wxSpinButton - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 20 - wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxEXPAND - 1 - - - - 1 - - - 0 - wxID_ANY - - - m_scrollBar1 - 1 - protected - - 100 - - wxSB_HORIZONTAL - - 1 - wxScrollBar - 50 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Multiple choice Controls - 0 - - - - 1 - - - 0 - wxID_ANY - - - m_panel2 - protected - - - - - - - wxTAB_TRAVERSAL - - - - - - - - - - - - - - - - - - - - - - - - - 2 - wxBOTH - - - 0 - - fgSizer2 - wxFLEX_GROWMODE_SPECIFIED - none - 5 - 0 - - 20 - wxALL|wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL - 1 - - - "wxCheckListBox" "Item1" "Item2" - - 1 - - - 0 - wxID_ANY - - - m_checkList1 - protected - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 20 - wxALL|wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL - 1 - - - "wxListBox" "Item1" "Item2" - - 1 - - - 0 - wxID_ANY - - - m_listBox1 - protected - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 20 - wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL - 0 - - - "Item1" "Item2" - - 1 - - - 0 - wxID_ANY - wxRadioBox - 1 - - - m_radioBox1 - protected - - 0 - - wxRA_SPECIFY_COLS - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 20 - wxALL|wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND - 1 - - - wxStaticBox - m_staticBox1 = new wxStaticBox(m_panel2,wxID_ANY, _("wxStaticBox"), wxDefaultPosition, wxDefaultSize, 0, _("_StaticBox")); - - wxStaticBox * m_staticBox1; - 1 - - - 0 - wxID_ANY - #include <wx/statbox.h> - - - m_staticBox1 - protected - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 20 - wxALL|wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL - 1 - - - - 1 - - - 0 - wxID_ANY - - - m_treeCtrl1 - protected - - - wxTR_DEFAULT_STYLE - - - - - wxSUNKEN_BORDER - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 20 - wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxEXPAND - 1 - - - - 1 - - - 0 - wxID_ANY - - - m_listCtrl1 - protected - - - wxLC_REPORT - - wxListCtrl - - - wxSUNKEN_BORDER - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 20 - wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL - 0 - - - wxAnimationCtrl - m_animationCtrl1 = new wxAnimationCtrl(m_panel2, wxID_ANY); - - wxAnimationCtrl * m_animationCtrl1; - 1 - - - 0 - wxID_ANY - #include "wx/animate.h" - - - m_animationCtrl1 - protected - - m_animationCtrl1->SetToolTip(_("wxAnimationCtrl")); if (m_animationCtrl1->LoadFile(wxT("bitmaps/throbber.gif"))) m_animationCtrl1->Play(); - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxEXPAND - 0 - - - wxCollapsiblePane - m_collPane1 = new wxCollapsiblePane(m_panel2, -1, wxT("Collapsed")); - - wxCollapsiblePane *m_collPane1; - 1 - - - 0 - wxID_ANY - #include "wx/collpane.h" - - - m_collPane1 - protected - - wxWindow *win = m_collPane1->GetPane(); m_collPane1->SetToolTip(_("wxCollapsiblePane")); wxBoxSizer * collbSizer = new wxBoxSizer(wxVERTICAL); wxStaticText* m_collSText = new wxStaticText(win, -1, wxT("You can place")); wxButton* m_collBut = new wxButton(win, -1, wxT("anything")); wxTextCtrl* m_collText = new wxTextCtrl(win, -1, wxT("inside a wxCollapsiblePane")); collbSizer->Add( m_collSText, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 0 ); collbSizer->Add( m_collBut, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 0 ); collbSizer->Add( m_collText, 0, wxALL|wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 0 ); win->SetSizer(collbSizer); - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxEXPAND - 0 - - - wxCollapsiblePane - m_collPane2 = new wxCollapsiblePane(m_panel2, -1, wxT("Expanded")); - - wxCollapsiblePane *m_collPane2; - 1 - - - 0 - wxID_ANY - #include "wx/collpane.h" - - - m_collPane2 - protected - - wxWindow *win2 = m_collPane2->GetPane(); m_collPane2->SetToolTip(_("wxCollapsiblePane")); wxBoxSizer * collbSizer2 = new wxBoxSizer(wxVERTICAL); wxStaticText* m_collSText2 = new wxStaticText(win2, -1, wxT("You can place")); wxButton* m_collBut2 = new wxButton(win2, -1, wxT("anything")); wxTextCtrl* m_collText2 = new wxTextCtrl(win2, -1, wxT("inside a wxCollapsiblePane")); collbSizer2->Add( m_collSText2, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 0 ); collbSizer2->Add( m_collBut2, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 0 ); collbSizer2->Add( m_collText2, 0, wxALL|wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 0 ); win2->SetSizer(collbSizer2); m_collPane2->Expand(); - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - [Rich]Text Controls - 0 - - - - 1 - - - 0 - wxID_ANY - - - m_panel3 - protected - - - - - - - wxTAB_TRAVERSAL - - - - - - - - - - - - - - - - - - - - - - - - - - bSizer2 - wxVERTICAL - none - - 20 - wxTOP|wxRIGHT|wxLEFT - 0 - - - - 1 - - - 0 - wxID_ANY - - 0 - - m_textCtrl1 - protected - - - - - wxTextCtrl - Single-line - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - - 0 - - 10 - protected - 0 - - - - 20 - wxBOTTOM|wxRIGHT|wxLEFT - 0 - - - - 1 - - - 0 - wxID_ANY - - 0 - - m_textCtrl2 - protected - - - wxTE_MULTILINE - - wxTextCtrl - Multi-line Line1 Line2 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 20 - wxALL - 0 - - - - 1 - - - 0 - wxID_ANY - - 200,200 - m_richText1 - protected - - -1,-1 - - - wxRichTextCtrl - - - wxVSCROLL|wxHSCROLL|wxNO_BORDER|wxWANTS_CHARS - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Picker Controls - 0 - - - - 1 - - - 0 - wxID_ANY - - - m_panel4 - protected - - - - - - - wxTAB_TRAVERSAL - - - - - - - - - - - - - - - - - - - - - - - - - 2 - wxBOTH - - - 10 - - fgSizer5 - wxFLEX_GROWMODE_SPECIFIED - none - 2 - 10 - - 20 - wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL - 0 - - - - - 1 - - - 0 - wxID_ANY - - - m_colourPicker1 - protected - - - wxCLRP_DEFAULT_STYLE - - wxColourPickerCtrl - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 20 - wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL - 0 - - - - 1 - - - 0 - wxID_ANY - 100 - - - m_fontPicker1 - protected - - - wxFNTP_DEFAULT_STYLE - - wxFontPickerCtrl - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 20 - wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL - 0 - - - - 1 - - - 0 - wxID_ANY - - Select a file - - m_filePicker1 - protected - - - wxFLP_DEFAULT_STYLE - - wxFilePickerCtrl - - *.* - - _FilePickerCtrl - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxEXPAND - 1 - - 0 - protected - 0 - - - - 20 - wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL - 0 - - - - 1 - - - 0 - wxID_ANY - - - m_calendar1 - protected - - - wxCAL_SHOW_HOLIDAYS - - wxCalendarCtrl - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 20 - wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL - 0 - - - - 1 - - - 0 - wxID_ANY - - - m_datePicker1 - protected - - - wxDP_DEFAULT - - wxDatePickerCtrl - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 20 - wxEXPAND|wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL - 1 - - - - 0 - - 1 - - - - 0 - wxID_ANY - - -1,150 - m_genericDirCtrl1 - protected - - 0 - - wxDIRCTRL_3D_INTERNAL - - wxGenericDirCtrl - - _GenericDirCtrl - wxSUNKEN_BORDER - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 20 - wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL - 0 - - - - 1 - - - 0 - wxID_ANY - - Select a folder - - m_dirPicker1 - protected - - - wxDIRP_DEFAULT_STYLE - - wxDirPickerCtrl - - - _DirPickerCtrl - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Drop-down Controls - 0 - - - - 1 - - - 0 - wxID_ANY - - - m_panel5 - protected - - - - - - - wxTAB_TRAVERSAL - - - - - - - - - - - - - - - - - - - - - - - - - 2 - wxBOTH - - - 0 - - fgSizer4 - wxFLEX_GROWMODE_SPECIFIED - none - 2 - 0 - - 20 - wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL - 0 - - - "wxChoice" "Item1" "Item2" "Item3" "Item4" - - 1 - - - 0 - wxID_ANY - - - m_choice1 - protected - - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 20 - wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL - 0 - - - "wxComboBox" "Item1" "Item2" "Item3" "Item4" - - 1 - - - 0 - wxID_ANY - - - m_comboBox1 - protected - - - - - - wxComboBox - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxEXPAND - 1 - - 120 - protected - 0 - - - - 5 - wxEXPAND - 1 - - 120 - protected - 0 - - - - 20 - wxALL|wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND - 1 - - - wxBitmapComboBox - m_bmpComboBox1 = new wxBitmapComboBox(m_panel5, wxID_ANY,_("Item1")); - - wxBitmapComboBox * m_bmpComboBox1; - 1 - - - 0 - wxID_ANY - #include <wx/bmpcbox.h> - - - m_bmpComboBox1 - protected - - m_bmpComboBox1->Append(_("Item1"), wxBitmap(_T("bitmaps/bell.png"),wxBITMAP_TYPE_PNG)); m_bmpComboBox1->Append(_("Item2"), wxBitmap(_T("bitmaps/sound.png"),wxBITMAP_TYPE_PNG)); m_bmpComboBox1->Append(_("Item3"), wxBitmap(_T("bitmaps/bell.png"),wxBITMAP_TYPE_PNG)); m_bmpComboBox1->Append(_("Item4"), wxBitmap(_T("bitmaps/sound.png"),wxBITMAP_TYPE_PNG)); m_bmpComboBox1->SetToolTip(_("wxBitmapComboBox")); - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 20 - wxALL|wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL - 1 - - - PenStyleComboBox - m_ownerDrawnComboBox1 = PenStyleComboBox::CreateSample(m_panel5); - - PenStyleComboBox * m_ownerDrawnComboBox1; - 1 - - - 0 - wxID_ANY - #include "customcombo.h" - - - m_ownerDrawnComboBox1 - protected - - m_ownerDrawnComboBox1->SetToolTip(_("wxOwnerDrawnComboBox")); - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxEXPAND - 1 - - 90 - protected - 0 - - - - 5 - wxEXPAND - 1 - - 90 - protected - 0 - - - - 20 - wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxEXPAND - 1 - - - wxComboCtrl - m_comboCtrl1 = new wxComboCtrl(m_panel5,wxID_ANY,wxEmptyString); - - wxComboCtrl * m_comboCtrl1; - 1 - - - 0 - wxID_ANY - #include "customcombo.h" - - - m_comboCtrl1 - protected - - // first of all, set the popup control! ListViewComboPopup* popupList = new ListViewComboPopup(); m_comboCtrl1->SetPopupControl(popupList); m_comboCtrl1->SetPopupMaxHeight(80); m_comboCtrl1->SetText(wxT("wxComboCtrl")); m_comboCtrl1->SetToolTip(_("wxComboCtrl")); // Populate using wxListView methods popupList->InsertItem(popupList->GetItemCount(),wxT("wxComboCtrl")); popupList->InsertItem(popupList->GetItemCount(),wxT("with")); popupList->InsertItem(popupList->GetItemCount(),wxT("wxListView")); popupList->InsertItem(popupList->GetItemCount(),wxT("popup")); popupList->InsertItem(popupList->GetItemCount(),wxT("Item1")); popupList->InsertItem(popupList->GetItemCount(),wxT("Item2")); popupList->InsertItem(popupList->GetItemCount(),wxT("Item3")); popupList->Select(0, true); - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 20 - wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxEXPAND - 1 - - - wxComboCtrl - m_comboCtrl2 = new wxComboCtrl(m_panel5,wxID_ANY,wxEmptyString); - - wxComboCtrl * m_comboCtrl2; - 1 - - - 0 - wxID_ANY - #include "customcombo.h" - - - m_comboCtrl2 - protected - - // first of all, set the popup control! TreeCtrlComboPopup* popupTree = new TreeCtrlComboPopup(); m_comboCtrl2->SetPopupControl(popupTree); m_comboCtrl2->SetPopupMaxHeight(80); m_comboCtrl2->SetText(wxT("wxComboCtrl")); m_comboCtrl2->SetToolTip(_("wxComboCtrl")); //Add a root and some nodes using wxTreeCtrl methods wxTreeItemId root = popupTree->AddRoot(_("wxComboCtrl")); popupTree->AppendItem(root, _("with")); popupTree->AppendItem(root, _("wxTreeCtrl")); wxTreeItemId node2 = popupTree->AppendItem(root, _("popout")); popupTree->AppendItem(node2, _("Node1")); popupTree->AppendItem(node2, _("Node2")); popupTree->ExpandAll(); - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 1 - - 1 - - 0 - wxID_ANY - - - statusBar - protected - - - wxST_SIZEGRIP - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/utils/screenshotgen/src/guiframe.cpp b/utils/screenshotgen/src/guiframe.cpp index 89ab522e3e..e59e3c4707 100644 --- a/utils/screenshotgen/src/guiframe.cpp +++ b/utils/screenshotgen/src/guiframe.cpp @@ -1,13 +1,10 @@ -/////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Apr 16 2008) -// http://www.wxformbuilder.org/ -// -// PLEASE DO "NOT" EDIT THIS FILE! -/////////////////////////////////////////////////////////////////////////// - -// ---------------------------------------------------------------------------- -// headers -// ---------------------------------------------------------------------------- +///////////////////////////////////////////////////////////////////////////// +// Name: guiframe.cpp +// Purpose: Implement the Application Frame +// Author: Utensil Candel (UtensilCandel@@gmail.com) +// RCS-ID: $Id$ +// Licence: wxWindows license +///////////////////////////////////////////////////////////////////////////// // For compilers that support precompilation, includes "wx/wx.h". #include "wx/wxprec.h" @@ -21,436 +18,436 @@ #include "wx/wx.h" #endif +#include "guiframe.h" + #include "bitmaps/play.xpm" #include "bitmaps/stop.xpm" -#include "guiframe.h" - /////////////////////////////////////////////////////////////////////////// GUIFrame::GUIFrame( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxFrame( parent, id, title, pos, size, style ) { - this->SetSizeHints( wxDefaultSize, wxDefaultSize ); - - mbar = new wxMenuBar( 0 ); - fileMenu = new wxMenu(); - wxMenuItem* m_menuSeeScr; - 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 ); - fileMenu->Append( m_menuSeeScr ); - - fileMenu->AppendSeparator(); - - wxMenuItem* m_menuFileQuit; - m_menuFileQuit = new wxMenuItem( fileMenu, wxID_EXIT, wxString( _("&Quit") ) + wxT('\t') + wxT("Alt+F4"), _("Quits the application."), wxITEM_NORMAL ); - fileMenu->Append( m_menuFileQuit ); - - mbar->Append( fileMenu, _("&File") ); - - captureMenu = new wxMenu(); - wxMenuItem* m_menuCapFullScreen; - m_menuCapFullScreen = new wxMenuItem( captureMenu, idMenuCapFullScreen, wxString( _("&Full Screen") ) + wxT('\t') + wxT("Ctrl+Alt+F"), _("Takes a screenshot of the entire screen."), wxITEM_NORMAL ); - captureMenu->Append( m_menuCapFullScreen ); - - m_menuCapRect = new wxMenuItem( captureMenu, idMenuCapRect, wxString( _("Regions") ) + wxT('\t') + wxT("Ctrl+Alt+R"), _("Manually specify rectangular regions for the screenshots."), wxITEM_NORMAL ); - captureMenu->Append( m_menuCapRect ); - - m_menuEndCapRect = new wxMenuItem( captureMenu, idMenuEndCapRect, wxString( _("Regions") ) + wxT('\t') + wxT("Ctrl+Alt+E"), _("Stop manually generating screenshots."), wxITEM_NORMAL ); - captureMenu->Append( m_menuEndCapRect ); - m_menuEndCapRect->Enable( false ); - - wxMenuItem* m_menuCapAll; - m_menuCapAll = new wxMenuItem( captureMenu, idMenuCapAll, wxString( _("Capture All") ) + wxT('\t') + wxT("Ctrl+Alt+A"), _("Takes screenshots for all controls automatically."), wxITEM_NORMAL ); - captureMenu->Append( m_menuCapAll ); - - mbar->Append( captureMenu, _("&Capture") ); - - helpMenu = new wxMenu(); - wxMenuItem* m_menuHelpAbout; - m_menuHelpAbout = new wxMenuItem( helpMenu, wxID_ABOUT, wxString( _("&About...") ) + wxT('\t') + wxT("F1"), _("Shows info about this application."), wxITEM_NORMAL ); - helpMenu->Append( m_menuHelpAbout ); - - mbar->Append( helpMenu, _("&Help") ); - - this->SetMenuBar( mbar ); - - wxBoxSizer* bSizer0; - bSizer0 = new wxBoxSizer( wxVERTICAL ); - - m_notebook1 = new wxNotebook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 ); - m_panel1 = new wxPanel( m_notebook1, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); - wxFlexGridSizer* fgSizer1; - fgSizer1 = new wxFlexGridSizer( 5, 2, 0, 0 ); - fgSizer1->SetFlexibleDirection( wxBOTH ); - fgSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_NONE ); - - m_button1 = new wxButton( m_panel1, wxID_ANY, _("wxButton"), wxDefaultPosition, wxDefaultSize, 0 ); - fgSizer1->Add( m_button1, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 20 ); - - m_staticText1 = new wxStaticText( m_panel1, wxID_ANY, _("wxStaticText"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText1->Wrap( -1 ); - fgSizer1->Add( m_staticText1, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 20 ); - - m_checkBox1 = new wxCheckBox( m_panel1, wxID_ANY, _("Checked"), wxDefaultPosition, wxDefaultSize, 0 ); - m_checkBox1->SetValue(true); - - m_checkBox1->SetToolTip( _("wxCheckBox") ); - - fgSizer1->Add( m_checkBox1, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 20 ); - - m_checkBox2 = new wxCheckBox( m_panel1, wxID_ANY, _("Unchecked"), wxDefaultPosition, wxDefaultSize, 0 ); - - m_checkBox2->SetToolTip( _("wxCheckBox") ); - - fgSizer1->Add( m_checkBox2, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 20 ); - - m_radioBtn1 = new wxRadioButton( m_panel1, wxID_ANY, _("Checked"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP ); - m_radioBtn1->SetValue( true ); - m_radioBtn1->SetToolTip( _("wxRadioButton") ); - - fgSizer1->Add( m_radioBtn1, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 20 ); - - m_radioBtn2 = new wxRadioButton( m_panel1, wxID_ANY, _("Unchecked"), wxDefaultPosition, wxDefaultSize, 0 ); - m_radioBtn2->SetToolTip( _("wxRadioButton") ); - - fgSizer1->Add( m_radioBtn2, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 20 ); - - m_bpButton1 = new wxBitmapButton( m_panel1, wxID_ANY, wxBitmap( wxT("bitmaps/wxwin32x32.png"), wxBITMAP_TYPE_ANY ), wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW ); - m_bpButton1->SetToolTip( _("wxBitmapButton") ); - - m_bpButton1->SetToolTip( _("wxBitmapButton") ); - - fgSizer1->Add( m_bpButton1, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 20 ); - - m_bitmap1 = new wxStaticBitmap( m_panel1, wxID_ANY, wxBitmap( wxT("bitmaps/wxwin32x32.png"), wxBITMAP_TYPE_ANY ), wxDefaultPosition, wxDefaultSize, 0 ); - m_bitmap1->SetToolTip( _("wxStaticBitmap") ); - - fgSizer1->Add( m_bitmap1, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 20 ); - - m_gauge1 = new wxGauge( m_panel1, wxID_ANY, 100, wxDefaultPosition, wxDefaultSize, wxGA_HORIZONTAL, wxDefaultValidator, wxT("_Gauge") ); - m_gauge1->SetValue( 50 ); - m_gauge1->SetToolTip( _("wxGauge") ); - - fgSizer1->Add( m_gauge1, 1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 20 ); - - m_slider1 = new wxSlider( m_panel1, wxID_ANY, 50, 0, 100, wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL ); - m_slider1->SetToolTip( _("wxSlider") ); - - fgSizer1->Add( m_slider1, 1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 20 ); - - m_toggleBtn1 = new wxToggleButton( m_panel1, wxID_ANY, _("Untoggled"), wxDefaultPosition, wxDefaultSize, 0 ); - m_toggleBtn1->SetToolTip( _("wxToggleButton") ); - - fgSizer1->Add( m_toggleBtn1, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 20 ); - - m_toggleBtn2 = new wxToggleButton( m_panel1, wxID_ANY, _("Toggled"), wxDefaultPosition, wxDefaultSize, 0 ); - m_toggleBtn2->SetValue( true ); - m_toggleBtn2->SetToolTip( _("wxToggleButton") ); - - fgSizer1->Add( m_toggleBtn2, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 20 ); - - m_hyperlink1 = new wxHyperlinkCtrl( m_panel1, wxID_ANY, _("www.wxwidgets.org"), wxT("http://www.wxwidgets.org"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE ); - m_hyperlink1->SetToolTip( _("wxHyperlinkCtrl") ); - - fgSizer1->Add( m_hyperlink1, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 20 ); - - m_spinCtrl1 = new wxSpinCtrl( m_panel1, wxID_ANY, wxT("5"), wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 0, 10, 0 ); - m_spinCtrl1->SetToolTip( _("wxSpinCtrl") ); - - fgSizer1->Add( m_spinCtrl1, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 20 ); - - m_spinBtn1 = new wxSpinButton( m_panel1, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 ); - m_spinBtn1->SetToolTip( _("wxSpinButton") ); - - fgSizer1->Add( m_spinBtn1, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 20 ); - - m_scrollBar1 = new wxScrollBar( m_panel1, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSB_HORIZONTAL ); - m_scrollBar1->SetToolTip( _("wxScrollBar") ); - - fgSizer1->Add( m_scrollBar1, 1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 20 ); - - m_panel1->SetSizer( fgSizer1 ); - m_panel1->Layout(); - fgSizer1->Fit( m_panel1 ); - m_notebook1->AddPage( m_panel1, _("Tiny Controls"), true ); - m_panel2 = new wxPanel( m_notebook1, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); - wxFlexGridSizer* fgSizer2; - fgSizer2 = new wxFlexGridSizer( 5, 2, 0, 0 ); - fgSizer2->SetFlexibleDirection( wxBOTH ); - fgSizer2->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); - - wxString m_checkList1Choices[] = { _("wxCheckListBox"), _("Item1"), _("Item2") }; - int m_checkList1NChoices = sizeof( m_checkList1Choices ) / sizeof( wxString ); - m_checkList1 = new wxCheckListBox( m_panel2, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_checkList1NChoices, m_checkList1Choices, 0 ); - fgSizer2->Add( m_checkList1, 1, wxALL|wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 20 ); - - m_listBox1 = new wxListBox( m_panel2, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 ); - m_listBox1->Append( _("wxListBox") ); - m_listBox1->Append( _("Item1") ); - m_listBox1->Append( _("Item2") ); - fgSizer2->Add( m_listBox1, 1, wxALL|wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 20 ); - - wxString m_radioBox1Choices[] = { _("Item1"), _("Item2") }; - int m_radioBox1NChoices = sizeof( m_radioBox1Choices ) / sizeof( wxString ); - m_radioBox1 = new wxRadioBox( m_panel2, wxID_ANY, _("wxRadioBox"), wxDefaultPosition, wxDefaultSize, m_radioBox1NChoices, m_radioBox1Choices, 1, wxRA_SPECIFY_COLS ); - m_radioBox1->SetSelection( 0 ); - fgSizer2->Add( m_radioBox1, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 20 ); - - m_staticBox1 = new wxStaticBox(m_panel2,wxID_ANY, _("wxStaticBox"), wxDefaultPosition, wxDefaultSize, 0, _("_StaticBox")); - - - fgSizer2->Add( m_staticBox1, 1, wxALL|wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 20 ); - - m_treeCtrl1 = new wxTreeCtrl( m_panel2, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTR_DEFAULT_STYLE|wxSUNKEN_BORDER ); - fgSizer2->Add( m_treeCtrl1, 1, wxALL|wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 20 ); - - m_listCtrl1 = new wxListCtrl( m_panel2, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_REPORT|wxSUNKEN_BORDER ); - m_listCtrl1->SetToolTip( _("wxListCtrl") ); - - fgSizer2->Add( m_listCtrl1, 1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 20 ); - - m_animationCtrl1 = new wxAnimationCtrl(m_panel2, wxID_ANY); - m_animationCtrl1->SetToolTip(_("wxAnimationCtrl")); - if (m_animationCtrl1->LoadFile(wxT("bitmaps/throbber.gif"))) - m_animationCtrl1->Play(); - fgSizer2->Add( m_animationCtrl1, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 20 ); - - m_collPane1 = new wxCollapsiblePane(m_panel2, -1, wxT("Collapsed")); - wxWindow *win = m_collPane1->GetPane(); - m_collPane1->SetToolTip(_("wxCollapsiblePane")); - - wxBoxSizer * collbSizer = new wxBoxSizer(wxVERTICAL); - wxStaticText* m_collSText = new wxStaticText(win, -1, wxT("You can place")); - wxButton* m_collBut = new wxButton(win, -1, wxT("anything")); - wxTextCtrl* m_collText = new wxTextCtrl(win, -1, wxT("inside a wxCollapsiblePane")); - collbSizer->Add( m_collSText, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 0 ); - collbSizer->Add( m_collBut, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 0 ); - collbSizer->Add( m_collText, 0, wxALL|wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 0 ); - win->SetSizer(collbSizer); - fgSizer2->Add( m_collPane1, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); - - m_collPane2 = new wxCollapsiblePane(m_panel2, -1, wxT("Expanded")); - wxWindow *win2 = m_collPane2->GetPane(); - m_collPane2->SetToolTip(_("wxCollapsiblePane")); - - wxBoxSizer * collbSizer2 = new wxBoxSizer(wxVERTICAL); - wxStaticText* m_collSText2 = new wxStaticText(win2, -1, wxT("You can place")); - wxButton* m_collBut2 = new wxButton(win2, -1, wxT("anything")); - wxTextCtrl* m_collText2 = new wxTextCtrl(win2, -1, wxT("inside a wxCollapsiblePane")); - collbSizer2->Add( m_collSText2, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 0 ); - collbSizer2->Add( m_collBut2, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 0 ); - collbSizer2->Add( m_collText2, 0, wxALL|wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 0 ); - win2->SetSizer(collbSizer2); - - m_collPane2->Expand(); - fgSizer2->Add( m_collPane2, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); - - m_panel2->SetSizer( fgSizer2 ); - m_panel2->Layout(); - fgSizer2->Fit( m_panel2 ); - m_notebook1->AddPage( m_panel2, _("Multiple choice Controls"), false ); - m_panel3 = new wxPanel( m_notebook1, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); - wxBoxSizer* bSizer2; - bSizer2 = new wxBoxSizer( wxVERTICAL ); - - m_textCtrl1 = new wxTextCtrl( m_panel3, wxID_ANY, _("Single-line"), wxDefaultPosition, wxDefaultSize, 0 ); - m_textCtrl1->SetToolTip( _("wxTextCtrl") ); - - bSizer2->Add( m_textCtrl1, 0, wxTOP|wxRIGHT|wxLEFT, 20 ); - - - bSizer2->Add( 0, 10, 0, 0, 5 ); - - m_textCtrl2 = new wxTextCtrl( m_panel3, wxID_ANY, _("Multi-line\nLine1\nLine2\n"), wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE ); - m_textCtrl2->SetToolTip( _("wxTextCtrl") ); - - bSizer2->Add( m_textCtrl2, 0, wxBOTTOM|wxRIGHT|wxLEFT, 20 ); - - m_richText1 = new wxRichTextCtrl( m_panel3, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1,-1 ), 0|wxVSCROLL|wxHSCROLL|wxNO_BORDER|wxWANTS_CHARS ); - m_richText1->SetToolTip( _("wxRichTextCtrl") ); - m_richText1->SetMinSize( wxSize( 200,200 ) ); - - bSizer2->Add( m_richText1, 0, wxALL, 20 ); - - m_panel3->SetSizer( bSizer2 ); - m_panel3->Layout(); - bSizer2->Fit( m_panel3 ); - m_notebook1->AddPage( m_panel3, _("[Rich]Text Controls"), false ); - m_panel4 = new wxPanel( m_notebook1, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); - wxFlexGridSizer* fgSizer5; - fgSizer5 = new wxFlexGridSizer( 2, 2, 10, 10 ); - fgSizer5->SetFlexibleDirection( wxBOTH ); - fgSizer5->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); - - m_colourPicker1 = new wxColourPickerCtrl( m_panel4, wxID_ANY, *wxBLACK, wxDefaultPosition, wxDefaultSize, wxCLRP_DEFAULT_STYLE ); - m_colourPicker1->SetToolTip( _("wxColourPickerCtrl") ); - - fgSizer5->Add( m_colourPicker1, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 20 ); - - m_fontPicker1 = new wxFontPickerCtrl( m_panel4, wxID_ANY, wxNullFont, wxDefaultPosition, wxDefaultSize, wxFNTP_DEFAULT_STYLE ); - m_fontPicker1->SetMaxPointSize( 100 ); - m_fontPicker1->SetToolTip( _("wxFontPickerCtrl") ); - - fgSizer5->Add( m_fontPicker1, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 20 ); - - m_filePicker1 = new wxFilePickerCtrl( m_panel4, wxID_ANY, wxEmptyString, _("Select a file"), wxT("*.*"), wxDefaultPosition, wxDefaultSize, wxFLP_DEFAULT_STYLE, wxDefaultValidator, wxT("_FilePickerCtrl") ); - m_filePicker1->SetToolTip( _("wxFilePickerCtrl") ); - - fgSizer5->Add( m_filePicker1, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 20 ); - - - fgSizer5->Add( 0, 0, 1, wxEXPAND, 5 ); - - m_calendar1 = new wxCalendarCtrl( m_panel4, wxID_ANY, wxDefaultDateTime, wxDefaultPosition, wxDefaultSize, wxCAL_SHOW_HOLIDAYS ); - m_calendar1->SetToolTip( _("wxCalendarCtrl") ); - - fgSizer5->Add( m_calendar1, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 20 ); - - m_datePicker1 = new wxDatePickerCtrl( m_panel4, wxID_ANY, wxDefaultDateTime, wxDefaultPosition, wxDefaultSize, wxDP_DEFAULT ); - m_datePicker1->SetToolTip( _("wxDatePickerCtrl") ); - - fgSizer5->Add( m_datePicker1, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 20 ); - - m_genericDirCtrl1 = new wxGenericDirCtrl( m_panel4, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxDIRCTRL_3D_INTERNAL|wxSUNKEN_BORDER, wxEmptyString, 0, wxT("_GenericDirCtrl") ); - - m_genericDirCtrl1->ShowHidden( false ); - m_genericDirCtrl1->SetToolTip( _("wxGenericDirCtrl") ); - m_genericDirCtrl1->SetMinSize( wxSize( -1,150 ) ); - - fgSizer5->Add( m_genericDirCtrl1, 1, wxEXPAND|wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 20 ); - - m_dirPicker1 = new wxDirPickerCtrl( m_panel4, wxID_ANY, wxEmptyString, _("Select a folder"), wxDefaultPosition, wxDefaultSize, wxDIRP_DEFAULT_STYLE, wxDefaultValidator, wxT("_DirPickerCtrl") ); - m_dirPicker1->SetToolTip( _("wxDirPickerCtrl") ); - - fgSizer5->Add( m_dirPicker1, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 20 ); - - m_panel4->SetSizer( fgSizer5 ); - m_panel4->Layout(); - fgSizer5->Fit( m_panel4 ); - m_notebook1->AddPage( m_panel4, _("Picker Controls"), false ); - m_panel5 = new wxPanel( m_notebook1, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); - wxFlexGridSizer* fgSizer4; - fgSizer4 = new wxFlexGridSizer( 2, 2, 0, 0 ); - fgSizer4->SetFlexibleDirection( wxBOTH ); - fgSizer4->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); - - wxString m_choice1Choices[] = { _("wxChoice"), _("Item1"), _("Item2"), _("Item3"), _("Item4") }; - int m_choice1NChoices = sizeof( m_choice1Choices ) / sizeof( wxString ); - m_choice1 = new wxChoice( m_panel5, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choice1NChoices, m_choice1Choices, 0 ); - m_choice1->SetSelection( 0 ); - fgSizer4->Add( m_choice1, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 20 ); - - m_comboBox1 = new wxComboBox( m_panel5, wxID_ANY, _("wxComboBox"), wxDefaultPosition, wxDefaultSize, 0, NULL, 0 ); - m_comboBox1->Append( _("wxComboBox") ); - m_comboBox1->Append( _("Item1") ); - m_comboBox1->Append( _("Item2") ); - m_comboBox1->Append( _("Item3") ); - m_comboBox1->Append( _("Item4") ); - fgSizer4->Add( m_comboBox1, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 20 ); - - - fgSizer4->Add( 0, 120, 1, wxEXPAND, 5 ); - - - fgSizer4->Add( 0, 120, 1, wxEXPAND, 5 ); - - m_bmpComboBox1 = new wxBitmapComboBox(m_panel5, wxID_ANY,_("Item1")); - m_bmpComboBox1->Append(_("Item1"), wxBitmap(_T("bitmaps/bell.png"),wxBITMAP_TYPE_PNG)); - m_bmpComboBox1->Append(_("Item2"), wxBitmap(_T("bitmaps/sound.png"),wxBITMAP_TYPE_PNG)); - m_bmpComboBox1->Append(_("Item3"), wxBitmap(_T("bitmaps/bell.png"),wxBITMAP_TYPE_PNG)); - m_bmpComboBox1->Append(_("Item4"), wxBitmap(_T("bitmaps/sound.png"),wxBITMAP_TYPE_PNG)); - m_bmpComboBox1->SetToolTip(_("wxBitmapComboBox")); - fgSizer4->Add( m_bmpComboBox1, 1, wxALL|wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 20 ); - - m_ownerDrawnComboBox1 = PenStyleComboBox::CreateSample(m_panel5); - m_ownerDrawnComboBox1->SetToolTip(_("wxOwnerDrawnComboBox")); - fgSizer4->Add( m_ownerDrawnComboBox1, 1, wxALL|wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 20 ); - - - fgSizer4->Add( 0, 90, 1, wxEXPAND, 5 ); - - - fgSizer4->Add( 0, 90, 1, wxEXPAND, 5 ); - - m_comboCtrl1 = new wxComboCtrl(m_panel5,wxID_ANY,wxEmptyString); - // first of all, set the popup control! - ListViewComboPopup* popupList = new ListViewComboPopup(); - m_comboCtrl1->SetPopupControl(popupList); - m_comboCtrl1->SetPopupMaxHeight(80); - - m_comboCtrl1->SetText(wxT("wxComboCtrl")); - m_comboCtrl1->SetToolTip(_("wxComboCtrl")); - - // Populate using wxListView methods - popupList->InsertItem(popupList->GetItemCount(),wxT("wxComboCtrl")); - popupList->InsertItem(popupList->GetItemCount(),wxT("with")); - popupList->InsertItem(popupList->GetItemCount(),wxT("wxListView")); - popupList->InsertItem(popupList->GetItemCount(),wxT("popup")); - popupList->InsertItem(popupList->GetItemCount(),wxT("Item1")); - popupList->InsertItem(popupList->GetItemCount(),wxT("Item2")); - popupList->InsertItem(popupList->GetItemCount(),wxT("Item3")); - - popupList->Select(0, true); - fgSizer4->Add( m_comboCtrl1, 1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 20 ); - - m_comboCtrl2 = new wxComboCtrl(m_panel5,wxID_ANY,wxEmptyString); - // first of all, set the popup control! - TreeCtrlComboPopup* popupTree = new TreeCtrlComboPopup(); - m_comboCtrl2->SetPopupControl(popupTree); - m_comboCtrl2->SetPopupMaxHeight(80); - - m_comboCtrl2->SetText(wxT("wxComboCtrl")); - m_comboCtrl2->SetToolTip(_("wxComboCtrl")); - - //Add a root and some nodes using wxTreeCtrl methods - wxTreeItemId root = popupTree->AddRoot(_("wxComboCtrl")); - - popupTree->AppendItem(root, _("with")); - popupTree->AppendItem(root, _("wxTreeCtrl")); - - wxTreeItemId node2 = popupTree->AppendItem(root, _("popout")); - popupTree->AppendItem(node2, _("Node1")); - popupTree->AppendItem(node2, _("Node2")); - - popupTree->ExpandAll(); - fgSizer4->Add( m_comboCtrl2, 1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 20 ); - - m_panel5->SetSizer( fgSizer4 ); - m_panel5->Layout(); - fgSizer4->Fit( m_panel5 ); - m_notebook1->AddPage( m_panel5, _("Drop-down Controls"), false ); - - bSizer0->Add( m_notebook1, 1, wxEXPAND | wxALL, 0 ); - - this->SetSizer( bSizer0 ); - this->Layout(); - bSizer0->Fit( this ); - statusBar = this->CreateStatusBar( 1, wxST_SIZEGRIP, wxID_ANY ); - - // Connect Events - this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( GUIFrame::OnClose ) ); - this->Connect( m_menuSeeScr->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( GUIFrame::OnSeeScreenshots ) ); - this->Connect( m_menuFileQuit->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( GUIFrame::OnQuit ) ); - this->Connect( m_menuCapFullScreen->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( GUIFrame::OnCaptureFullScreen ) ); - this->Connect( m_menuCapRect->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( GUIFrame::OnCaptureRect ) ); - this->Connect( m_menuEndCapRect->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( GUIFrame::OnEndCaptureRect ) ); - this->Connect( m_menuCapAll->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( GUIFrame::OnCaptureAllControls ) ); - this->Connect( m_menuHelpAbout->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( GUIFrame::OnAbout ) ); - m_notebook1->Connect( wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED, wxNotebookEventHandler( GUIFrame::OnNotebookPageChanged ), NULL, this ); - m_notebook1->Connect( wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING, wxNotebookEventHandler( GUIFrame::OnNotebookPageChanging ), NULL, this ); + this->SetSizeHints( wxDefaultSize, wxDefaultSize ); + + mbar = new wxMenuBar( 0 ); + fileMenu = new wxMenu(); + wxMenuItem* m_menuSeeScr; + 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 ); + fileMenu->Append( m_menuSeeScr ); + + fileMenu->AppendSeparator(); + + wxMenuItem* m_menuFileQuit; + m_menuFileQuit = new wxMenuItem( fileMenu, wxID_EXIT, wxString( _("&Quit") ) + wxT('\t') + wxT("Alt+F4"), _("Quits the application."), wxITEM_NORMAL ); + fileMenu->Append( m_menuFileQuit ); + + mbar->Append( fileMenu, _("&File") ); + + captureMenu = new wxMenu(); + wxMenuItem* m_menuCapFullScreen; + m_menuCapFullScreen = new wxMenuItem( captureMenu, idMenuCapFullScreen, wxString( _("&Full Screen") ) + wxT('\t') + wxT("Ctrl+Alt+F"), _("Takes a screenshot of the entire screen."), wxITEM_NORMAL ); + captureMenu->Append( m_menuCapFullScreen ); + + m_menuCapRect = new wxMenuItem( captureMenu, idMenuCapRect, wxString( _("Regions") ) + wxT('\t') + wxT("Ctrl+Alt+R"), _("Manually specify rectangular regions for the screenshots."), wxITEM_NORMAL ); + captureMenu->Append( m_menuCapRect ); + + m_menuEndCapRect = new wxMenuItem( captureMenu, idMenuEndCapRect, wxString( _("Regions") ) + wxT('\t') + wxT("Ctrl+Alt+E"), _("Stop manually generating screenshots."), wxITEM_NORMAL ); + captureMenu->Append( m_menuEndCapRect ); + m_menuEndCapRect->Enable( false ); + + wxMenuItem* m_menuCapAll; + m_menuCapAll = new wxMenuItem( captureMenu, idMenuCapAll, wxString( _("Capture All") ) + wxT('\t') + wxT("Ctrl+Alt+A"), _("Takes screenshots for all controls automatically."), wxITEM_NORMAL ); + captureMenu->Append( m_menuCapAll ); + + mbar->Append( captureMenu, _("&Capture") ); + + helpMenu = new wxMenu(); + wxMenuItem* m_menuHelpAbout; + m_menuHelpAbout = new wxMenuItem( helpMenu, wxID_ABOUT, wxString( _("&About...") ) + wxT('\t') + wxT("F1"), _("Shows info about this application."), wxITEM_NORMAL ); + helpMenu->Append( m_menuHelpAbout ); + + mbar->Append( helpMenu, _("&Help") ); + + this->SetMenuBar( mbar ); + + wxBoxSizer* bSizer0; + bSizer0 = new wxBoxSizer( wxVERTICAL ); + + m_notebook1 = new wxNotebook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 ); + m_panel1 = new wxPanel( m_notebook1, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + wxFlexGridSizer* fgSizer1; + fgSizer1 = new wxFlexGridSizer( 5, 2, 0, 0 ); + fgSizer1->SetFlexibleDirection( wxBOTH ); + fgSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_NONE ); + + m_button1 = new wxButton( m_panel1, wxID_ANY, _("wxButton"), wxDefaultPosition, wxDefaultSize, 0 ); + fgSizer1->Add( m_button1, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 20 ); + + m_staticText1 = new wxStaticText( m_panel1, wxID_ANY, _("wxStaticText"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText1->Wrap( -1 ); + fgSizer1->Add( m_staticText1, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 20 ); + + m_checkBox1 = new wxCheckBox( m_panel1, wxID_ANY, _("Checked"), wxDefaultPosition, wxDefaultSize, 0 ); + m_checkBox1->SetValue(true); + + m_checkBox1->SetToolTip( _("wxCheckBox") ); + + fgSizer1->Add( m_checkBox1, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 20 ); + + m_checkBox2 = new wxCheckBox( m_panel1, wxID_ANY, _("Unchecked"), wxDefaultPosition, wxDefaultSize, 0 ); + + m_checkBox2->SetToolTip( _("wxCheckBox") ); + + fgSizer1->Add( m_checkBox2, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 20 ); + + m_radioBtn1 = new wxRadioButton( m_panel1, wxID_ANY, _("Checked"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP ); + m_radioBtn1->SetValue( true ); + m_radioBtn1->SetToolTip( _("wxRadioButton") ); + + fgSizer1->Add( m_radioBtn1, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 20 ); + + m_radioBtn2 = new wxRadioButton( m_panel1, wxID_ANY, _("Unchecked"), wxDefaultPosition, wxDefaultSize, 0 ); + m_radioBtn2->SetToolTip( _("wxRadioButton") ); + + fgSizer1->Add( m_radioBtn2, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 20 ); + + m_bpButton1 = new wxBitmapButton( m_panel1, wxID_ANY, wxBitmap( wxT("bitmaps/wxwin32x32.png"), wxBITMAP_TYPE_ANY ), wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW ); + m_bpButton1->SetToolTip( _("wxBitmapButton") ); + + m_bpButton1->SetToolTip( _("wxBitmapButton") ); + + fgSizer1->Add( m_bpButton1, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 20 ); + + m_bitmap1 = new wxStaticBitmap( m_panel1, wxID_ANY, wxBitmap( wxT("bitmaps/wxwin32x32.png"), wxBITMAP_TYPE_ANY ), wxDefaultPosition, wxDefaultSize, 0 ); + m_bitmap1->SetToolTip( _("wxStaticBitmap") ); + + fgSizer1->Add( m_bitmap1, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 20 ); + + m_gauge1 = new wxGauge( m_panel1, wxID_ANY, 100, wxDefaultPosition, wxDefaultSize, wxGA_HORIZONTAL, wxDefaultValidator, wxT("_Gauge") ); + m_gauge1->SetValue( 50 ); + m_gauge1->SetToolTip( _("wxGauge") ); + + fgSizer1->Add( m_gauge1, 1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 20 ); + + m_slider1 = new wxSlider( m_panel1, wxID_ANY, 50, 0, 100, wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL ); + m_slider1->SetToolTip( _("wxSlider") ); + + fgSizer1->Add( m_slider1, 1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 20 ); + + m_toggleBtn1 = new wxToggleButton( m_panel1, wxID_ANY, _("Untoggled"), wxDefaultPosition, wxDefaultSize, 0 ); + m_toggleBtn1->SetToolTip( _("wxToggleButton") ); + + fgSizer1->Add( m_toggleBtn1, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 20 ); + + m_toggleBtn2 = new wxToggleButton( m_panel1, wxID_ANY, _("Toggled"), wxDefaultPosition, wxDefaultSize, 0 ); + m_toggleBtn2->SetValue( true ); + m_toggleBtn2->SetToolTip( _("wxToggleButton") ); + + fgSizer1->Add( m_toggleBtn2, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 20 ); + + m_hyperlink1 = new wxHyperlinkCtrl( m_panel1, wxID_ANY, _("www.wxwidgets.org"), wxT("http://www.wxwidgets.org"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE ); + m_hyperlink1->SetToolTip( _("wxHyperlinkCtrl") ); + + fgSizer1->Add( m_hyperlink1, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 20 ); + + m_spinCtrl1 = new wxSpinCtrl( m_panel1, wxID_ANY, wxT("5"), wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 0, 10, 0 ); + m_spinCtrl1->SetToolTip( _("wxSpinCtrl") ); + + fgSizer1->Add( m_spinCtrl1, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 20 ); + + m_spinBtn1 = new wxSpinButton( m_panel1, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 ); + m_spinBtn1->SetToolTip( _("wxSpinButton") ); + + fgSizer1->Add( m_spinBtn1, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 20 ); + + m_scrollBar1 = new wxScrollBar( m_panel1, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSB_HORIZONTAL ); + m_scrollBar1->SetToolTip( _("wxScrollBar") ); + + fgSizer1->Add( m_scrollBar1, 1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 20 ); + + m_panel1->SetSizer( fgSizer1 ); + m_panel1->Layout(); + fgSizer1->Fit( m_panel1 ); + m_notebook1->AddPage( m_panel1, _("Tiny Controls"), true ); + m_panel2 = new wxPanel( m_notebook1, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + wxFlexGridSizer* fgSizer2; + fgSizer2 = new wxFlexGridSizer( 5, 2, 0, 0 ); + fgSizer2->SetFlexibleDirection( wxBOTH ); + fgSizer2->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); + + wxString m_checkList1Choices[] = { _("wxCheckListBox"), _("Item1"), _("Item2") }; + int m_checkList1NChoices = sizeof( m_checkList1Choices ) / sizeof( wxString ); + m_checkList1 = new wxCheckListBox( m_panel2, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_checkList1NChoices, m_checkList1Choices, 0 ); + fgSizer2->Add( m_checkList1, 1, wxALL|wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 20 ); + + m_listBox1 = new wxListBox( m_panel2, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 ); + m_listBox1->Append( _("wxListBox") ); + m_listBox1->Append( _("Item1") ); + m_listBox1->Append( _("Item2") ); + fgSizer2->Add( m_listBox1, 1, wxALL|wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 20 ); + + wxString m_radioBox1Choices[] = { _("Item1"), _("Item2") }; + int m_radioBox1NChoices = sizeof( m_radioBox1Choices ) / sizeof( wxString ); + m_radioBox1 = new wxRadioBox( m_panel2, wxID_ANY, _("wxRadioBox"), wxDefaultPosition, wxDefaultSize, m_radioBox1NChoices, m_radioBox1Choices, 1, wxRA_SPECIFY_COLS ); + m_radioBox1->SetSelection( 0 ); + fgSizer2->Add( m_radioBox1, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 20 ); + + m_staticBox1 = new wxStaticBox(m_panel2,wxID_ANY, _("wxStaticBox"), wxDefaultPosition, wxDefaultSize, 0, _("_StaticBox")); + + + fgSizer2->Add( m_staticBox1, 1, wxALL|wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 20 ); + + m_treeCtrl1 = new wxTreeCtrl( m_panel2, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTR_DEFAULT_STYLE|wxSUNKEN_BORDER ); + fgSizer2->Add( m_treeCtrl1, 1, wxALL|wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 20 ); + + m_listCtrl1 = new wxListCtrl( m_panel2, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_REPORT|wxSUNKEN_BORDER ); + m_listCtrl1->SetToolTip( _("wxListCtrl") ); + + fgSizer2->Add( m_listCtrl1, 1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 20 ); + + m_animationCtrl1 = new wxAnimationCtrl(m_panel2, wxID_ANY); + m_animationCtrl1->SetToolTip(_("wxAnimationCtrl")); + if (m_animationCtrl1->LoadFile(wxT("bitmaps/throbber.gif"))) + m_animationCtrl1->Play(); + fgSizer2->Add( m_animationCtrl1, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 20 ); + + m_collPane1 = new wxCollapsiblePane(m_panel2, -1, wxT("Collapsed")); + wxWindow *win = m_collPane1->GetPane(); + m_collPane1->SetToolTip(_("wxCollapsiblePane")); + + wxBoxSizer * collbSizer = new wxBoxSizer(wxVERTICAL); + wxStaticText* m_collSText = new wxStaticText(win, -1, wxT("You can place")); + wxButton* m_collBut = new wxButton(win, -1, wxT("anything")); + wxTextCtrl* m_collText = new wxTextCtrl(win, -1, wxT("inside a wxCollapsiblePane")); + collbSizer->Add( m_collSText, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 0 ); + collbSizer->Add( m_collBut, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 0 ); + collbSizer->Add( m_collText, 0, wxALL|wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 0 ); + win->SetSizer(collbSizer); + fgSizer2->Add( m_collPane1, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); + + m_collPane2 = new wxCollapsiblePane(m_panel2, -1, wxT("Expanded")); + wxWindow *win2 = m_collPane2->GetPane(); + m_collPane2->SetToolTip(_("wxCollapsiblePane")); + + wxBoxSizer * collbSizer2 = new wxBoxSizer(wxVERTICAL); + wxStaticText* m_collSText2 = new wxStaticText(win2, -1, wxT("You can place")); + wxButton* m_collBut2 = new wxButton(win2, -1, wxT("anything")); + wxTextCtrl* m_collText2 = new wxTextCtrl(win2, -1, wxT("inside a wxCollapsiblePane")); + collbSizer2->Add( m_collSText2, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 0 ); + collbSizer2->Add( m_collBut2, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 0 ); + collbSizer2->Add( m_collText2, 0, wxALL|wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 0 ); + win2->SetSizer(collbSizer2); + + m_collPane2->Expand(); + fgSizer2->Add( m_collPane2, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); + + m_panel2->SetSizer( fgSizer2 ); + m_panel2->Layout(); + fgSizer2->Fit( m_panel2 ); + m_notebook1->AddPage( m_panel2, _("Multiple choice Controls"), false ); + m_panel3 = new wxPanel( m_notebook1, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + wxBoxSizer* bSizer2; + bSizer2 = new wxBoxSizer( wxVERTICAL ); + + m_textCtrl1 = new wxTextCtrl( m_panel3, wxID_ANY, _("Single-line"), wxDefaultPosition, wxDefaultSize, 0 ); + m_textCtrl1->SetToolTip( _("wxTextCtrl") ); + + bSizer2->Add( m_textCtrl1, 0, wxTOP|wxRIGHT|wxLEFT, 20 ); + + + bSizer2->Add( 0, 10, 0, 0, 5 ); + + m_textCtrl2 = new wxTextCtrl( m_panel3, wxID_ANY, _("Multi-line\nLine1\nLine2\n"), wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE ); + m_textCtrl2->SetToolTip( _("wxTextCtrl") ); + + bSizer2->Add( m_textCtrl2, 0, wxBOTTOM|wxRIGHT|wxLEFT, 20 ); + + m_richText1 = new wxRichTextCtrl( m_panel3, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1,-1 ), 0|wxVSCROLL|wxHSCROLL|wxNO_BORDER|wxWANTS_CHARS ); + m_richText1->SetToolTip( _("wxRichTextCtrl") ); + m_richText1->SetMinSize( wxSize( 200,200 ) ); + + bSizer2->Add( m_richText1, 0, wxALL, 20 ); + + m_panel3->SetSizer( bSizer2 ); + m_panel3->Layout(); + bSizer2->Fit( m_panel3 ); + m_notebook1->AddPage( m_panel3, _("[Rich]Text Controls"), false ); + m_panel4 = new wxPanel( m_notebook1, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + wxFlexGridSizer* fgSizer5; + fgSizer5 = new wxFlexGridSizer( 2, 2, 10, 10 ); + fgSizer5->SetFlexibleDirection( wxBOTH ); + fgSizer5->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); + + m_colourPicker1 = new wxColourPickerCtrl( m_panel4, wxID_ANY, *wxBLACK, wxDefaultPosition, wxDefaultSize, wxCLRP_DEFAULT_STYLE ); + m_colourPicker1->SetToolTip( _("wxColourPickerCtrl") ); + + fgSizer5->Add( m_colourPicker1, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 20 ); + + m_fontPicker1 = new wxFontPickerCtrl( m_panel4, wxID_ANY, wxNullFont, wxDefaultPosition, wxDefaultSize, wxFNTP_DEFAULT_STYLE ); + m_fontPicker1->SetMaxPointSize( 100 ); + m_fontPicker1->SetToolTip( _("wxFontPickerCtrl") ); + + fgSizer5->Add( m_fontPicker1, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 20 ); + + m_filePicker1 = new wxFilePickerCtrl( m_panel4, wxID_ANY, wxEmptyString, _("Select a file"), wxT("*.*"), wxDefaultPosition, wxDefaultSize, wxFLP_DEFAULT_STYLE, wxDefaultValidator, wxT("_FilePickerCtrl") ); + m_filePicker1->SetToolTip( _("wxFilePickerCtrl") ); + + fgSizer5->Add( m_filePicker1, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 20 ); + + + fgSizer5->Add( 0, 0, 1, wxEXPAND, 5 ); + + m_calendar1 = new wxCalendarCtrl( m_panel4, wxID_ANY, wxDefaultDateTime, wxDefaultPosition, wxDefaultSize, wxCAL_SHOW_HOLIDAYS ); + m_calendar1->SetToolTip( _("wxCalendarCtrl") ); + + fgSizer5->Add( m_calendar1, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 20 ); + + m_datePicker1 = new wxDatePickerCtrl( m_panel4, wxID_ANY, wxDefaultDateTime, wxDefaultPosition, wxDefaultSize, wxDP_DEFAULT ); + m_datePicker1->SetToolTip( _("wxDatePickerCtrl") ); + + fgSizer5->Add( m_datePicker1, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 20 ); + + m_genericDirCtrl1 = new wxGenericDirCtrl( m_panel4, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxDIRCTRL_3D_INTERNAL|wxSUNKEN_BORDER, wxEmptyString, 0, wxT("_GenericDirCtrl") ); + + m_genericDirCtrl1->ShowHidden( false ); + m_genericDirCtrl1->SetToolTip( _("wxGenericDirCtrl") ); + m_genericDirCtrl1->SetMinSize( wxSize( -1,150 ) ); + + fgSizer5->Add( m_genericDirCtrl1, 1, wxEXPAND|wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 20 ); + + m_dirPicker1 = new wxDirPickerCtrl( m_panel4, wxID_ANY, wxEmptyString, _("Select a folder"), wxDefaultPosition, wxDefaultSize, wxDIRP_DEFAULT_STYLE, wxDefaultValidator, wxT("_DirPickerCtrl") ); + m_dirPicker1->SetToolTip( _("wxDirPickerCtrl") ); + + fgSizer5->Add( m_dirPicker1, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 20 ); + + m_panel4->SetSizer( fgSizer5 ); + m_panel4->Layout(); + fgSizer5->Fit( m_panel4 ); + m_notebook1->AddPage( m_panel4, _("Picker Controls"), false ); + m_panel5 = new wxPanel( m_notebook1, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + wxFlexGridSizer* fgSizer4; + fgSizer4 = new wxFlexGridSizer( 2, 2, 0, 0 ); + fgSizer4->SetFlexibleDirection( wxBOTH ); + fgSizer4->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); + + wxString m_choice1Choices[] = { _("wxChoice"), _("Item1"), _("Item2"), _("Item3"), _("Item4") }; + int m_choice1NChoices = sizeof( m_choice1Choices ) / sizeof( wxString ); + m_choice1 = new wxChoice( m_panel5, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choice1NChoices, m_choice1Choices, 0 ); + m_choice1->SetSelection( 0 ); + fgSizer4->Add( m_choice1, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 20 ); + + m_comboBox1 = new wxComboBox( m_panel5, wxID_ANY, _("wxComboBox"), wxDefaultPosition, wxDefaultSize, 0, NULL, 0 ); + m_comboBox1->Append( _("wxComboBox") ); + m_comboBox1->Append( _("Item1") ); + m_comboBox1->Append( _("Item2") ); + m_comboBox1->Append( _("Item3") ); + m_comboBox1->Append( _("Item4") ); + fgSizer4->Add( m_comboBox1, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 20 ); + + + fgSizer4->Add( 0, 120, 1, wxEXPAND, 5 ); + + + fgSizer4->Add( 0, 120, 1, wxEXPAND, 5 ); + + m_bmpComboBox1 = new wxBitmapComboBox(m_panel5, wxID_ANY,_("Item1")); + m_bmpComboBox1->Append(_("Item1"), wxBitmap(_T("bitmaps/bell.png"),wxBITMAP_TYPE_PNG)); + m_bmpComboBox1->Append(_("Item2"), wxBitmap(_T("bitmaps/sound.png"),wxBITMAP_TYPE_PNG)); + m_bmpComboBox1->Append(_("Item3"), wxBitmap(_T("bitmaps/bell.png"),wxBITMAP_TYPE_PNG)); + m_bmpComboBox1->Append(_("Item4"), wxBitmap(_T("bitmaps/sound.png"),wxBITMAP_TYPE_PNG)); + m_bmpComboBox1->SetToolTip(_("wxBitmapComboBox")); + fgSizer4->Add( m_bmpComboBox1, 1, wxALL|wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 20 ); + + m_ownerDrawnComboBox1 = PenStyleComboBox::CreateSample(m_panel5); + m_ownerDrawnComboBox1->SetToolTip(_("wxOwnerDrawnComboBox")); + fgSizer4->Add( m_ownerDrawnComboBox1, 1, wxALL|wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 20 ); + + + fgSizer4->Add( 0, 90, 1, wxEXPAND, 5 ); + + + fgSizer4->Add( 0, 90, 1, wxEXPAND, 5 ); + + m_comboCtrl1 = new wxComboCtrl(m_panel5,wxID_ANY,wxEmptyString); + // first of all, set the popup control! + ListViewComboPopup* popupList = new ListViewComboPopup(); + m_comboCtrl1->SetPopupControl(popupList); + m_comboCtrl1->SetPopupMaxHeight(80); + + m_comboCtrl1->SetText(wxT("wxComboCtrl")); + m_comboCtrl1->SetToolTip(_("wxComboCtrl")); + + // Populate using wxListView methods + popupList->InsertItem(popupList->GetItemCount(),wxT("wxComboCtrl")); + popupList->InsertItem(popupList->GetItemCount(),wxT("with")); + popupList->InsertItem(popupList->GetItemCount(),wxT("wxListView")); + popupList->InsertItem(popupList->GetItemCount(),wxT("popup")); + popupList->InsertItem(popupList->GetItemCount(),wxT("Item1")); + popupList->InsertItem(popupList->GetItemCount(),wxT("Item2")); + popupList->InsertItem(popupList->GetItemCount(),wxT("Item3")); + + popupList->Select(0, true); + fgSizer4->Add( m_comboCtrl1, 1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 20 ); + + m_comboCtrl2 = new wxComboCtrl(m_panel5,wxID_ANY,wxEmptyString); + // first of all, set the popup control! + TreeCtrlComboPopup* popupTree = new TreeCtrlComboPopup(); + m_comboCtrl2->SetPopupControl(popupTree); + m_comboCtrl2->SetPopupMaxHeight(80); + + m_comboCtrl2->SetText(wxT("wxComboCtrl")); + m_comboCtrl2->SetToolTip(_("wxComboCtrl")); + + //Add a root and some nodes using wxTreeCtrl methods + wxTreeItemId root = popupTree->AddRoot(_("wxComboCtrl")); + + popupTree->AppendItem(root, _("with")); + popupTree->AppendItem(root, _("wxTreeCtrl")); + + wxTreeItemId node2 = popupTree->AppendItem(root, _("popout")); + popupTree->AppendItem(node2, _("Node1")); + popupTree->AppendItem(node2, _("Node2")); + + popupTree->ExpandAll(); + fgSizer4->Add( m_comboCtrl2, 1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 20 ); + + m_panel5->SetSizer( fgSizer4 ); + m_panel5->Layout(); + fgSizer4->Fit( m_panel5 ); + m_notebook1->AddPage( m_panel5, _("Drop-down Controls"), false ); + + bSizer0->Add( m_notebook1, 1, wxEXPAND | wxALL, 0 ); + + this->SetSizer( bSizer0 ); + this->Layout(); + bSizer0->Fit( this ); + statusBar = this->CreateStatusBar( 1, wxST_SIZEGRIP, wxID_ANY ); + + // Connect Events + this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( GUIFrame::OnClose ) ); + this->Connect( m_menuSeeScr->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( GUIFrame::OnSeeScreenshots ) ); + this->Connect( m_menuFileQuit->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( GUIFrame::OnQuit ) ); + this->Connect( m_menuCapFullScreen->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( GUIFrame::OnCaptureFullScreen ) ); + this->Connect( m_menuCapRect->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( GUIFrame::OnCaptureRect ) ); + this->Connect( m_menuEndCapRect->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( GUIFrame::OnEndCaptureRect ) ); + this->Connect( m_menuCapAll->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( GUIFrame::OnCaptureAllControls ) ); + this->Connect( m_menuHelpAbout->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( GUIFrame::OnAbout ) ); + m_notebook1->Connect( wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED, wxNotebookEventHandler( GUIFrame::OnNotebookPageChanged ), NULL, this ); + m_notebook1->Connect( wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING, wxNotebookEventHandler( GUIFrame::OnNotebookPageChanging ), NULL, this ); } GUIFrame::~GUIFrame() { - // Disconnect Events - this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( GUIFrame::OnClose ) ); - this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( GUIFrame::OnSeeScreenshots ) ); - this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( GUIFrame::OnQuit ) ); - this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( GUIFrame::OnCaptureFullScreen ) ); - this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( GUIFrame::OnCaptureRect ) ); - this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( GUIFrame::OnEndCaptureRect ) ); - this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( GUIFrame::OnCaptureAllControls ) ); - this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( GUIFrame::OnAbout ) ); - m_notebook1->Disconnect( wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED, wxNotebookEventHandler( GUIFrame::OnNotebookPageChanged ), NULL, this ); - m_notebook1->Disconnect( wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING, wxNotebookEventHandler( GUIFrame::OnNotebookPageChanging ), NULL, this ); + // Disconnect Events + this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( GUIFrame::OnClose ) ); + this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( GUIFrame::OnSeeScreenshots ) ); + this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( GUIFrame::OnQuit ) ); + this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( GUIFrame::OnCaptureFullScreen ) ); + this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( GUIFrame::OnCaptureRect ) ); + this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( GUIFrame::OnEndCaptureRect ) ); + this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( GUIFrame::OnCaptureAllControls ) ); + this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( GUIFrame::OnAbout ) ); + m_notebook1->Disconnect( wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED, wxNotebookEventHandler( GUIFrame::OnNotebookPageChanged ), NULL, this ); + m_notebook1->Disconnect( wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING, wxNotebookEventHandler( GUIFrame::OnNotebookPageChanging ), NULL, this ); } diff --git a/utils/screenshotgen/src/guiframe.h b/utils/screenshotgen/src/guiframe.h index 940f41c81a..972add5e0b 100644 --- a/utils/screenshotgen/src/guiframe.h +++ b/utils/screenshotgen/src/guiframe.h @@ -1,160 +1,122 @@ -/////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Apr 16 2008) -// http://www.wxformbuilder.org/ -// -// PLEASE DO "NOT" EDIT THIS FILE! -/////////////////////////////////////////////////////////////////////////// +///////////////////////////////////////////////////////////////////////////// +// Name: guiframe.h +// Purpose: Defines the window containing all controls. +// Author: Utensil Candel (UtensilCandel@@gmail.com) +// RCS-ID: $Id$ +// Licence: wxWindows license +///////////////////////////////////////////////////////////////////////////// -#ifndef __guiframe__ -#define __guiframe__ +#ifndef _GUIFRAME_H_ +#define _GUIFRAME_H_ -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include #include "wx/animate.h" +#include "wx/bmpcbox.h" +#include "wx/calctrl.h" +#include "wx/clrpicker.h" #include "wx/collpane.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include "wx/datectrl.h" +#include "wx/dirctrl.h" +#include "wx/filepicker.h" +#include "wx/fontpicker.h" +#include "wx/hyperlink.h" +#include "wx/listctrl.h" +#include "wx/notebook.h" +#include "wx/richtext/richtextctrl.h" +#include "wx/spinbutt.h" +#include "wx/spinctrl.h" +#include "wx/tglbtn.h" +#include "wx/treectrl.h" + #include "customcombo.h" -#include -#include -#include -/////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////// -/// Class GUIFrame -/////////////////////////////////////////////////////////////////////////////// class GUIFrame : public wxFrame { - private: - - protected: - enum - { - idMenuCapFullScreen = 1000, - idMenuCapRect, - idMenuEndCapRect, - idMenuCapAll, - }; - - wxMenuBar* mbar; - wxMenu* fileMenu; - wxMenu* captureMenu; - wxMenuItem* m_menuCapRect; - wxMenuItem* m_menuEndCapRect; - wxMenu* helpMenu; - wxNotebook* m_notebook1; - wxPanel* m_panel1; - wxButton* m_button1; - wxStaticText* m_staticText1; - wxCheckBox* m_checkBox1; - wxCheckBox* m_checkBox2; - wxRadioButton* m_radioBtn1; - wxRadioButton* m_radioBtn2; - wxBitmapButton* m_bpButton1; - wxStaticBitmap* m_bitmap1; - wxGauge* m_gauge1; - wxSlider* m_slider1; - wxToggleButton* m_toggleBtn1; - wxToggleButton* m_toggleBtn2; - wxHyperlinkCtrl* m_hyperlink1; - wxSpinCtrl* m_spinCtrl1; - wxSpinButton* m_spinBtn1; - wxScrollBar* m_scrollBar1; - wxPanel* m_panel2; - wxCheckListBox* m_checkList1; - wxListBox* m_listBox1; - wxRadioBox* m_radioBox1; - wxStaticBox * m_staticBox1; - wxTreeCtrl* m_treeCtrl1; - wxListCtrl* m_listCtrl1; - wxAnimationCtrl * m_animationCtrl1; - wxCollapsiblePane *m_collPane1; - wxCollapsiblePane *m_collPane2; - wxPanel* m_panel3; - wxTextCtrl* m_textCtrl1; - - wxTextCtrl* m_textCtrl2; - wxRichTextCtrl* m_richText1; - wxPanel* m_panel4; - wxColourPickerCtrl* m_colourPicker1; - wxFontPickerCtrl* m_fontPicker1; - wxFilePickerCtrl* m_filePicker1; - - wxCalendarCtrl* m_calendar1; - wxDatePickerCtrl* m_datePicker1; - wxGenericDirCtrl* m_genericDirCtrl1; - wxDirPickerCtrl* m_dirPicker1; - wxPanel* m_panel5; - wxChoice* m_choice1; - wxComboBox* m_comboBox1; - - - wxBitmapComboBox * m_bmpComboBox1; - PenStyleComboBox * m_ownerDrawnComboBox1; - - - wxComboCtrl * m_comboCtrl1; - wxComboCtrl * m_comboCtrl2; - wxStatusBar* statusBar; - - // Virtual event handlers, overide them in your derived class - virtual void OnClose( wxCloseEvent& event ){ event.Skip(); } - virtual void OnSeeScreenshots( wxCommandEvent& event ){ event.Skip(); } - virtual void OnQuit( wxCommandEvent& event ){ event.Skip(); } - virtual void OnCaptureFullScreen( wxCommandEvent& event ){ event.Skip(); } - virtual void OnCaptureRect( wxCommandEvent& event ){ event.Skip(); } - virtual void OnEndCaptureRect( wxCommandEvent& event ){ event.Skip(); } - virtual void OnCaptureAllControls( wxCommandEvent& event ){ event.Skip(); } - virtual void OnAbout( wxCommandEvent& event ){ event.Skip(); } - virtual void OnNotebookPageChanged( wxNotebookEvent& event ){ event.Skip(); } - virtual void OnNotebookPageChanging( wxNotebookEvent& event ){ event.Skip(); } - - - public: - GUIFrame( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("wxWidgets Control Screenshot Generator"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_FRAME_STYLE|wxTAB_TRAVERSAL ); - ~GUIFrame(); - +public: + + GUIFrame( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("wxWidgets Control Screenshot Generator"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_FRAME_STYLE|wxTAB_TRAVERSAL ); + ~GUIFrame(); + +protected: + + enum + { + idMenuCapFullScreen = 1000, + idMenuCapRect, + idMenuEndCapRect, + idMenuCapAll, + }; + + wxMenuBar* mbar; + wxMenu* fileMenu; + wxMenu* captureMenu; + wxMenuItem* m_menuCapRect; + wxMenuItem* m_menuEndCapRect; + wxMenu* helpMenu; + wxNotebook* m_notebook1; + wxPanel* m_panel1; + wxButton* m_button1; + wxStaticText* m_staticText1; + wxCheckBox* m_checkBox1; + wxCheckBox* m_checkBox2; + wxRadioButton* m_radioBtn1; + wxRadioButton* m_radioBtn2; + wxBitmapButton* m_bpButton1; + wxStaticBitmap* m_bitmap1; + wxGauge* m_gauge1; + wxSlider* m_slider1; + wxToggleButton* m_toggleBtn1; + wxToggleButton* m_toggleBtn2; + wxHyperlinkCtrl* m_hyperlink1; + wxSpinCtrl* m_spinCtrl1; + wxSpinButton* m_spinBtn1; + wxScrollBar* m_scrollBar1; + wxPanel* m_panel2; + wxCheckListBox* m_checkList1; + wxListBox* m_listBox1; + wxRadioBox* m_radioBox1; + wxStaticBox * m_staticBox1; + wxTreeCtrl* m_treeCtrl1; + wxListCtrl* m_listCtrl1; + wxAnimationCtrl * m_animationCtrl1; + wxCollapsiblePane *m_collPane1; + wxCollapsiblePane *m_collPane2; + wxPanel* m_panel3; + wxTextCtrl* m_textCtrl1; + + wxTextCtrl* m_textCtrl2; + wxRichTextCtrl* m_richText1; + wxPanel* m_panel4; + wxColourPickerCtrl* m_colourPicker1; + wxFontPickerCtrl* m_fontPicker1; + wxFilePickerCtrl* m_filePicker1; + + wxCalendarCtrl* m_calendar1; + wxDatePickerCtrl* m_datePicker1; + wxGenericDirCtrl* m_genericDirCtrl1; + wxDirPickerCtrl* m_dirPicker1; + wxPanel* m_panel5; + wxChoice* m_choice1; + wxComboBox* m_comboBox1; + + wxBitmapComboBox * m_bmpComboBox1; + PenStyleComboBox * m_ownerDrawnComboBox1; + + wxComboCtrl * m_comboCtrl1; + wxComboCtrl * m_comboCtrl2; + wxStatusBar* statusBar; + + // Virtual event handlers, overide them in your derived class + virtual void OnClose( wxCloseEvent& event ){ event.Skip(); } + virtual void OnSeeScreenshots( wxCommandEvent& event ){ event.Skip(); } + virtual void OnQuit( wxCommandEvent& event ){ event.Skip(); } + virtual void OnCaptureFullScreen( wxCommandEvent& event ){ event.Skip(); } + virtual void OnCaptureRect( wxCommandEvent& event ){ event.Skip(); } + virtual void OnEndCaptureRect( wxCommandEvent& event ){ event.Skip(); } + virtual void OnCaptureAllControls( wxCommandEvent& event ){ event.Skip(); } + virtual void OnAbout( wxCommandEvent& event ){ event.Skip(); } + virtual void OnNotebookPageChanged( wxNotebookEvent& event ){ event.Skip(); } + virtual void OnNotebookPageChanging( wxNotebookEvent& event ){ event.Skip(); } }; -#endif //__guiframe__ +#endif //_GUIFRAME_H_ diff --git a/utils/screenshotgen/src/screenshot_app.cpp b/utils/screenshotgen/src/screenshot_app.cpp index 18b7cbe1a8..329a1cbdeb 100644 --- a/utils/screenshotgen/src/screenshot_app.cpp +++ b/utils/screenshotgen/src/screenshot_app.cpp @@ -10,15 +10,15 @@ #include "wx/wxprec.h" #ifdef __BORLANDC__ - #pragma hdrstop +#pragma hdrstop #endif -// for all others, include the necessary headers +// for all others, include the necessary headers wxWidgets headers) #ifndef WX_PRECOMP - #include "wx/wx.h" +#include "wx/wx.h" #endif -#include +#include "wx/richtext/richtextxml.h" #include "screenshot_app.h" #include "screenshot_main.h" diff --git a/utils/screenshotgen/src/screenshot_app.h b/utils/screenshotgen/src/screenshot_app.h index 1e1b485de8..8e58cb4516 100644 --- a/utils/screenshotgen/src/screenshot_app.h +++ b/utils/screenshotgen/src/screenshot_app.h @@ -6,10 +6,10 @@ // Licence: wxWindows license ///////////////////////////////////////////////////////////////////////////// -#ifndef WXSCREENSHOTAPP_H -#define WXSCREENSHOTAPP_H +#ifndef _SCREENSHOT_APP_H_ +#define _SCREENSHOT_APP_H_ -#include +#include "wx/app.h" class ScreenshotApp : public wxApp { @@ -17,4 +17,4 @@ public: virtual bool OnInit(); }; -#endif // WXSCREENSHOTAPP_H +#endif // _SCREENSHOT_APP_H_ diff --git a/utils/screenshotgen/src/screenshot_main.cpp b/utils/screenshotgen/src/screenshot_main.cpp index cebae3daf4..46e28632fb 100644 --- a/utils/screenshotgen/src/screenshot_main.cpp +++ b/utils/screenshotgen/src/screenshot_main.cpp @@ -1,6 +1,6 @@ ///////////////////////////////////////////////////////////////////////////// // Name: screenshot_main.cpp -// Purpose: Implement the Application Frame +// Purpose: Implements the window containing all controls. // Author: Utensil Candel (UtensilCandel@@gmail.com) // RCS-ID: $Id$ // Licence: wxWindows license @@ -10,25 +10,17 @@ #include "wx/wxprec.h" #ifdef __BORLANDC__ - #pragma hdrstop +#pragma hdrstop #endif -// for all others, include the necessary headers +// for all others, include the necessary headers wxWidgets headers) #ifndef WX_PRECOMP - #include - #include - #include - #include - #include - #include +#include "wx/wx.h" #endif -#include -#include -#include -#include -#include -#include +#include "wx/aboutdlg.h" +#include "wx/dir.h" +#include "wx/filesys.h" #include "screenshot_main.h" #include "ctrlmaskout.h" @@ -74,13 +66,7 @@ ScreenshotFrame::~ScreenshotFrame() } /* - Do some further customization on some controls generated by wxFormBuilder. - - wxFormBuilder does not allow customizations on some controls; - e.g. you cannot load a richtext file in a wxRichtextCtrl during initialization. - - Those customizations will be done here. - + Do some further customization on some controls. NB: under wxGTK for the radio button "unchecked" to be unchecked, it's important to put the wxRB_GROUP style on the first wxRadioButton @@ -88,7 +74,6 @@ ScreenshotFrame::~ScreenshotFrame() */ void ScreenshotFrame::InitFBControls() { - // For some reason, wxFormBuilder does not set the scrollbar range m_scrollBar1->SetScrollbar(50, 1, 100, 1); // Do the default selection for wxComboBox @@ -107,24 +92,24 @@ void ScreenshotFrame::InitFBControls() m_treeCtrl1->ExpandAll(); // Add items into wxListCtrl - m_listCtrl1->InsertColumn(0, "Names"); - m_listCtrl1->InsertColumn(1, "Values"); - for(long index = 0; index < 5; index++) { + m_listCtrl1->InsertColumn(0, "Names"); + m_listCtrl1->InsertColumn(1, "Values"); + for(long index = 0; index < 5; index++) { m_listCtrl1->InsertItem( index, wxString::Format(_("Item%d"),index)); - m_listCtrl1->SetItem(index, 1, wxString::Format("%d", index)); - } + m_listCtrl1->SetItem(index, 1, wxString::Format("%d", index)); + } - // Init file and dir pickers - wxString file, dir; + // Init file and dir pickers + wxString file, dir; #if defined(__WXMSW__) - file = "C:\\Windows\\explorer.exe"; - dir = "C:\\Windows"; + file = "C:\\Windows\\explorer.exe"; + dir = "C:\\Windows"; #else - file = "/bin/bash"; - dir = "/home"; + file = "/bin/bash"; + dir = "/home"; #endif - m_filePicker1->SetPath(file); - m_dirPicker1->SetPath(dir); + m_filePicker1->SetPath(file); + m_dirPicker1->SetPath(dir); // Check the first item in wxCheckListBox m_checkList1->Check(0); diff --git a/utils/screenshotgen/src/screenshot_main.h b/utils/screenshotgen/src/screenshot_main.h index 54b6667a33..9e7a1bf8a1 100644 --- a/utils/screenshotgen/src/screenshot_main.h +++ b/utils/screenshotgen/src/screenshot_main.h @@ -6,8 +6,8 @@ // Licence: wxWindows license ///////////////////////////////////////////////////////////////////////////// -#ifndef WXSCREENSHOTMAIN_H -#define WXSCREENSHOTMAIN_H +#ifndef _SCREENSHOT_MAIN_H_ +#define _SCREENSHOT_MAIN_H_ #include "guiframe.h" @@ -20,9 +20,9 @@ class CtrlMaskOut; class ScreenshotFrame #if SCREENSHOTGEN_USE_AUI -: public AuiGUIFrame + : public AuiGUIFrame #else -: public GUIFrame + : public GUIFrame #endif { public: @@ -58,4 +58,4 @@ private: CtrlMaskOut * m_maskout; }; -#endif // WXSCREENSHOTMAIN_H +#endif // _SCREENSHOT_MAIN_H_ -- 2.47.2