- wxImageList* GetImageList();
- int GetPageImage(int page);
- bool SetPageImage(int page, int image);
- int GetRowCount();
-
- void SetPageSize(const wxSize& size);
- void SetPadding(const wxSize& padding);
- bool DeletePage(int page);
- bool RemovePage(int page);
- bool DeleteAllPages();
- bool AddPage(/*wxNotebookPage*/ wxWindow *page,
- const wxString& text,
- int select = FALSE,
- int imageId = -1);
- bool InsertPage(int index,
- /*wxNotebookPage*/ wxWindow *page,
- const wxString& text,
- bool select = FALSE,
- int imageId = -1);
- /*wxNotebookPage*/ wxWindow *GetPage(int page);
-
- %addmethods {
- void ResizeChildren() {
- wxSizeEvent evt(self->GetClientSize());
- self->GetEventHandler()->ProcessEvent(evt);
- }
- }
+ // get pointer (may be NULL) to the associated image list
+ wxImageList* GetImageList() const;
+
+ // sets/returns item's image index in the current image list
+ int GetPageImage(int page) const;
+ bool SetPageImage(int page, int nImage);
+
+ // get the number of rows for a control with wxNB_MULTILINE style (not all
+ // versions support it - they will always return 1 then)
+ int GetRowCount() const;
+
+ // set the size (the same for all pages)
+ void SetPageSize(const wxSize& size);
+
+ // set the padding between tabs (in pixels)
+ void SetPadding(const wxSize& padding);
+
+ // set the size of the tabs for wxNB_FIXEDWIDTH controls
+ void SetTabSize(const wxSize& sz);
+
+ // calculate the size of the notebook from the size of its page
+ wxSize CalcSizeFromPage(const wxSize& sizePage) const;
+
+
+ // remove one page from the notebook and delete it
+ bool DeletePage(int page);
+
+ // remove one page from the notebook, without deleting it
+ bool RemovePage(int page);
+
+ // remove all pages and delete them
+ bool DeleteAllPages();
+
+ // adds a new page to the notebook (it will be deleted by the notebook,
+ // don't delete it yourself) and make it the current one if select
+ bool AddPage(wxWindow *page,
+ const wxString& text,
+ bool telect = FALSE,
+ int imageId = -1);
+
+ // the same as AddPage(), but adds the page at the specified position
+ bool InsertPage(int index,
+ wxWindow *page,
+ const wxString& text,
+ bool select = FALSE,
+ int imageId = -1);