wxauinotebookwxauinotebook is part of the wxaui class framework. see also wxaui overview. wxauinotebook is a notebook control which implements many features common in applications with dockable panes. specifically, wxauinotebook implements functionality which allows the user to rearrange tab order via drag-and-drop, split the tab window into many different splitter configurations, and toggle through different themes to customize the control's look and feel. an effort has been made to try to maintain an api as similar to that of wxnotebook. the default theme that is used is wxauidefaulttabart, which provides a modern, glossy look and feel. the theme can be changed by calling wxauinotebook::setartprovider. derived from include files <wx/aui/auibook.h> window styles
data structures members
wxauinotebook::wxauinotebook
wxauinotebook::wxauinotebookwxauinotebook() wxauinotebook(wxwindow* parent, wxwindowid id = wxid_any, const wxpoint& pos = wxdefaultposition, const wxsize& size = wxdefaultsize, long style = wxaui_nb_default_style) constructor. creates a wxauinotebok control.
wxauinotebook::addpagebool addpage(wxwindow* page, const wxstring& caption, bool select = false, const wxbitmap& bitmap = wxnullbitmap) adds a page. if the select parameter is true, calling this will generate a page change event.
wxauinotebook::advanceselectionvoid advanceselection(bool forward = true) sets the selection to the next or previous page.
wxauinotebook::createbool create(wxwindow* parent, wxwindowid id = wxid_any, const wxpoint& pos = wxdefaultposition, const wxsize& size = wxdefaultsize, long style = 0) creates the notebook window.
wxauinotebook::deletepagebool deletepage(size_t page) deletes a page at the given index. calling this method will generate a page change event.
wxauinotebook::getartproviderwxauitabart* getartprovider() const returns the associated art provider.
wxauinotebook::getheightforpageheightint getheightforpageheight(int pageheight) returns the desired height of the notebook for the given page height. use this to fit the notebook to a given page size.
wxauinotebook::getpagewxwindow* getpage(size_t page_idx) const returns the page specified by the given index.
wxauinotebook::getpagebitmapwxbitmap getpagebitmap(size_t page) const returns the tab bitmap for the page.
wxauinotebook::getpagecountsize_t getpagecount() const returns the number of pages in the notebook.
wxauinotebook::getpageindexint getpageindex(wxwindow* page_wnd) const returns the page index for the specified window. if the window is not found in the notebook, wxnot_found is returned.
wxauinotebook::getpagetextwxstring getpagetext(size_t page) const returns the tab label for the page.
wxauinotebook::getselectionint getselection() const returns the currently selected page.
wxauinotebook::gettabctrlheightint gettabctrlheight() const returns the height of the tab control.
wxauinotebook::insertpagebool insertpage(size_t page_idx, wxwindow* page, const wxstring& caption, bool select = false, const wxbitmap& bitmap = wxnullbitmap) insertpage() is similar to addpage, but allows the ability to specify the insert location. if the select parameter is true, calling this will generate a page change event.
wxauinotebook::removepagebool removepage(size_t page) removes a page, without deleting the window pointer.
wxauinotebook::setartprovidervoid setartprovider(wxauitabart* art) sets the art provider to be used by the notebook.
wxauinotebook::setfontbool setfont(const wxfont& font) sets the font for drawing the tab labels, using a bold version of the font for selected tab labels.
wxauinotebook::setnormalfontvoid setnormalfont(const wxfont& font) sets the font for drawing unselected tab labels.
wxauinotebook::setselectedfontvoid setselectedfont(const wxfont& font) sets the font for drawing selected tab labels.
wxauinotebook::setmeasuringfontvoid setmeasuringfont(const wxfont& font) sets the font for measuring tab labels.
wxauinotebook::setpagebitmapbool setpagebitmap(size_t page, const wxbitmap& bitmap) sets the bitmap for the page. to remove a bitmap from the tab caption, pass wxnullbitmap.
wxauinotebook::setpagetextbool setpagetext(size_t page, const wxstring& text) sets the tab label for the page.
wxauinotebook::setselectionsize_t setselection(size_t new_page) sets the page selection. calling this method will generate a page change event.
wxauinotebook::settabctrlheightvoid settabctrlheight(int height) sets the tab height. by default, the tab control height is calculated by measuring the text height and bitmap sizes on the tab captions. calling this method will override that calculation and set the tab control to the specified height parameter. a call to this method will override any call to setuniformbitmapsize(). specifying -1 as the height will return the control to its default auto-sizing behaviour.
wxauinotebook::setuniformbitmapsizevoid setuniformbitmapsize(const wxsize& size) setuniformbitmapsize() ensures that all tabs will have the same height, even if some tabs don't have bitmaps. passing wxdefaultsize to this function will instruct the control to use dynamic tab height, which is the default behaviour. under the default behaviour, when a tab with a large bitmap is added, the tab control's height will automatically increase to accommodate the larger bitmap. void split(size_t page, int direction) split performs a split operation programmatically. the argument page indicates the page that will be split off. this page will also become the active page after the split. the direction argument specifies where the pane should go, it should be one of the following: wxtop, wxbottom, wxleft, or wxright.
wxauinotebook::showwindowmenubool showwindowmenu() shows the window menu for the active tab control associated with this notebook, and returns true if a selection was made.
|