X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ddbb966daa6f8e3cbdc670fb1c17325647d35f34..6a591c43171f79cbe3ee09aa4f967fef0c861fba:/wxPython/src/_dc.i?ds=sidebyside diff --git a/wxPython/src/_dc.i b/wxPython/src/_dc.i index 780ba5610c..75e80deaaa 100644 --- a/wxPython/src/_dc.i +++ b/wxPython/src/_dc.i @@ -585,8 +585,8 @@ current or specified font. Only works for single line strings.", "", void, GetMultiLineTextExtent(const wxString& text, wxCoord *OUTPUT, wxCoord *OUTPUT, wxCoord *OUTPUT, wxFont *font = NULL), - "GetMultiLineTextExtent(wxString string, Font font=None) ->\n (width, height, descent, externalLeading)", - "Get the width, height, decent and leading of the text using the + "GetMultiLineTextExtent(wxString string, Font font=None) ->\n (width, height, lineHeight)", + "Get the width, height, and line height of the text using the current or specified font. Works for single as well as multi-line strings.", ""); @@ -703,7 +703,7 @@ converting a height, for example.", ""); DocDeclStr( virtual wxSize , GetPPI() const, - "Resolution in Pixels per inch", ""); + "Resolution in pixels per inch", ""); DocDeclStr( @@ -1171,6 +1171,35 @@ box doesn't contain anything.", ""); return self._DrawTextList(textList, coords, foregrounds, backgrounds) } + %property(Background, GetBackground, SetBackground, doc="See `GetBackground` and `SetBackground`"); + %property(BackgroundMode, GetBackgroundMode, SetBackgroundMode, doc="See `GetBackgroundMode` and `SetBackgroundMode`"); + %property(BoundingBox, GetBoundingBox, doc="See `GetBoundingBox`"); + %property(Brush, GetBrush, SetBrush, doc="See `GetBrush` and `SetBrush`"); + %property(CharHeight, GetCharHeight, doc="See `GetCharHeight`"); + %property(CharWidth, GetCharWidth, doc="See `GetCharWidth`"); + %property(ClippingBox, GetClippingBox, doc="See `GetClippingBox`"); + %property(ClippingRect, GetClippingRect, SetClippingRect, doc="See `GetClippingRect` and `SetClippingRect`"); + %property(Depth, GetDepth, doc="See `GetDepth`"); + %property(DeviceOrigin, GetDeviceOrigin, SetDeviceOrigin, doc="See `GetDeviceOrigin` and `SetDeviceOrigin`"); + %property(Font, GetFont, SetFont, doc="See `GetFont` and `SetFont`"); + %property(FullTextExtent, GetFullTextExtent, doc="See `GetFullTextExtent`"); + %property(LogicalFunction, GetLogicalFunction, SetLogicalFunction, doc="See `GetLogicalFunction` and `SetLogicalFunction`"); + %property(LogicalOrigin, GetLogicalOrigin, SetLogicalOrigin, doc="See `GetLogicalOrigin` and `SetLogicalOrigin`"); + %property(LogicalScale, GetLogicalScale, SetLogicalScale, doc="See `GetLogicalScale` and `SetLogicalScale`"); + %property(MapMode, GetMapMode, SetMapMode, doc="See `GetMapMode` and `SetMapMode`"); + %property(MultiLineTextExtent, GetMultiLineTextExtent, doc="See `GetMultiLineTextExtent`"); + %property(Optimization, GetOptimization, SetOptimization, doc="See `GetOptimization` and `SetOptimization`"); + %property(PPI, GetPPI, doc="See `GetPPI`"); + %property(PartialTextExtents, GetPartialTextExtents, doc="See `GetPartialTextExtents`"); + %property(Pen, GetPen, SetPen, doc="See `GetPen` and `SetPen`"); + %property(Pixel, GetPixel, doc="See `GetPixel`"); + %property(PixelPoint, GetPixelPoint, doc="See `GetPixelPoint`"); + %property(Size, GetSize, doc="See `GetSize`"); + %property(SizeMM, GetSizeMM, doc="See `GetSizeMM`"); + %property(TextBackground, GetTextBackground, SetTextBackground, doc="See `GetTextBackground` and `SetTextBackground`"); + %property(TextExtent, GetTextExtent, doc="See `GetTextExtent`"); + %property(TextForeground, GetTextForeground, SetTextForeground, doc="See `GetTextForeground` and `SetTextForeground`"); + %property(UserScale, GetUserScale, SetUserScale, doc="See `GetUserScale` and `SetUserScale`"); }; @@ -1258,10 +1287,14 @@ on it, everything is in fact first drawn on an in-memory buffer (a `wx.Bitmap`) and then copied to the screen only once, when this object is destroyed. -It can be used in the same way as any other device -context. wx.BufferedDC itself typically replaces `wx.ClientDC`, if you -want to use it in your EVT_PAINT handler, you should look at +It can be used in the same way as any other device context. +wx.BufferedDC itself typically replaces `wx.ClientDC`, if you want to +use it in your EVT_PAINT handler, you should look at `wx.BufferedPaintDC`. + +Please note that GTK+ 2.0 and OS X provide double buffering themselves +natively so using this class on those platforms will normally result +in an unneeded level of buffering. ", ""); class wxBufferedDC : public wxMemoryDC @@ -1415,6 +1448,23 @@ to some applications.", ""); //--------------------------------------------------------------------------- %newgroup +MustHaveApp(wxWindowDC); + +DocStr(wxWindowDC, + "A wx.WindowDC must be constructed if an application wishes to paint on +the whole area of a window (client and decorations). This should +normally be constructed as a temporary stack object; don't store a +wx.WindowDC object.",""); +class wxWindowDC : public wxDC { +public: + DocCtorStr( + wxWindowDC(wxWindow* win), + "Constructor. Pass the window on which you wish to paint.",""); +}; + +//--------------------------------------------------------------------------- +%newgroup + MustHaveApp(wxClientDC); DocStr(wxClientDC, @@ -1429,7 +1479,7 @@ To draw on a window from within an EVT_PAINT handler, construct a To draw on the whole window including decorations, construct a `wx.WindowDC` object (Windows only). ", ""); -class wxClientDC : public wxDC { +class wxClientDC : public wxWindowDC { public: DocCtorStr( wxClientDC(wxWindow* win), @@ -1456,7 +1506,7 @@ window. Attempts to draw outside this area do not appear. To draw on a window from outside EVT_PAINT handlers, construct a `wx.ClientDC` object. ",""); -class wxPaintDC : public wxDC { +class wxPaintDC : public wxClientDC { public: DocCtorStr( wxPaintDC(wxWindow* win), @@ -1466,23 +1516,6 @@ public: //--------------------------------------------------------------------------- %newgroup -MustHaveApp(wxWindowDC); - -DocStr(wxWindowDC, - "A wx.WindowDC must be constructed if an application wishes to paint on -the whole area of a window (client and decorations). This should -normally be constructed as a temporary stack object; don't store a -wx.WindowDC object.",""); -class wxWindowDC : public wxDC { -public: - DocCtorStr( - wxWindowDC(wxWindow* win), - "Constructor. Pass the window on which you wish to paint.",""); -}; - -//--------------------------------------------------------------------------- -%newgroup - MustHaveApp(wxMirrorDC); DocStr(wxMirrorDC, @@ -1532,6 +1565,8 @@ output. Default is 720ppi.", ""); DocDeclStr( static int , GetResolution(), "Return resolution used in PostScript output.", ""); + + %property(PrintData, GetPrintData, SetPrintData, doc="See `GetPrintData` and `SetPrintData`"); }; //---------------------------------------------------------------------------