X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/4863e55108155a4e109e401407e01495ebf45b36..b02dd12239c8a59b9a545d9fcb04974f8ad02c6b:/interface/wx/bookctrl.h diff --git a/interface/wx/bookctrl.h b/interface/wx/bookctrl.h index 2039da442d..15f27c1abf 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,13 +23,19 @@ This is a pure virtual class so you cannot allocate it directly. @library{wxcore} - @category{miscwnd} + @category{bookctrl} @see @ref overview_bookctrl */ -class wxBookCtrlBase : public wxControl +class wxBookCtrlBase : public wxControl, public wxWithImages { public: + enum + { + /// Symbolic constant indicating that no image should be used. + NO_IMAGE = -1 + }; + /** Default ctor. */ @@ -65,33 +71,12 @@ public: */ //@{ - /** - Sets the image list for the page control and takes ownership of the list. - - @see wxImageList, SetImageList() - */ - void AssignImageList(wxImageList* imageList); - - /** - Returns the associated image list. - - @see wxImageList, SetImageList() - */ - wxImageList* GetImageList() const; /** Returns the image index for the given page. */ virtual int GetPageImage(size_t nPage) const = 0; - /** - Sets the image list for the page control. - It does not take ownership of the image list, you must delete it yourself. - - @see wxImageList, AssignImageList() - */ - virtual void SetImageList(wxImageList* imageList); - /** Sets the image index for the given page. @a image is an index into the image list which was set with SetImageList(). @@ -168,7 +153,7 @@ public: This function behaves as SetSelection() but does @em not generate the page changing events. - See @ref overview_eventhandling_prog for more information. + See @ref overview_events_prog for more information. */ virtual int ChangeSelection(size_t page) = 0; @@ -221,6 +206,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 @@ -239,7 +228,7 @@ public: @see InsertPage() */ virtual bool AddPage(wxWindow* page, const wxString& text, - bool select = false, int imageId = wxNOT_FOUND); + bool select = false, int imageId = NO_IMAGE); /** Deletes all pages. @@ -276,7 +265,7 @@ public: wxWindow* page, const wxString& text, bool select = false, - int imageId = wxNOT_FOUND) = 0; + int imageId = NO_IMAGE) = 0; /** Deletes the specified page, without deleting the associated window. @@ -346,7 +335,7 @@ public: @class wxBookCtrlEvent This class represents the events generated by book controls (wxNotebook, - wxListbook, wxChoicebook, wxTreebook). + wxListbook, wxChoicebook, wxTreebook, wxAuiNotebook). The PAGE_CHANGING events are sent before the current page is changed. It allows the program to examine the current page (which can be retrieved @@ -363,9 +352,9 @@ public: probably unnecessary to process both events at once. @library{wxcore} - @category{events} + @category{events,bookctrl} - @see wxNotebook, wxListbook, wxChoicebook, wxTreebook, wxToolbook + @see wxNotebook, wxListbook, wxChoicebook, wxTreebook, wxToolbook, wxAuiNotebook */ class wxBookCtrlEvent : public wxNotifyEvent {