wxNotebook(3erl)
π wxNotebook π
okay so this is the wxNotebook page from the Erlang Module Definition gang, manual name wxNotebook(3erl), and bestie we are gonna make it make sense. β¨
π NAME π
wxNotebook β Functions for wxNotebook class. no cap. π
β¨ DESCRIPTION β¨
This class represents a notebook control, which manages multiple windows with associated tabs. Itβs giving βtabs but make it a whole window manager vibe.β π¦
To use the class, create a wxNotebook object and call wxBookCtrlBase:addPage/4 or wxBookCtrlBase:insertPage/5, passing a window to be used as the page.
Do not explicitly delete the window for a page that is currently managed by wxNotebook. Thatβs the warning bestie, do not do it. π
wxNotebookPage is a typedef for wxWindow. periodt. π
π Styles π
This class supports the following styles:
π¨ Page backgrounds π¨
On Windows, the default theme paints a background on the notebook's pages. If you wish to suppress this theme, for aesthetic or performance reasons, there are three ways of doing it. You can use wxNB_NOPAGETHEME to disable themed drawing for a particular notebook, you can call wxSystemOptions:setOption/2 to disable it for the whole application, or you can disable it for individual pages by using wxWindow:setBackgroundColour/2. Three paths, all iconic. π
To disable themed pages globally:
Set the value to 1 to enable it again. To give a single page a solid background that more or less fits in with the overall theme, use:
On platforms other than Windows, or if the application is not using Windows themes, getThemeBackgroundColour/1 will return an uninitialised colour object, and the above code will therefore work on all platforms. slay for portability. π
See: ?wxBookCtrl, wxBookCtrlEvent, wxImageList, Examples.
This class is derived (and can use functions) from: wxBookCtrlBase wxControl wxWindow wxEvtHandler.
wxWidgets docs: wxNotebook.
π₯ EVENTS π₯
Event types emitted from this class: command_notebook_page_changed, command_notebook_page_changing. The group chat is literally these two events. π¬
π§ DATA TYPES π§
wxNotebook() = wx:wx_object()
π EXPORTS π
new() -> wxNotebook()
Constructs a notebook control. babyβs first notebook. πΌ
new(Parent, Id) -> wxNotebook()
Types:
Parent = wxWindow:wxWindow()
Id = integer()
new(Parent, Id, Options :: [Option]) -> wxNotebook()
Types:
Parent = wxWindow:wxWindow()
Id = integer()
Option =
{pos, {X :: integer(), Y :: integer()}} |
{size, {W :: integer(), H :: integer()}} |
{style, integer()}
Constructs a notebook control.
Note that sometimes you can reduce flicker by passing the wxCLIP_CHILDREN window style. lowkey useful. β¨
destroy(This :: wxNotebook()) -> ok
Destroys the wxNotebook object. bye bestie. π
assignImageList(This, ImageList) -> ok
Types:
This = wxNotebook()
ImageList = wxImageList:wxImageList()
Sets the image list for the page control and takes ownership of the list.
See: wxImageList, setImageList/2.
create(This, Parent, Id) -> boolean()
Types:
This = wxNotebook()
Parent = wxWindow:wxWindow()
Id = integer()
create(This, Parent, Id, Options :: [Option]) -> boolean()
Types:
This = wxNotebook()
Parent = wxWindow:wxWindow()
Id = integer()
Option =
{pos, {X :: integer(), Y :: integer()}} |
{size, {W :: integer(), H :: integer()}} |
{style, integer()}
Creates a notebook control.
See new/3 for a description of the parameters.
getImageList(This) -> wxImageList:wxImageList()
Types:
This = wxNotebook()
Returns the associated image list, may be NULL.
See: wxImageList, setImageList/2.
getPageImage(This, NPage) -> integer()
Types:
This = wxNotebook()
NPage = integer()
Returns the image index for the given page.
getRowCount(This) -> integer()
Types:
This = wxNotebook()
Returns the number of rows in the notebook control.
getThemeBackgroundColour(This) -> wx:wx_colour4()
Types:
This = wxNotebook()
If running under Windows and themes are enabled for the application, this function returns a suitable colour for painting the background of a notebook page, and can be passed to wxWindow:setBackgroundColour/2.
Otherwise, an uninitialised colour will be returned. no cap. π¨
setImageList(This, ImageList) -> ok
Types:
This = wxNotebook()
ImageList = wxImageList:wxImageList()
Sets the image list to use.
It does not take ownership of the image list, you must delete it yourself. important bestie. π«Ά
See: wxImageList, assignImageList/2.
setPadding(This, Padding) -> ok
Types:
This = wxNotebook()
Padding = {W :: integer(), H :: integer()}
Sets the amount of space around each page's icon and label, in pixels.
Note: The vertical padding cannot be changed in wxGTK. wxGTK said βnot todayβ to vertical padding. π
setPageSize(This, Size) -> ok
Types:
This = wxNotebook()
Size = {W :: integer(), H :: integer()}
Sets the width and height of the pages.
Note: This method is currently not implemented for wxGTK. wxGTK is really going through something here. π
setPageImage(This, Page, Image) -> boolean()
Types:
This = wxNotebook()
Page = Image = integer()
Sets the image index for the given page.
image is an index into the image list which was set with setImageList/2. iykyk. πΌοΈ
okay bestie, thatβs the whole wxNotebook(3erl) page! π source/version: wxWidgets team, wx 2.2.2.1; date: the footer doesnβt show a separate date, so no made-up numbers β periodt. π«Ά
π¦ where this page comes from
- ubuntu noble: erlang-manpages 1:25.3.2.8+dfsg-1ubuntu4 Β· Apache-2.0
- ubuntu noble: erlang-manpages 1:25.3.2.8+dfsg-1ubuntu4.8 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms