X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/340e9651e1ee6938ee797ea15f4c1fbdab8a6f44..c29c95fe24973b94fd724db767193171ca7c513d:/interface/wx/bookctrl.h diff --git a/interface/wx/bookctrl.h b/interface/wx/bookctrl.h index 03777305d7..450cd6d4eb 100644 --- a/interface/wx/bookctrl.h +++ b/interface/wx/bookctrl.h @@ -3,7 +3,7 @@ // Purpose: interface of wxBookCtrlBase // Author: wxWidgets team // RCS-ID: $Id$ -// Licence: wxWindows license +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// /** @@ -23,7 +23,7 @@ This is a pure virtual class so you cannot allocate it directly. @library{wxcore} - @category{miscwnd} + @category{bookctrl} @see @ref overview_bookctrl */ @@ -82,7 +82,7 @@ public: /** Returns the image index for the given page. */ - virtual int GetPageImage(size_t nPage) const; + virtual int GetPageImage(size_t nPage) const = 0; /** Sets the image list for the page control. @@ -96,7 +96,7 @@ public: Sets the image index for the given page. @a image is an index into the image list which was set with SetImageList(). */ - virtual bool SetPageImage(size_t page, int image); + virtual bool SetPageImage(size_t page, int image) = 0; //@} @@ -147,15 +147,14 @@ public: /** Sets the selection for the given page, returning the previous selection. - The call to this function generates the page changing events. - @deprecated - This function is deprecated and should not be used in new code. - Please use the ChangeSelection() function instead. + Notice that the call to this function generates the page changing + events, use the ChangeSelection() function if you don't want these + events to be generated. @see GetSelection() */ - virtual int SetSelection(size_t page); + virtual int SetSelection(size_t page) = 0; /** Cycles through the tabs. @@ -166,11 +165,12 @@ public: /** Changes the selection for the given page, returning the previous selection. - The call to this function does NOT generate the page changing events. - This is the only difference with SetSelection(). - See @ref overview_eventhandling_prog for more infomation. + This function behaves as SetSelection() but does @em not generate the + page changing events. + + See @ref overview_events_prog for more information. */ - virtual int ChangeSelection(size_t page); + virtual int ChangeSelection(size_t page) = 0; //@} @@ -221,6 +221,10 @@ public: /** Adds a new page. + + The page must have the book control itself as the parent and must not + have been added to this control previously. + The call to this function may generate the page changing events. @param page @@ -238,10 +242,8 @@ public: @see InsertPage() */ - bool AddPage(wxWindow* page, - const wxString& text, - bool select = false, - int imageId = wxNOT_FOUND); + virtual bool AddPage(wxWindow* page, const wxString& text, + bool select = false, int imageId = wxNOT_FOUND); /** Deletes all pages. @@ -252,7 +254,7 @@ public: Deletes the specified page, and the associated window. The call to this function generates the page changing events. */ - bool DeletePage(size_t page); + virtual bool DeletePage(size_t page); /** Inserts a new page at the specified position. @@ -283,17 +285,17 @@ public: /** Deletes the specified page, without deleting the associated window. */ - bool RemovePage(size_t page); + virtual bool RemovePage(size_t page); /** Returns the number of pages in the control. */ - size_t GetPageCount() const; + virtual size_t GetPageCount() const; /** Returns the window at the given page position. */ - wxWindow* GetPage(size_t page); + wxWindow* GetPage(size_t page) const; //@} @@ -336,6 +338,13 @@ public: */ }; +/** + wxBookCtrl is defined to one of the 'real' book controls. + + See @ref overview_bookctrl for more info. +*/ +#define wxBookCtrl TheBestBookCtrlForTheCurrentPlatform + /** @class wxBookCtrlEvent @@ -358,7 +367,7 @@ public: probably unnecessary to process both events at once. @library{wxcore} - @category{events} + @category{events,bookctrl} @see wxNotebook, wxListbook, wxChoicebook, wxTreebook, wxToolbook */