many fixes; now the application correctly starts up
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@56112 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -219,7 +219,7 @@ uninstall_screenshotgen:
|
|||||||
|
|
||||||
data:
|
data:
|
||||||
@mkdir -p .
|
@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 ; \
|
if test ! -f ./$$f -a ! -d ./$$f ; \
|
||||||
then x=yep ; \
|
then x=yep ; \
|
||||||
else x=`find $(srcdir)/$$f -newer ./$$f -print` ; \
|
else x=`find $(srcdir)/$$f -newer ./$$f -print` ; \
|
||||||
|
@@ -84,6 +84,117 @@ wxBitmap Capture(wxRect rect)
|
|||||||
return Capture(origin.x, origin.y, rect.GetWidth(), rect.GetHeight());
|
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)
|
void AutoCaptureMechanism::Save(wxBitmap screenshot, wxString fileName)
|
||||||
{
|
{
|
||||||
//Check if m_defaultDir already existed
|
//Check if m_defaultDir already existed
|
||||||
|
@@ -28,6 +28,11 @@ enum AdjustFlags
|
|||||||
AJ_UnionEnd = 1 << 4
|
AJ_UnionEnd = 1 << 4
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
// class AutoCaptureMechanism
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
class AutoCaptureMechanism
|
class AutoCaptureMechanism
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@@ -86,7 +91,7 @@ public:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
protected: // internal utils
|
||||||
struct Control
|
struct Control
|
||||||
{
|
{
|
||||||
Control() {}
|
Control() {}
|
||||||
@@ -99,6 +104,20 @@ private:
|
|||||||
int flag;
|
int flag;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
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);
|
||||||
|
|
||||||
|
void Save(wxBitmap screenshot, wxString fileName);
|
||||||
|
|
||||||
|
private:
|
||||||
typedef std::vector<Control> ControlList;
|
typedef std::vector<Control> ControlList;
|
||||||
ControlList m_controlList;
|
ControlList m_controlList;
|
||||||
|
|
||||||
@@ -111,116 +130,6 @@ private:
|
|||||||
|
|
||||||
wxString m_dir;
|
wxString m_dir;
|
||||||
int m_border;
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
//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);
|
|
||||||
|
|
||||||
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 Save(wxBitmap screenshot, wxString fileName);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // AUTOCAP_H
|
#endif // AUTOCAP_H
|
||||||
|
25
utils/screenshotgen/src/bitmaps/play.xpm
Normal file
25
utils/screenshotgen/src/bitmaps/play.xpm
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
/* XPM */
|
||||||
|
static const char * play_xpm[] = {
|
||||||
|
"20 20 2 1",
|
||||||
|
" c None",
|
||||||
|
". c #000000",
|
||||||
|
" ",
|
||||||
|
" ",
|
||||||
|
" ..... ",
|
||||||
|
" ...... ",
|
||||||
|
" ....... ",
|
||||||
|
" ........ ",
|
||||||
|
" ......... ",
|
||||||
|
" .......... ",
|
||||||
|
" ........... ",
|
||||||
|
" ............ ",
|
||||||
|
" ............ ",
|
||||||
|
" ........... ",
|
||||||
|
" .......... ",
|
||||||
|
" ......... ",
|
||||||
|
" ........ ",
|
||||||
|
" ....... ",
|
||||||
|
" ...... ",
|
||||||
|
" ..... ",
|
||||||
|
" ",
|
||||||
|
" "};
|
25
utils/screenshotgen/src/bitmaps/stop.xpm
Normal file
25
utils/screenshotgen/src/bitmaps/stop.xpm
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
/* XPM */
|
||||||
|
static const char * stop_xpm[] = {
|
||||||
|
"20 20 2 1",
|
||||||
|
" c None",
|
||||||
|
". c #000000",
|
||||||
|
" ",
|
||||||
|
" ",
|
||||||
|
" ",
|
||||||
|
" .............. ",
|
||||||
|
" .............. ",
|
||||||
|
" .............. ",
|
||||||
|
" .............. ",
|
||||||
|
" .............. ",
|
||||||
|
" .............. ",
|
||||||
|
" .............. ",
|
||||||
|
" .............. ",
|
||||||
|
" .............. ",
|
||||||
|
" .............. ",
|
||||||
|
" .............. ",
|
||||||
|
" .............. ",
|
||||||
|
" .............. ",
|
||||||
|
" .............. ",
|
||||||
|
" ",
|
||||||
|
" ",
|
||||||
|
" "};
|
@@ -1,6 +1,6 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
// Name: ctrlmaskout.cpp
|
// Name: ctrlmaskout.cpp
|
||||||
// Purpose: Implement wxCtrlMaskOut class
|
// Purpose: Implement CtrlMaskOut class
|
||||||
// Author: Utensil Candel (UtensilCandel@@gmail.com)
|
// Author: Utensil Candel (UtensilCandel@@gmail.com)
|
||||||
// RCS-ID: $Id$
|
// RCS-ID: $Id$
|
||||||
// Licence: wxWindows license
|
// Licence: wxWindows license
|
||||||
@@ -31,7 +31,7 @@
|
|||||||
|
|
||||||
// It's copied from src/aui/framemanager.cpp and modified, a failed attempt to
|
// It's copied from src/aui/framemanager.cpp and modified, a failed attempt to
|
||||||
// visualize the process of taking the screenshot when wxTopLevelWindow::CanSetTransparent
|
// 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
|
// 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_defaultDir(_T("screenshots")),
|
||||||
m_controlName(_T("")),
|
m_controlName(_T("")),
|
||||||
m_currentRect(0, 0, 0, 0),
|
m_currentRect(0, 0, 0, 0),
|
||||||
@@ -116,7 +116,7 @@ wxCtrlMaskOut::wxCtrlMaskOut()
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
wxCtrlMaskOut::~wxCtrlMaskOut()
|
CtrlMaskOut::~CtrlMaskOut()
|
||||||
{
|
{
|
||||||
if (m_mask != NULL)
|
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();
|
if (m_isTiming) event.Skip();
|
||||||
|
|
||||||
@@ -138,7 +138,7 @@ void wxCtrlMaskOut::OnLeftButtonDown(wxMouseEvent& event)
|
|||||||
CreateMask(thePanel);
|
CreateMask(thePanel);
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxCtrlMaskOut::OnMouseMoving(wxMouseEvent& event)
|
void CtrlMaskOut::OnMouseMoving(wxMouseEvent& event)
|
||||||
{
|
{
|
||||||
if (!event.Dragging())
|
if (!event.Dragging())
|
||||||
{
|
{
|
||||||
@@ -159,7 +159,7 @@ void wxCtrlMaskOut::OnMouseMoving(wxMouseEvent& event)
|
|||||||
m_mask->SetSize(m_currentRect);
|
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
|
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;
|
m_isTiming = true;
|
||||||
(new wxTimer(this))->Start(3000, wxTIMER_ONE_SHOT);
|
(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
|
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.
|
// The final rect region is determined.
|
||||||
DetermineCtrlNameAndRect();
|
DetermineCtrlNameAndRect();
|
||||||
@@ -196,10 +196,10 @@ void wxCtrlMaskOut::OnTimingFinished(wxTimerEvent& event)
|
|||||||
Capture(m_currentRect, m_controlName);
|
Capture(m_currentRect, m_controlName);
|
||||||
|
|
||||||
m_isTiming = false;
|
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.
|
// Somehow wxScreenDC.Blit() doesn't work under Mac for now. Here is a trick.
|
||||||
#ifdef __WXMAC__
|
#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);
|
fileName + _T(".png"), wxBITMAP_TYPE_PNG);
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxCtrlMaskOut::Capture(wxRect rect, wxString fileName)
|
void CtrlMaskOut::Capture(wxRect rect, wxString fileName)
|
||||||
{
|
{
|
||||||
wxPoint origin = rect.GetPosition();
|
wxPoint origin = rect.GetPosition();
|
||||||
Capture(origin.x, origin.y, rect.GetWidth(), rect.GetHeight(), fileName);
|
Capture(origin.x, origin.y, rect.GetWidth(), rect.GetHeight(), fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxCtrlMaskOut::DetermineCtrlNameAndRect()
|
void CtrlMaskOut::DetermineCtrlNameAndRect()
|
||||||
{
|
{
|
||||||
// Detect windows using (n-1)*(n-1) points
|
// Detect windows using (n-1)*(n-1) points
|
||||||
const int n = 5;
|
const int n = 5;
|
||||||
@@ -357,7 +357,7 @@ void wxCtrlMaskOut::DetermineCtrlNameAndRect()
|
|||||||
m_currentRect.Inflate(m_inflateBorder);
|
m_currentRect.Inflate(m_inflateBorder);
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxCtrlMaskOut::CreateMask(wxWindow* parent)
|
void CtrlMaskOut::CreateMask(wxWindow* parent)
|
||||||
{
|
{
|
||||||
if (m_mask != NULL)
|
if (m_mask != NULL)
|
||||||
m_mask->Destroy();
|
m_mask->Destroy();
|
||||||
@@ -392,9 +392,9 @@ void wxCtrlMaskOut::CreateMask(wxWindow* parent)
|
|||||||
p->SetBackgroundColour(*wxBLUE);
|
p->SetBackgroundColour(*wxBLUE);
|
||||||
|
|
||||||
// So that even if the cursor run into the mask, the events are still correctly processed.
|
// 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_DOWN, wxMouseEventHandler( CtrlMaskOut::OnLeftButtonDown ), NULL, this);
|
||||||
p->Connect( wxEVT_LEFT_UP, wxMouseEventHandler( wxCtrlMaskOut::OnLeftButtonUp ), NULL, this);
|
p->Connect( wxEVT_LEFT_UP, wxMouseEventHandler( CtrlMaskOut::OnLeftButtonUp ), NULL, this);
|
||||||
p->Connect( wxEVT_MOTION, wxMouseEventHandler( wxCtrlMaskOut::OnMouseMoving ), NULL, this);
|
p->Connect( wxEVT_MOTION, wxMouseEventHandler( CtrlMaskOut::OnMouseMoving ), NULL, this);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// If the platform doesn't support SetTransparent()
|
// If the platform doesn't support SetTransparent()
|
||||||
@@ -420,16 +420,16 @@ void wxCtrlMaskOut::CreateMask(wxWindow* parent)
|
|||||||
m_mask->Show(true);
|
m_mask->Show(true);
|
||||||
|
|
||||||
// So that even if the cursor run into the mask, the events are still correctly processed.
|
// 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_DOWN, wxMouseEventHandler( CtrlMaskOut::OnLeftButtonDown ), NULL, this);
|
||||||
m_mask->Connect( wxEVT_LEFT_UP, wxMouseEventHandler( wxCtrlMaskOut::OnLeftButtonUp ), NULL, this);
|
m_mask->Connect( wxEVT_LEFT_UP, wxMouseEventHandler( CtrlMaskOut::OnLeftButtonUp ), NULL, this);
|
||||||
m_mask->Connect( wxEVT_MOTION, wxMouseEventHandler( wxCtrlMaskOut::OnMouseMoving ), 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_DOWN, wxMouseEventHandler( CtrlMaskOut::OnLeftButtonDown ), NULL, this);
|
||||||
m_mask->Disconnect( wxEVT_LEFT_UP, wxMouseEventHandler( wxCtrlMaskOut::OnLeftButtonUp ), NULL, this);
|
m_mask->Disconnect( wxEVT_LEFT_UP, wxMouseEventHandler( CtrlMaskOut::OnLeftButtonUp ), NULL, this);
|
||||||
m_mask->Disconnect( wxEVT_MOTION, wxMouseEventHandler( wxCtrlMaskOut::OnMouseMoving ), NULL, this);
|
m_mask->Disconnect( wxEVT_MOTION, wxMouseEventHandler( CtrlMaskOut::OnMouseMoving ), NULL, this);
|
||||||
wxWindow * parent = m_mask->GetParent();
|
wxWindow * parent = m_mask->GetParent();
|
||||||
// m_mask->Destroy();
|
// m_mask->Destroy();
|
||||||
delete m_mask;
|
delete m_mask;
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
// Name: ctrlmaskout.h
|
// Name: ctrlmaskout.h
|
||||||
// Purpose: Defines the wxCtrlMaskOut class
|
// Purpose: Defines the CtrlMaskOut class
|
||||||
// Author: Utensil Candel (UtensilCandel@@gmail.com)
|
// Author: Utensil Candel (UtensilCandel@@gmail.com)
|
||||||
// RCS-ID: $Id$
|
// RCS-ID: $Id$
|
||||||
// Licence: wxWindows license
|
// Licence: wxWindows license
|
||||||
@@ -13,14 +13,14 @@
|
|||||||
|
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// class wxCtrlMaskOut
|
// class CtrlMaskOut
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
class wxCtrlMaskOut : public wxEvtHandler
|
class CtrlMaskOut : public wxEvtHandler
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
wxCtrlMaskOut();
|
CtrlMaskOut();
|
||||||
~wxCtrlMaskOut();
|
~CtrlMaskOut();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
void OnLeftButtonDown(wxMouseEvent& event);
|
void OnLeftButtonDown(wxMouseEvent& event);
|
||||||
|
@@ -44,10 +44,10 @@ END_EVENT_TABLE()
|
|||||||
|
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// wxPenStyleComboBox
|
// PenStyleComboBox
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
void wxPenStyleComboBox::OnDrawItem( wxDC& dc,
|
void PenStyleComboBox::OnDrawItem( wxDC& dc,
|
||||||
const wxRect& rect,
|
const wxRect& rect,
|
||||||
int item,
|
int item,
|
||||||
int flags ) const
|
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
|
int item, int flags ) const
|
||||||
{
|
{
|
||||||
// If item is selected or even, or we are painting the
|
// 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);
|
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
|
// Simply demonstrate the ability to have variable-height items
|
||||||
if ( item & 1 )
|
if ( item & 1 )
|
||||||
@@ -131,14 +131,14 @@ inline wxCoord wxPenStyleComboBox::OnMeasureItem( size_t item ) const
|
|||||||
return 24;
|
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
|
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.
|
// Common list of items for all dialogs.
|
||||||
wxArrayString arrItems;
|
wxArrayString arrItems;
|
||||||
@@ -161,7 +161,7 @@ wxPenStyleComboBox * wxPenStyleComboBox::CreateSample(wxWindow* parent)
|
|||||||
// When defining derivative class for callbacks, we need
|
// When defining derivative class for callbacks, we need
|
||||||
// to use two-stage creation (or redefine the common wx
|
// to use two-stage creation (or redefine the common wx
|
||||||
// constructor).
|
// constructor).
|
||||||
odc = new wxPenStyleComboBox();
|
odc = new PenStyleComboBox();
|
||||||
odc->Create(parent,wxID_ANY,wxEmptyString,
|
odc->Create(parent,wxID_ANY,wxEmptyString,
|
||||||
wxDefaultPosition, wxDefaultSize,
|
wxDefaultPosition, wxDefaultSize,
|
||||||
arrItems,
|
arrItems,
|
||||||
@@ -172,9 +172,9 @@ wxPenStyleComboBox * wxPenStyleComboBox::CreateSample(wxWindow* parent)
|
|||||||
odc->SetSelection(0);
|
odc->SetSelection(0);
|
||||||
|
|
||||||
// Load images from disk
|
// Load images from disk
|
||||||
wxImage imgNormal(wxT("dropbutn.png"));
|
wxImage imgNormal(wxT("bitmaps/dropbutn.png"));
|
||||||
wxImage imgPressed(wxT("dropbutp.png"));
|
wxImage imgPressed(wxT("bitmaps/dropbutp.png"));
|
||||||
wxImage imgHover(wxT("dropbuth.png"));
|
wxImage imgHover(wxT("bitmaps/dropbuth.png"));
|
||||||
|
|
||||||
if ( imgNormal.IsOk() && imgPressed.IsOk() && imgHover.IsOk() )
|
if ( imgNormal.IsOk() && imgPressed.IsOk() && imgHover.IsOk() )
|
||||||
{
|
{
|
||||||
|
@@ -10,13 +10,13 @@
|
|||||||
#define WX_CUSTOM_COMBO_H
|
#define WX_CUSTOM_COMBO_H
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// class wxPenStyleComboBox
|
// class PenStyleComboBox
|
||||||
// This class is a modified version of the one from samples/combo.cpp
|
// This class is a modified version of the one from samples/combo.cpp
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
#include <wx/odcombo.h>
|
#include <wx/odcombo.h>
|
||||||
|
|
||||||
class wxPenStyleComboBox : public wxOwnerDrawnComboBox
|
class PenStyleComboBox : public wxOwnerDrawnComboBox
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
virtual void OnDrawItem( wxDC& dc,
|
virtual void OnDrawItem( wxDC& dc,
|
||||||
@@ -32,7 +32,7 @@ public:
|
|||||||
|
|
||||||
virtual wxCoord OnMeasureItemWidth( size_t WXUNUSED(item) ) const;
|
virtual wxCoord OnMeasureItemWidth( size_t WXUNUSED(item) ) const;
|
||||||
|
|
||||||
static wxPenStyleComboBox* CreateSample(wxWindow* parent);
|
static PenStyleComboBox* CreateSample(wxWindow* parent);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@@ -14,7 +14,7 @@
|
|||||||
<property name="name">MyProject</property>
|
<property name="name">MyProject</property>
|
||||||
<property name="namespace"></property>
|
<property name="namespace"></property>
|
||||||
<property name="path">.</property>
|
<property name="path">.</property>
|
||||||
<property name="precompiled_header">// ----------------------------------------------------------------------------
// headers
// ----------------------------------------------------------------------------

// For compilers that support precompilation, includes "wx/wx.h".
#include "wx/wxprec.h"

#ifdef __BORLANDC__
 #pragma hdrstop
#endif

// for all others, include the necessary headers (this file is usually all you
// need because it includes almost all "standard" wxWidgets headers)
#ifndef WX_PRECOMP
 #include "wx/wx.h"
#endif</property>
|
<property name="precompiled_header">// ----------------------------------------------------------------------------
// headers
// ----------------------------------------------------------------------------

// For compilers that support precompilation, includes "wx/wx.h".
#include "wx/wxprec.h"

#ifdef __BORLANDC__
 #pragma hdrstop
#endif

// for all others, include the necessary headers wxWidgets headers)
#ifndef WX_PRECOMP
 #include "wx/wx.h"
#endif

#include "bitmaps/play.xpm"
#include "bitmaps/stop.xpm"
</property>
|
||||||
<property name="relative_path">1</property>
|
<property name="relative_path">1</property>
|
||||||
<property name="use_enum">1</property>
|
<property name="use_enum">1</property>
|
||||||
<property name="use_microsoft_bom">0</property>
|
<property name="use_microsoft_bom">0</property>
|
||||||
@@ -70,7 +70,7 @@
|
|||||||
<event name="OnSetFocus"></event>
|
<event name="OnSetFocus"></event>
|
||||||
<event name="OnSize"></event>
|
<event name="OnSize"></event>
|
||||||
<event name="OnUpdateUI"></event>
|
<event name="OnUpdateUI"></event>
|
||||||
<object class="wxMenuBar" expanded="0">
|
<object class="wxMenuBar" expanded="1">
|
||||||
<property name="bg"></property>
|
<property name="bg"></property>
|
||||||
<property name="context_help"></property>
|
<property name="context_help"></property>
|
||||||
<property name="enabled">1</property>
|
<property name="enabled">1</property>
|
||||||
@@ -123,9 +123,9 @@
|
|||||||
<property name="checked">0</property>
|
<property name="checked">0</property>
|
||||||
<property name="enabled">1</property>
|
<property name="enabled">1</property>
|
||||||
<property name="help">Open the directory where the screenshots generated.</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="kind">wxITEM_NORMAL</property>
|
||||||
<property name="label">See Screenshots</property>
|
<property name="label">&View screenshots...</property>
|
||||||
<property name="name">m_menuSeeScr</property>
|
<property name="name">m_menuSeeScr</property>
|
||||||
<property name="permission">none</property>
|
<property name="permission">none</property>
|
||||||
<property name="shortcut">Ctrl+O</property>
|
<property name="shortcut">Ctrl+O</property>
|
||||||
@@ -133,12 +133,15 @@
|
|||||||
<event name="OnMenuSelection">OnSeeScreenshots</event>
|
<event name="OnMenuSelection">OnSeeScreenshots</event>
|
||||||
<event name="OnUpdateUI"></event>
|
<event name="OnUpdateUI"></event>
|
||||||
</object>
|
</object>
|
||||||
|
<object class="separator" expanded="1">
|
||||||
|
<property name="permission">none</property>
|
||||||
|
</object>
|
||||||
<object class="wxMenuItem" expanded="1">
|
<object class="wxMenuItem" expanded="1">
|
||||||
<property name="bitmap"></property>
|
<property name="bitmap"></property>
|
||||||
<property name="checked">0</property>
|
<property name="checked">0</property>
|
||||||
<property name="enabled">1</property>
|
<property name="enabled">1</property>
|
||||||
<property name="help">Quit the application</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="kind">wxITEM_NORMAL</property>
|
||||||
<property name="label">&Quit</property>
|
<property name="label">&Quit</property>
|
||||||
<property name="name">m_menuFileQuit</property>
|
<property name="name">m_menuFileQuit</property>
|
||||||
@@ -169,7 +172,7 @@
|
|||||||
<event name="OnUpdateUI"></event>
|
<event name="OnUpdateUI"></event>
|
||||||
</object>
|
</object>
|
||||||
<object class="wxMenuItem" expanded="1">
|
<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="checked">0</property>
|
||||||
<property name="enabled">1</property>
|
<property name="enabled">1</property>
|
||||||
<property name="help">Manually specify rectangular regions</property>
|
<property name="help">Manually specify rectangular regions</property>
|
||||||
@@ -184,7 +187,7 @@
|
|||||||
<event name="OnUpdateUI"></event>
|
<event name="OnUpdateUI"></event>
|
||||||
</object>
|
</object>
|
||||||
<object class="wxMenuItem" expanded="1">
|
<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="checked">0</property>
|
||||||
<property name="enabled">0</property>
|
<property name="enabled">0</property>
|
||||||
<property name="help">Stop generating screenshots...</property>
|
<property name="help">Stop generating screenshots...</property>
|
||||||
@@ -199,7 +202,7 @@
|
|||||||
<event name="OnUpdateUI"></event>
|
<event name="OnUpdateUI"></event>
|
||||||
</object>
|
</object>
|
||||||
<object class="wxMenuItem" expanded="1">
|
<object class="wxMenuItem" expanded="1">
|
||||||
<property name="bitmap"></property>
|
<property name="bitmap">; Load From Resource</property>
|
||||||
<property name="checked">0</property>
|
<property name="checked">0</property>
|
||||||
<property name="enabled">1</property>
|
<property name="enabled">1</property>
|
||||||
<property name="help">Take screenshot for all controls autoly.</property>
|
<property name="help">Take screenshot for all controls autoly.</property>
|
||||||
@@ -214,7 +217,7 @@
|
|||||||
<event name="OnUpdateUI"></event>
|
<event name="OnUpdateUI"></event>
|
||||||
</object>
|
</object>
|
||||||
</object>
|
</object>
|
||||||
<object class="wxMenu" expanded="0">
|
<object class="wxMenu" expanded="1">
|
||||||
<property name="label">&Help</property>
|
<property name="label">&Help</property>
|
||||||
<property name="name">helpMenu</property>
|
<property name="name">helpMenu</property>
|
||||||
<property name="permission">protected</property>
|
<property name="permission">protected</property>
|
||||||
@@ -223,9 +226,9 @@
|
|||||||
<property name="checked">0</property>
|
<property name="checked">0</property>
|
||||||
<property name="enabled">1</property>
|
<property name="enabled">1</property>
|
||||||
<property name="help">Show info about this application</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="kind">wxITEM_NORMAL</property>
|
||||||
<property name="label">&About</property>
|
<property name="label">&About...</property>
|
||||||
<property name="name">m_menuHelpAbout</property>
|
<property name="name">m_menuHelpAbout</property>
|
||||||
<property name="permission">none</property>
|
<property name="permission">none</property>
|
||||||
<property name="shortcut">F1</property>
|
<property name="shortcut">F1</property>
|
||||||
@@ -293,8 +296,8 @@
|
|||||||
<object class="notebookpage" expanded="1">
|
<object class="notebookpage" expanded="1">
|
||||||
<property name="bitmap"></property>
|
<property name="bitmap"></property>
|
||||||
<property name="label">Tiny Controls</property>
|
<property name="label">Tiny Controls</property>
|
||||||
<property name="select">1</property>
|
<property name="select">0</property>
|
||||||
<object class="wxPanel" expanded="0">
|
<object class="wxPanel" expanded="1">
|
||||||
<property name="bg"></property>
|
<property name="bg"></property>
|
||||||
<property name="context_help"></property>
|
<property name="context_help"></property>
|
||||||
<property name="enabled">1</property>
|
<property name="enabled">1</property>
|
||||||
@@ -336,7 +339,7 @@
|
|||||||
<event name="OnSetFocus"></event>
|
<event name="OnSetFocus"></event>
|
||||||
<event name="OnSize"></event>
|
<event name="OnSize"></event>
|
||||||
<event name="OnUpdateUI"></event>
|
<event name="OnUpdateUI"></event>
|
||||||
<object class="wxFlexGridSizer" expanded="0">
|
<object class="wxFlexGridSizer" expanded="1">
|
||||||
<property name="cols">2</property>
|
<property name="cols">2</property>
|
||||||
<property name="flexible_direction">wxBOTH</property>
|
<property name="flexible_direction">wxBOTH</property>
|
||||||
<property name="growablecols"></property>
|
<property name="growablecols"></property>
|
||||||
@@ -665,7 +668,7 @@
|
|||||||
<property name="proportion">0</property>
|
<property name="proportion">0</property>
|
||||||
<object class="wxBitmapButton" expanded="1">
|
<object class="wxBitmapButton" expanded="1">
|
||||||
<property name="bg"></property>
|
<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="context_help"></property>
|
||||||
<property name="default">0</property>
|
<property name="default">0</property>
|
||||||
<property name="disabled"></property>
|
<property name="disabled"></property>
|
||||||
@@ -722,7 +725,7 @@
|
|||||||
<property name="proportion">0</property>
|
<property name="proportion">0</property>
|
||||||
<object class="wxStaticBitmap" expanded="1">
|
<object class="wxStaticBitmap" expanded="1">
|
||||||
<property name="bg"></property>
|
<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="context_help"></property>
|
||||||
<property name="enabled">1</property>
|
<property name="enabled">1</property>
|
||||||
<property name="fg"></property>
|
<property name="fg"></property>
|
||||||
@@ -765,6 +768,120 @@
|
|||||||
<event name="OnUpdateUI"></event>
|
<event name="OnUpdateUI"></event>
|
||||||
</object>
|
</object>
|
||||||
</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">
|
<object class="sizeritem" expanded="1">
|
||||||
<property name="border">20</property>
|
<property name="border">20</property>
|
||||||
<property name="flag">wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxEXPAND</property>
|
<property name="flag">wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxEXPAND</property>
|
||||||
@@ -1003,7 +1120,7 @@
|
|||||||
<property name="hidden">0</property>
|
<property name="hidden">0</property>
|
||||||
<property name="hover_color"></property>
|
<property name="hover_color"></property>
|
||||||
<property name="id">wxID_ANY</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="maximum_size"></property>
|
||||||
<property name="minimum_size"></property>
|
<property name="minimum_size"></property>
|
||||||
<property name="name">m_hyperlink1</property>
|
<property name="name">m_hyperlink1</property>
|
||||||
@@ -1014,7 +1131,7 @@
|
|||||||
<property name="style">wxHL_DEFAULT_STYLE</property>
|
<property name="style">wxHL_DEFAULT_STYLE</property>
|
||||||
<property name="subclass"></property>
|
<property name="subclass"></property>
|
||||||
<property name="tooltip">wxHyperlinkCtrl</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="visited_color"></property>
|
||||||
<property name="window_extra_style"></property>
|
<property name="window_extra_style"></property>
|
||||||
<property name="window_name"></property>
|
<property name="window_name"></property>
|
||||||
@@ -1231,8 +1348,8 @@
|
|||||||
<object class="notebookpage" expanded="1">
|
<object class="notebookpage" expanded="1">
|
||||||
<property name="bitmap"></property>
|
<property name="bitmap"></property>
|
||||||
<property name="label">Choosing Controls</property>
|
<property name="label">Choosing Controls</property>
|
||||||
<property name="select">0</property>
|
<property name="select">1</property>
|
||||||
<object class="wxPanel" expanded="0">
|
<object class="wxPanel" expanded="1">
|
||||||
<property name="bg"></property>
|
<property name="bg"></property>
|
||||||
<property name="context_help"></property>
|
<property name="context_help"></property>
|
||||||
<property name="enabled">1</property>
|
<property name="enabled">1</property>
|
||||||
@@ -1658,7 +1775,7 @@
|
|||||||
<property name="name">m_animationCtrl1</property>
|
<property name="name">m_animationCtrl1</property>
|
||||||
<property name="permission">protected</property>
|
<property name="permission">protected</property>
|
||||||
<property name="pos"></property>
|
<property name="pos"></property>
|
||||||
<property name="settings"> m_animationCtrl1->SetToolTip(_("wxAnimationCtrl"));
 if (m_animationCtrl1->LoadFile(wxT("throbber.gif")))
 m_animationCtrl1->Play();</property>
|
<property name="settings"> m_animationCtrl1->SetToolTip(_("wxAnimationCtrl"));
 if (m_animationCtrl1->LoadFile(wxT("bitmaps/throbber.gif")))
 m_animationCtrl1->Play();</property>
|
||||||
<property name="size"></property>
|
<property name="size"></property>
|
||||||
<property name="subclass"></property>
|
<property name="subclass"></property>
|
||||||
<property name="tooltip"></property>
|
<property name="tooltip"></property>
|
||||||
@@ -1803,7 +1920,7 @@
|
|||||||
<property name="bitmap"></property>
|
<property name="bitmap"></property>
|
||||||
<property name="label">Text Richtext</property>
|
<property name="label">Text Richtext</property>
|
||||||
<property name="select">0</property>
|
<property name="select">0</property>
|
||||||
<object class="wxPanel" expanded="0">
|
<object class="wxPanel" expanded="1">
|
||||||
<property name="bg"></property>
|
<property name="bg"></property>
|
||||||
<property name="context_help"></property>
|
<property name="context_help"></property>
|
||||||
<property name="enabled">1</property>
|
<property name="enabled">1</property>
|
||||||
@@ -2039,7 +2156,7 @@
|
|||||||
<property name="bitmap"></property>
|
<property name="bitmap"></property>
|
||||||
<property name="label">Picker Controls</property>
|
<property name="label">Picker Controls</property>
|
||||||
<property name="select">0</property>
|
<property name="select">0</property>
|
||||||
<object class="wxPanel" expanded="0">
|
<object class="wxPanel" expanded="1">
|
||||||
<property name="bg"></property>
|
<property name="bg"></property>
|
||||||
<property name="context_help"></property>
|
<property name="context_help"></property>
|
||||||
<property name="enabled">1</property>
|
<property name="enabled">1</property>
|
||||||
@@ -2081,7 +2198,7 @@
|
|||||||
<event name="OnSetFocus"></event>
|
<event name="OnSetFocus"></event>
|
||||||
<event name="OnSize"></event>
|
<event name="OnSize"></event>
|
||||||
<event name="OnUpdateUI"></event>
|
<event name="OnUpdateUI"></event>
|
||||||
<object class="wxFlexGridSizer" expanded="0">
|
<object class="wxFlexGridSizer" expanded="1">
|
||||||
<property name="cols">2</property>
|
<property name="cols">2</property>
|
||||||
<property name="flexible_direction">wxBOTH</property>
|
<property name="flexible_direction">wxBOTH</property>
|
||||||
<property name="growablecols"></property>
|
<property name="growablecols"></property>
|
||||||
@@ -2693,7 +2810,7 @@
|
|||||||
<property name="name">m_bmpComboBox1</property>
|
<property name="name">m_bmpComboBox1</property>
|
||||||
<property name="permission">protected</property>
|
<property name="permission">protected</property>
|
||||||
<property name="pos"></property>
|
<property name="pos"></property>
|
||||||
<property name="settings">m_bmpComboBox1->Append(_("Item1"), wxBitmap(_T("bell.png"),wxBITMAP_TYPE_PNG));
m_bmpComboBox1->Append(_("Item2"), wxBitmap(_T("sound.png"),wxBITMAP_TYPE_PNG));
m_bmpComboBox1->Append(_("Item3"), wxBitmap(_T("bell.png"),wxBITMAP_TYPE_PNG));
m_bmpComboBox1->Append(_("Item4"), wxBitmap(_T("sound.png"),wxBITMAP_TYPE_PNG));
m_bmpComboBox1->SetToolTip(_("wxBitmapComboBox"));</property>
|
<property name="settings">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"));</property>
|
||||||
<property name="size"></property>
|
<property name="size"></property>
|
||||||
<property name="subclass"></property>
|
<property name="subclass"></property>
|
||||||
<property name="tooltip"></property>
|
<property name="tooltip"></property>
|
||||||
@@ -2731,16 +2848,16 @@
|
|||||||
<property name="proportion">1</property>
|
<property name="proportion">1</property>
|
||||||
<object class="CustomControl" expanded="1">
|
<object class="CustomControl" expanded="1">
|
||||||
<property name="bg"></property>
|
<property name="bg"></property>
|
||||||
<property name="class">wxPenStyleComboBox</property>
|
<property name="class">PenStyleComboBox</property>
|
||||||
<property name="construction">m_ownerDrawnComboBox1 = wxPenStyleComboBox::CreateSample(m_panel5);</property>
|
<property name="construction">m_ownerDrawnComboBox1 = PenStyleComboBox::CreateSample(m_panel5);</property>
|
||||||
<property name="context_help"></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="enabled">1</property>
|
||||||
<property name="fg"></property>
|
<property name="fg"></property>
|
||||||
<property name="font"></property>
|
<property name="font"></property>
|
||||||
<property name="hidden">0</property>
|
<property name="hidden">0</property>
|
||||||
<property name="id">wxID_ANY</property>
|
<property name="id">wxID_ANY</property>
|
||||||
<property name="include">#include "custom_combo.h"</property>
|
<property name="include">#include "customcombo.h"</property>
|
||||||
<property name="maximum_size"></property>
|
<property name="maximum_size"></property>
|
||||||
<property name="minimum_size"></property>
|
<property name="minimum_size"></property>
|
||||||
<property name="name">m_ownerDrawnComboBox1</property>
|
<property name="name">m_ownerDrawnComboBox1</property>
|
||||||
@@ -2813,13 +2930,13 @@
|
|||||||
<property name="font"></property>
|
<property name="font"></property>
|
||||||
<property name="hidden">0</property>
|
<property name="hidden">0</property>
|
||||||
<property name="id">wxID_ANY</property>
|
<property name="id">wxID_ANY</property>
|
||||||
<property name="include">#include "custom_combo.h"</property>
|
<property name="include">#include "customcombo.h"</property>
|
||||||
<property name="maximum_size"></property>
|
<property name="maximum_size"></property>
|
||||||
<property name="minimum_size"></property>
|
<property name="minimum_size"></property>
|
||||||
<property name="name">m_comboCtrl1</property>
|
<property name="name">m_comboCtrl1</property>
|
||||||
<property name="permission">protected</property>
|
<property name="permission">protected</property>
|
||||||
<property name="pos"></property>
|
<property name="pos"></property>
|
||||||
<property name="settings">	m_comboCtrl1->SetText(wxT("wxComboCtrl"));
 m_comboCtrl1->SetToolTip(_("wxComboCtrl"));

	ListViewComboPopup* popupList = new ListViewComboPopup();
	m_comboCtrl1->SetPopupControl(popupList);
	m_comboCtrl1->SetPopupMaxHeight(80);

	// Populate using wxListView methods
	popupList->InsertItem(popupList->GetItemCount(),wxT("wxComboCtrl"));
	popupList->InsertItem(popupList->GetItemCount(),wxT("with"));
	popupList->InsertItem(popupList->GetItemCount(),wxT("wxListView"));
	popupList->InsertItem(popupList->GetItemCount(),wxT("popup"));
	popupList->InsertItem(popupList->GetItemCount(),wxT("Item1"));
	popupList->InsertItem(popupList->GetItemCount(),wxT("Item2"));
	popupList->InsertItem(popupList->GetItemCount(),wxT("Item3"));

	popupList->Select(0, true);</property>
|
<property name="settings"> // first of all, set the popup control!
	ListViewComboPopup* popupList = new ListViewComboPopup();
	m_comboCtrl1->SetPopupControl(popupList);
	m_comboCtrl1->SetPopupMaxHeight(80);

 m_comboCtrl1->SetText(wxT("wxComboCtrl"));
 m_comboCtrl1->SetToolTip(_("wxComboCtrl"));

	// Populate using wxListView methods
	popupList->InsertItem(popupList->GetItemCount(),wxT("wxComboCtrl"));
	popupList->InsertItem(popupList->GetItemCount(),wxT("with"));
	popupList->InsertItem(popupList->GetItemCount(),wxT("wxListView"));
	popupList->InsertItem(popupList->GetItemCount(),wxT("popup"));
	popupList->InsertItem(popupList->GetItemCount(),wxT("Item1"));
	popupList->InsertItem(popupList->GetItemCount(),wxT("Item2"));
	popupList->InsertItem(popupList->GetItemCount(),wxT("Item3"));

	popupList->Select(0, true);</property>
|
||||||
<property name="size"></property>
|
<property name="size"></property>
|
||||||
<property name="subclass"></property>
|
<property name="subclass"></property>
|
||||||
<property name="tooltip"></property>
|
<property name="tooltip"></property>
|
||||||
@@ -2866,13 +2983,13 @@
|
|||||||
<property name="font"></property>
|
<property name="font"></property>
|
||||||
<property name="hidden">0</property>
|
<property name="hidden">0</property>
|
||||||
<property name="id">wxID_ANY</property>
|
<property name="id">wxID_ANY</property>
|
||||||
<property name="include">#include "custom_combo.h"</property>
|
<property name="include">#include "customcombo.h"</property>
|
||||||
<property name="maximum_size"></property>
|
<property name="maximum_size"></property>
|
||||||
<property name="minimum_size"></property>
|
<property name="minimum_size"></property>
|
||||||
<property name="name">m_comboCtrl2</property>
|
<property name="name">m_comboCtrl2</property>
|
||||||
<property name="permission">protected</property>
|
<property name="permission">protected</property>
|
||||||
<property name="pos"></property>
|
<property name="pos"></property>
|
||||||
<property name="settings">	m_comboCtrl2->SetText(wxT("wxComboCtrl"));
	m_comboCtrl2->SetToolTip(_("wxComboCtrl"));

	TreeCtrlComboPopup* popupTree = new TreeCtrlComboPopup();

	m_comboCtrl2->SetPopupControl(popupTree);
	m_comboCtrl2->SetPopupMaxHeight(80);

	//Add a root and some nodes using wxTreeCtrl methods
	wxTreeItemId root = popupTree->AddRoot(_("wxComboCtrl"));

	popupTree->AppendItem(root, _("with"));
	popupTree->AppendItem(root, _("wxTreeCtrl"));

	wxTreeItemId node2 = popupTree->AppendItem(root, _("popout"));
	popupTree->AppendItem(node2, _("Node1"));
	popupTree->AppendItem(node2, _("Node2"));

	popupTree->ExpandAll();</property>
|
<property name="settings"> // first of all, set the popup control!
	TreeCtrlComboPopup* popupTree = new TreeCtrlComboPopup();
	m_comboCtrl2->SetPopupControl(popupTree);
	m_comboCtrl2->SetPopupMaxHeight(80);

	m_comboCtrl2->SetText(wxT("wxComboCtrl"));
	m_comboCtrl2->SetToolTip(_("wxComboCtrl"));

	//Add a root and some nodes using wxTreeCtrl methods
	wxTreeItemId root = popupTree->AddRoot(_("wxComboCtrl"));

	popupTree->AppendItem(root, _("with"));
	popupTree->AppendItem(root, _("wxTreeCtrl"));

	wxTreeItemId node2 = popupTree->AppendItem(root, _("popout"));
	popupTree->AppendItem(node2, _("Node1"));
	popupTree->AppendItem(node2, _("Node2"));

	popupTree->ExpandAll();</property>
|
||||||
<property name="size"></property>
|
<property name="size"></property>
|
||||||
<property name="subclass"></property>
|
<property name="subclass"></property>
|
||||||
<property name="tooltip"></property>
|
<property name="tooltip"></property>
|
||||||
|
@@ -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/
|
// http://www.wxformbuilder.org/
|
||||||
//
|
//
|
||||||
// PLEASE DO "NOT" EDIT THIS FILE!
|
// PLEASE DO "NOT" EDIT THIS FILE!
|
||||||
@@ -16,12 +16,15 @@
|
|||||||
#pragma hdrstop
|
#pragma hdrstop
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// for all others, include the necessary headers (this file is usually all you
|
// for all others, include the necessary headers wxWidgets headers)
|
||||||
// need because it includes almost all "standard" wxWidgets headers)
|
|
||||||
#ifndef WX_PRECOMP
|
#ifndef WX_PRECOMP
|
||||||
#include "wx/wx.h"
|
#include "wx/wx.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include "bitmaps/play.xpm"
|
||||||
|
#include "bitmaps/stop.xpm"
|
||||||
|
|
||||||
|
|
||||||
#include "guiframe.h"
|
#include "guiframe.h"
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////
|
||||||
@@ -33,11 +36,13 @@ GUIFrame::GUIFrame( wxWindow* parent, wxWindowID id, const wxString& title, cons
|
|||||||
mbar = new wxMenuBar( 0 );
|
mbar = new wxMenuBar( 0 );
|
||||||
fileMenu = new wxMenu();
|
fileMenu = new wxMenu();
|
||||||
wxMenuItem* m_menuSeeScr;
|
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->Append( m_menuSeeScr );
|
||||||
|
|
||||||
|
fileMenu->AppendSeparator();
|
||||||
|
|
||||||
wxMenuItem* m_menuFileQuit;
|
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 );
|
fileMenu->Append( m_menuFileQuit );
|
||||||
|
|
||||||
mbar->Append( fileMenu, _("&File") );
|
mbar->Append( fileMenu, _("&File") );
|
||||||
@@ -49,10 +54,20 @@ GUIFrame::GUIFrame( wxWindow* parent, wxWindowID id, const wxString& title, cons
|
|||||||
|
|
||||||
wxMenuItem* m_menuCapRect;
|
wxMenuItem* m_menuCapRect;
|
||||||
m_menuCapRect = new wxMenuItem( captureMenu, idMenuCapRect, wxString( _("Regions<Begin>") ) + wxT('\t') + wxT("Ctrl+Alt+R"), _("Manually specify rectangular regions"), wxITEM_NORMAL );
|
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 );
|
captureMenu->Append( m_menuCapRect );
|
||||||
|
|
||||||
wxMenuItem* m_menuEndCapRect;
|
wxMenuItem* m_menuEndCapRect;
|
||||||
m_menuEndCapRect = new wxMenuItem( captureMenu, idMenuEndCapRect, wxString( _("Regions<End>") ) + wxT('\t') + wxT("Ctrl+Alt+E"), _("Stop generating screenshots..."), wxITEM_NORMAL );
|
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 );
|
captureMenu->Append( m_menuEndCapRect );
|
||||||
m_menuEndCapRect->Enable( false );
|
m_menuEndCapRect->Enable( false );
|
||||||
|
|
||||||
@@ -64,7 +79,7 @@ GUIFrame::GUIFrame( wxWindow* parent, wxWindowID id, const wxString& title, cons
|
|||||||
|
|
||||||
helpMenu = new wxMenu();
|
helpMenu = new wxMenu();
|
||||||
wxMenuItem* m_menuHelpAbout;
|
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 );
|
helpMenu->Append( m_menuHelpAbout );
|
||||||
|
|
||||||
mbar->Append( helpMenu, _("&Help") );
|
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 );
|
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") );
|
||||||
|
|
||||||
m_bpButton1->SetToolTip( _("wxBitmapButton") );
|
m_bpButton1->SetToolTip( _("wxBitmapButton") );
|
||||||
|
|
||||||
fgSizer1->Add( m_bpButton1, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 20 );
|
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") );
|
m_bitmap1->SetToolTip( _("wxStaticBitmap") );
|
||||||
|
|
||||||
fgSizer1->Add( m_bitmap1, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 20 );
|
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 = new wxGauge( m_panel1, wxID_ANY, 100, wxDefaultPosition, wxDefaultSize, wxGA_HORIZONTAL, wxDefaultValidator, wxT("_Gauge") );
|
||||||
m_gauge1->SetValue( 50 );
|
m_gauge1->SetValue( 50 );
|
||||||
m_gauge1->SetToolTip( _("wxGauge") );
|
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 );
|
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") );
|
m_hyperlink1->SetToolTip( _("wxHyperlinkCtrl") );
|
||||||
|
|
||||||
fgSizer1->Add( m_hyperlink1, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 20 );
|
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->SetSizer( fgSizer1 );
|
||||||
m_panel1->Layout();
|
m_panel1->Layout();
|
||||||
fgSizer1->Fit( m_panel1 );
|
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 );
|
m_panel2 = new wxPanel( m_notebook1, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
|
||||||
wxFlexGridSizer* fgSizer2;
|
wxFlexGridSizer* fgSizer2;
|
||||||
fgSizer2 = new wxFlexGridSizer( 5, 2, 0, 0 );
|
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 = new wxAnimationCtrl(m_panel2, wxID_ANY);
|
||||||
m_animationCtrl1->SetToolTip(_("wxAnimationCtrl"));
|
m_animationCtrl1->SetToolTip(_("wxAnimationCtrl"));
|
||||||
if (m_animationCtrl1->LoadFile(wxT("throbber.gif")))
|
if (m_animationCtrl1->LoadFile(wxT("bitmaps/throbber.gif")))
|
||||||
m_animationCtrl1->Play();
|
m_animationCtrl1->Play();
|
||||||
fgSizer2->Add( m_animationCtrl1, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 20 );
|
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->SetSizer( fgSizer2 );
|
||||||
m_panel2->Layout();
|
m_panel2->Layout();
|
||||||
fgSizer2->Fit( m_panel2 );
|
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 );
|
m_panel3 = new wxPanel( m_notebook1, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
|
||||||
wxBoxSizer* bSizer2;
|
wxBoxSizer* bSizer2;
|
||||||
bSizer2 = new wxBoxSizer( wxVERTICAL );
|
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 );
|
fgSizer4->Add( 0, 120, 1, wxEXPAND, 5 );
|
||||||
|
|
||||||
m_bmpComboBox1 = new wxBitmapComboBox(m_panel5, wxID_ANY,_("Item1"));
|
m_bmpComboBox1 = new wxBitmapComboBox(m_panel5, wxID_ANY,_("Item1"));
|
||||||
m_bmpComboBox1->Append(_("Item1"), wxBitmap(_T("bell.png"),wxBITMAP_TYPE_PNG));
|
m_bmpComboBox1->Append(_("Item1"), wxBitmap(_T("bitmaps/bell.png"),wxBITMAP_TYPE_PNG));
|
||||||
m_bmpComboBox1->Append(_("Item2"), wxBitmap(_T("sound.png"),wxBITMAP_TYPE_PNG));
|
m_bmpComboBox1->Append(_("Item2"), wxBitmap(_T("bitmaps/sound.png"),wxBITMAP_TYPE_PNG));
|
||||||
m_bmpComboBox1->Append(_("Item3"), wxBitmap(_T("bell.png"),wxBITMAP_TYPE_PNG));
|
m_bmpComboBox1->Append(_("Item3"), wxBitmap(_T("bitmaps/bell.png"),wxBITMAP_TYPE_PNG));
|
||||||
m_bmpComboBox1->Append(_("Item4"), wxBitmap(_T("sound.png"),wxBITMAP_TYPE_PNG));
|
m_bmpComboBox1->Append(_("Item4"), wxBitmap(_T("bitmaps/sound.png"),wxBITMAP_TYPE_PNG));
|
||||||
m_bmpComboBox1->SetToolTip(_("wxBitmapComboBox"));
|
m_bmpComboBox1->SetToolTip(_("wxBitmapComboBox"));
|
||||||
fgSizer4->Add( m_bmpComboBox1, 1, wxALL|wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 20 );
|
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"));
|
m_ownerDrawnComboBox1->SetToolTip(_("wxOwnerDrawnComboBox"));
|
||||||
fgSizer4->Add( m_ownerDrawnComboBox1, 1, wxALL|wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 20 );
|
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 );
|
fgSizer4->Add( 0, 90, 1, wxEXPAND, 5 );
|
||||||
|
|
||||||
m_comboCtrl1 = new wxComboCtrl(m_panel5,wxID_ANY,wxEmptyString);
|
m_comboCtrl1 = new wxComboCtrl(m_panel5,wxID_ANY,wxEmptyString);
|
||||||
m_comboCtrl1->SetText(wxT("wxComboCtrl"));
|
// first of all, set the popup control!
|
||||||
m_comboCtrl1->SetToolTip(_("wxComboCtrl"));
|
|
||||||
|
|
||||||
ListViewComboPopup* popupList = new ListViewComboPopup();
|
ListViewComboPopup* popupList = new ListViewComboPopup();
|
||||||
m_comboCtrl1->SetPopupControl(popupList);
|
m_comboCtrl1->SetPopupControl(popupList);
|
||||||
m_comboCtrl1->SetPopupMaxHeight(80);
|
m_comboCtrl1->SetPopupMaxHeight(80);
|
||||||
|
|
||||||
|
m_comboCtrl1->SetText(wxT("wxComboCtrl"));
|
||||||
|
m_comboCtrl1->SetToolTip(_("wxComboCtrl"));
|
||||||
|
|
||||||
// Populate using wxListView methods
|
// Populate using wxListView methods
|
||||||
popupList->InsertItem(popupList->GetItemCount(),wxT("wxComboCtrl"));
|
popupList->InsertItem(popupList->GetItemCount(),wxT("wxComboCtrl"));
|
||||||
popupList->InsertItem(popupList->GetItemCount(),wxT("with"));
|
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 );
|
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 = new wxComboCtrl(m_panel5,wxID_ANY,wxEmptyString);
|
||||||
m_comboCtrl2->SetText(wxT("wxComboCtrl"));
|
// first of all, set the popup control!
|
||||||
m_comboCtrl2->SetToolTip(_("wxComboCtrl"));
|
|
||||||
|
|
||||||
TreeCtrlComboPopup* popupTree = new TreeCtrlComboPopup();
|
TreeCtrlComboPopup* popupTree = new TreeCtrlComboPopup();
|
||||||
|
|
||||||
m_comboCtrl2->SetPopupControl(popupTree);
|
m_comboCtrl2->SetPopupControl(popupTree);
|
||||||
m_comboCtrl2->SetPopupMaxHeight(80);
|
m_comboCtrl2->SetPopupMaxHeight(80);
|
||||||
|
|
||||||
|
m_comboCtrl2->SetText(wxT("wxComboCtrl"));
|
||||||
|
m_comboCtrl2->SetToolTip(_("wxComboCtrl"));
|
||||||
|
|
||||||
//Add a root and some nodes using wxTreeCtrl methods
|
//Add a root and some nodes using wxTreeCtrl methods
|
||||||
wxTreeItemId root = popupTree->AddRoot(_("wxComboCtrl"));
|
wxTreeItemId root = popupTree->AddRoot(_("wxComboCtrl"));
|
||||||
|
|
||||||
|
@@ -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/
|
// http://www.wxformbuilder.org/
|
||||||
//
|
//
|
||||||
// PLEASE DO "NOT" EDIT THIS FILE!
|
// PLEASE DO "NOT" EDIT THIS FILE!
|
||||||
@@ -64,22 +64,19 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
/// Class GUIFrame
|
/// Class GUIFrame
|
||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
class GUIFrame : public wxFrame
|
class GUIFrame : public wxFrame
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
idMenuOpen = 1000,
|
idMenuCapFullScreen = 1000,
|
||||||
idMenuQuit,
|
|
||||||
idMenuCapFullScreen,
|
|
||||||
idMenuCapRect,
|
idMenuCapRect,
|
||||||
idMenuEndCapRect,
|
idMenuEndCapRect,
|
||||||
idMenuCapAll,
|
idMenuCapAll,
|
||||||
idMenuAbout,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
wxMenuBar* mbar;
|
wxMenuBar* mbar;
|
||||||
wxMenu* fileMenu;
|
wxMenu* fileMenu;
|
||||||
wxMenu* captureMenu;
|
wxMenu* captureMenu;
|
||||||
@@ -94,6 +91,8 @@ class GUIFrame : public wxFrame
|
|||||||
wxRadioButton* m_radioBtn2;
|
wxRadioButton* m_radioBtn2;
|
||||||
wxBitmapButton* m_bpButton1;
|
wxBitmapButton* m_bpButton1;
|
||||||
wxStaticBitmap* m_bitmap1;
|
wxStaticBitmap* m_bitmap1;
|
||||||
|
wxBitmapButton* m_bpButton12;
|
||||||
|
wxBitmapButton* m_bpButton11;
|
||||||
wxGauge* m_gauge1;
|
wxGauge* m_gauge1;
|
||||||
wxSlider* m_slider1;
|
wxSlider* m_slider1;
|
||||||
wxToggleButton* m_toggleBtn1;
|
wxToggleButton* m_toggleBtn1;
|
||||||
@@ -114,14 +113,14 @@ class GUIFrame : public wxFrame
|
|||||||
wxCollapsiblePane *m_collPane2;
|
wxCollapsiblePane *m_collPane2;
|
||||||
wxPanel* m_panel3;
|
wxPanel* m_panel3;
|
||||||
wxTextCtrl* m_textCtrl1;
|
wxTextCtrl* m_textCtrl1;
|
||||||
|
|
||||||
wxTextCtrl* m_textCtrl2;
|
wxTextCtrl* m_textCtrl2;
|
||||||
wxRichTextCtrl* m_richText1;
|
wxRichTextCtrl* m_richText1;
|
||||||
wxPanel* m_panel4;
|
wxPanel* m_panel4;
|
||||||
wxColourPickerCtrl* m_colourPicker1;
|
wxColourPickerCtrl* m_colourPicker1;
|
||||||
wxFontPickerCtrl* m_fontPicker1;
|
wxFontPickerCtrl* m_fontPicker1;
|
||||||
wxFilePickerCtrl* m_filePicker1;
|
wxFilePickerCtrl* m_filePicker1;
|
||||||
|
|
||||||
wxCalendarCtrl* m_calendar1;
|
wxCalendarCtrl* m_calendar1;
|
||||||
wxDatePickerCtrl* m_datePicker1;
|
wxDatePickerCtrl* m_datePicker1;
|
||||||
wxGenericDirCtrl* m_genericDirCtrl1;
|
wxGenericDirCtrl* m_genericDirCtrl1;
|
||||||
@@ -129,16 +128,16 @@ class GUIFrame : public wxFrame
|
|||||||
wxPanel* m_panel5;
|
wxPanel* m_panel5;
|
||||||
wxChoice* m_choice1;
|
wxChoice* m_choice1;
|
||||||
wxComboBox* m_comboBox1;
|
wxComboBox* m_comboBox1;
|
||||||
|
|
||||||
|
|
||||||
wxBitmapComboBox * m_bmpComboBox1;
|
wxBitmapComboBox * m_bmpComboBox1;
|
||||||
wxPenStyleComboBox * m_ownerDrawnComboBox1;
|
PenStyleComboBox * m_ownerDrawnComboBox1;
|
||||||
|
|
||||||
|
|
||||||
wxComboCtrl * m_comboCtrl1;
|
wxComboCtrl * m_comboCtrl1;
|
||||||
wxComboCtrl * m_comboCtrl2;
|
wxComboCtrl * m_comboCtrl2;
|
||||||
wxStatusBar* statusBar;
|
wxStatusBar* statusBar;
|
||||||
|
|
||||||
// Virtual event handlers, overide them in your derived class
|
// Virtual event handlers, overide them in your derived class
|
||||||
virtual void OnClose( wxCloseEvent& event ){ event.Skip(); }
|
virtual void OnClose( wxCloseEvent& event ){ event.Skip(); }
|
||||||
virtual void OnSeeScreenshots( wxCommandEvent& 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 OnAbout( wxCommandEvent& event ){ event.Skip(); }
|
||||||
virtual void OnNotebookPageChanged( wxNotebookEvent& event ){ event.Skip(); }
|
virtual void OnNotebookPageChanged( wxNotebookEvent& event ){ event.Skip(); }
|
||||||
virtual void OnNotebookPageChanging( wxNotebookEvent& event ){ event.Skip(); }
|
virtual void OnNotebookPageChanging( wxNotebookEvent& event ){ event.Skip(); }
|
||||||
|
|
||||||
|
|
||||||
public:
|
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( 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();
|
~GUIFrame();
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif //__guiframe__
|
#endif //__guiframe__
|
||||||
|
@@ -260,7 +260,7 @@ $(OBJS)\screenshotgen.exe: $(SCREENSHOTGEN_OBJECTS) $(OBJS)\screenshotgen_scree
|
|||||||
|
|
||||||
data:
|
data:
|
||||||
if not exist $(OBJS) mkdir $(OBJS)
|
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
|
$(OBJS)\screenshotgen_screenshot_app.obj: .\screenshot_app.cpp
|
||||||
$(CXX) -q -c -P -o$@ $(SCREENSHOTGEN_CXXFLAGS) .\screenshot_app.cpp
|
$(CXX) -q -c -P -o$@ $(SCREENSHOTGEN_CXXFLAGS) .\screenshot_app.cpp
|
||||||
|
@@ -253,7 +253,7 @@ $(OBJS)\screenshotgen.exe: $(SCREENSHOTGEN_OBJECTS) $(OBJS)\screenshotgen_screen
|
|||||||
|
|
||||||
data:
|
data:
|
||||||
if not exist $(OBJS) mkdir $(OBJS)
|
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
|
$(OBJS)\screenshotgen_screenshot_app.o: ./screenshot_app.cpp
|
||||||
$(CXX) -c -o $@ $(SCREENSHOTGEN_CXXFLAGS) $(CPPDEPS) $<
|
$(CXX) -c -o $@ $(SCREENSHOTGEN_CXXFLAGS) $(CPPDEPS) $<
|
||||||
|
@@ -336,7 +336,7 @@ $(OBJS)\screenshotgen.exe: $(SCREENSHOTGEN_OBJECTS) $(OBJS)\screenshotgen_screen
|
|||||||
|
|
||||||
data:
|
data:
|
||||||
if not exist $(OBJS) mkdir $(OBJS)
|
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
|
$(OBJS)\screenshotgen_screenshot_app.obj: .\screenshot_app.cpp
|
||||||
$(CXX) /c /nologo /TP /Fo$@ $(SCREENSHOTGEN_CXXFLAGS) .\screenshot_app.cpp
|
$(CXX) /c /nologo /TP /Fo$@ $(SCREENSHOTGEN_CXXFLAGS) .\screenshot_app.cpp
|
||||||
|
@@ -290,7 +290,7 @@ $(OBJS)\screenshotgen.exe : $(SCREENSHOTGEN_OBJECTS) $(OBJS)\screenshotgen_scre
|
|||||||
|
|
||||||
data : .SYMBOLIC
|
data : .SYMBOLIC
|
||||||
if not exist $(OBJS) mkdir $(OBJS)
|
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
|
$(OBJS)\screenshotgen_screenshot_app.obj : .AUTODEPEND .\screenshot_app.cpp
|
||||||
$(CXX) -bt=nt -zq -fo=$^@ $(SCREENSHOTGEN_CXXFLAGS) $<
|
$(CXX) -bt=nt -zq -fo=$^@ $(SCREENSHOTGEN_CXXFLAGS) $<
|
||||||
|
@@ -25,12 +25,12 @@
|
|||||||
|
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// wxScreenshotApp
|
// ScreenshotApp
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
IMPLEMENT_APP(wxScreenshotApp);
|
IMPLEMENT_APP(ScreenshotApp);
|
||||||
|
|
||||||
bool wxScreenshotApp::OnInit()
|
bool ScreenshotApp::OnInit()
|
||||||
{
|
{
|
||||||
// Init all Image handlers
|
// Init all Image handlers
|
||||||
wxInitAllImageHandlers();
|
wxInitAllImageHandlers();
|
||||||
@@ -38,7 +38,7 @@ bool wxScreenshotApp::OnInit()
|
|||||||
// Add richtext extra handlers (plain text is automatically added)
|
// Add richtext extra handlers (plain text is automatically added)
|
||||||
wxRichTextBuffer::AddHandler(new wxRichTextXMLHandler);
|
wxRichTextBuffer::AddHandler(new wxRichTextXMLHandler);
|
||||||
|
|
||||||
wxScreenshotFrame* frame = new wxScreenshotFrame(0L);
|
ScreenshotFrame* frame = new ScreenshotFrame(0L);
|
||||||
frame->Show();
|
frame->Show();
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
@@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
#include <wx/app.h>
|
#include <wx/app.h>
|
||||||
|
|
||||||
class wxScreenshotApp : public wxApp
|
class ScreenshotApp : public wxApp
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
virtual bool OnInit();
|
virtual bool OnInit();
|
||||||
|
@@ -24,11 +24,13 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <wx/dir.h>
|
#include <wx/dir.h>
|
||||||
|
#include <wx/aboutdlg.h>
|
||||||
|
|
||||||
#include "screenshot_main.h"
|
#include "screenshot_main.h"
|
||||||
#include "ctrlmaskout.h"
|
#include "ctrlmaskout.h"
|
||||||
#include "autocapture.h"
|
#include "autocapture.h"
|
||||||
|
|
||||||
|
/*
|
||||||
// Global helper functions
|
// Global helper functions
|
||||||
enum wxBuildInfoFormat
|
enum wxBuildInfoFormat
|
||||||
{
|
{
|
||||||
@@ -58,14 +60,14 @@ wxString wxbuildinfo(wxBuildInfoFormat format)
|
|||||||
}
|
}
|
||||||
|
|
||||||
return wxbuild;
|
return wxbuild;
|
||||||
}
|
}*/
|
||||||
|
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// wxScreenshotFrame
|
// ScreenshotFrame
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
wxScreenshotFrame::wxScreenshotFrame(wxFrame *frame)
|
ScreenshotFrame::ScreenshotFrame(wxFrame *frame)
|
||||||
#if SCREENSHOTGEN_USE_AUI
|
#if SCREENSHOTGEN_USE_AUI
|
||||||
: AuiGUIFrame(frame)
|
: AuiGUIFrame(frame)
|
||||||
#else
|
#else
|
||||||
@@ -78,7 +80,7 @@ wxScreenshotFrame::wxScreenshotFrame(wxFrame *frame)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
// We will hold one during the whole life time of the main frame
|
// 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
|
// At the begining, we are not specifying the rect region
|
||||||
capturingRect = false;
|
capturingRect = false;
|
||||||
@@ -92,7 +94,7 @@ wxScreenshotFrame::wxScreenshotFrame(wxFrame *frame)
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
wxScreenshotFrame::~wxScreenshotFrame()
|
ScreenshotFrame::~ScreenshotFrame()
|
||||||
{
|
{
|
||||||
delete m_maskout;
|
delete m_maskout;
|
||||||
}
|
}
|
||||||
@@ -106,7 +108,7 @@ wxScreenshotFrame::~wxScreenshotFrame()
|
|||||||
|
|
||||||
Those customizations will be done here.
|
Those customizations will be done here.
|
||||||
*/
|
*/
|
||||||
void wxScreenshotFrame::InitFBControls()
|
void ScreenshotFrame::InitFBControls()
|
||||||
{
|
{
|
||||||
// Do the default selection for wxComboBox
|
// Do the default selection for wxComboBox
|
||||||
m_comboBox1->Select(0);
|
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();
|
Destroy();
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxScreenshotFrame::OnQuit(wxCommandEvent& WXUNUSED(event))
|
void ScreenshotFrame::OnQuit(wxCommandEvent& WXUNUSED(event))
|
||||||
{
|
{
|
||||||
Destroy();
|
Destroy();
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxScreenshotFrame::OnSeeScreenshots(wxCommandEvent& WXUNUSED(event))
|
void ScreenshotFrame::OnSeeScreenshots(wxCommandEvent& WXUNUSED(event))
|
||||||
{
|
{
|
||||||
wxString defaultDir = m_maskout->GetDefaultDirectory();
|
wxString defaultDir = m_maskout->GetDefaultDirectory();
|
||||||
|
|
||||||
@@ -176,13 +178,18 @@ void wxScreenshotFrame::OnSeeScreenshots(wxCommandEvent& WXUNUSED(event))
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxScreenshotFrame::OnAbout(wxCommandEvent& WXUNUSED(event))
|
void ScreenshotFrame::OnAbout(wxCommandEvent& WXUNUSED(event))
|
||||||
{
|
{
|
||||||
wxString msg = wxbuildinfo(long_f);
|
wxAboutDialogInfo info;
|
||||||
wxMessageBox(msg, _("Welcome to..."));
|
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
|
// Create a DC for the whole screen area
|
||||||
wxScreenDC dcScreen;
|
wxScreenDC dcScreen;
|
||||||
@@ -194,7 +201,7 @@ void wxScreenshotFrame::OnCaptureFullScreen(wxCommandEvent& WXUNUSED(event))
|
|||||||
m_maskout->Capture(0, 0, screenWidth, screenHeight, _T("fullscreen"));
|
m_maskout->Capture(0, 0, screenWidth, screenHeight, _T("fullscreen"));
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxScreenshotFrame::OnCaptureRect(wxCommandEvent& WXUNUSED(event))
|
void ScreenshotFrame::OnCaptureRect(wxCommandEvent& WXUNUSED(event))
|
||||||
{
|
{
|
||||||
capturingRect = true;
|
capturingRect = true;
|
||||||
wxMenuBar * menubar = this->GetMenuBar();
|
wxMenuBar * menubar = this->GetMenuBar();
|
||||||
@@ -203,12 +210,12 @@ void wxScreenshotFrame::OnCaptureRect(wxCommandEvent& WXUNUSED(event))
|
|||||||
|
|
||||||
wxWindow * thePage = m_notebook1->GetPage(m_notebook1->GetSelection());
|
wxWindow * thePage = m_notebook1->GetPage(m_notebook1->GetSelection());
|
||||||
|
|
||||||
thePage->Connect( wxEVT_LEFT_DOWN, wxMouseEventHandler( wxCtrlMaskOut::OnLeftButtonDown ), NULL, m_maskout);
|
thePage->Connect( wxEVT_LEFT_DOWN, wxMouseEventHandler( CtrlMaskOut::OnLeftButtonDown ), NULL, m_maskout);
|
||||||
thePage->Connect( wxEVT_LEFT_UP, wxMouseEventHandler( wxCtrlMaskOut::OnLeftButtonUp ), NULL, m_maskout);
|
thePage->Connect( wxEVT_LEFT_UP, wxMouseEventHandler( CtrlMaskOut::OnLeftButtonUp ), NULL, m_maskout);
|
||||||
thePage->Connect( wxEVT_MOTION, wxMouseEventHandler( wxCtrlMaskOut::OnMouseMoving ), 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;
|
capturingRect = false;
|
||||||
wxMenuBar * menubar = this->GetMenuBar();
|
wxMenuBar * menubar = this->GetMenuBar();
|
||||||
@@ -217,12 +224,12 @@ void wxScreenshotFrame::OnEndCaptureRect(wxCommandEvent& WXUNUSED(event))
|
|||||||
|
|
||||||
wxWindow * thePage = m_notebook1->GetPage(m_notebook1->GetSelection());
|
wxWindow * thePage = m_notebook1->GetPage(m_notebook1->GetSelection());
|
||||||
|
|
||||||
thePage->Disconnect( wxEVT_LEFT_DOWN, wxMouseEventHandler( wxCtrlMaskOut::OnLeftButtonDown ), NULL, m_maskout);
|
thePage->Disconnect( wxEVT_LEFT_DOWN, wxMouseEventHandler( CtrlMaskOut::OnLeftButtonDown ), NULL, m_maskout);
|
||||||
thePage->Disconnect( wxEVT_LEFT_UP, wxMouseEventHandler( wxCtrlMaskOut::OnLeftButtonUp ), NULL, m_maskout);
|
thePage->Disconnect( wxEVT_LEFT_UP, wxMouseEventHandler( CtrlMaskOut::OnLeftButtonUp ), NULL, m_maskout);
|
||||||
thePage->Disconnect( wxEVT_MOTION, wxMouseEventHandler( wxCtrlMaskOut::OnMouseMoving ), NULL, m_maskout);
|
thePage->Disconnect( wxEVT_MOTION, wxMouseEventHandler( CtrlMaskOut::OnMouseMoving ), NULL, m_maskout);
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxScreenshotFrame::OnNotebookPageChanging(
|
void ScreenshotFrame::OnNotebookPageChanging(
|
||||||
#if SCREENSHOTGEN_USE_AUI
|
#if SCREENSHOTGEN_USE_AUI
|
||||||
wxAuiNotebookEvent& event
|
wxAuiNotebookEvent& event
|
||||||
#else
|
#else
|
||||||
@@ -238,14 +245,14 @@ wxNotebookEvent& event
|
|||||||
|
|
||||||
wxWindow * thePage = m_notebook1->GetPage(event.GetOldSelection());
|
wxWindow * thePage = m_notebook1->GetPage(event.GetOldSelection());
|
||||||
|
|
||||||
thePage->Disconnect( wxEVT_LEFT_DOWN, wxMouseEventHandler( wxCtrlMaskOut::OnLeftButtonDown ), NULL, m_maskout);
|
thePage->Disconnect( wxEVT_LEFT_DOWN, wxMouseEventHandler( CtrlMaskOut::OnLeftButtonDown ), NULL, m_maskout);
|
||||||
thePage->Disconnect( wxEVT_LEFT_UP, wxMouseEventHandler( wxCtrlMaskOut::OnLeftButtonUp ), NULL, m_maskout);
|
thePage->Disconnect( wxEVT_LEFT_UP, wxMouseEventHandler( CtrlMaskOut::OnLeftButtonUp ), NULL, m_maskout);
|
||||||
thePage->Disconnect( wxEVT_MOTION, wxMouseEventHandler( wxCtrlMaskOut::OnMouseMoving ), NULL, m_maskout);
|
thePage->Disconnect( wxEVT_MOTION, wxMouseEventHandler( CtrlMaskOut::OnMouseMoving ), NULL, m_maskout);
|
||||||
|
|
||||||
event.Skip();
|
event.Skip();
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxScreenshotFrame::OnNotebookPageChanged(
|
void ScreenshotFrame::OnNotebookPageChanged(
|
||||||
#if SCREENSHOTGEN_USE_AUI
|
#if SCREENSHOTGEN_USE_AUI
|
||||||
wxAuiNotebookEvent& event
|
wxAuiNotebookEvent& event
|
||||||
#else
|
#else
|
||||||
@@ -261,14 +268,14 @@ wxNotebookEvent& event
|
|||||||
|
|
||||||
wxWindow *thePage = m_notebook1->GetPage(event.GetSelection());
|
wxWindow *thePage = m_notebook1->GetPage(event.GetSelection());
|
||||||
|
|
||||||
thePage->Connect( wxEVT_LEFT_DOWN, wxMouseEventHandler( wxCtrlMaskOut::OnLeftButtonDown ), NULL, m_maskout);
|
thePage->Connect( wxEVT_LEFT_DOWN, wxMouseEventHandler( CtrlMaskOut::OnLeftButtonDown ), NULL, m_maskout);
|
||||||
thePage->Connect( wxEVT_LEFT_UP, wxMouseEventHandler( wxCtrlMaskOut::OnLeftButtonUp ), NULL, m_maskout);
|
thePage->Connect( wxEVT_LEFT_UP, wxMouseEventHandler( CtrlMaskOut::OnLeftButtonUp ), NULL, m_maskout);
|
||||||
thePage->Connect( wxEVT_MOTION, wxMouseEventHandler( wxCtrlMaskOut::OnMouseMoving ), NULL, m_maskout);
|
thePage->Connect( wxEVT_MOTION, wxMouseEventHandler( CtrlMaskOut::OnMouseMoving ), NULL, m_maskout);
|
||||||
|
|
||||||
event.Skip();
|
event.Skip();
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxScreenshotFrame::OnCaptureAllControls(wxCommandEvent& WXUNUSED(event))
|
void ScreenshotFrame::OnCaptureAllControls(wxCommandEvent& WXUNUSED(event))
|
||||||
{
|
{
|
||||||
wxString dir = wxT("screenshots");
|
wxString dir = wxT("screenshots");
|
||||||
|
|
||||||
|
@@ -15,10 +15,10 @@
|
|||||||
#define SCREENSHOTGEN_USE_AUI 0
|
#define SCREENSHOTGEN_USE_AUI 0
|
||||||
|
|
||||||
|
|
||||||
class wxCtrlMaskOut;
|
class CtrlMaskOut;
|
||||||
|
|
||||||
|
|
||||||
class wxScreenshotFrame
|
class ScreenshotFrame
|
||||||
#if SCREENSHOTGEN_USE_AUI
|
#if SCREENSHOTGEN_USE_AUI
|
||||||
: public AuiGUIFrame
|
: public AuiGUIFrame
|
||||||
#else
|
#else
|
||||||
@@ -26,8 +26,8 @@ class wxScreenshotFrame
|
|||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
wxScreenshotFrame(wxFrame *frame);
|
ScreenshotFrame(wxFrame *frame);
|
||||||
~wxScreenshotFrame();
|
~ScreenshotFrame();
|
||||||
|
|
||||||
protected: // event handlers
|
protected: // event handlers
|
||||||
|
|
||||||
@@ -55,7 +55,7 @@ private:
|
|||||||
|
|
||||||
// Data members
|
// Data members
|
||||||
bool capturingRect;
|
bool capturingRect;
|
||||||
wxCtrlMaskOut * m_maskout;
|
CtrlMaskOut * m_maskout;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // WXSCREENSHOTMAIN_H
|
#endif // WXSCREENSHOTMAIN_H
|
||||||
|
@@ -47,7 +47,6 @@
|
|||||||
richtext.xml
|
richtext.xml
|
||||||
bitmaps/wxwin32x32.png
|
bitmaps/wxwin32x32.png
|
||||||
bitmaps/bell.png
|
bitmaps/bell.png
|
||||||
bitmaps/info.png
|
|
||||||
bitmaps/sound.png
|
bitmaps/sound.png
|
||||||
bitmaps/dropbuth.png
|
bitmaps/dropbuth.png
|
||||||
bitmaps/dropbutn.png
|
bitmaps/dropbutn.png
|
||||||
|
Reference in New Issue
Block a user