wxAuiNotebook(3)
okay bestie, welcome to wxAuiNotebook(3) β the Erlang Module Definition β and yes, this is part 1. π We're talking the wxAUI notebook control, and it's lowkey iconic.
πΈ NAME πΈ
wxAuiNotebookβ this is part of the wxAUI class framework, and it's literally a notebook control that manages multiple windows with associated tabs. no cap. π«Ά
β¨ DESCRIPTION β¨
See also overview_aui.
wxAuiNotebook is a notebook control that implements many features common in applications with dockable panes. Specifically, it implements functionality that lets the user 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. periodt. β¨
The default theme is wxAuiDefaultTabArt (not implemented in wx), and it's giving modern, glossy look and feel. You can change the theme by calling setArtProvider/2. π
π Styles π
bestie, this class supports the following styles β collect them all:
wxAUI_NB_DEFAULT_STYLEβ it's defined aswxAUI_NB_TOP | wxAUI_NB_TAB_SPLIT | wxAUI_NB_TAB_MOVE | wxAUI_NB_SCROLL_BUTTONS | wxAUI_NB_CLOSE_ON_ACTIVE_TAB | wxAUI_NB_MIDDLE_CLICK_CLOSE.wxAUI_NB_TAB_SPLITβ allows the tab control to be split by dragging a tab.wxAUI_NB_TAB_MOVEβ allows a tab to be moved horizontally by dragging.wxAUI_NB_TAB_EXTERNAL_MOVEβ allows a tab to be moved to another tab control.wxAUI_NB_TAB_FIXED_WIDTHβ with this style, all tabs have the same width.wxAUI_NB_SCROLL_BUTTONSβ with this style, left and right scroll buttons are displayed.wxAUI_NB_WINDOWLIST_BUTTONβ with this style, a drop-down list of windows is available.wxAUI_NB_CLOSE_BUTTONβ with this style, a close button is available on the tab bar.wxAUI_NB_CLOSE_ON_ACTIVE_TABβ with this style, the close button is visible on the active tab.wxAUI_NB_CLOSE_ON_ALL_TABSβ with this style, the close button is visible on all tabs.wxAUI_NB_MIDDLE_CLICK_CLOSEβ with this style, middle click on a tab closes the tab.wxAUI_NB_TOPβ with this style, tabs are drawn along the top of the notebook.wxAUI_NB_BOTTOMβ with this style, tabs are drawn along the bottom of the notebook.
This class is derived, and can use functions, from:
wxControlwxWindowwxEvtHandler
wxWidgets docs: wxAuiNotebook
π Events π
event types emitted from this class are basically the group chat notifications:
command_auinotebook_page_closecommand_auinotebook_page_closedcommand_auinotebook_page_changedcommand_auinotebook_page_changingcommand_auinotebook_buttoncommand_auinotebook_begin_dragcommand_auinotebook_end_dragcommand_auinotebook_drag_motioncommand_auinotebook_allow_dndcommand_auinotebook_drag_donecommand_auinotebook_tab_middle_downcommand_auinotebook_tab_middle_upcommand_auinotebook_tab_right_downcommand_auinotebook_tab_right_upcommand_auinotebook_bg_dclick
π¦ DATA TYPES π¦
wxAuiNotebook() :: wx:wx_object().
β¨ FUNCTIONS β¨
πΈ addPage (the one with options) πΈ
addPage(This, Page, Caption, [Option]) -> boolean()
when
This :: wxAuiNotebook(),
Page :: wxWindow:wxWindow(),
Caption :: unicode:chardata(),
Option ::
{select, boolean()} |
{bitmap, wxBitmap:wxBitmap()}.
okay so bestie, this one adds a page π. and if you set the select parameter to true, calling this will literally generate a page change event. iykyk.
π¦ addPage (the full five-argument vibe) π¦
addPage(This, Page, Text, Select, ImageId) -> boolean()
when
This :: wxAuiNotebook(),
Page :: wxWindow:wxWindow(),
Text :: unicode:chardata(),
Select :: boolean(),
ImageId :: integer().
okay so this one adds a new page π. major key: the page must have the book control itself as the parent, and it must not have been added to this control previously. no cap. also, calling this function may generate the page changing events π.
return: true if it slays, false otherwise. periodt.
remark: do not delete the page β it will be deleted by the book control. so like, hands off bestie π.
see: insertPage/6
since: 2.9.3 β¨
π create (the one with two clauses) π
create(This, Parent, Winid) -> boolean()
when
This :: wxAuiNotebook(),
Parent :: wxWindow:wxWindow(),
Winid :: integer();
(This, Parent, [Option]) -> boolean()
when
This :: wxAuiNotebook(),
Parent :: wxWindow:wxWindow(),
Option ::
{id, integer()} |
{pos, {X :: integer(), Y :: integer()}} |
{size, {W :: integer(), H :: integer()}} |
{style, integer()}.
creates the notebook window π . that's it. that's the tweet.
π create (the four-argument glow-up) π
create(This, Parent, Winid, [Option]) -> boolean()
when
This :: wxAuiNotebook(),
Parent :: wxWindow:wxWindow(),
Winid :: integer(),
Option ::
{pos, {X :: integer(), Y :: integer()}} |
{size, {W :: integer(), H :: integer()}} |
{style, integer()}.
constructs the book control with the given parameters β¨. iconic.
π deletePage π
deletePage(This, Page) -> boolean()
when This :: wxAuiNotebook(), Page :: integer().
deletes a page at the given index π₯. and heads up: calling this method will generate a page change event. so be ready.
π«Ά destroy π«Ά
destroy(This :: wxAuiNotebook()) -> ok.
destroys the object π₯. bye bestie.
π getArtProvider π
getArtProvider(This) -> wxAuiTabArt:wxAuiTabArt()
when This :: wxAuiNotebook().
returns the associated art provider π¨. giving main character energy.
π getPage π
getPage(This, Page_idx) -> wxWindow:wxWindow()
when This :: wxAuiNotebook(), Page_idx :: integer().
returns the page specified by the given index π. got it.
β¨ getPageBitmap β¨
getPageBitmap(This, Page) -> wxBitmap:wxBitmap()
when This :: wxAuiNotebook(), Page :: integer().
returns the tab bitmap for the page πΌοΈ. cute.
π getPageCount π
getPageCount(This) -> integer() when This :: wxAuiNotebook().
returns the number of pages in the notebook π’. periodt.
πΈ getPageIndex πΈ
getPageIndex(This, Page_wnd) -> integer()
when
This :: wxAuiNotebook(),
Page_wnd :: wxWindow:wxWindow().
returns the page index for the specified window πͺ. and if the window is not found in the notebook, wxNOT_FOUND is returned. so watch out for that π.
π getPageText π
getPageText(This, Page) -> unicode:charlist()
when This :: wxAuiNotebook(), Page :: integer().
returns the tab label for the page π·οΈ. slay.
π₯ getSelection π₯
getSelection(This) -> integer() when This :: wxAuiNotebook().
returns the currently selected page π―. hot.
π¦ insertPage (the option-list version) π¦
insertPage(This, Page_idx, Page, Caption, [Option]) -> boolean()
when
This :: wxAuiNotebook(),
Page_idx :: integer(),
Page :: wxWindow:wxWindow(),
Caption :: unicode:chardata(),
Option ::
{select, boolean()} |
{bitmap, wxBitmap:wxBitmap()}.
insertPage/6 is similar to AddPage, but it allows the ability to specify the insert location π. and if the select parameter is true, calling this will generate a page change event. no cap.
π insertPage (the full six-argument version) π
insertPage(This, Index, Page, Text, Select, ImageId) -> boolean()
when
This :: wxAuiNotebook(),
Index :: integer(),
Page :: wxWindow:wxWindow(),
Text :: unicode:chardata(),
Select :: boolean(),
ImageId :: integer().
inserts a new page at the specified position π.
return: true if it works, false otherwise.
remark: do not delete the page β it will be deleted by the book control. so like, don't even think about it π.
see: addPage/5
since: 2.9.3 β¨
π new (no args) π
new() -> wxAuiNotebook().
default ctor π. simple. clean.
π¦ new (with Parent and options) π¦
new(Parent, [Option]) -> wxAuiNotebook()
when
Parent :: wxWindow:wxWindow(),
Option ::
{id, integer()} |
{pos, {X :: integer(), Y :: integer()}} |
{size, {W :: integer(), H :: integer()}} |
{style, integer()}.
constructor π οΈ. creates a wxAuiNotebok control. (yes, it's spelled like that in the original, we don't make the rules π
).
π removePage π
removePage(This, Page) -> boolean()
when This :: wxAuiNotebook(), Page :: integer().
removes a page, without deleting the window pointer π«ποΈ. so like, it's still there, just not in the notebook. iykyk.
β¨ setArtProvider β¨
setArtProvider(This, Art) -> ok
when
This :: wxAuiNotebook(),
Art :: wxAuiTabArt:wxAuiTabArt().
sets the art provider to be used by the notebook π¨. giving it a whole new look.
πΈ setFont πΈ
setFont(This, Font) -> boolean()
when This :: wxAuiNotebook(), Font :: wxFont:wxFont().
sets the font for drawing the tab labels ποΈ, using a bold version of the font for selected tab labels. so selected tabs get that extra oomph πͺ.
π setPageBitmap π
setPageBitmap(This, Page, Bitmap) -> boolean()
when
This :: wxAuiNotebook(),
Page :: integer(),
Bitmap :: wxBitmap:wxBitmap().
sets the bitmap for the page πΌοΈ. and heads up: to remove a bitmap from the tab caption, pass wxNullBitmap. boom.
π setPageText π
setPageText(This, Page, Text) -> boolean()
when
This :: wxAuiNotebook(),
Page :: integer(),
Text :: unicode:chardata().
sets the tab label for the page π·οΈ. slay.
π₯ setSelection π₯
setSelection(This, New_page) -> integer()
when
This :: wxAuiNotebook(), New_page ::
integer().
sets the page selection π―. and calling this method will generate a page change event. you've been warned.
π setTabCtrlHeight π
setTabCtrlHeight(This, Height) -> ok
when
This :: wxAuiNotebook(),
Height :: integer().
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. and a call to this method will override any call to setUniformBitmapSize/2. big moves.
specifying -1 as the height will return the control to its default auto-sizing behaviour. so like, undo it.
π setUniformBitmapSize π
setUniformBitmapSize(This, Size) -> ok
when
This :: wxAuiNotebook(),
Size ::
{W :: integer(), H :: integer()}.
ensure that all tabs have the same height, even if some of them don't have bitmaps π. equality.
passing ?wxDefaultSize as Size undoes the effect of a previous call to this function and instructs the control to use dynamic tab height. so it's like a reset button π.
and that's a wrap, bestie π . this masterpiece was brought to you by Ericsson AB, running on wx 2.6, and it's the wxAuiNotebook(3) man page. no date in sight, just vibes. periodt. πβ¨
π¦ where this page comes from
- ubuntu stonking: erlang-doc 1:29.0.6+dfsg-1 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms