]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/src/_notebook.i
* wxPrintDialog no longer derives from wxDialog.
[wxWidgets.git] / wxPython / src / _notebook.i
index ab17747cd7436fe87b5b74c5b07b9f664b0469da..0e14515827b7a69f872bbca5c291c0ac402cda49 100644 (file)
@@ -98,14 +98,14 @@ public:
     // adds a new page to the control
     virtual bool AddPage(wxWindow *page,
                          const wxString& text,
     // adds a new page to the control
     virtual bool AddPage(wxWindow *page,
                          const wxString& text,
-                         bool select = False,
+                         bool select = false,
                          int imageId = -1);
 
     // the same as AddPage(), but adds the page at the specified position
     virtual bool InsertPage(size_t n,
                             wxWindow *page,
                             const wxString& text,
                          int imageId = -1);
 
     // the same as AddPage(), but adds the page at the specified position
     virtual bool InsertPage(size_t n,
                             wxWindow *page,
                             const wxString& text,
-                            bool select = False,
+                            bool select = false,
                             int imageId = -1)/* = 0*/;
 
     // set the currently selected page, return the index of the previously
                             int imageId = -1)/* = 0*/;
 
     // set the currently selected page, return the index of the previously
@@ -116,7 +116,7 @@ public:
 
 
     // cycle thru the pages
 
 
     // cycle thru the pages
-    void AdvanceSelection(bool forward = True);
+    void AdvanceSelection(bool forward = true);
 
     static wxVisualAttributes
     GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
 
     static wxVisualAttributes
     GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
@@ -168,6 +168,7 @@ class wxNotebook : public wxBookCtrl {
 public:
     %pythonAppend wxNotebook         "self._setOORInfo(self)"
     %pythonAppend wxNotebook()       ""
 public:
     %pythonAppend wxNotebook         "self._setOORInfo(self)"
     %pythonAppend wxNotebook()       ""
+    %typemap(out) wxNotebook*;    // turn off this typemap
 
     wxNotebook(wxWindow *parent,
                wxWindowID id=-1,
 
     wxNotebook(wxWindow *parent,
                wxWindowID id=-1,
@@ -177,6 +178,9 @@ public:
                const wxString& name = wxPyNOTEBOOK_NAME);
     %name(PreNotebook)wxNotebook();
 
                const wxString& name = wxPyNOTEBOOK_NAME);
     %name(PreNotebook)wxNotebook();
 
+    // Turn it back on again
+    %typemap(out) wxNotebook* { $result = wxPyMake_wxObject($1, $owner); }
+
     bool Create(wxWindow *parent,
                wxWindowID id=-1,
                const wxPoint& pos = wxDefaultPosition,
     bool Create(wxWindow *parent,
                wxWindowID id=-1,
                const wxPoint& pos = wxDefaultPosition,
@@ -257,7 +261,7 @@ class NotebookPage(wx.Panel):
         wx.Panel.__init__(self, parent, id, pos, size, style, name)
         self.child = None
         EVT_SIZE(self, self.OnSize)
         wx.Panel.__init__(self, parent, id, pos, size, style, name)
         self.child = None
         EVT_SIZE(self, self.OnSize)
-        
+
     def OnSize(self, evt):
         if self.child is None:
             children = self.GetChildren()
     def OnSize(self, evt):
         if self.child is None:
             children = self.GetChildren()
@@ -317,6 +321,7 @@ public:
     // returns True if we have wxLB_TOP or wxLB_BOTTOM style
     bool IsVertical() const;
 
     // returns True if we have wxLB_TOP or wxLB_BOTTOM style
     bool IsVertical() const;
 
+    wxListView* GetListView();
 };
 
 
 };
 
 
@@ -338,6 +343,69 @@ public:
 }
 
 
 }
 
 
+//---------------------------------------------------------------------------
+
+
+/*
+ * wxChoicebook flags
+ */
+enum {
+    wxCHB_DEFAULT,
+    wxCHB_TOP,
+    wxCHB_BOTTOM,
+    wxCHB_LEFT,
+    wxCHB_RIGHT,
+    wxCHB_ALIGN_MASK
+};
+
+
+MustHaveApp(wxChoicebook);
+
+class wxChoicebook : public wxBookCtrl
+{
+public:
+    %pythonAppend wxChoicebook         "self._setOORInfo(self)"
+    %pythonAppend wxChoicebook()       ""
+
+    wxChoicebook(wxWindow *parent,
+                 wxWindowID id,
+                 const wxPoint& pos = wxDefaultPosition,
+                 const wxSize& size = wxDefaultSize,
+                 long style = 0,
+                 const wxString& name = wxPyEmptyString);
+    %name(PreChoicebook)wxChoicebook();
+
+    // quasi ctor
+    bool Create(wxWindow *parent,
+                wxWindowID id,
+                const wxPoint& pos = wxDefaultPosition,
+                const wxSize& size = wxDefaultSize,
+                long style = 0,
+                const wxString& name = wxPyEmptyString);
+
+
+    // returns true if we have wxCHB_TOP or wxCHB_BOTTOM style
+    bool IsVertical() const { return HasFlag(wxCHB_BOTTOM | wxCHB_TOP); }
+
+    virtual bool DeleteAllPages();
+};
+
+
+class wxChoicebookEvent : public wxBookCtrlEvent
+{
+public:
+    wxChoicebookEvent(wxEventType commandType = wxEVT_NULL, int id = 0,
+                      int nSel = -1, int nOldSel = -1);
+};
+
+%constant wxEventType wxEVT_COMMAND_CHOICEBOOK_PAGE_CHANGED;
+%constant wxEventType wxEVT_COMMAND_CHOICEBOOK_PAGE_CHANGING;
+
+%pythoncode {
+    EVT_CHOICEBOOK_PAGE_CHANGED  = wx.PyEventBinder( wxEVT_COMMAND_CHOICEBOOK_PAGE_CHANGED, 1 )
+    EVT_CHOICEBOOK_PAGE_CHANGING = wx.PyEventBinder( wxEVT_COMMAND_CHOICEBOOK_PAGE_CHANGING, 1 )
+}
+
 //---------------------------------------------------------------------------
 %newgroup;
 
 //---------------------------------------------------------------------------
 %newgroup;
 
@@ -348,7 +416,7 @@ public:
     %pythonAppend wxBookCtrlSizer "self._setOORInfo(self)"
 
     wxBookCtrlSizer( wxBookCtrl *nb );
     %pythonAppend wxBookCtrlSizer "self._setOORInfo(self)"
 
     wxBookCtrlSizer( wxBookCtrl *nb );
-    
+
     void RecalcSizes();
     wxSize CalcMin();
     wxBookCtrl *GetControl();
     void RecalcSizes();
     wxSize CalcMin();
     wxBookCtrl *GetControl();
@@ -360,7 +428,7 @@ public:
     %pythonAppend wxNotebookSizer "self._setOORInfo(self)"
 
     wxNotebookSizer( wxNotebook *nb );
     %pythonAppend wxNotebookSizer "self._setOORInfo(self)"
 
     wxNotebookSizer( wxNotebook *nb );
-    
+
     void RecalcSizes();
     wxSize CalcMin();
     wxNotebook *GetNotebook();
     void RecalcSizes();
     wxSize CalcMin();
     wxNotebook *GetNotebook();