From 4bae10bdff8683fea70daf9f9b6c3fa559fe64cb Mon Sep 17 00:00:00 2001 From: Francesco Montorsi Date: Mon, 6 Oct 2008 11:53:16 +0000 Subject: [PATCH] many fixes; now the application correctly starts up git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@56112 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- utils/screenshotgen/src/Makefile.in | 2 +- utils/screenshotgen/src/autocapture.cpp | 111 ++++++++++++ utils/screenshotgen/src/autocapture.h | 131 +++----------- utils/screenshotgen/src/bitmaps/play.xpm | 25 +++ utils/screenshotgen/src/bitmaps/stop.xpm | 25 +++ utils/screenshotgen/src/ctrlmaskout.cpp | 50 +++--- utils/screenshotgen/src/ctrlmaskout.h | 10 +- utils/screenshotgen/src/customcombo.cpp | 22 +-- utils/screenshotgen/src/customcombo.h | 6 +- utils/screenshotgen/src/guidesign.fbp | 183 ++++++++++++++++---- utils/screenshotgen/src/guiframe.cpp | 78 ++++++--- utils/screenshotgen/src/guiframe.h | 37 ++-- utils/screenshotgen/src/makefile.bcc | 2 +- utils/screenshotgen/src/makefile.gcc | 2 +- utils/screenshotgen/src/makefile.vc | 2 +- utils/screenshotgen/src/makefile.wat | 2 +- utils/screenshotgen/src/screenshot_app.cpp | 8 +- utils/screenshotgen/src/screenshot_app.h | 2 +- utils/screenshotgen/src/screenshot_main.cpp | 71 ++++---- utils/screenshotgen/src/screenshot_main.h | 10 +- utils/screenshotgen/src/screenshotgen.bkl | 1 - 21 files changed, 501 insertions(+), 279 deletions(-) create mode 100644 utils/screenshotgen/src/bitmaps/play.xpm create mode 100644 utils/screenshotgen/src/bitmaps/stop.xpm diff --git a/utils/screenshotgen/src/Makefile.in b/utils/screenshotgen/src/Makefile.in index 197597bec0..85f007ed00 100644 --- a/utils/screenshotgen/src/Makefile.in +++ b/utils/screenshotgen/src/Makefile.in @@ -219,7 +219,7 @@ uninstall_screenshotgen: data: @mkdir -p . - @for f in richtext.xml bitmaps/wxwin32x32.png bitmaps/bell.png bitmaps/info.png bitmaps/sound.png bitmaps/dropbuth.png bitmaps/dropbutn.png bitmaps/dropbutp.png bitmaps/throbber.gif; do \ + @for f in richtext.xml bitmaps/wxwin32x32.png bitmaps/bell.png bitmaps/sound.png bitmaps/dropbuth.png bitmaps/dropbutn.png bitmaps/dropbutp.png bitmaps/throbber.gif; do \ if test ! -f ./$$f -a ! -d ./$$f ; \ then x=yep ; \ else x=`find $(srcdir)/$$f -newer ./$$f -print` ; \ diff --git a/utils/screenshotgen/src/autocapture.cpp b/utils/screenshotgen/src/autocapture.cpp index 0d729281cf..382c445172 100644 --- a/utils/screenshotgen/src/autocapture.cpp +++ b/utils/screenshotgen/src/autocapture.cpp @@ -84,6 +84,117 @@ wxBitmap Capture(wxRect rect) return Capture(origin.x, origin.y, rect.GetWidth(), rect.GetHeight()); } + +// ---------------------------------------------------------------------------- +// AutoCaptureMechanism +// ---------------------------------------------------------------------------- + +wxBitmap AutoCaptureMechanism::Capture(Control & ctrl) +{ + if(ctrl.name == wxT("")) //no mannual specification for the control name + { + //Get name from wxRTTI + ctrl.name = ctrl.ctrl->GetClassInfo()->GetClassName(); + } + + int choice = wxNO; + + if(ctrl.flag & AJ_Dropdown) + { + wxString caption = _("Do you wish to capture the dropdown list of ") + ctrl.name + _("?"); + wxString notice = _("Click YES to capture it.\nAnd you MUST drop down the ") + ctrl.name + _(" in 3 seconds after close me.\n"); + notice += _("Click NO otherwise."); + + choice = wxMessageBox(notice, caption, wxYES_NO, m_notebook); + + if(choice == wxYES) + { + //Wait for 3 seconds + using std::clock; + using std::clock_t; + + clock_t start = clock(); + while(clock() - start < CLOCKS_PER_SEC * 3) + { + wxYieldIfNeeded(); + } + } + } + + wxRect rect = GetRect(ctrl.ctrl, ctrl.flag); + + //Do some rect adjust so it can include the dropdown list + //Currently it only works well under MSW, not adjusted for Linux and Mac OS + if(ctrl.flag & AJ_Dropdown && choice == wxYES) + { +// #ifdef __WXMSW__ + int h = rect.GetHeight(); + rect.SetHeight(h * 4); +// #endif + } + + //cut off "wx" and change them into lowercase. + // e.g. wxButton will have a name of "button" at the end + ctrl.name.StartsWith(_T("wx"), &(ctrl.name)); + ctrl.name.MakeLower(); + + wxBitmap screenshot = ::Capture(rect); + + if(ctrl.flag & AJ_RegionAdjust) + { + PutBack(ctrl.ctrl); + } + + return screenshot; +} + +//if AJ_RegionAdjust is specified, the following line will use the label trick to adjust +//the region position and size +wxRect GetRect(wxWindow* ctrl, int flag); +//put the control back after the label trick(Using reparent/resizer approach) +void PutBack(wxWindow * ctrl); + +wxBitmap AutoCaptureMechanism::Union(wxBitmap pic1, wxBitmap pic2) +{ + int w1, w2, h1, h2, w, h; + w1 = pic1.GetWidth(); + w2 = pic2.GetWidth(); + h1 = pic1.GetHeight(); + h2 = pic2.GetHeight(); + + const int gap_between = 20; + + w = (w1 >= w2) ? w1 : w2; + h = h1 + h2 + gap_between; + + wxBitmap result(w, h, -1); + + wxMemoryDC dstDC; + dstDC.SelectObject(result); + + dstDC.DrawBitmap(pic1, 0, 0, false); + dstDC.DrawBitmap(pic2, 0, h1 + gap_between, false); + + dstDC.SelectObject(wxNullBitmap); + + wxMemoryDC maskDC; + wxBitmap mask(w, h, 1); + maskDC.SelectObject(mask); + + maskDC.SetPen(*wxTRANSPARENT_PEN); + maskDC.SetBrush(*wxBLACK_BRUSH); + maskDC.DrawRectangle(0, 0, w + 1, h + 1); + + maskDC.SetBrush(*wxWHITE_BRUSH); + maskDC.DrawRectangle(0, 0, w1, h1); + maskDC.DrawRectangle(0, h1 + gap_between, w2, h2); + maskDC.SelectObject(wxNullBitmap); + + result.SetMask(new wxMask(mask)); + + return result; +} + void AutoCaptureMechanism::Save(wxBitmap screenshot, wxString fileName) { //Check if m_defaultDir already existed diff --git a/utils/screenshotgen/src/autocapture.h b/utils/screenshotgen/src/autocapture.h index 6893cc498d..e07b43f19b 100644 --- a/utils/screenshotgen/src/autocapture.h +++ b/utils/screenshotgen/src/autocapture.h @@ -28,6 +28,11 @@ enum AdjustFlags AJ_UnionEnd = 1 << 4 }; + +// ---------------------------------------------------------------------------- +// class AutoCaptureMechanism +// ---------------------------------------------------------------------------- + class AutoCaptureMechanism { public: @@ -86,7 +91,7 @@ public: } } -private: +protected: // internal utils struct Control { Control() {} @@ -99,128 +104,32 @@ private: int flag; }; - typedef std::vector ControlList; - ControlList m_controlList; - - // here we introduce the dependency on wxNotebook. - // The assumption of this whole class is that the gui has the following top-down structure - // wxNotebook wxPanel wxSizer wxControls - wxNotebook* m_notebook; - - wxFlexGridSizer* m_grid; - - wxString m_dir; - int m_border; - - - - wxBitmap Capture(Control & ctrl) - { - if(ctrl.name == wxT("")) //no mannual specification for the control name - { - //Get name from wxRTTI - ctrl.name = ctrl.ctrl->GetClassInfo()->GetClassName(); - } - - int choice = wxNO; - - if(ctrl.flag & AJ_Dropdown) - { - wxString caption = _("Do you wish to capture the dropdown list of ") + ctrl.name + _("?"); - wxString notice = _("Click YES to capture it.\nAnd you MUST drop down the ") + ctrl.name + _(" in 3 seconds after close me.\n"); - notice += _("Click NO otherwise."); - - choice = wxMessageBox(notice, caption, wxYES_NO, m_notebook); - - if(choice == wxYES) - { - //Wait for 3 seconds - using std::clock; - using std::clock_t; - - clock_t start = clock(); - while(clock() - start < CLOCKS_PER_SEC * 3) - { - wxYieldIfNeeded(); - } - } - } - - wxRect rect = GetRect(ctrl.ctrl, ctrl.flag); - - //Do some rect adjust so it can include the dropdown list - //Currently it only works well under MSW, not adjusted for Linux and Mac OS - if(ctrl.flag & AJ_Dropdown && choice == wxYES) - { -// #ifdef __WXMSW__ - int h = rect.GetHeight(); - rect.SetHeight(h * 4); -// #endif - } - - //cut off "wx" and change them into lowercase. - // e.g. wxButton will have a name of "button" at the end - ctrl.name.StartsWith(_T("wx"), &(ctrl.name)); - ctrl.name.MakeLower(); - - wxBitmap screenshot = ::Capture(rect); - - if(ctrl.flag & AJ_RegionAdjust) - { - PutBack(ctrl.ctrl); - } - - return screenshot; - } + wxBitmap Capture(Control & ctrl); //if AJ_RegionAdjust is specified, the following line will use the label trick to adjust //the region position and size wxRect GetRect(wxWindow* ctrl, int flag); + //put the control back after the label trick(Using reparent/resizer approach) void PutBack(wxWindow * ctrl); - wxBitmap Union(wxBitmap pic1, wxBitmap pic2) - { - int w1, w2, h1, h2, w, h; - w1 = pic1.GetWidth(); - w2 = pic2.GetWidth(); - h1 = pic1.GetHeight(); - h2 = pic2.GetHeight(); - - const int gap_between = 20; - - w = (w1 >= w2) ? w1 : w2; - h = h1 + h2 + gap_between; - - wxBitmap result(w, h, -1); - - wxMemoryDC dstDC; - dstDC.SelectObject(result); - - dstDC.DrawBitmap(pic1, 0, 0, false); - dstDC.DrawBitmap(pic2, 0, h1 + gap_between, false); + wxBitmap Union(wxBitmap pic1, wxBitmap pic2); - dstDC.SelectObject(wxNullBitmap); - - wxMemoryDC maskDC; - wxBitmap mask(w, h, 1); - maskDC.SelectObject(mask); - - maskDC.SetPen(*wxTRANSPARENT_PEN); - maskDC.SetBrush(*wxBLACK_BRUSH); - maskDC.DrawRectangle(0, 0, w + 1, h + 1); + void Save(wxBitmap screenshot, wxString fileName); - maskDC.SetBrush(*wxWHITE_BRUSH); - maskDC.DrawRectangle(0, 0, w1, h1); - maskDC.DrawRectangle(0, h1 + gap_between, w2, h2); - maskDC.SelectObject(wxNullBitmap); +private: + typedef std::vector ControlList; + ControlList m_controlList; - result.SetMask(new wxMask(mask)); + // here we introduce the dependency on wxNotebook. + // The assumption of this whole class is that the gui has the following top-down structure + // wxNotebook wxPanel wxSizer wxControls + wxNotebook* m_notebook; - return result; - } + wxFlexGridSizer* m_grid; - void Save(wxBitmap screenshot, wxString fileName); + wxString m_dir; + int m_border; }; #endif // AUTOCAP_H diff --git a/utils/screenshotgen/src/bitmaps/play.xpm b/utils/screenshotgen/src/bitmaps/play.xpm new file mode 100644 index 0000000000..ed43c6a225 --- /dev/null +++ b/utils/screenshotgen/src/bitmaps/play.xpm @@ -0,0 +1,25 @@ +/* XPM */ +static const char * play_xpm[] = { +"20 20 2 1", +" c None", +". c #000000", +" ", +" ", +" ..... ", +" ...... ", +" ....... ", +" ........ ", +" ......... ", +" .......... ", +" ........... ", +" ............ ", +" ............ ", +" ........... ", +" .......... ", +" ......... ", +" ........ ", +" ....... ", +" ...... ", +" ..... ", +" ", +" "}; diff --git a/utils/screenshotgen/src/bitmaps/stop.xpm b/utils/screenshotgen/src/bitmaps/stop.xpm new file mode 100644 index 0000000000..d53bf86b40 --- /dev/null +++ b/utils/screenshotgen/src/bitmaps/stop.xpm @@ -0,0 +1,25 @@ +/* XPM */ +static const char * stop_xpm[] = { +"20 20 2 1", +" c None", +". c #000000", +" ", +" ", +" ", +" .............. ", +" .............. ", +" .............. ", +" .............. ", +" .............. ", +" .............. ", +" .............. ", +" .............. ", +" .............. ", +" .............. ", +" .............. ", +" .............. ", +" .............. ", +" .............. ", +" ", +" ", +" "}; diff --git a/utils/screenshotgen/src/ctrlmaskout.cpp b/utils/screenshotgen/src/ctrlmaskout.cpp index 53883a5c30..c4b51abae8 100644 --- a/utils/screenshotgen/src/ctrlmaskout.cpp +++ b/utils/screenshotgen/src/ctrlmaskout.cpp @@ -1,6 +1,6 @@ ///////////////////////////////////////////////////////////////////////////// // Name: ctrlmaskout.cpp -// Purpose: Implement wxCtrlMaskOut class +// Purpose: Implement CtrlMaskOut class // Author: Utensil Candel (UtensilCandel@@gmail.com) // RCS-ID: $Id$ // Licence: wxWindows license @@ -31,7 +31,7 @@ // It's copied from src/aui/framemanager.cpp and modified, a failed attempt to // visualize the process of taking the screenshot when wxTopLevelWindow::CanSetTransparent -// returns false. see wxCtrlMaskOut::CreateMask for more info +// returns false. see CtrlMaskOut::CreateMask for more info // now it shows nothing and does nothing ///////////////////////////////////////////////////////////////////////////// @@ -103,10 +103,10 @@ END_EVENT_TABLE() // ---------------------------------------------------------------------------- -// wxCtrlMaskOut +// CtrlMaskOut // ---------------------------------------------------------------------------- -wxCtrlMaskOut::wxCtrlMaskOut() +CtrlMaskOut::CtrlMaskOut() : m_defaultDir(_T("screenshots")), m_controlName(_T("")), m_currentRect(0, 0, 0, 0), @@ -116,7 +116,7 @@ wxCtrlMaskOut::wxCtrlMaskOut() { } -wxCtrlMaskOut::~wxCtrlMaskOut() +CtrlMaskOut::~CtrlMaskOut() { if (m_mask != NULL) { @@ -125,7 +125,7 @@ wxCtrlMaskOut::~wxCtrlMaskOut() } } -void wxCtrlMaskOut::OnLeftButtonDown(wxMouseEvent& event) +void CtrlMaskOut::OnLeftButtonDown(wxMouseEvent& event) { if (m_isTiming) event.Skip(); @@ -138,7 +138,7 @@ void wxCtrlMaskOut::OnLeftButtonDown(wxMouseEvent& event) CreateMask(thePanel); } -void wxCtrlMaskOut::OnMouseMoving(wxMouseEvent& event) +void CtrlMaskOut::OnMouseMoving(wxMouseEvent& event) { if (!event.Dragging()) { @@ -159,7 +159,7 @@ void wxCtrlMaskOut::OnMouseMoving(wxMouseEvent& event) m_mask->SetSize(m_currentRect); } -void wxCtrlMaskOut::OnLeftButtonUp(wxMouseEvent& event) +void CtrlMaskOut::OnLeftButtonUp(wxMouseEvent& event) { if (m_mask == NULL)// Which means it's not after specifying a rect region { @@ -177,7 +177,7 @@ void wxCtrlMaskOut::OnLeftButtonUp(wxMouseEvent& event) { m_isTiming = true; (new wxTimer(this))->Start(3000, wxTIMER_ONE_SHOT); - this->Connect(wxEVT_TIMER, wxTimerEventHandler( wxCtrlMaskOut::OnTimingFinished ), NULL, this); + this->Connect(wxEVT_TIMER, wxTimerEventHandler( CtrlMaskOut::OnTimingFinished ), NULL, this); } else { @@ -188,7 +188,7 @@ void wxCtrlMaskOut::OnLeftButtonUp(wxMouseEvent& event) } } -void wxCtrlMaskOut::OnTimingFinished(wxTimerEvent& event) +void CtrlMaskOut::OnTimingFinished(wxTimerEvent& event) { // The final rect region is determined. DetermineCtrlNameAndRect(); @@ -196,10 +196,10 @@ void wxCtrlMaskOut::OnTimingFinished(wxTimerEvent& event) Capture(m_currentRect, m_controlName); m_isTiming = false; - this->Disconnect(wxEVT_TIMER, wxTimerEventHandler( wxCtrlMaskOut::OnTimingFinished ), NULL, this); + this->Disconnect(wxEVT_TIMER, wxTimerEventHandler( CtrlMaskOut::OnTimingFinished ), NULL, this); } -void wxCtrlMaskOut::Capture(int x, int y, int width, int height, wxString fileName) +void CtrlMaskOut::Capture(int x, int y, int width, int height, wxString fileName) { // Somehow wxScreenDC.Blit() doesn't work under Mac for now. Here is a trick. #ifdef __WXMAC__ @@ -259,13 +259,13 @@ void wxCtrlMaskOut::Capture(int x, int y, int width, int height, wxString fileNa fileName + _T(".png"), wxBITMAP_TYPE_PNG); } -void wxCtrlMaskOut::Capture(wxRect rect, wxString fileName) +void CtrlMaskOut::Capture(wxRect rect, wxString fileName) { wxPoint origin = rect.GetPosition(); Capture(origin.x, origin.y, rect.GetWidth(), rect.GetHeight(), fileName); } -void wxCtrlMaskOut::DetermineCtrlNameAndRect() +void CtrlMaskOut::DetermineCtrlNameAndRect() { // Detect windows using (n-1)*(n-1) points const int n = 5; @@ -357,7 +357,7 @@ void wxCtrlMaskOut::DetermineCtrlNameAndRect() m_currentRect.Inflate(m_inflateBorder); } -void wxCtrlMaskOut::CreateMask(wxWindow* parent) +void CtrlMaskOut::CreateMask(wxWindow* parent) { if (m_mask != NULL) m_mask->Destroy(); @@ -392,9 +392,9 @@ void wxCtrlMaskOut::CreateMask(wxWindow* parent) p->SetBackgroundColour(*wxBLUE); // So that even if the cursor run into the mask, the events are still correctly processed. - p->Connect( wxEVT_LEFT_DOWN, wxMouseEventHandler( wxCtrlMaskOut::OnLeftButtonDown ), NULL, this); - p->Connect( wxEVT_LEFT_UP, wxMouseEventHandler( wxCtrlMaskOut::OnLeftButtonUp ), NULL, this); - p->Connect( wxEVT_MOTION, wxMouseEventHandler( wxCtrlMaskOut::OnMouseMoving ), NULL, this); + p->Connect( wxEVT_LEFT_DOWN, wxMouseEventHandler( CtrlMaskOut::OnLeftButtonDown ), NULL, this); + p->Connect( wxEVT_LEFT_UP, wxMouseEventHandler( CtrlMaskOut::OnLeftButtonUp ), NULL, this); + p->Connect( wxEVT_MOTION, wxMouseEventHandler( CtrlMaskOut::OnMouseMoving ), NULL, this); #endif // If the platform doesn't support SetTransparent() @@ -420,16 +420,16 @@ void wxCtrlMaskOut::CreateMask(wxWindow* parent) m_mask->Show(true); // So that even if the cursor run into the mask, the events are still correctly processed. - m_mask->Connect( wxEVT_LEFT_DOWN, wxMouseEventHandler( wxCtrlMaskOut::OnLeftButtonDown ), NULL, this); - m_mask->Connect( wxEVT_LEFT_UP, wxMouseEventHandler( wxCtrlMaskOut::OnLeftButtonUp ), NULL, this); - m_mask->Connect( wxEVT_MOTION, wxMouseEventHandler( wxCtrlMaskOut::OnMouseMoving ), NULL, this); + m_mask->Connect( wxEVT_LEFT_DOWN, wxMouseEventHandler( CtrlMaskOut::OnLeftButtonDown ), NULL, this); + m_mask->Connect( wxEVT_LEFT_UP, wxMouseEventHandler( CtrlMaskOut::OnLeftButtonUp ), NULL, this); + m_mask->Connect( wxEVT_MOTION, wxMouseEventHandler( CtrlMaskOut::OnMouseMoving ), NULL, this); } -void wxCtrlMaskOut::DestroyMask() +void CtrlMaskOut::DestroyMask() { - m_mask->Disconnect( wxEVT_LEFT_DOWN, wxMouseEventHandler( wxCtrlMaskOut::OnLeftButtonDown ), NULL, this); - m_mask->Disconnect( wxEVT_LEFT_UP, wxMouseEventHandler( wxCtrlMaskOut::OnLeftButtonUp ), NULL, this); - m_mask->Disconnect( wxEVT_MOTION, wxMouseEventHandler( wxCtrlMaskOut::OnMouseMoving ), NULL, this); + m_mask->Disconnect( wxEVT_LEFT_DOWN, wxMouseEventHandler( CtrlMaskOut::OnLeftButtonDown ), NULL, this); + m_mask->Disconnect( wxEVT_LEFT_UP, wxMouseEventHandler( CtrlMaskOut::OnLeftButtonUp ), NULL, this); + m_mask->Disconnect( wxEVT_MOTION, wxMouseEventHandler( CtrlMaskOut::OnMouseMoving ), NULL, this); wxWindow * parent = m_mask->GetParent(); // m_mask->Destroy(); delete m_mask; diff --git a/utils/screenshotgen/src/ctrlmaskout.h b/utils/screenshotgen/src/ctrlmaskout.h index 3f1c894edc..124788c911 100644 --- a/utils/screenshotgen/src/ctrlmaskout.h +++ b/utils/screenshotgen/src/ctrlmaskout.h @@ -1,6 +1,6 @@ ///////////////////////////////////////////////////////////////////////////// // Name: ctrlmaskout.h -// Purpose: Defines the wxCtrlMaskOut class +// Purpose: Defines the CtrlMaskOut class // Author: Utensil Candel (UtensilCandel@@gmail.com) // RCS-ID: $Id$ // Licence: wxWindows license @@ -13,14 +13,14 @@ // ---------------------------------------------------------------------------- -// class wxCtrlMaskOut +// class CtrlMaskOut // ---------------------------------------------------------------------------- -class wxCtrlMaskOut : public wxEvtHandler +class CtrlMaskOut : public wxEvtHandler { public: - wxCtrlMaskOut(); - ~wxCtrlMaskOut(); + CtrlMaskOut(); + ~CtrlMaskOut(); public: void OnLeftButtonDown(wxMouseEvent& event); diff --git a/utils/screenshotgen/src/customcombo.cpp b/utils/screenshotgen/src/customcombo.cpp index 447c5aaeb9..6d4d0b700f 100644 --- a/utils/screenshotgen/src/customcombo.cpp +++ b/utils/screenshotgen/src/customcombo.cpp @@ -44,10 +44,10 @@ END_EVENT_TABLE() // ---------------------------------------------------------------------------- -// wxPenStyleComboBox +// PenStyleComboBox // ---------------------------------------------------------------------------- -void wxPenStyleComboBox::OnDrawItem( wxDC& dc, +void PenStyleComboBox::OnDrawItem( wxDC& dc, const wxRect& rect, int item, int flags ) const @@ -103,7 +103,7 @@ void wxPenStyleComboBox::OnDrawItem( wxDC& dc, } } -void wxPenStyleComboBox::OnDrawBackground( wxDC& dc, const wxRect& rect, +void PenStyleComboBox::OnDrawBackground( wxDC& dc, const wxRect& rect, int item, int flags ) const { // If item is selected or even, or we are painting the @@ -122,7 +122,7 @@ void wxPenStyleComboBox::OnDrawBackground( wxDC& dc, const wxRect& rect, dc.DrawRectangle(rect); } -inline wxCoord wxPenStyleComboBox::OnMeasureItem( size_t item ) const +inline wxCoord PenStyleComboBox::OnMeasureItem( size_t item ) const { // Simply demonstrate the ability to have variable-height items if ( item & 1 ) @@ -131,14 +131,14 @@ inline wxCoord wxPenStyleComboBox::OnMeasureItem( size_t item ) const return 24; } -inline wxCoord wxPenStyleComboBox::OnMeasureItemWidth( size_t WXUNUSED(item) ) const +inline wxCoord PenStyleComboBox::OnMeasureItemWidth( size_t WXUNUSED(item) ) const { return -1; // default - will be measured from text width } -wxPenStyleComboBox * wxPenStyleComboBox::CreateSample(wxWindow* parent) +PenStyleComboBox * PenStyleComboBox::CreateSample(wxWindow* parent) { - wxPenStyleComboBox* odc; + PenStyleComboBox* odc; // Common list of items for all dialogs. wxArrayString arrItems; @@ -161,7 +161,7 @@ wxPenStyleComboBox * wxPenStyleComboBox::CreateSample(wxWindow* parent) // When defining derivative class for callbacks, we need // to use two-stage creation (or redefine the common wx // constructor). - odc = new wxPenStyleComboBox(); + odc = new PenStyleComboBox(); odc->Create(parent,wxID_ANY,wxEmptyString, wxDefaultPosition, wxDefaultSize, arrItems, @@ -172,9 +172,9 @@ wxPenStyleComboBox * wxPenStyleComboBox::CreateSample(wxWindow* parent) odc->SetSelection(0); // Load images from disk - wxImage imgNormal(wxT("dropbutn.png")); - wxImage imgPressed(wxT("dropbutp.png")); - wxImage imgHover(wxT("dropbuth.png")); + wxImage imgNormal(wxT("bitmaps/dropbutn.png")); + wxImage imgPressed(wxT("bitmaps/dropbutp.png")); + wxImage imgHover(wxT("bitmaps/dropbuth.png")); if ( imgNormal.IsOk() && imgPressed.IsOk() && imgHover.IsOk() ) { diff --git a/utils/screenshotgen/src/customcombo.h b/utils/screenshotgen/src/customcombo.h index e438060e9b..8902abd3d6 100644 --- a/utils/screenshotgen/src/customcombo.h +++ b/utils/screenshotgen/src/customcombo.h @@ -10,13 +10,13 @@ #define WX_CUSTOM_COMBO_H // ---------------------------------------------------------------------------- -// class wxPenStyleComboBox +// class PenStyleComboBox // This class is a modified version of the one from samples/combo.cpp // ---------------------------------------------------------------------------- #include -class wxPenStyleComboBox : public wxOwnerDrawnComboBox +class PenStyleComboBox : public wxOwnerDrawnComboBox { public: virtual void OnDrawItem( wxDC& dc, @@ -32,7 +32,7 @@ public: virtual wxCoord OnMeasureItemWidth( size_t WXUNUSED(item) ) const; - static wxPenStyleComboBox* CreateSample(wxWindow* parent); + static PenStyleComboBox* CreateSample(wxWindow* parent); }; diff --git a/utils/screenshotgen/src/guidesign.fbp b/utils/screenshotgen/src/guidesign.fbp index e40481bdc0..2340fc4e14 100644 --- a/utils/screenshotgen/src/guidesign.fbp +++ b/utils/screenshotgen/src/guidesign.fbp @@ -14,7 +14,7 @@ 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 (this file is usually all you // need because it includes almost all "standard" wxWidgets headers) #ifndef WX_PRECOMP #include "wx/wx.h" #endif + // ---------------------------------------------------------------------------- // 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 @@ -70,7 +70,7 @@ - + 1 @@ -123,9 +123,9 @@ 0 1 Open the directory where the screenshots generated. - idMenuOpen + wxID_ZOOM_IN wxITEM_NORMAL - See Screenshots + &View screenshots... m_menuSeeScr none Ctrl+O @@ -133,12 +133,15 @@ OnSeeScreenshots + + none + 0 1 Quit the application - idMenuQuit + wxID_EXIT wxITEM_NORMAL &Quit m_menuFileQuit @@ -169,7 +172,7 @@ - + play; Load From Icon Resource [-1; -1] 0 1 Manually specify rectangular regions @@ -184,7 +187,7 @@ - + stop; Load From Icon Resource [-1; -1] 0 0 Stop generating screenshots... @@ -199,7 +202,7 @@ - + ; Load From Resource 0 1 Take screenshot for all controls autoly. @@ -214,7 +217,7 @@ - + &Help helpMenu protected @@ -223,9 +226,9 @@ 0 1 Show info about this application - idMenuAbout + wxID_ABOUT wxITEM_NORMAL - &About + &About... m_menuHelpAbout none F1 @@ -293,8 +296,8 @@ Tiny Controls - 1 - + 0 + 1 @@ -336,7 +339,7 @@ - + 2 wxBOTH @@ -665,7 +668,7 @@ 0 - wxwin32x32.png; Load From File + bitmaps/wxwin32x32.png; Load From File 0 @@ -722,7 +725,7 @@ 0 - wxwin32x32.png; Load From File + bitmaps/wxwin32x32.png; Load From File 1 @@ -765,6 +768,120 @@ + + 5 + wxALIGN_CENTER|wxALL + 0 + + + bitmaps/wxwin32x32.png; Load From File + + 0 + + 1 + + + + 0 + + wxID_ANY + wxBitmapButton + + + m_bpButton12 + protected + + + + wxBU_AUTODRAW + + wxBitmapButton + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_CENTER|wxALL + 0 + + + bitmaps/wxwin32x32.png; Load From File + + 0 + + 1 + + + + 0 + + wxID_ANY + wxBitmapButton + + + m_bpButton11 + protected + + + + wxBU_AUTODRAW + + wxBitmapButton + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 20 wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxEXPAND @@ -1003,7 +1120,7 @@ 0 wxID_ANY - www.wxWidgets.org + www.wxwidgets.org m_hyperlink1 @@ -1014,7 +1131,7 @@ wxHL_DEFAULT_STYLE wxHyperlinkCtrl - http://www.wxWidgets.org + http://www.wxwidgets.org @@ -1231,8 +1348,8 @@ Choosing Controls - 0 - + 1 + 1 @@ -1658,7 +1775,7 @@ m_animationCtrl1 protected - m_animationCtrl1->SetToolTip(_("wxAnimationCtrl")); if (m_animationCtrl1->LoadFile(wxT("throbber.gif"))) m_animationCtrl1->Play(); + m_animationCtrl1->SetToolTip(_("wxAnimationCtrl")); if (m_animationCtrl1->LoadFile(wxT("bitmaps/throbber.gif"))) m_animationCtrl1->Play(); @@ -1803,7 +1920,7 @@ Text Richtext 0 - + 1 @@ -2039,7 +2156,7 @@ Picker Controls 0 - + 1 @@ -2081,7 +2198,7 @@ - + 2 wxBOTH @@ -2693,7 +2810,7 @@ m_bmpComboBox1 protected - m_bmpComboBox1->Append(_("Item1"), wxBitmap(_T("bell.png"),wxBITMAP_TYPE_PNG)); m_bmpComboBox1->Append(_("Item2"), wxBitmap(_T("sound.png"),wxBITMAP_TYPE_PNG)); m_bmpComboBox1->Append(_("Item3"), wxBitmap(_T("bell.png"),wxBITMAP_TYPE_PNG)); m_bmpComboBox1->Append(_("Item4"), wxBitmap(_T("sound.png"),wxBITMAP_TYPE_PNG)); m_bmpComboBox1->SetToolTip(_("wxBitmapComboBox")); + 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")); @@ -2731,16 +2848,16 @@ 1 - wxPenStyleComboBox - m_ownerDrawnComboBox1 = wxPenStyleComboBox::CreateSample(m_panel5); + PenStyleComboBox + m_ownerDrawnComboBox1 = PenStyleComboBox::CreateSample(m_panel5); - wxPenStyleComboBox * m_ownerDrawnComboBox1; + PenStyleComboBox * m_ownerDrawnComboBox1; 1 0 wxID_ANY - #include "custom_combo.h" + #include "customcombo.h" m_ownerDrawnComboBox1 @@ -2813,13 +2930,13 @@ 0 wxID_ANY - #include "custom_combo.h" + #include "customcombo.h" m_comboCtrl1 protected - m_comboCtrl1->SetText(wxT("wxComboCtrl")); m_comboCtrl1->SetToolTip(_("wxComboCtrl")); ListViewComboPopup* popupList = new ListViewComboPopup(); m_comboCtrl1->SetPopupControl(popupList); m_comboCtrl1->SetPopupMaxHeight(80); // 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); + // 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); @@ -2866,13 +2983,13 @@ 0 wxID_ANY - #include "custom_combo.h" + #include "customcombo.h" m_comboCtrl2 protected - m_comboCtrl2->SetText(wxT("wxComboCtrl")); m_comboCtrl2->SetToolTip(_("wxComboCtrl")); TreeCtrlComboPopup* popupTree = new TreeCtrlComboPopup(); m_comboCtrl2->SetPopupControl(popupTree); m_comboCtrl2->SetPopupMaxHeight(80); //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(); + // 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(); diff --git a/utils/screenshotgen/src/guiframe.cpp b/utils/screenshotgen/src/guiframe.cpp index ed1cbf90fe..541e63fb1a 100644 --- a/utils/screenshotgen/src/guiframe.cpp +++ b/utils/screenshotgen/src/guiframe.cpp @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Apr 17 2008) +// C++ code generated with wxFormBuilder (version Apr 21 2008) // http://www.wxformbuilder.org/ // // PLEASE DO "NOT" EDIT THIS FILE! @@ -16,12 +16,15 @@ #pragma hdrstop #endif -// for all others, include the necessary headers (this file is usually all you -// need because it includes almost all "standard" wxWidgets headers) +// 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" + + #include "guiframe.h" /////////////////////////////////////////////////////////////////////////// @@ -33,11 +36,13 @@ GUIFrame::GUIFrame( wxWindow* parent, wxWindowID id, const wxString& title, cons mbar = new wxMenuBar( 0 ); fileMenu = new wxMenu(); wxMenuItem* m_menuSeeScr; - m_menuSeeScr = new wxMenuItem( fileMenu, idMenuOpen, wxString( _("See Screenshots") ) + wxT('\t') + wxT("Ctrl+O"), _("Open the directory where the screenshots generated."), wxITEM_NORMAL ); + m_menuSeeScr = new wxMenuItem( fileMenu, wxID_ZOOM_IN, wxString( _("&View screenshots...") ) + wxT('\t') + wxT("Ctrl+O"), _("Open the directory where the screenshots generated."), wxITEM_NORMAL ); fileMenu->Append( m_menuSeeScr ); + fileMenu->AppendSeparator(); + wxMenuItem* m_menuFileQuit; - m_menuFileQuit = new wxMenuItem( fileMenu, idMenuQuit, wxString( _("&Quit") ) + wxT('\t') + wxT("Alt+F4"), _("Quit the application"), wxITEM_NORMAL ); + m_menuFileQuit = new wxMenuItem( fileMenu, wxID_EXIT, wxString( _("&Quit") ) + wxT('\t') + wxT("Alt+F4"), _("Quit the application"), wxITEM_NORMAL ); fileMenu->Append( m_menuFileQuit ); mbar->Append( fileMenu, _("&File") ); @@ -49,10 +54,20 @@ GUIFrame::GUIFrame( wxWindow* parent, wxWindowID id, const wxString& title, cons wxMenuItem* m_menuCapRect; m_menuCapRect = new wxMenuItem( captureMenu, idMenuCapRect, wxString( _("Regions") ) + wxT('\t') + wxT("Ctrl+Alt+R"), _("Manually specify rectangular regions"), wxITEM_NORMAL ); + #ifdef __WXMSW__ + m_menuCapRect->SetBitmaps( wxICON( play ) ); + #elif defined( __WXGTK__ ) + m_menuCapRect->SetBitmap( wxICON( play ) ); + #endif captureMenu->Append( m_menuCapRect ); wxMenuItem* m_menuEndCapRect; m_menuEndCapRect = new wxMenuItem( captureMenu, idMenuEndCapRect, wxString( _("Regions") ) + wxT('\t') + wxT("Ctrl+Alt+E"), _("Stop generating screenshots..."), wxITEM_NORMAL ); + #ifdef __WXMSW__ + m_menuEndCapRect->SetBitmaps( wxICON( stop ) ); + #elif defined( __WXGTK__ ) + m_menuEndCapRect->SetBitmap( wxICON( stop ) ); + #endif captureMenu->Append( m_menuEndCapRect ); m_menuEndCapRect->Enable( false ); @@ -64,7 +79,7 @@ GUIFrame::GUIFrame( wxWindow* parent, wxWindowID id, const wxString& title, cons helpMenu = new wxMenu(); wxMenuItem* m_menuHelpAbout; - m_menuHelpAbout = new wxMenuItem( helpMenu, idMenuAbout, wxString( _("&About") ) + wxT('\t') + wxT("F1"), _("Show info about this application"), wxITEM_NORMAL ); + m_menuHelpAbout = new wxMenuItem( helpMenu, wxID_ABOUT, wxString( _("&About...") ) + wxT('\t') + wxT("F1"), _("Show info about this application"), wxITEM_NORMAL ); helpMenu->Append( m_menuHelpAbout ); mbar->Append( helpMenu, _("&Help") ); @@ -112,18 +127,32 @@ GUIFrame::GUIFrame( wxWindow* parent, wxWindowID id, const wxString& title, cons fgSizer1->Add( m_radioBtn2, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 20 ); - m_bpButton1 = new wxBitmapButton( m_panel1, wxID_ANY, wxBitmap( wxT("wxwin32x32.png"), wxBITMAP_TYPE_ANY ), wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW ); + 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("wxwin32x32.png"), wxBITMAP_TYPE_ANY ), wxDefaultPosition, wxDefaultSize, 0 ); + 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_bpButton12 = new wxBitmapButton( m_panel1, wxID_ANY, wxBitmap( wxT("bitmaps/wxwin32x32.png"), wxBITMAP_TYPE_ANY ), wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW ); + m_bpButton12->SetToolTip( _("wxBitmapButton") ); + + m_bpButton12->SetToolTip( _("wxBitmapButton") ); + + fgSizer1->Add( m_bpButton12, 0, wxALIGN_CENTER|wxALL, 5 ); + + m_bpButton11 = new wxBitmapButton( m_panel1, wxID_ANY, wxBitmap( wxT("bitmaps/wxwin32x32.png"), wxBITMAP_TYPE_ANY ), wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW ); + m_bpButton11->SetToolTip( _("wxBitmapButton") ); + + m_bpButton11->SetToolTip( _("wxBitmapButton") ); + + fgSizer1->Add( m_bpButton11, 0, wxALIGN_CENTER|wxALL, 5 ); + m_gauge1 = new wxGauge( m_panel1, wxID_ANY, 100, wxDefaultPosition, wxDefaultSize, wxGA_HORIZONTAL, wxDefaultValidator, wxT("_Gauge") ); m_gauge1->SetValue( 50 ); m_gauge1->SetToolTip( _("wxGauge") ); @@ -146,7 +175,7 @@ GUIFrame::GUIFrame( wxWindow* parent, wxWindowID id, const wxString& title, cons 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 = 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 ); @@ -169,7 +198,7 @@ GUIFrame::GUIFrame( wxWindow* parent, wxWindowID id, const wxString& title, cons m_panel1->SetSizer( fgSizer1 ); m_panel1->Layout(); fgSizer1->Fit( m_panel1 ); - m_notebook1->AddPage( m_panel1, _("Tiny Controls"), true ); + m_notebook1->AddPage( m_panel1, _("Tiny Controls"), false ); m_panel2 = new wxPanel( m_notebook1, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); wxFlexGridSizer* fgSizer2; fgSizer2 = new wxFlexGridSizer( 5, 2, 0, 0 ); @@ -208,7 +237,7 @@ GUIFrame::GUIFrame( wxWindow* parent, wxWindowID id, const wxString& title, cons m_animationCtrl1 = new wxAnimationCtrl(m_panel2, wxID_ANY); m_animationCtrl1->SetToolTip(_("wxAnimationCtrl")); - if (m_animationCtrl1->LoadFile(wxT("throbber.gif"))) + if (m_animationCtrl1->LoadFile(wxT("bitmaps/throbber.gif"))) m_animationCtrl1->Play(); fgSizer2->Add( m_animationCtrl1, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 20 ); @@ -245,7 +274,7 @@ GUIFrame::GUIFrame( wxWindow* parent, wxWindowID id, const wxString& title, cons m_panel2->SetSizer( fgSizer2 ); m_panel2->Layout(); fgSizer2->Fit( m_panel2 ); - m_notebook1->AddPage( m_panel2, _("Choosing Controls"), false ); + m_notebook1->AddPage( m_panel2, _("Choosing Controls"), true ); m_panel3 = new wxPanel( m_notebook1, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); wxBoxSizer* bSizer2; bSizer2 = new wxBoxSizer( wxVERTICAL ); @@ -352,14 +381,14 @@ GUIFrame::GUIFrame( wxWindow* parent, wxWindowID id, const wxString& title, cons fgSizer4->Add( 0, 120, 1, wxEXPAND, 5 ); m_bmpComboBox1 = new wxBitmapComboBox(m_panel5, wxID_ANY,_("Item1")); - m_bmpComboBox1->Append(_("Item1"), wxBitmap(_T("bell.png"),wxBITMAP_TYPE_PNG)); - m_bmpComboBox1->Append(_("Item2"), wxBitmap(_T("sound.png"),wxBITMAP_TYPE_PNG)); - m_bmpComboBox1->Append(_("Item3"), wxBitmap(_T("bell.png"),wxBITMAP_TYPE_PNG)); - m_bmpComboBox1->Append(_("Item4"), wxBitmap(_T("sound.png"),wxBITMAP_TYPE_PNG)); + 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 = wxPenStyleComboBox::CreateSample(m_panel5); + m_ownerDrawnComboBox1 = PenStyleComboBox::CreateSample(m_panel5); m_ownerDrawnComboBox1->SetToolTip(_("wxOwnerDrawnComboBox")); fgSizer4->Add( m_ownerDrawnComboBox1, 1, wxALL|wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 20 ); @@ -370,13 +399,14 @@ GUIFrame::GUIFrame( wxWindow* parent, wxWindowID id, const wxString& title, cons fgSizer4->Add( 0, 90, 1, wxEXPAND, 5 ); m_comboCtrl1 = new wxComboCtrl(m_panel5,wxID_ANY,wxEmptyString); - m_comboCtrl1->SetText(wxT("wxComboCtrl")); - m_comboCtrl1->SetToolTip(_("wxComboCtrl")); - + // 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")); @@ -390,14 +420,14 @@ GUIFrame::GUIFrame( wxWindow* parent, wxWindowID id, const wxString& title, cons fgSizer4->Add( m_comboCtrl1, 1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 20 ); m_comboCtrl2 = new wxComboCtrl(m_panel5,wxID_ANY,wxEmptyString); - m_comboCtrl2->SetText(wxT("wxComboCtrl")); - m_comboCtrl2->SetToolTip(_("wxComboCtrl")); - + // 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")); diff --git a/utils/screenshotgen/src/guiframe.h b/utils/screenshotgen/src/guiframe.h index d366f72ccf..40d3bfed0a 100644 --- a/utils/screenshotgen/src/guiframe.h +++ b/utils/screenshotgen/src/guiframe.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Apr 17 2008) +// C++ code generated with wxFormBuilder (version Apr 21 2008) // http://www.wxformbuilder.org/ // // PLEASE DO "NOT" EDIT THIS FILE! @@ -64,22 +64,19 @@ /////////////////////////////////////////////////////////////////////////////// /// Class GUIFrame /////////////////////////////////////////////////////////////////////////////// -class GUIFrame : public wxFrame +class GUIFrame : public wxFrame { private: - + protected: enum { - idMenuOpen = 1000, - idMenuQuit, - idMenuCapFullScreen, + idMenuCapFullScreen = 1000, idMenuCapRect, idMenuEndCapRect, idMenuCapAll, - idMenuAbout, }; - + wxMenuBar* mbar; wxMenu* fileMenu; wxMenu* captureMenu; @@ -94,6 +91,8 @@ class GUIFrame : public wxFrame wxRadioButton* m_radioBtn2; wxBitmapButton* m_bpButton1; wxStaticBitmap* m_bitmap1; + wxBitmapButton* m_bpButton12; + wxBitmapButton* m_bpButton11; wxGauge* m_gauge1; wxSlider* m_slider1; wxToggleButton* m_toggleBtn1; @@ -114,14 +113,14 @@ class GUIFrame : public wxFrame 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; @@ -129,16 +128,16 @@ class GUIFrame : public wxFrame wxPanel* m_panel5; wxChoice* m_choice1; wxComboBox* m_comboBox1; - - + + wxBitmapComboBox * m_bmpComboBox1; - wxPenStyleComboBox * m_ownerDrawnComboBox1; - - + 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(); } @@ -150,12 +149,12 @@ class GUIFrame : public wxFrame 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(); - + }; #endif //__guiframe__ diff --git a/utils/screenshotgen/src/makefile.bcc b/utils/screenshotgen/src/makefile.bcc index 77735f7507..b2059387d5 100644 --- a/utils/screenshotgen/src/makefile.bcc +++ b/utils/screenshotgen/src/makefile.bcc @@ -260,7 +260,7 @@ $(OBJS)\screenshotgen.exe: $(SCREENSHOTGEN_OBJECTS) $(OBJS)\screenshotgen_scree data: if not exist $(OBJS) mkdir $(OBJS) - for %f in (richtext.xml bitmaps/wxwin32x32.png bitmaps/bell.png bitmaps/info.png bitmaps/sound.png bitmaps/dropbuth.png bitmaps/dropbutn.png bitmaps/dropbutp.png bitmaps/throbber.gif) do if not exist $(OBJS)\%f copy .\%f $(OBJS) + for %f in (richtext.xml bitmaps/wxwin32x32.png bitmaps/bell.png bitmaps/sound.png bitmaps/dropbuth.png bitmaps/dropbutn.png bitmaps/dropbutp.png bitmaps/throbber.gif) do if not exist $(OBJS)\%f copy .\%f $(OBJS) $(OBJS)\screenshotgen_screenshot_app.obj: .\screenshot_app.cpp $(CXX) -q -c -P -o$@ $(SCREENSHOTGEN_CXXFLAGS) .\screenshot_app.cpp diff --git a/utils/screenshotgen/src/makefile.gcc b/utils/screenshotgen/src/makefile.gcc index 2bc26bd51d..9f3f9d6797 100644 --- a/utils/screenshotgen/src/makefile.gcc +++ b/utils/screenshotgen/src/makefile.gcc @@ -253,7 +253,7 @@ $(OBJS)\screenshotgen.exe: $(SCREENSHOTGEN_OBJECTS) $(OBJS)\screenshotgen_screen data: if not exist $(OBJS) mkdir $(OBJS) - for %%f in (richtext.xml bitmaps/wxwin32x32.png bitmaps/bell.png bitmaps/info.png bitmaps/sound.png bitmaps/dropbuth.png bitmaps/dropbutn.png bitmaps/dropbutp.png bitmaps/throbber.gif) do if not exist $(OBJS)\%%f copy .\%%f $(OBJS) + for %%f in (richtext.xml bitmaps/wxwin32x32.png bitmaps/bell.png bitmaps/sound.png bitmaps/dropbuth.png bitmaps/dropbutn.png bitmaps/dropbutp.png bitmaps/throbber.gif) do if not exist $(OBJS)\%%f copy .\%%f $(OBJS) $(OBJS)\screenshotgen_screenshot_app.o: ./screenshot_app.cpp $(CXX) -c -o $@ $(SCREENSHOTGEN_CXXFLAGS) $(CPPDEPS) $< diff --git a/utils/screenshotgen/src/makefile.vc b/utils/screenshotgen/src/makefile.vc index ed1159e2de..436287b023 100644 --- a/utils/screenshotgen/src/makefile.vc +++ b/utils/screenshotgen/src/makefile.vc @@ -336,7 +336,7 @@ $(OBJS)\screenshotgen.exe: $(SCREENSHOTGEN_OBJECTS) $(OBJS)\screenshotgen_screen data: if not exist $(OBJS) mkdir $(OBJS) - for %f in (richtext.xml bitmaps/wxwin32x32.png bitmaps/bell.png bitmaps/info.png bitmaps/sound.png bitmaps/dropbuth.png bitmaps/dropbutn.png bitmaps/dropbutp.png bitmaps/throbber.gif) do if not exist $(OBJS)\%f copy .\%f $(OBJS) + for %f in (richtext.xml bitmaps/wxwin32x32.png bitmaps/bell.png bitmaps/sound.png bitmaps/dropbuth.png bitmaps/dropbutn.png bitmaps/dropbutp.png bitmaps/throbber.gif) do if not exist $(OBJS)\%f copy .\%f $(OBJS) $(OBJS)\screenshotgen_screenshot_app.obj: .\screenshot_app.cpp $(CXX) /c /nologo /TP /Fo$@ $(SCREENSHOTGEN_CXXFLAGS) .\screenshot_app.cpp diff --git a/utils/screenshotgen/src/makefile.wat b/utils/screenshotgen/src/makefile.wat index 12ed10a493..a482dbad5f 100644 --- a/utils/screenshotgen/src/makefile.wat +++ b/utils/screenshotgen/src/makefile.wat @@ -290,7 +290,7 @@ $(OBJS)\screenshotgen.exe : $(SCREENSHOTGEN_OBJECTS) $(OBJS)\screenshotgen_scre data : .SYMBOLIC if not exist $(OBJS) mkdir $(OBJS) - for %f in (richtext.xml bitmaps/wxwin32x32.png bitmaps/bell.png bitmaps/info.png bitmaps/sound.png bitmaps/dropbuth.png bitmaps/dropbutn.png bitmaps/dropbutp.png bitmaps/throbber.gif) do if not exist $(OBJS)\%f copy .\%f $(OBJS) + for %f in (richtext.xml bitmaps/wxwin32x32.png bitmaps/bell.png bitmaps/sound.png bitmaps/dropbuth.png bitmaps/dropbutn.png bitmaps/dropbutp.png bitmaps/throbber.gif) do if not exist $(OBJS)\%f copy .\%f $(OBJS) $(OBJS)\screenshotgen_screenshot_app.obj : .AUTODEPEND .\screenshot_app.cpp $(CXX) -bt=nt -zq -fo=$^@ $(SCREENSHOTGEN_CXXFLAGS) $< diff --git a/utils/screenshotgen/src/screenshot_app.cpp b/utils/screenshotgen/src/screenshot_app.cpp index e2b0c85380..18b7cbe1a8 100644 --- a/utils/screenshotgen/src/screenshot_app.cpp +++ b/utils/screenshotgen/src/screenshot_app.cpp @@ -25,12 +25,12 @@ // ---------------------------------------------------------------------------- -// wxScreenshotApp +// ScreenshotApp // ---------------------------------------------------------------------------- -IMPLEMENT_APP(wxScreenshotApp); +IMPLEMENT_APP(ScreenshotApp); -bool wxScreenshotApp::OnInit() +bool ScreenshotApp::OnInit() { // Init all Image handlers wxInitAllImageHandlers(); @@ -38,7 +38,7 @@ bool wxScreenshotApp::OnInit() // Add richtext extra handlers (plain text is automatically added) wxRichTextBuffer::AddHandler(new wxRichTextXMLHandler); - wxScreenshotFrame* frame = new wxScreenshotFrame(0L); + ScreenshotFrame* frame = new ScreenshotFrame(0L); frame->Show(); return true; diff --git a/utils/screenshotgen/src/screenshot_app.h b/utils/screenshotgen/src/screenshot_app.h index 331b2d1c5e..1e1b485de8 100644 --- a/utils/screenshotgen/src/screenshot_app.h +++ b/utils/screenshotgen/src/screenshot_app.h @@ -11,7 +11,7 @@ #include -class wxScreenshotApp : public wxApp +class ScreenshotApp : public wxApp { public: virtual bool OnInit(); diff --git a/utils/screenshotgen/src/screenshot_main.cpp b/utils/screenshotgen/src/screenshot_main.cpp index 7181cf9d5f..c9966ff502 100644 --- a/utils/screenshotgen/src/screenshot_main.cpp +++ b/utils/screenshotgen/src/screenshot_main.cpp @@ -24,11 +24,13 @@ #endif #include +#include + #include "screenshot_main.h" #include "ctrlmaskout.h" #include "autocapture.h" - +/* // Global helper functions enum wxBuildInfoFormat { @@ -58,14 +60,14 @@ wxString wxbuildinfo(wxBuildInfoFormat format) } return wxbuild; -} +}*/ // ---------------------------------------------------------------------------- -// wxScreenshotFrame +// ScreenshotFrame // ---------------------------------------------------------------------------- -wxScreenshotFrame::wxScreenshotFrame(wxFrame *frame) +ScreenshotFrame::ScreenshotFrame(wxFrame *frame) #if SCREENSHOTGEN_USE_AUI : AuiGUIFrame(frame) #else @@ -78,7 +80,7 @@ wxScreenshotFrame::wxScreenshotFrame(wxFrame *frame) #endif // We will hold one during the whole life time of the main frame - m_maskout = new wxCtrlMaskOut(); + m_maskout = new CtrlMaskOut(); // At the begining, we are not specifying the rect region capturingRect = false; @@ -92,7 +94,7 @@ wxScreenshotFrame::wxScreenshotFrame(wxFrame *frame) #endif } -wxScreenshotFrame::~wxScreenshotFrame() +ScreenshotFrame::~ScreenshotFrame() { delete m_maskout; } @@ -106,7 +108,7 @@ wxScreenshotFrame::~wxScreenshotFrame() Those customizations will be done here. */ -void wxScreenshotFrame::InitFBControls() +void ScreenshotFrame::InitFBControls() { // Do the default selection for wxComboBox m_comboBox1->Select(0); @@ -141,20 +143,20 @@ void wxScreenshotFrame::InitFBControls() // ---------------------------------------------------------------------------- -// wxScreenshotFrame - event handlers +// ScreenshotFrame - event handlers // ---------------------------------------------------------------------------- -void wxScreenshotFrame::OnClose(wxCloseEvent& WXUNUSED(event)) +void ScreenshotFrame::OnClose(wxCloseEvent& WXUNUSED(event)) { Destroy(); } -void wxScreenshotFrame::OnQuit(wxCommandEvent& WXUNUSED(event)) +void ScreenshotFrame::OnQuit(wxCommandEvent& WXUNUSED(event)) { Destroy(); } -void wxScreenshotFrame::OnSeeScreenshots(wxCommandEvent& WXUNUSED(event)) +void ScreenshotFrame::OnSeeScreenshots(wxCommandEvent& WXUNUSED(event)) { wxString defaultDir = m_maskout->GetDefaultDirectory(); @@ -176,13 +178,18 @@ void wxScreenshotFrame::OnSeeScreenshots(wxCommandEvent& WXUNUSED(event)) #endif } -void wxScreenshotFrame::OnAbout(wxCommandEvent& WXUNUSED(event)) +void ScreenshotFrame::OnAbout(wxCommandEvent& WXUNUSED(event)) { - wxString msg = wxbuildinfo(long_f); - wxMessageBox(msg, _("Welcome to...")); + wxAboutDialogInfo info; + info.SetName(_("Automatic Screenshot Generator")); + info.SetVersion(_("1.0")); + info.SetDescription(_("This utility automatically creates screenshots of wxWidgets controls for ues in wxWidgets documentation.")); + info.SetCopyright(_T("(C) 2008 Utensil Candel")); + + wxAboutBox(info); } -void wxScreenshotFrame::OnCaptureFullScreen(wxCommandEvent& WXUNUSED(event)) +void ScreenshotFrame::OnCaptureFullScreen(wxCommandEvent& WXUNUSED(event)) { // Create a DC for the whole screen area wxScreenDC dcScreen; @@ -194,7 +201,7 @@ void wxScreenshotFrame::OnCaptureFullScreen(wxCommandEvent& WXUNUSED(event)) m_maskout->Capture(0, 0, screenWidth, screenHeight, _T("fullscreen")); } -void wxScreenshotFrame::OnCaptureRect(wxCommandEvent& WXUNUSED(event)) +void ScreenshotFrame::OnCaptureRect(wxCommandEvent& WXUNUSED(event)) { capturingRect = true; wxMenuBar * menubar = this->GetMenuBar(); @@ -203,12 +210,12 @@ void wxScreenshotFrame::OnCaptureRect(wxCommandEvent& WXUNUSED(event)) wxWindow * thePage = m_notebook1->GetPage(m_notebook1->GetSelection()); - thePage->Connect( wxEVT_LEFT_DOWN, wxMouseEventHandler( wxCtrlMaskOut::OnLeftButtonDown ), NULL, m_maskout); - thePage->Connect( wxEVT_LEFT_UP, wxMouseEventHandler( wxCtrlMaskOut::OnLeftButtonUp ), NULL, m_maskout); - thePage->Connect( wxEVT_MOTION, wxMouseEventHandler( wxCtrlMaskOut::OnMouseMoving ), NULL, m_maskout); + thePage->Connect( wxEVT_LEFT_DOWN, wxMouseEventHandler( CtrlMaskOut::OnLeftButtonDown ), NULL, m_maskout); + thePage->Connect( wxEVT_LEFT_UP, wxMouseEventHandler( CtrlMaskOut::OnLeftButtonUp ), NULL, m_maskout); + thePage->Connect( wxEVT_MOTION, wxMouseEventHandler( CtrlMaskOut::OnMouseMoving ), NULL, m_maskout); } -void wxScreenshotFrame::OnEndCaptureRect(wxCommandEvent& WXUNUSED(event)) +void ScreenshotFrame::OnEndCaptureRect(wxCommandEvent& WXUNUSED(event)) { capturingRect = false; wxMenuBar * menubar = this->GetMenuBar(); @@ -217,12 +224,12 @@ void wxScreenshotFrame::OnEndCaptureRect(wxCommandEvent& WXUNUSED(event)) wxWindow * thePage = m_notebook1->GetPage(m_notebook1->GetSelection()); - thePage->Disconnect( wxEVT_LEFT_DOWN, wxMouseEventHandler( wxCtrlMaskOut::OnLeftButtonDown ), NULL, m_maskout); - thePage->Disconnect( wxEVT_LEFT_UP, wxMouseEventHandler( wxCtrlMaskOut::OnLeftButtonUp ), NULL, m_maskout); - thePage->Disconnect( wxEVT_MOTION, wxMouseEventHandler( wxCtrlMaskOut::OnMouseMoving ), NULL, m_maskout); + thePage->Disconnect( wxEVT_LEFT_DOWN, wxMouseEventHandler( CtrlMaskOut::OnLeftButtonDown ), NULL, m_maskout); + thePage->Disconnect( wxEVT_LEFT_UP, wxMouseEventHandler( CtrlMaskOut::OnLeftButtonUp ), NULL, m_maskout); + thePage->Disconnect( wxEVT_MOTION, wxMouseEventHandler( CtrlMaskOut::OnMouseMoving ), NULL, m_maskout); } -void wxScreenshotFrame::OnNotebookPageChanging( +void ScreenshotFrame::OnNotebookPageChanging( #if SCREENSHOTGEN_USE_AUI wxAuiNotebookEvent& event #else @@ -238,14 +245,14 @@ wxNotebookEvent& event wxWindow * thePage = m_notebook1->GetPage(event.GetOldSelection()); - thePage->Disconnect( wxEVT_LEFT_DOWN, wxMouseEventHandler( wxCtrlMaskOut::OnLeftButtonDown ), NULL, m_maskout); - thePage->Disconnect( wxEVT_LEFT_UP, wxMouseEventHandler( wxCtrlMaskOut::OnLeftButtonUp ), NULL, m_maskout); - thePage->Disconnect( wxEVT_MOTION, wxMouseEventHandler( wxCtrlMaskOut::OnMouseMoving ), NULL, m_maskout); + thePage->Disconnect( wxEVT_LEFT_DOWN, wxMouseEventHandler( CtrlMaskOut::OnLeftButtonDown ), NULL, m_maskout); + thePage->Disconnect( wxEVT_LEFT_UP, wxMouseEventHandler( CtrlMaskOut::OnLeftButtonUp ), NULL, m_maskout); + thePage->Disconnect( wxEVT_MOTION, wxMouseEventHandler( CtrlMaskOut::OnMouseMoving ), NULL, m_maskout); event.Skip(); } -void wxScreenshotFrame::OnNotebookPageChanged( +void ScreenshotFrame::OnNotebookPageChanged( #if SCREENSHOTGEN_USE_AUI wxAuiNotebookEvent& event #else @@ -261,14 +268,14 @@ wxNotebookEvent& event wxWindow *thePage = m_notebook1->GetPage(event.GetSelection()); - thePage->Connect( wxEVT_LEFT_DOWN, wxMouseEventHandler( wxCtrlMaskOut::OnLeftButtonDown ), NULL, m_maskout); - thePage->Connect( wxEVT_LEFT_UP, wxMouseEventHandler( wxCtrlMaskOut::OnLeftButtonUp ), NULL, m_maskout); - thePage->Connect( wxEVT_MOTION, wxMouseEventHandler( wxCtrlMaskOut::OnMouseMoving ), NULL, m_maskout); + thePage->Connect( wxEVT_LEFT_DOWN, wxMouseEventHandler( CtrlMaskOut::OnLeftButtonDown ), NULL, m_maskout); + thePage->Connect( wxEVT_LEFT_UP, wxMouseEventHandler( CtrlMaskOut::OnLeftButtonUp ), NULL, m_maskout); + thePage->Connect( wxEVT_MOTION, wxMouseEventHandler( CtrlMaskOut::OnMouseMoving ), NULL, m_maskout); event.Skip(); } -void wxScreenshotFrame::OnCaptureAllControls(wxCommandEvent& WXUNUSED(event)) +void ScreenshotFrame::OnCaptureAllControls(wxCommandEvent& WXUNUSED(event)) { wxString dir = wxT("screenshots"); diff --git a/utils/screenshotgen/src/screenshot_main.h b/utils/screenshotgen/src/screenshot_main.h index ae922361fe..54b6667a33 100644 --- a/utils/screenshotgen/src/screenshot_main.h +++ b/utils/screenshotgen/src/screenshot_main.h @@ -15,10 +15,10 @@ #define SCREENSHOTGEN_USE_AUI 0 -class wxCtrlMaskOut; +class CtrlMaskOut; -class wxScreenshotFrame +class ScreenshotFrame #if SCREENSHOTGEN_USE_AUI : public AuiGUIFrame #else @@ -26,8 +26,8 @@ class wxScreenshotFrame #endif { public: - wxScreenshotFrame(wxFrame *frame); - ~wxScreenshotFrame(); + ScreenshotFrame(wxFrame *frame); + ~ScreenshotFrame(); protected: // event handlers @@ -55,7 +55,7 @@ private: // Data members bool capturingRect; - wxCtrlMaskOut * m_maskout; + CtrlMaskOut * m_maskout; }; #endif // WXSCREENSHOTMAIN_H diff --git a/utils/screenshotgen/src/screenshotgen.bkl b/utils/screenshotgen/src/screenshotgen.bkl index c90f91b6fe..8ef21b97fc 100644 --- a/utils/screenshotgen/src/screenshotgen.bkl +++ b/utils/screenshotgen/src/screenshotgen.bkl @@ -47,7 +47,6 @@ richtext.xml bitmaps/wxwin32x32.png bitmaps/bell.png - bitmaps/info.png bitmaps/sound.png bitmaps/dropbuth.png bitmaps/dropbutn.png -- 2.47.2