Updates to reflect recent changes in wxWindows
authorRobin Dunn <robin@alldunn.com>
Wed, 11 Feb 2004 00:21:37 +0000 (00:21 +0000)
committerRobin Dunn <robin@alldunn.com>
Wed, 11 Feb 2004 00:21:37 +0000 (00:21 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@25730 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

wxPython/src/_dc.i
wxPython/src/_gdi_rename.i
wxPython/src/_pen.i
wxPython/src/_treectrl.i
wxPython/wxPython/gdi.py

index 466b5469a55db1cae1ce40633861e6f63c4e65f6..7d0fa94a4fcb1fc315210ae7baa6bda130c0a201 100644 (file)
@@ -168,6 +168,11 @@ public:
                      wxCoord xoffset = 0, wxCoord yoffset = 0,
                      int fillStyle = wxODDEVEN_RULE);
 
+    // TODO:  Figure out what the start parameter means and devise a
+    // good typemap for this    
+    //void DrawPolyPolygon(int n, int start[], wxPoint points[],
+    //                     wxCoord xoffset = 0, wxCoord yoffset = 0,
+    //                     int fillStyle = wxODDEVEN_RULE)
 
     // this version puts both optional bitmap and the text into the given
     // rectangle and aligns is as specified by alignment parameter; it also
@@ -555,27 +560,45 @@ public:
 //---------------------------------------------------------------------------
 %newgroup
 
+enum
+{
+    // this is more efficient and hence default
+    wxBUFFER_DC_OVERWRITE_BG = 0,
+
+    // preserve the old background: more time consuming
+    wxBUFFER_DC_PRESERVE_BG = 1,
+
+    // flags used by default
+    wxBUFFER_DC_DEFAULT = wxBUFFER_DC_OVERWRITE_BG
+};
+
+
 class wxBufferedDC : public wxMemoryDC
 {
 public:
     %pythonAppend wxBufferedDC( wxDC *dc, const wxBitmap &buffer )
         "self._dc = args[0] # save a ref so the other dc will not be deleted before self";
-    %pythonAppend wxBufferedDC( wxDC *dc, const wxSize &area )
+    %pythonAppend wxBufferedDC( wxDC *dc, const wxSize &area, int flags = wxBUFFER_DC_DEFAULT )
         "val._dc = args[0] # save a ref so the other dc will not be deleted before self";
 
+    %nokwargs wxBufferedDC;
+    
     // Construct a wxBufferedDC using a user supplied buffer.
     wxBufferedDC( wxDC *dc, const wxBitmap &buffer );
 
-        // Construct a wxBufferedDC with an internal buffer of 'area'
-        // (where area is usually something like the size of the window
-        // being buffered)
-    %name(BufferedDCInternalBuffer) wxBufferedDC( wxDC *dc, const wxSize &area );
+    // Construct a wxBufferedDC with an internal buffer of 'area'
+    // (where area is usually something like the size of the window
+    // being buffered)
+    wxBufferedDC( wxDC *dc, const wxSize &area, int flags = wxBUFFER_DC_DEFAULT );
+
+    // TODO: Keep this one too?
+    %name(BufferedDCInternalBuffer) wxBufferedDC( wxDC *dc, const wxSize &area, int flags = wxBUFFER_DC_DEFAULT );
 
-        // Blits the buffer to the dc, and detaches the dc from
-        // the buffer.  Usually called in the dtor or by the dtor
-        // of derived classes if the BufferedDC must blit before
-        // the derived class (which may own the dc it's blitting
-        // to) is destroyed.
+    // Blits the buffer to the dc, and detaches the dc from
+    // the buffer.  Usually called in the dtor or by the dtor
+    // of derived classes if the BufferedDC must blit before
+    // the derived class (which may own the dc it's blitting
+    // to) is destroyed.
     void UnMask();
 };
 
@@ -583,7 +606,14 @@ public:
 class wxBufferedPaintDC : public wxBufferedDC
 {
 public:
-    wxBufferedPaintDC( wxWindow *window, const wxBitmap &buffer = wxNullBitmap );
+
+    %nokwargs wxBufferedPaintDC;
+    
+    wxBufferedPaintDC( wxWindow *window, const wxBitmap &buffer );
+
+    // this ctor creates a bitmap of the size of the window for buffering
+    wxBufferedPaintDC(wxWindow *window, int flags = wxBUFFER_DC_DEFAULT);
+
 };
 
 
index ce81ce421086475bb516c7c99241bdaf594720f8..39ae956b4b6f010d0492d5a88cef9870e4c618c1 100644 (file)
 %rename(EncodingConverter)                  wxEncodingConverter;
 %rename(DC)                                 wxDC;
 %rename(MemoryDC)                           wxMemoryDC;
+%rename(BUFFER_DC_OVERWRITE_BG)             wxBUFFER_DC_OVERWRITE_BG;
+%rename(BUFFER_DC_PRESERVE_BG)              wxBUFFER_DC_PRESERVE_BG;
+%rename(BUFFER_DC_DEFAULT)                  wxBUFFER_DC_DEFAULT;
 %rename(BufferedDC)                         wxBufferedDC;
 %rename(BufferedPaintDC)                    wxBufferedPaintDC;
 %rename(ScreenDC)                           wxScreenDC;
index e7d1b7e8eb4a6ddbdba4270200d1d9bc8eeaa96e..a30cc189d2b2e89e6c77940ded8bdfacc958a7f9 100644 (file)
@@ -62,6 +62,8 @@ public:
             return retval;
         }
     }
+    
+    bool operator==(const wxPen& pen) const;
 
 #ifndef __WXMAC__
 //  wxDash* GetDash() const;
index bf455ec4ae3f0a7dce7a279111fec19508f59d23..0dfc6bfd0035f3021786ff572f544001147d6248 100644 (file)
@@ -642,12 +642,19 @@ public:
     // remove the selection from currently selected item (if any)
     void Unselect();
 
+    // remove the selection from the given one (multiselect mode only)
+    void UnselectItem(const wxTreeItemId& item);
+    
     // unselect all items (only makes sense for multiple selection control)
     void UnselectAll();
 
     // select this item
-    void SelectItem(const wxTreeItemId& item);
+    void SelectItem(const wxTreeItemId& item, bool select = True);
+
+    // toggle the item selection
+    void ToggleItemSelection(const wxTreeItemId& item);
 
+    
     // make sure this item is visible (expanding the parent item and/or
     // scrolling to this item if necessary)
     void EnsureVisible(const wxTreeItemId& item);
index f93e5015727e888c0e67e7fa16c4cf1da10b45e4..492bcd2a57be2bbf289ae4ab931e852834e670d2 100644 (file)
@@ -487,6 +487,9 @@ wxDCPtr = wx.gdi.DCPtr
 wxMemoryDC = wx.gdi.MemoryDC
 wxMemoryDCPtr = wx.gdi.MemoryDCPtr
 wxMemoryDCFromDC = wx.gdi.MemoryDCFromDC
+wxBUFFER_DC_OVERWRITE_BG = wx.gdi.BUFFER_DC_OVERWRITE_BG
+wxBUFFER_DC_PRESERVE_BG = wx.gdi.BUFFER_DC_PRESERVE_BG
+wxBUFFER_DC_DEFAULT = wx.gdi.BUFFER_DC_DEFAULT
 wxBufferedDC = wx.gdi.BufferedDC
 wxBufferedDCPtr = wx.gdi.BufferedDCPtr
 wxBufferedDCInternalBuffer = wx.gdi.BufferedDCInternalBuffer