wxErlang

Reference Manual

Version 2.1

Table of Contents

wxAuiNotebook

Module

wxAuiNotebook

Module Summary

Functions for wxAuiNotebook class

Description

wxAuiNotebook is part of the wxAUI class framework, which represents a notebook control, managing multiple windows with associated tabs.

See also overview_aui.

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.

The default theme that is used is wxAuiDefaultTabArt (not implemented in wx), which provides a modern, glossy look and feel. The theme can be changed by calling setArtProvider/2.

Styles

This class supports the following styles:

This class is derived (and can use functions) from: wxControl wxWindow wxEvtHandler

wxWidgets docs: wxAuiNotebook

new() -> wxAuiNotebook()

Default ctor.

new(Parent) -> wxAuiNotebook()

Types

new(Parent, Options :: [Option]) -> wxAuiNotebook()

Types

Option =
    {id, integer()} |
    {pos, {X :: integer(), Y :: integer()}} |
    {size, {W :: integer(), H :: integer()}} |
    {style, integer()}

Constructor.

Creates a wxAuiNotebok control.

addPage(This, Page, Caption) -> boolean()
addPage(This, Page, Caption, Options :: [Option]) -> boolean()

Types

Option = {select, boolean()} | {bitmap, wxBitmap:wxBitmap()}

Adds a page.

If the select parameter is true, calling this will generate a page change event.

addPage(This, Page, Text, Select, ImageId) -> boolean()

Types

Select = boolean()
ImageId = integer()

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.

Return: true if successful, false otherwise.

Remark: Do not delete the page, it will be deleted by the book control.

See: insertPage/6

Since: 2.9.3

create(This, Parent) -> boolean()

Types

create(This, Parent, Winid) -> boolean()
create(This, Parent, Winid :: [Option]) -> boolean()

Types

Option =
    {id, integer()} |
    {pos, {X :: integer(), Y :: integer()}} |
    {size, {W :: integer(), H :: integer()}} |
    {style, integer()}

Creates the notebook window.

create(This, Parent, Winid, Options :: [Option]) -> boolean()

Types

Winid = integer()
Option =
    {pos, {X :: integer(), Y :: integer()}} |
    {size, {W :: integer(), H :: integer()}} |
    {style, integer()}

Constructs the book control with the given parameters.

deletePage(This, Page) -> boolean()

Types

Page = integer()

Deletes a page at the given index.

Calling this method will generate a page change event.

getArtProvider(This) -> wxAuiTabArt:wxAuiTabArt()

Types

Returns the associated art provider.

getPage(This, Page_idx) -> wxWindow:wxWindow()

Types

Page_idx = integer()

Returns the page specified by the given index.

getPageBitmap(This, Page) -> wxBitmap:wxBitmap()

Types

Page = integer()

Returns the tab bitmap for the page.

getPageCount(This) -> integer()

Types

Returns the number of pages in the notebook.

getPageIndex(This, Page_wnd) -> integer()

Types

Returns the page index for the specified window.

If the window is not found in the notebook, wxNOT_FOUND is returned.

getPageText(This, Page) -> unicode:charlist()

Types

Page = integer()

Returns the tab label for the page.

getSelection(This) -> integer()

Types

Returns the currently selected page.

insertPage(This, Page_idx, Page, Caption) -> boolean()

Types

Page_idx = integer()
insertPage(This, Page_idx, Page, Caption, Options :: [Option]) ->
              boolean()

Types

Page_idx = integer()
Option = {select, boolean()} | {bitmap, wxBitmap:wxBitmap()}

insertPage/6 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.

insertPage(This, Index, Page, Text, Select, ImageId) -> boolean()

Types

Index = integer()
Select = boolean()
ImageId = integer()

Inserts a new page at the specified position.

Return: true if successful, false otherwise.

Remark: Do not delete the page, it will be deleted by the book control.

See: addPage/5

Since: 2.9.3

removePage(This, Page) -> boolean()

Types

Page = integer()

Removes a page, without deleting the window pointer.

setArtProvider(This, Art) -> ok

Sets the art provider to be used by the notebook.

setFont(This, Font) -> boolean()

Types

Sets the font for drawing the tab labels, using a bold version of the font for selected tab labels.

setPageBitmap(This, Page, Bitmap) -> boolean()

Types

Page = integer()

Sets the bitmap for the page.

To remove a bitmap from the tab caption, pass wxNullBitmap.

setPageText(This, Page, Text) -> boolean()

Types

Page = integer()

Sets the tab label for the page.

setSelection(This, New_page) -> integer()

Types

New_page = integer()

Sets the page selection.

Calling this method will generate a page change event.

setTabCtrlHeight(This, Height) -> ok

Types

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. A call to this method will override any call to setUniformBitmapSize/2.

Specifying -1 as the height will return the control to its default auto-sizing behaviour.

setUniformBitmapSize(This, Size) -> ok

Types

Size = {W :: integer(), H :: integer()}

Ensure that all tabs have the same height, even if some of them don't have bitmaps.

Passing ?wxDefaultSize as size undoes the effect of a previous call to this function and instructs the control to use dynamic tab height.

destroy(This :: wxAuiNotebook()) -> ok

Destroys the object.