]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/src/_dc.i
use "StrokeLineSegements" for the second overload of StrokeLines
[wxWidgets.git] / wxPython / src / _dc.i
index ab5bceb09dded80977ac0c4feebf9862f098c96c..18a8690ab941c1b49c34be7bf656843c35f0dac4 100644 (file)
@@ -975,6 +975,24 @@ box doesn't contain anything.", "");
     %pythoncode { def __nonzero__(self): return self.IsOk() };
 
 
+    // RTL related functions
+    // ---------------------
+
+    DocDeclStr(
+        virtual wxLayoutDirection , GetLayoutDirection() const,
+        "Get the layout direction (LTR or RTL)_ for this dc.  On platforms
+where RTL layout is supported, the return value will either be
+``wx.Layout_LeftToRight`` or ``wx.Layout_RightToLeft``.
+``wx.Layout_Default`` is returned if layout direction is not
+supported.", "");
+    
+    DocDeclStr(
+        virtual void , SetLayoutDirection(wxLayoutDirection dir),
+        "Change the layout direction for this dc.", "");
+    
+
+    
+
 #ifdef __WXMSW__
     long GetHDC();
 #endif
@@ -1201,6 +1219,8 @@ box doesn't contain anything.", "");
     %property(TextExtent, GetTextExtent, doc="See `GetTextExtent`");
     %property(TextForeground, GetTextForeground, SetTextForeground, doc="See `GetTextForeground` and `SetTextForeground`");
     %property(UserScale, GetUserScale, SetUserScale, doc="See `GetUserScale` and `SetUserScale`");
+
+    %property(LayoutDirection, GetLayoutDirection, SetLayoutDirection);
 };
 
 
@@ -1294,11 +1314,11 @@ 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.
+natively. wxBufferedDC is aware of this however, and will bypass the buffering
+unless an explicit buffer bitmap is given.
 ", "");
 
-class wxBufferedDC : public wxMemoryDC
+class wxBufferedDC : public wxDC
 {
 public:
     %pythonAppend wxBufferedDC
@@ -1338,6 +1358,11 @@ public:
     wxBufferedDC( wxDC* dc,
                   const wxSize& area,
                   int style = wxBUFFER_CLIENT_AREA );
+    wxBufferedDC(wxWindow* win,
+                 wxDC *dc,
+                 const wxSize &area,
+                 int style = wxBUFFER_CLIENT_AREA);
+
 
     DocCtorStr(
         ~wxBufferedDC(),
@@ -1376,8 +1401,6 @@ automatically when it is destroyed.  For example::
         dc = wx.BufferedPaintDC(self, self.buffer)
 
 
-
-
 ", "");
 
 class wxBufferedPaintDC : public wxBufferedDC
@@ -1391,13 +1414,10 @@ public:
         "Create a buffered paint DC.  As with `wx.BufferedDC`, you may either
 provide the bitmap to be used for buffering or let this object create
 one internally (in the latter case, the size of the client part of the
-window is automatically used).
-
-", "");
+window is automatically used).", "");
 
 };
 
-
 //---------------------------------------------------------------------------
 %newgroup
 
@@ -1514,6 +1534,26 @@ public:
         "Constructor. Pass the window on which you wish to paint.", "");
 };
 
+
+
+//---------------------------------------------------------------------------
+%newgroup
+
+%pythoncode {
+    if 'wxMac' in wx.PlatformInfo or 'gtk2' in wx.PlatformInfo:
+        _AutoBufferedPaintDCBase = PaintDC
+    else:
+        _AutoBufferedPaintDCBase = BufferedPaintDC
+            
+    class AutoBufferedPaintDC(_AutoBufferedPaintDCBase):
+        """
+        If the current platform double buffers by default then this DC is the
+        same as a plain `wx.PaintDC`, otherwise it is a `wx.BufferedPaintDC`.
+        """
+        def __init__(self, window):
+            _AutoBufferedPaintDCBase.__init__(self, window)
+}
+
 //---------------------------------------------------------------------------
 %newgroup