]>
git.saurik.com Git - wxWidgets.git/blob - utils/screenshotgen/src/ctrlmaskout.h
1e0ec6832e9f7ebbb905d710534630820b46bfd8
1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: Defines the CtrlMaskOut class
4 // Author: Utensil Candel (UtensilCandel@@gmail.com)
6 // Licence: wxWindows license
7 /////////////////////////////////////////////////////////////////////////////
9 #ifndef _CTRLMASKOUT_H_
10 #define _CTRLMASKOUT_H_
12 #include "wx/filename.h"
15 // ----------------------------------------------------------------------------
17 // ----------------------------------------------------------------------------
19 class CtrlMaskOut
: public wxEvtHandler
26 void OnLeftButtonDown(wxMouseEvent
& event
);
27 void OnLeftButtonUp(wxMouseEvent
& event
);
28 void OnMouseMoving(wxMouseEvent
& event
);
30 void Capture(wxRect rect
, wxString fileName
);
31 void Capture(int x
, int y
, int width
, int height
, wxString fileName
);
33 wxString
GetDefaultDirectory() const
34 { return m_defaultDir
; }
35 wxString
GetDefaultDirectoryAbsPath() const
37 wxFileName output
= wxFileName::DirName(GetDefaultDirectory());
38 output
.MakeAbsolute();
39 return output
.GetFullPath();
44 void CreateMask(wxWindow
* parent
);
46 void DetermineCtrlNameAndRect();
48 void OnTimingFinished(wxTimerEvent
& event
);
52 wxString m_defaultDir
;
54 wxString m_controlName
;
56 wxCoord m_inflateBorder
;
63 #endif // _CTRLMASKOUT_H_