Removed traces of wxFormBuilder from the screenshotgen utility, cleaned up some dependencies in headers, and replaced a few sparse tabs with spaces.
Also applied patch #10083 (VC6 build fixes for screenshotgen). git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@56343 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -10,15 +10,16 @@
|
||||
#include "wx/wxprec.h"
|
||||
|
||||
#ifdef __BORLANDC__
|
||||
#pragma hdrstop
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
// for all others, include the necessary headers
|
||||
// for all others, include the necessary headers wxWidgets headers)
|
||||
#ifndef WX_PRECOMP
|
||||
#include "wx/wx.h"
|
||||
#include "wx/wx.h"
|
||||
#endif
|
||||
|
||||
#include <wx/filename.h>
|
||||
#include "wx/filename.h"
|
||||
|
||||
#include "autocapture.h"
|
||||
|
||||
#ifdef __WXMAC__
|
||||
@@ -33,8 +34,7 @@
|
||||
/* static */
|
||||
void AutoCaptureMechanism::Delay(int seconds)
|
||||
{
|
||||
using std::clock;
|
||||
using std::clock_t;
|
||||
// TODO: Switch this to use wxTimer.
|
||||
|
||||
// Wait for 3 seconds
|
||||
clock_t start = clock();
|
||||
|
@@ -6,14 +6,14 @@
|
||||
// Licence: wxWindows license
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef AUTOCAP_H
|
||||
#define AUTOCAP_H
|
||||
#ifndef _AUTOCAPTURE_H_
|
||||
#define _AUTOCAPTURE_H_
|
||||
|
||||
#include <wx/notebook.h>
|
||||
#include <wx/settings.h>
|
||||
#include <vector>
|
||||
#include <ctime>
|
||||
|
||||
#include <wx/notebook.h>
|
||||
|
||||
|
||||
// TODO: document what these flags mean
|
||||
enum AdjustFlags
|
||||
@@ -112,6 +112,6 @@ private: // internal utils
|
||||
int m_border;
|
||||
};
|
||||
|
||||
#endif // AUTOCAP_H
|
||||
#endif // _AUTOCAPTURE_H_
|
||||
|
||||
|
||||
|
@@ -10,24 +10,25 @@
|
||||
#include "wx/wxprec.h"
|
||||
|
||||
#ifdef __BORLANDC__
|
||||
#pragma hdrstop
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
// for all others, include the necessary headers
|
||||
// for all others, include the necessary headers wxWidgets headers)
|
||||
#ifndef WX_PRECOMP
|
||||
#include "wx/wx.h"
|
||||
#include "wx/wx.h"
|
||||
#endif
|
||||
|
||||
#ifdef __WXMAC__ // See CreateMask()
|
||||
#include <wx/minifram.h>
|
||||
#include <cstdlib>
|
||||
#endif
|
||||
|
||||
#include <wx/filename.h>
|
||||
#include <wx/hashset.h>
|
||||
|
||||
#include "ctrlmaskout.h"
|
||||
|
||||
#ifdef __WXMAC__ // See CreateMask()
|
||||
#include <wx/minifram.h>
|
||||
#include <cstdlib>
|
||||
#endif
|
||||
|
||||
// use a set to make sure the same control won't be inserted twice
|
||||
#include "wx/hashset.h"
|
||||
WX_DECLARE_HASH_SET(wxWindow*, wxPointerHash, wxPointerEqual, CtrlSet);
|
||||
|
||||
|
||||
// It's copied from src/aui/framemanager.cpp and modified, a failed attempt to
|
||||
// visualize the process of taking the screenshot when wxTopLevelWindow::CanSetTransparent
|
||||
@@ -280,9 +281,6 @@ void CtrlMaskOut::DetermineCtrlNameAndRect()
|
||||
wxString ctrlName;
|
||||
wxRect ctrlSize;
|
||||
|
||||
// use a set to make sure the same control won't be inserted twice
|
||||
WX_DECLARE_HASH_SET(wxWindow*, wxPointerHash, wxPointerEqual, CtrlSet);
|
||||
|
||||
CtrlSet ctrls;
|
||||
|
||||
int i, j;
|
||||
|
@@ -6,10 +6,10 @@
|
||||
// Licence: wxWindows license
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef WX_CTRL_MASK_OUT
|
||||
#define WX_CTRL_MASK_OUT
|
||||
#ifndef _CTRLMASKOUT_H_
|
||||
#define _CTRLMASKOUT_H_
|
||||
|
||||
#include <wx/frame.h>
|
||||
#include "wx/filename.h"
|
||||
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
@@ -60,6 +60,6 @@ private:
|
||||
bool m_isTiming;
|
||||
};
|
||||
|
||||
#endif // WX_CTRL_MASK_OUT
|
||||
#endif // _CTRLMASKOUT_H_
|
||||
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -1,13 +1,10 @@
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version Apr 16 2008)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO "NOT" EDIT THIS FILE!
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// headers
|
||||
// ----------------------------------------------------------------------------
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: guiframe.cpp
|
||||
// Purpose: Implement the Application Frame
|
||||
// Author: Utensil Candel (UtensilCandel@@gmail.com)
|
||||
// RCS-ID: $Id$
|
||||
// Licence: wxWindows license
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// For compilers that support precompilation, includes "wx/wx.h".
|
||||
#include "wx/wxprec.h"
|
||||
@@ -21,12 +18,12 @@
|
||||
#include "wx/wx.h"
|
||||
#endif
|
||||
|
||||
#include "guiframe.h"
|
||||
|
||||
#include "bitmaps/play.xpm"
|
||||
#include "bitmaps/stop.xpm"
|
||||
|
||||
|
||||
#include "guiframe.h"
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
GUIFrame::GUIFrame( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxFrame( parent, id, title, pos, size, style )
|
||||
|
@@ -1,74 +1,44 @@
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version Apr 16 2008)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO "NOT" EDIT THIS FILE!
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: guiframe.h
|
||||
// Purpose: Defines the window containing all controls.
|
||||
// Author: Utensil Candel (UtensilCandel@@gmail.com)
|
||||
// RCS-ID: $Id$
|
||||
// Licence: wxWindows license
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __guiframe__
|
||||
#define __guiframe__
|
||||
#ifndef _GUIFRAME_H_
|
||||
#define _GUIFRAME_H_
|
||||
|
||||
#include <wx/intl.h>
|
||||
|
||||
#include <wx/string.h>
|
||||
#include <wx/bitmap.h>
|
||||
#include <wx/image.h>
|
||||
#include <wx/icon.h>
|
||||
#include <wx/menu.h>
|
||||
#include <wx/gdicmn.h>
|
||||
#include <wx/font.h>
|
||||
#include <wx/colour.h>
|
||||
#include <wx/settings.h>
|
||||
#include <wx/button.h>
|
||||
#include <wx/stattext.h>
|
||||
#include <wx/checkbox.h>
|
||||
#include <wx/radiobut.h>
|
||||
#include <wx/bmpbuttn.h>
|
||||
#include <wx/statbmp.h>
|
||||
#include <wx/gauge.h>
|
||||
#include <wx/slider.h>
|
||||
#include <wx/tglbtn.h>
|
||||
#include <wx/hyperlink.h>
|
||||
#include <wx/spinctrl.h>
|
||||
#include <wx/spinbutt.h>
|
||||
#include <wx/scrolbar.h>
|
||||
#include <wx/sizer.h>
|
||||
#include <wx/panel.h>
|
||||
#include <wx/checklst.h>
|
||||
#include <wx/listbox.h>
|
||||
#include <wx/radiobox.h>
|
||||
#include <wx/statbox.h>
|
||||
#include <wx/treectrl.h>
|
||||
#include <wx/listctrl.h>
|
||||
#include "wx/animate.h"
|
||||
#include "wx/bmpcbox.h"
|
||||
#include "wx/calctrl.h"
|
||||
#include "wx/clrpicker.h"
|
||||
#include "wx/collpane.h"
|
||||
#include <wx/textctrl.h>
|
||||
#include <wx/richtext/richtextctrl.h>
|
||||
#include <wx/clrpicker.h>
|
||||
#include <wx/fontpicker.h>
|
||||
#include <wx/filepicker.h>
|
||||
#include <wx/calctrl.h>
|
||||
#include <wx/datectrl.h>
|
||||
#include <wx/dateevt.h>
|
||||
#include <wx/dirctrl.h>
|
||||
#include <wx/choice.h>
|
||||
#include <wx/combobox.h>
|
||||
#include <wx/bmpcbox.h>
|
||||
#include "wx/datectrl.h"
|
||||
#include "wx/dirctrl.h"
|
||||
#include "wx/filepicker.h"
|
||||
#include "wx/fontpicker.h"
|
||||
#include "wx/hyperlink.h"
|
||||
#include "wx/listctrl.h"
|
||||
#include "wx/notebook.h"
|
||||
#include "wx/richtext/richtextctrl.h"
|
||||
#include "wx/spinbutt.h"
|
||||
#include "wx/spinctrl.h"
|
||||
#include "wx/tglbtn.h"
|
||||
#include "wx/treectrl.h"
|
||||
|
||||
#include "customcombo.h"
|
||||
#include <wx/notebook.h>
|
||||
#include <wx/statusbr.h>
|
||||
#include <wx/frame.h>
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
/// Class GUIFrame
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
class GUIFrame : public wxFrame
|
||||
{
|
||||
private:
|
||||
public:
|
||||
|
||||
GUIFrame( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("wxWidgets Control Screenshot Generator"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_FRAME_STYLE|wxTAB_TRAVERSAL );
|
||||
~GUIFrame();
|
||||
|
||||
protected:
|
||||
|
||||
protected:
|
||||
enum
|
||||
{
|
||||
idMenuCapFullScreen = 1000,
|
||||
@@ -129,11 +99,9 @@ class GUIFrame : public wxFrame
|
||||
wxChoice* m_choice1;
|
||||
wxComboBox* m_comboBox1;
|
||||
|
||||
|
||||
wxBitmapComboBox * m_bmpComboBox1;
|
||||
PenStyleComboBox * m_ownerDrawnComboBox1;
|
||||
|
||||
|
||||
wxComboCtrl * m_comboCtrl1;
|
||||
wxComboCtrl * m_comboCtrl2;
|
||||
wxStatusBar* statusBar;
|
||||
@@ -149,12 +117,6 @@ 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__
|
||||
#endif //_GUIFRAME_H_
|
||||
|
@@ -10,15 +10,15 @@
|
||||
#include "wx/wxprec.h"
|
||||
|
||||
#ifdef __BORLANDC__
|
||||
#pragma hdrstop
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
// for all others, include the necessary headers
|
||||
// for all others, include the necessary headers wxWidgets headers)
|
||||
#ifndef WX_PRECOMP
|
||||
#include "wx/wx.h"
|
||||
#include "wx/wx.h"
|
||||
#endif
|
||||
|
||||
#include <wx/richtext/richtextxml.h>
|
||||
#include "wx/richtext/richtextxml.h"
|
||||
|
||||
#include "screenshot_app.h"
|
||||
#include "screenshot_main.h"
|
||||
|
@@ -6,10 +6,10 @@
|
||||
// Licence: wxWindows license
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef WXSCREENSHOTAPP_H
|
||||
#define WXSCREENSHOTAPP_H
|
||||
#ifndef _SCREENSHOT_APP_H_
|
||||
#define _SCREENSHOT_APP_H_
|
||||
|
||||
#include <wx/app.h>
|
||||
#include "wx/app.h"
|
||||
|
||||
class ScreenshotApp : public wxApp
|
||||
{
|
||||
@@ -17,4 +17,4 @@ public:
|
||||
virtual bool OnInit();
|
||||
};
|
||||
|
||||
#endif // WXSCREENSHOTAPP_H
|
||||
#endif // _SCREENSHOT_APP_H_
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: screenshot_main.cpp
|
||||
// Purpose: Implement the Application Frame
|
||||
// Purpose: Implements the window containing all controls.
|
||||
// Author: Utensil Candel (UtensilCandel@@gmail.com)
|
||||
// RCS-ID: $Id$
|
||||
// Licence: wxWindows license
|
||||
@@ -10,25 +10,17 @@
|
||||
#include "wx/wxprec.h"
|
||||
|
||||
#ifdef __BORLANDC__
|
||||
#pragma hdrstop
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
// for all others, include the necessary headers
|
||||
// for all others, include the necessary headers wxWidgets headers)
|
||||
#ifndef WX_PRECOMP
|
||||
#include <wx/filename.h>
|
||||
#include <wx/dcbuffer.h>
|
||||
#include <wx/colordlg.h>
|
||||
#include <wx/fontdlg.h>
|
||||
#include <wx/filedlg.h>
|
||||
#include <wx/dirdlg.h>
|
||||
#include "wx/wx.h"
|
||||
#endif
|
||||
|
||||
#include <wx/dir.h>
|
||||
#include <wx/aboutdlg.h>
|
||||
#include <wx/msgdlg.h>
|
||||
#include <wx/dcscreen.h>
|
||||
#include <wx/filesys.h>
|
||||
#include <wx/utils.h>
|
||||
#include "wx/aboutdlg.h"
|
||||
#include "wx/dir.h"
|
||||
#include "wx/filesys.h"
|
||||
|
||||
#include "screenshot_main.h"
|
||||
#include "ctrlmaskout.h"
|
||||
@@ -74,13 +66,7 @@ ScreenshotFrame::~ScreenshotFrame()
|
||||
}
|
||||
|
||||
/*
|
||||
Do some further customization on some controls generated by wxFormBuilder.
|
||||
|
||||
wxFormBuilder does not allow customizations on some controls;
|
||||
e.g. you cannot load a richtext file in a wxRichtextCtrl during initialization.
|
||||
|
||||
Those customizations will be done here.
|
||||
|
||||
Do some further customization on some controls.
|
||||
|
||||
NB: under wxGTK for the radio button "unchecked" to be unchecked, it's
|
||||
important to put the wxRB_GROUP style on the first wxRadioButton
|
||||
@@ -88,7 +74,6 @@ ScreenshotFrame::~ScreenshotFrame()
|
||||
*/
|
||||
void ScreenshotFrame::InitFBControls()
|
||||
{
|
||||
// For some reason, wxFormBuilder does not set the scrollbar range
|
||||
m_scrollBar1->SetScrollbar(50, 1, 100, 1);
|
||||
|
||||
// Do the default selection for wxComboBox
|
||||
|
@@ -6,8 +6,8 @@
|
||||
// Licence: wxWindows license
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef WXSCREENSHOTMAIN_H
|
||||
#define WXSCREENSHOTMAIN_H
|
||||
#ifndef _SCREENSHOT_MAIN_H_
|
||||
#define _SCREENSHOT_MAIN_H_
|
||||
|
||||
#include "guiframe.h"
|
||||
|
||||
@@ -20,9 +20,9 @@ class CtrlMaskOut;
|
||||
|
||||
class ScreenshotFrame
|
||||
#if SCREENSHOTGEN_USE_AUI
|
||||
: public AuiGUIFrame
|
||||
: public AuiGUIFrame
|
||||
#else
|
||||
: public GUIFrame
|
||||
: public GUIFrame
|
||||
#endif
|
||||
{
|
||||
public:
|
||||
@@ -58,4 +58,4 @@ private:
|
||||
CtrlMaskOut * m_maskout;
|
||||
};
|
||||
|
||||
#endif // WXSCREENSHOTMAIN_H
|
||||
#endif // _SCREENSHOT_MAIN_H_
|
||||
|
Reference in New Issue
Block a user