]> git.saurik.com Git - wxWidgets.git/commitdiff
many fixes; now the application correctly starts up
authorFrancesco Montorsi <f18m_cpp217828@yahoo.it>
Mon, 6 Oct 2008 11:53:16 +0000 (11:53 +0000)
committerFrancesco Montorsi <f18m_cpp217828@yahoo.it>
Mon, 6 Oct 2008 11:53:16 +0000 (11:53 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@56112 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

21 files changed:
utils/screenshotgen/src/Makefile.in
utils/screenshotgen/src/autocapture.cpp
utils/screenshotgen/src/autocapture.h
utils/screenshotgen/src/bitmaps/play.xpm [new file with mode: 0644]
utils/screenshotgen/src/bitmaps/stop.xpm [new file with mode: 0644]
utils/screenshotgen/src/ctrlmaskout.cpp
utils/screenshotgen/src/ctrlmaskout.h
utils/screenshotgen/src/customcombo.cpp
utils/screenshotgen/src/customcombo.h
utils/screenshotgen/src/guidesign.fbp
utils/screenshotgen/src/guiframe.cpp
utils/screenshotgen/src/guiframe.h
utils/screenshotgen/src/makefile.bcc
utils/screenshotgen/src/makefile.gcc
utils/screenshotgen/src/makefile.vc
utils/screenshotgen/src/makefile.wat
utils/screenshotgen/src/screenshot_app.cpp
utils/screenshotgen/src/screenshot_app.h
utils/screenshotgen/src/screenshot_main.cpp
utils/screenshotgen/src/screenshot_main.h
utils/screenshotgen/src/screenshotgen.bkl

index 197597bec05fdd6f622c20157763c6127f59355e..85f007ed001936eeca6f445aec16b7df7fb8e51d 100644 (file)
@@ -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` ; \
index 0d729281cf23823caa74cca0d797022e6e427b37..382c4451720a5127a9d60848cf91465278bd4bae 100644 (file)
@@ -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
index 6893cc498df2e51c9cac146d8659cf21e2aed3fe..e07b43f19be4feda63ef98e2af8958432be51847 100644 (file)
@@ -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<Control> 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<Control> 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 (file)
index 0000000..ed43c6a
--- /dev/null
@@ -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 (file)
index 0000000..d53bf86
--- /dev/null
@@ -0,0 +1,25 @@
+/* XPM */
+static const char * stop_xpm[] = {
+"20 20 2 1",
+"      c None",
+".     c #000000",
+"                    ",
+"                    ",
+"                    ",
+"   ..............   ",
+"   ..............   ",
+"   ..............   ",
+"   ..............   ",
+"   ..............   ",
+"   ..............   ",
+"   ..............   ",
+"   ..............   ",
+"   ..............   ",
+"   ..............   ",
+"   ..............   ",
+"   ..............   ",
+"   ..............   ",
+"   ..............   ",
+"                    ",
+"                    ",
+"                    "};
index 53883a5c30734ed048830672af8ddd2afabd10d9..c4b51abae857693ee383dc8bfef7d3c5a6651fff 100644 (file)
@@ -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;
index 3f1c894edc7c14d3218d0160fd218081b5681557..124788c911730e36a5d3736c7a42b67ae8ae5731 100644 (file)
@@ -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
 
 
 // ----------------------------------------------------------------------------
-// class wxCtrlMaskOut
+// class CtrlMaskOut
 // ----------------------------------------------------------------------------
 
-class wxCtrlMaskOut : public wxEvtHandler
+class CtrlMaskOut : public wxEvtHandler
 {
 public:
-    wxCtrlMaskOut();
-    ~wxCtrlMaskOut();
+    CtrlMaskOut();
+    ~CtrlMaskOut();
 
 public:
     void OnLeftButtonDown(wxMouseEvent& event);
index 447c5aaeb90768293af36de57762e1342c19088a..6d4d0b700fafbb09c9c3694e3247cc1137b0b7ef 100644 (file)
@@ -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() )
     {
index e438060e9b4708454b615b15e105643431d5a959..8902abd3d6698a09b306b9563c6d37cc24ed506a 100644 (file)
 #define WX_CUSTOM_COMBO_H
 
 // ----------------------------------------------------------------------------
-// class wxPenStyleComboBox
+// class PenStyleComboBox
 // This class is a modified version of the one from samples/combo.cpp
 // ----------------------------------------------------------------------------
 
 #include <wx/odcombo.h>
 
-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);
 };
 
 
index e40481bdc02a1d769c23aa6fb134d7844a4065d9..2340fc4e14708fc0a7b3436692fb61b8bdaa079f 100644 (file)
@@ -14,7 +14,7 @@
         <property name="name">MyProject</property>
         <property name="namespace"></property>
         <property name="path">.</property>
-        <property name="precompiled_header">// ----------------------------------------------------------------------------&#x0A;// headers&#x0A;// ----------------------------------------------------------------------------&#x0A;&#x0A;// For compilers that support precompilation, includes &quot;wx/wx.h&quot;.&#x0A;#include &quot;wx/wxprec.h&quot;&#x0A;&#x0A;#ifdef __BORLANDC__&#x0A;    #pragma hdrstop&#x0A;#endif&#x0A;&#x0A;// for all others, include the necessary headers (this file is usually all you&#x0A;// need because it includes almost all &quot;standard&quot; wxWidgets headers)&#x0A;#ifndef WX_PRECOMP&#x0A;    #include &quot;wx/wx.h&quot;&#x0A;#endif</property>
+        <property name="precompiled_header">// ----------------------------------------------------------------------------&#x0A;// headers&#x0A;// ----------------------------------------------------------------------------&#x0A;&#x0A;// For compilers that support precompilation, includes &quot;wx/wx.h&quot;.&#x0A;#include &quot;wx/wxprec.h&quot;&#x0A;&#x0A;#ifdef __BORLANDC__&#x0A;    #pragma hdrstop&#x0A;#endif&#x0A;&#x0A;// for all others, include the necessary headers wxWidgets headers)&#x0A;#ifndef WX_PRECOMP&#x0A;    #include &quot;wx/wx.h&quot;&#x0A;#endif&#x0A;&#x0A;#include &quot;bitmaps/play.xpm&quot;&#x0A;#include &quot;bitmaps/stop.xpm&quot;&#x0A;</property>
         <property name="relative_path">1</property>
         <property name="use_enum">1</property>
         <property name="use_microsoft_bom">0</property>
@@ -70,7 +70,7 @@
             <event name="OnSetFocus"></event>
             <event name="OnSize"></event>
             <event name="OnUpdateUI"></event>
-            <object class="wxMenuBar" expanded="0">
+            <object class="wxMenuBar" expanded="1">
                 <property name="bg"></property>
                 <property name="context_help"></property>
                 <property name="enabled">1</property>
                         <property name="checked">0</property>
                         <property name="enabled">1</property>
                         <property name="help">Open the directory where the screenshots generated.</property>
-                        <property name="id">idMenuOpen</property>
+                        <property name="id">wxID_ZOOM_IN</property>
                         <property name="kind">wxITEM_NORMAL</property>
-                        <property name="label">See Screenshots</property>
+                        <property name="label">&amp;View screenshots...</property>
                         <property name="name">m_menuSeeScr</property>
                         <property name="permission">none</property>
                         <property name="shortcut">Ctrl+O</property>
                         <event name="OnMenuSelection">OnSeeScreenshots</event>
                         <event name="OnUpdateUI"></event>
                     </object>
+                    <object class="separator" expanded="1">
+                        <property name="permission">none</property>
+                    </object>
                     <object class="wxMenuItem" expanded="1">
                         <property name="bitmap"></property>
                         <property name="checked">0</property>
                         <property name="enabled">1</property>
                         <property name="help">Quit the application</property>
-                        <property name="id">idMenuQuit</property>
+                        <property name="id">wxID_EXIT</property>
                         <property name="kind">wxITEM_NORMAL</property>
                         <property name="label">&amp;Quit</property>
                         <property name="name">m_menuFileQuit</property>
                         <event name="OnUpdateUI"></event>
                     </object>
                     <object class="wxMenuItem" expanded="1">
-                        <property name="bitmap"></property>
+                        <property name="bitmap">play; Load From Icon Resource [-1; -1]</property>
                         <property name="checked">0</property>
                         <property name="enabled">1</property>
                         <property name="help">Manually specify rectangular regions</property>
                         <event name="OnUpdateUI"></event>
                     </object>
                     <object class="wxMenuItem" expanded="1">
-                        <property name="bitmap"></property>
+                        <property name="bitmap">stop; Load From Icon Resource [-1; -1]</property>
                         <property name="checked">0</property>
                         <property name="enabled">0</property>
                         <property name="help">Stop generating screenshots...</property>
                         <event name="OnUpdateUI"></event>
                     </object>
                     <object class="wxMenuItem" expanded="1">
-                        <property name="bitmap"></property>
+                        <property name="bitmap">; Load From Resource</property>
                         <property name="checked">0</property>
                         <property name="enabled">1</property>
                         <property name="help">Take screenshot for all controls autoly.</property>
                         <event name="OnUpdateUI"></event>
                     </object>
                 </object>
-                <object class="wxMenu" expanded="0">
+                <object class="wxMenu" expanded="1">
                     <property name="label">&amp;Help</property>
                     <property name="name">helpMenu</property>
                     <property name="permission">protected</property>
                         <property name="checked">0</property>
                         <property name="enabled">1</property>
                         <property name="help">Show info about this application</property>
-                        <property name="id">idMenuAbout</property>
+                        <property name="id">wxID_ABOUT</property>
                         <property name="kind">wxITEM_NORMAL</property>
-                        <property name="label">&amp;About</property>
+                        <property name="label">&amp;About...</property>
                         <property name="name">m_menuHelpAbout</property>
                         <property name="permission">none</property>
                         <property name="shortcut">F1</property>
                         <object class="notebookpage" expanded="1">
                             <property name="bitmap"></property>
                             <property name="label">Tiny Controls</property>
-                            <property name="select">1</property>
-                            <object class="wxPanel" expanded="0">
+                            <property name="select">0</property>
+                            <object class="wxPanel" expanded="1">
                                 <property name="bg"></property>
                                 <property name="context_help"></property>
                                 <property name="enabled">1</property>
                                 <event name="OnSetFocus"></event>
                                 <event name="OnSize"></event>
                                 <event name="OnUpdateUI"></event>
-                                <object class="wxFlexGridSizer" expanded="0">
+                                <object class="wxFlexGridSizer" expanded="1">
                                     <property name="cols">2</property>
                                     <property name="flexible_direction">wxBOTH</property>
                                     <property name="growablecols"></property>
                                         <property name="proportion">0</property>
                                         <object class="wxBitmapButton" expanded="1">
                                             <property name="bg"></property>
-                                            <property name="bitmap">wxwin32x32.png; Load From File</property>
+                                            <property name="bitmap">bitmaps/wxwin32x32.png; Load From File</property>
                                             <property name="context_help"></property>
                                             <property name="default">0</property>
                                             <property name="disabled"></property>
                                         <property name="proportion">0</property>
                                         <object class="wxStaticBitmap" expanded="1">
                                             <property name="bg"></property>
-                                            <property name="bitmap">wxwin32x32.png; Load From File</property>
+                                            <property name="bitmap">bitmaps/wxwin32x32.png; Load From File</property>
                                             <property name="context_help"></property>
                                             <property name="enabled">1</property>
                                             <property name="fg"></property>
                                             <event name="OnUpdateUI"></event>
                                         </object>
                                     </object>
+                                    <object class="sizeritem" expanded="1">
+                                        <property name="border">5</property>
+                                        <property name="flag">wxALIGN_CENTER|wxALL</property>
+                                        <property name="proportion">0</property>
+                                        <object class="wxBitmapButton" expanded="1">
+                                            <property name="bg"></property>
+                                            <property name="bitmap">bitmaps/wxwin32x32.png; Load From File</property>
+                                            <property name="context_help"></property>
+                                            <property name="default">0</property>
+                                            <property name="disabled"></property>
+                                            <property name="enabled">1</property>
+                                            <property name="fg"></property>
+                                            <property name="focus"></property>
+                                            <property name="font"></property>
+                                            <property name="hidden">0</property>
+                                            <property name="hover"></property>
+                                            <property name="id">wxID_ANY</property>
+                                            <property name="label">wxBitmapButton</property>
+                                            <property name="maximum_size"></property>
+                                            <property name="minimum_size"></property>
+                                            <property name="name">m_bpButton12</property>
+                                            <property name="permission">protected</property>
+                                            <property name="pos"></property>
+                                            <property name="selected"></property>
+                                            <property name="size"></property>
+                                            <property name="style">wxBU_AUTODRAW</property>
+                                            <property name="subclass"></property>
+                                            <property name="tooltip">wxBitmapButton</property>
+                                            <property name="window_extra_style"></property>
+                                            <property name="window_name"></property>
+                                            <property name="window_style"></property>
+                                            <event name="OnButtonClick"></event>
+                                            <event name="OnChar"></event>
+                                            <event name="OnEnterWindow"></event>
+                                            <event name="OnEraseBackground"></event>
+                                            <event name="OnKeyDown"></event>
+                                            <event name="OnKeyUp"></event>
+                                            <event name="OnKillFocus"></event>
+                                            <event name="OnLeaveWindow"></event>
+                                            <event name="OnLeftDClick"></event>
+                                            <event name="OnLeftDown"></event>
+                                            <event name="OnLeftUp"></event>
+                                            <event name="OnMiddleDClick"></event>
+                                            <event name="OnMiddleDown"></event>
+                                            <event name="OnMiddleUp"></event>
+                                            <event name="OnMotion"></event>
+                                            <event name="OnMouseEvents"></event>
+                                            <event name="OnMouseWheel"></event>
+                                            <event name="OnPaint"></event>
+                                            <event name="OnRightDClick"></event>
+                                            <event name="OnRightDown"></event>
+                                            <event name="OnRightUp"></event>
+                                            <event name="OnSetFocus"></event>
+                                            <event name="OnSize"></event>
+                                            <event name="OnUpdateUI"></event>
+                                        </object>
+                                    </object>
+                                    <object class="sizeritem" expanded="1">
+                                        <property name="border">5</property>
+                                        <property name="flag">wxALIGN_CENTER|wxALL</property>
+                                        <property name="proportion">0</property>
+                                        <object class="wxBitmapButton" expanded="1">
+                                            <property name="bg"></property>
+                                            <property name="bitmap">bitmaps/wxwin32x32.png; Load From File</property>
+                                            <property name="context_help"></property>
+                                            <property name="default">0</property>
+                                            <property name="disabled"></property>
+                                            <property name="enabled">1</property>
+                                            <property name="fg"></property>
+                                            <property name="focus"></property>
+                                            <property name="font"></property>
+                                            <property name="hidden">0</property>
+                                            <property name="hover"></property>
+                                            <property name="id">wxID_ANY</property>
+                                            <property name="label">wxBitmapButton</property>
+                                            <property name="maximum_size"></property>
+                                            <property name="minimum_size"></property>
+                                            <property name="name">m_bpButton11</property>
+                                            <property name="permission">protected</property>
+                                            <property name="pos"></property>
+                                            <property name="selected"></property>
+                                            <property name="size"></property>
+                                            <property name="style">wxBU_AUTODRAW</property>
+                                            <property name="subclass"></property>
+                                            <property name="tooltip">wxBitmapButton</property>
+                                            <property name="window_extra_style"></property>
+                                            <property name="window_name"></property>
+                                            <property name="window_style"></property>
+                                            <event name="OnButtonClick"></event>
+                                            <event name="OnChar"></event>
+                                            <event name="OnEnterWindow"></event>
+                                            <event name="OnEraseBackground"></event>
+                                            <event name="OnKeyDown"></event>
+                                            <event name="OnKeyUp"></event>
+                                            <event name="OnKillFocus"></event>
+                                            <event name="OnLeaveWindow"></event>
+                                            <event name="OnLeftDClick"></event>
+                                            <event name="OnLeftDown"></event>
+                                            <event name="OnLeftUp"></event>
+                                            <event name="OnMiddleDClick"></event>
+                                            <event name="OnMiddleDown"></event>
+                                            <event name="OnMiddleUp"></event>
+                                            <event name="OnMotion"></event>
+                                            <event name="OnMouseEvents"></event>
+                                            <event name="OnMouseWheel"></event>
+                                            <event name="OnPaint"></event>
+                                            <event name="OnRightDClick"></event>
+                                            <event name="OnRightDown"></event>
+                                            <event name="OnRightUp"></event>
+                                            <event name="OnSetFocus"></event>
+                                            <event name="OnSize"></event>
+                                            <event name="OnUpdateUI"></event>
+                                        </object>
+                                    </object>
                                     <object class="sizeritem" expanded="1">
                                         <property name="border">20</property>
                                         <property name="flag">wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxEXPAND</property>
                                             <property name="hidden">0</property>
                                             <property name="hover_color"></property>
                                             <property name="id">wxID_ANY</property>
-                                            <property name="label">www.wxWidgets.org</property>
+                                            <property name="label">www.wxwidgets.org</property>
                                             <property name="maximum_size"></property>
                                             <property name="minimum_size"></property>
                                             <property name="name">m_hyperlink1</property>
                                             <property name="style">wxHL_DEFAULT_STYLE</property>
                                             <property name="subclass"></property>
                                             <property name="tooltip">wxHyperlinkCtrl</property>
-                                            <property name="url">http://www.wxWidgets.org</property>
+                                            <property name="url">http://www.wxwidgets.org</property>
                                             <property name="visited_color"></property>
                                             <property name="window_extra_style"></property>
                                             <property name="window_name"></property>
                         <object class="notebookpage" expanded="1">
                             <property name="bitmap"></property>
                             <property name="label">Choosing Controls</property>
-                            <property name="select">0</property>
-                            <object class="wxPanel" expanded="0">
+                            <property name="select">1</property>
+                            <object class="wxPanel" expanded="1">
                                 <property name="bg"></property>
                                 <property name="context_help"></property>
                                 <property name="enabled">1</property>
                                             <property name="name">m_animationCtrl1</property>
                                             <property name="permission">protected</property>
                                             <property name="pos"></property>
-                                            <property name="settings">    m_animationCtrl1-&gt;SetToolTip(_(&quot;wxAnimationCtrl&quot;));&#x0A;    if (m_animationCtrl1-&gt;LoadFile(wxT(&quot;throbber.gif&quot;)))&#x0A;        m_animationCtrl1-&gt;Play();</property>
+                                            <property name="settings">    m_animationCtrl1-&gt;SetToolTip(_(&quot;wxAnimationCtrl&quot;));&#x0A;    if (m_animationCtrl1-&gt;LoadFile(wxT(&quot;bitmaps/throbber.gif&quot;)))&#x0A;        m_animationCtrl1-&gt;Play();</property>
                                             <property name="size"></property>
                                             <property name="subclass"></property>
                                             <property name="tooltip"></property>
                             <property name="bitmap"></property>
                             <property name="label">Text Richtext</property>
                             <property name="select">0</property>
-                            <object class="wxPanel" expanded="0">
+                            <object class="wxPanel" expanded="1">
                                 <property name="bg"></property>
                                 <property name="context_help"></property>
                                 <property name="enabled">1</property>
                             <property name="bitmap"></property>
                             <property name="label">Picker Controls</property>
                             <property name="select">0</property>
-                            <object class="wxPanel" expanded="0">
+                            <object class="wxPanel" expanded="1">
                                 <property name="bg"></property>
                                 <property name="context_help"></property>
                                 <property name="enabled">1</property>
                                 <event name="OnSetFocus"></event>
                                 <event name="OnSize"></event>
                                 <event name="OnUpdateUI"></event>
-                                <object class="wxFlexGridSizer" expanded="0">
+                                <object class="wxFlexGridSizer" expanded="1">
                                     <property name="cols">2</property>
                                     <property name="flexible_direction">wxBOTH</property>
                                     <property name="growablecols"></property>
                                             <property name="name">m_bmpComboBox1</property>
                                             <property name="permission">protected</property>
                                             <property name="pos"></property>
-                                            <property name="settings">m_bmpComboBox1-&gt;Append(_(&quot;Item1&quot;), wxBitmap(_T(&quot;bell.png&quot;),wxBITMAP_TYPE_PNG));&#x0A;m_bmpComboBox1-&gt;Append(_(&quot;Item2&quot;), wxBitmap(_T(&quot;sound.png&quot;),wxBITMAP_TYPE_PNG));&#x0A;m_bmpComboBox1-&gt;Append(_(&quot;Item3&quot;), wxBitmap(_T(&quot;bell.png&quot;),wxBITMAP_TYPE_PNG));&#x0A;m_bmpComboBox1-&gt;Append(_(&quot;Item4&quot;), wxBitmap(_T(&quot;sound.png&quot;),wxBITMAP_TYPE_PNG));&#x0A;m_bmpComboBox1-&gt;SetToolTip(_(&quot;wxBitmapComboBox&quot;));</property>
+                                            <property name="settings">m_bmpComboBox1-&gt;Append(_(&quot;Item1&quot;), wxBitmap(_T(&quot;bitmaps/bell.png&quot;),wxBITMAP_TYPE_PNG));&#x0A;m_bmpComboBox1-&gt;Append(_(&quot;Item2&quot;), wxBitmap(_T(&quot;bitmaps/sound.png&quot;),wxBITMAP_TYPE_PNG));&#x0A;m_bmpComboBox1-&gt;Append(_(&quot;Item3&quot;), wxBitmap(_T(&quot;bitmaps/bell.png&quot;),wxBITMAP_TYPE_PNG));&#x0A;m_bmpComboBox1-&gt;Append(_(&quot;Item4&quot;), wxBitmap(_T(&quot;bitmaps/sound.png&quot;),wxBITMAP_TYPE_PNG));&#x0A;m_bmpComboBox1-&gt;SetToolTip(_(&quot;wxBitmapComboBox&quot;));</property>
                                             <property name="size"></property>
                                             <property name="subclass"></property>
                                             <property name="tooltip"></property>
                                         <property name="proportion">1</property>
                                         <object class="CustomControl" expanded="1">
                                             <property name="bg"></property>
-                                            <property name="class">wxPenStyleComboBox</property>
-                                            <property name="construction">m_ownerDrawnComboBox1 = wxPenStyleComboBox::CreateSample(m_panel5);</property>
+                                            <property name="class">PenStyleComboBox</property>
+                                            <property name="construction">m_ownerDrawnComboBox1 = PenStyleComboBox::CreateSample(m_panel5);</property>
                                             <property name="context_help"></property>
-                                            <property name="declaration">wxPenStyleComboBox * m_ownerDrawnComboBox1;</property>
+                                            <property name="declaration">PenStyleComboBox * m_ownerDrawnComboBox1;</property>
                                             <property name="enabled">1</property>
                                             <property name="fg"></property>
                                             <property name="font"></property>
                                             <property name="hidden">0</property>
                                             <property name="id">wxID_ANY</property>
-                                            <property name="include">#include &quot;custom_combo.h&quot;</property>
+                                            <property name="include">#include &quot;customcombo.h&quot;</property>
                                             <property name="maximum_size"></property>
                                             <property name="minimum_size"></property>
                                             <property name="name">m_ownerDrawnComboBox1</property>
                                             <property name="font"></property>
                                             <property name="hidden">0</property>
                                             <property name="id">wxID_ANY</property>
-                                            <property name="include">#include &quot;custom_combo.h&quot;</property>
+                                            <property name="include">#include &quot;customcombo.h&quot;</property>
                                             <property name="maximum_size"></property>
                                             <property name="minimum_size"></property>
                                             <property name="name">m_comboCtrl1</property>
                                             <property name="permission">protected</property>
                                             <property name="pos"></property>
-                                            <property name="settings">&#x09;m_comboCtrl1-&gt;SetText(wxT(&quot;wxComboCtrl&quot;));&#x0A;    m_comboCtrl1-&gt;SetToolTip(_(&quot;wxComboCtrl&quot;));&#x0A;&#x0A;&#x09;ListViewComboPopup* popupList = new ListViewComboPopup();&#x0A;&#x09;m_comboCtrl1-&gt;SetPopupControl(popupList);&#x0A;&#x09;m_comboCtrl1-&gt;SetPopupMaxHeight(80);&#x0A;&#x0A;&#x09;// Populate using wxListView methods&#x0A;&#x09;popupList-&gt;InsertItem(popupList-&gt;GetItemCount(),wxT(&quot;wxComboCtrl&quot;));&#x0A;&#x09;popupList-&gt;InsertItem(popupList-&gt;GetItemCount(),wxT(&quot;with&quot;));&#x0A;&#x09;popupList-&gt;InsertItem(popupList-&gt;GetItemCount(),wxT(&quot;wxListView&quot;));&#x0A;&#x09;popupList-&gt;InsertItem(popupList-&gt;GetItemCount(),wxT(&quot;popup&quot;));&#x0A;&#x09;popupList-&gt;InsertItem(popupList-&gt;GetItemCount(),wxT(&quot;Item1&quot;));&#x0A;&#x09;popupList-&gt;InsertItem(popupList-&gt;GetItemCount(),wxT(&quot;Item2&quot;));&#x0A;&#x09;popupList-&gt;InsertItem(popupList-&gt;GetItemCount(),wxT(&quot;Item3&quot;));&#x0A;&#x0A;&#x09;popupList-&gt;Select(0, true);</property>
+                                            <property name="settings">        // first of all, set the popup control!&#x0A;&#x09;ListViewComboPopup* popupList = new ListViewComboPopup();&#x0A;&#x09;m_comboCtrl1-&gt;SetPopupControl(popupList);&#x0A;&#x09;m_comboCtrl1-&gt;SetPopupMaxHeight(80);&#x0A;&#x0A;    m_comboCtrl1-&gt;SetText(wxT(&quot;wxComboCtrl&quot;));&#x0A;    m_comboCtrl1-&gt;SetToolTip(_(&quot;wxComboCtrl&quot;));&#x0A;&#x0A;&#x09;// Populate using wxListView methods&#x0A;&#x09;popupList-&gt;InsertItem(popupList-&gt;GetItemCount(),wxT(&quot;wxComboCtrl&quot;));&#x0A;&#x09;popupList-&gt;InsertItem(popupList-&gt;GetItemCount(),wxT(&quot;with&quot;));&#x0A;&#x09;popupList-&gt;InsertItem(popupList-&gt;GetItemCount(),wxT(&quot;wxListView&quot;));&#x0A;&#x09;popupList-&gt;InsertItem(popupList-&gt;GetItemCount(),wxT(&quot;popup&quot;));&#x0A;&#x09;popupList-&gt;InsertItem(popupList-&gt;GetItemCount(),wxT(&quot;Item1&quot;));&#x0A;&#x09;popupList-&gt;InsertItem(popupList-&gt;GetItemCount(),wxT(&quot;Item2&quot;));&#x0A;&#x09;popupList-&gt;InsertItem(popupList-&gt;GetItemCount(),wxT(&quot;Item3&quot;));&#x0A;&#x0A;&#x09;popupList-&gt;Select(0, true);</property>
                                             <property name="size"></property>
                                             <property name="subclass"></property>
                                             <property name="tooltip"></property>
                                             <property name="font"></property>
                                             <property name="hidden">0</property>
                                             <property name="id">wxID_ANY</property>
-                                            <property name="include">#include &quot;custom_combo.h&quot;</property>
+                                            <property name="include">#include &quot;customcombo.h&quot;</property>
                                             <property name="maximum_size"></property>
                                             <property name="minimum_size"></property>
                                             <property name="name">m_comboCtrl2</property>
                                             <property name="permission">protected</property>
                                             <property name="pos"></property>
-                                            <property name="settings">&#x09;m_comboCtrl2-&gt;SetText(wxT(&quot;wxComboCtrl&quot;));&#x0A;&#x09;m_comboCtrl2-&gt;SetToolTip(_(&quot;wxComboCtrl&quot;));&#x0A;&#x0A;&#x09;TreeCtrlComboPopup* popupTree = new TreeCtrlComboPopup();&#x0A;&#x0A;&#x09;m_comboCtrl2-&gt;SetPopupControl(popupTree);&#x0A;&#x09;m_comboCtrl2-&gt;SetPopupMaxHeight(80);&#x0A;&#x0A;&#x09;//Add a root and some nodes using wxTreeCtrl methods&#x0A;&#x09;wxTreeItemId root = popupTree-&gt;AddRoot(_(&quot;wxComboCtrl&quot;));&#x0A;&#x0A;&#x09;popupTree-&gt;AppendItem(root, _(&quot;with&quot;));&#x0A;&#x09;popupTree-&gt;AppendItem(root, _(&quot;wxTreeCtrl&quot;));&#x0A;&#x0A;&#x09;wxTreeItemId node2 = popupTree-&gt;AppendItem(root, _(&quot;popout&quot;));&#x0A;&#x09;popupTree-&gt;AppendItem(node2, _(&quot;Node1&quot;));&#x0A;&#x09;popupTree-&gt;AppendItem(node2, _(&quot;Node2&quot;));&#x0A;&#x0A;&#x09;popupTree-&gt;ExpandAll();</property>
+                                            <property name="settings">        // first of all, set the popup control!&#x0A;&#x09;TreeCtrlComboPopup* popupTree = new TreeCtrlComboPopup();&#x0A;&#x09;m_comboCtrl2-&gt;SetPopupControl(popupTree);&#x0A;&#x09;m_comboCtrl2-&gt;SetPopupMaxHeight(80);&#x0A;&#x0A;&#x09;m_comboCtrl2-&gt;SetText(wxT(&quot;wxComboCtrl&quot;));&#x0A;&#x09;m_comboCtrl2-&gt;SetToolTip(_(&quot;wxComboCtrl&quot;));&#x0A;&#x0A;&#x09;//Add a root and some nodes using wxTreeCtrl methods&#x0A;&#x09;wxTreeItemId root = popupTree-&gt;AddRoot(_(&quot;wxComboCtrl&quot;));&#x0A;&#x0A;&#x09;popupTree-&gt;AppendItem(root, _(&quot;with&quot;));&#x0A;&#x09;popupTree-&gt;AppendItem(root, _(&quot;wxTreeCtrl&quot;));&#x0A;&#x0A;&#x09;wxTreeItemId node2 = popupTree-&gt;AppendItem(root, _(&quot;popout&quot;));&#x0A;&#x09;popupTree-&gt;AppendItem(node2, _(&quot;Node1&quot;));&#x0A;&#x09;popupTree-&gt;AppendItem(node2, _(&quot;Node2&quot;));&#x0A;&#x0A;&#x09;popupTree-&gt;ExpandAll();</property>
                                             <property name="size"></property>
                                             <property name="subclass"></property>
                                             <property name="tooltip"></property>
index ed1cbf90fe53a69c287dd29a6cd3e8df742db19c..541e63fb1ab23f64e5ecf10ad63c16a4c3145bab 100644 (file)
@@ -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!
 #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<Begin>") ) + 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<End>") ) + 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"));
        
index d366f72ccfa8fb2f3f83a2bfbc3d834b7bbfa1cd..40d3bfed0af31b9aeb11c03c92c8540ba63c3700 100644 (file)
@@ -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!
 ///////////////////////////////////////////////////////////////////////////////
 /// 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__
index 77735f750714f19799defdaeb796301900605713..b2059387d5e7f5648afccc01d2007c5b92c356cf 100644 (file)
@@ -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
index 2bc26bd51d329990323351b94d5db474c278ef82..9f3f9d6797f46dc038dc3c999eebdff01acf4697 100644 (file)
@@ -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) $<
index ed1159e2de782dcb5c448829d92c69526b4a5e3f..436287b023d8a783f81e8f18260cd1bc06e7de12 100644 (file)
@@ -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
index 12ed10a493a9dcbde3e5c091413d0f63788e2f94..a482dbad5fd12cffc1b46740b688ae10a674c5d0 100644 (file)
@@ -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) $<
index e2b0c85380fb323ac5bf4720b94ed5a1721ca12f..18b7cbe1a8f1d48434e961b5922e7bc4a1a71d78 100644 (file)
 
 
 // ----------------------------------------------------------------------------
-// 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;
index 331b2d1c5e347fd90009fb19a79805c0c076a8c6..1e1b485de8e0d9c489a4dd141172d571c748d48e 100644 (file)
@@ -11,7 +11,7 @@
 
 #include <wx/app.h>
 
-class wxScreenshotApp : public wxApp
+class ScreenshotApp : public wxApp
 {
 public:
     virtual bool OnInit();
index 7181cf9d5f704ce4ef7d8026ce959e12414cbd90..c9966ff50234aec3228d6a19457ea0b284ffd00e 100644 (file)
 #endif
 
 #include <wx/dir.h>
+#include <wx/aboutdlg.h>
+
 #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");
 
index ae922361fe0f60686a4773ccd1cc8c085a98c0fb..54b6667a339c28ea1a20bbd128c2020937e6907e 100644 (file)
 #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
index c90f91b6fe50b3b58c78ea9da1f5f383787b7cee..8ef21b97fcfbe5b347d99bc8a2ac47b55f437b7f 100644 (file)
@@ -47,7 +47,6 @@
             richtext.xml
             bitmaps/wxwin32x32.png
             bitmaps/bell.png
-            bitmaps/info.png
             bitmaps/sound.png
             bitmaps/dropbuth.png
             bitmaps/dropbutn.png