From ad55c49e82848208ca5af4f24c5a5e9a9de1d7b7 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Fri, 27 Oct 2006 06:08:54 +0000 Subject: [PATCH] Added Changer classes git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42484 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- wxPython/src/_dc.i | 58 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) diff --git a/wxPython/src/_dc.i b/wxPython/src/_dc.i index 7d1f08cf86..f2c860be0a 100644 --- a/wxPython/src/_dc.i +++ b/wxPython/src/_dc.i @@ -1235,6 +1235,64 @@ static void wxDC_GetBoundingBox(wxDC* dc, int* x1, int* y1, int* x2, int* y2) { %} +//--------------------------------------------------------------------------- +%newgroup + +DocStr(wxDCTextColourChanger, +"wx.DCTextColourChanger can be used to temporarily change the DC text +colour and restore it automatically when the object goes out of scope", ""); + +class wxDCTextColourChanger +{ +public: + wxDCTextColourChanger(wxDC& dc, const wxColour& col); + ~wxDCTextColourChanger(); +}; + + +DocStr(wxDCPenChanger, +"wx.DCPenChanger can be used to temporarily change the DC pen and +restore it automatically when the object goes out of scope", ""); + +class wxDCPenChanger +{ +public: + wxDCPenChanger(wxDC& dc, const wxPen& pen); + ~wxDCPenChanger(); +}; + + + +DocStr(wxDCBrushChanger, +"wx.DCBrushChanger can be used to temporarily change the DC brush and +restore it automatically when the object goes out of scope", ""); + +class wxDCBrushChanger +{ +public: + wxDCBrushChanger(wxDC& dc, const wxBrush& brush); + ~wxDCBrushChanger(); +}; + + +DocStr(wxDCClipper, +"wx.wxDCClipper sets the DC's clipping region when it is constructed, +and then automatically destroys the clipping region when the clipper +goes out of scope.", ""); + +class wxDCClipper +{ +public: + %nokwargs wxDCClipper; + wxDCClipper(wxDC& dc, const wxRegion& r); + wxDCClipper(wxDC& dc, const wxRect& r); + wxDCClipper(wxDC& dc, wxCoord x, wxCoord y, wxCoord w, wxCoord h); + ~wxDCClipper(); +}; + + + + //--------------------------------------------------------------------------- %newgroup -- 2.45.2