]> git.saurik.com Git - wxWidgets.git/blame - utils/screenshotgen/src/ctrlmaskout.h
add to utils.bkl the hhp2cached (why wasn't already there?) and screenshotgen utilities
[wxWidgets.git] / utils / screenshotgen / src / ctrlmaskout.h
CommitLineData
0d5eda9c
FM
1/////////////////////////////////////////////////////////////////////////////
2// Name: ctrlmaskout.h
3// Purpose: Defines the wxCtrlMaskOut class
4// Author: Utensil Candel (UtensilCandel@@gmail.com)
5// RCS-ID: $Id$
6// Licence: wxWindows license
7/////////////////////////////////////////////////////////////////////////////
8
9#ifndef WX_CTRL_MASK_OUT
10#define WX_CTRL_MASK_OUT
11
12#include <wx/frame.h>
13
14
15// ----------------------------------------------------------------------------
16// class wxCtrlMaskOut
17// ----------------------------------------------------------------------------
18
19class wxCtrlMaskOut : public wxEvtHandler
20{
21public:
22 wxCtrlMaskOut();
23 ~wxCtrlMaskOut();
24
25public:
26 void OnLeftButtonDown(wxMouseEvent& event);
27 void OnLeftButtonUp(wxMouseEvent& event);
28 void OnMouseMoving(wxMouseEvent& event);
29
30 void Capture(wxRect rect, wxString fileName);
31 void Capture(int x, int y, int width, int height, wxString fileName);
32
33 wxString GetDefaultDirectory(){return m_defaultDir;}
34
35private:
36 // Helper functions
37 void CreateMask(wxWindow* parent);
38 void DestroyMask();
39 void DetermineCtrlNameAndRect();
40
41 void OnTimingFinished(wxTimerEvent& event);
42
43
44 // Data members
45 wxString m_defaultDir;
46
47 wxString m_controlName;
48 wxRect m_currentRect;
49 wxCoord m_inflateBorder;
50
51 wxFrame * m_mask;
52
53 bool m_isTiming;
54};
55
56#endif // WX_CTRL_MASK_OUT
57
58