This class represents a notebook control, which manages multiple windows
with associated tabs.
To use the class, create a Notebook object and call
add_page or insert_page,
passing a window to be used as the page. Do not explicitly delete the
window for a page that is currently managed by Notebook.
NB_TOP |
Place tabs on the top side. |
NB_LEFT |
Place tabs on the left side. |
NB_RIGHT |
Place tabs on the right side. |
NB_BOTTOM |
Place tabs under instead of above the notebook pages. |
NB_FIXEDWIDTH |
(Windows only) All tabs will have same width. |
NB_MULTILINE |
(Windows only) There can be several rows of tabs. |
NB_NOPAGETHEME |
(Windows only) Display a solid colour on notebook pages, and not a gradient, which can reduce performance. |
NB_FLAT |
(Windows CE only) Show tabs in a flat style. |
The styles NB_LEFT
, RIGHT
and BOTTOM
are not
supported under Microsoft Windows XP when using visual themes.
See also window styles overview.
BookCtrl, NotebookEvent, ImageList, notebook sample
Constructs a notebook control.
Note that sometimes you can reduce flicker by passing the CLIP_CHILDREN window style.
Destroys the Notebook object.
Adds a new page.
The call to this function may generate the page changing events.
true if successful, false otherwise.
Do not delete the page, it will be deleted by the notebook.
Cycles through the tabs.
The call to this function generates the page changing events.
Creates a notebook control. See Notebook.new for a description
of the parameters.
Deletes all pages.
Deletes the specified page, and the associated window.
The call to this function generates the page changing events.
Iterates over all the pages in the notebook, from first to last, passing
them into the associated block as a Window object.
Returns the currently selected notebook age or NULL
.
Returns the associated image list.
ImageList, Notebook#set_image_list
Returns the window at the given page position.
Returns the number of pages in the notebook control.
Returns the image index for the given page.
Returns the string for the given page.
Returns the number of rows in the notebook control.
Returns the currently selected page, or $-1$ if none was selected.
Note that this method may return either the previously or newly selected page
when called from the EVT_NOTEBOOK_PAGE_CHANGED
handler depending on
the platform and so NotebookEvent#get_selection should be
used instead in this case.
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 SetBackgroundColour
. Otherwise, an uninitialised colour will be returned.
NULL
)
Returns the index of the tab at the specified position or NOT_FOUND
if none. If flags parameter is non NULL
, the position of the point
inside the tab is returned as well.
*NB: * This method is currently only implemented under MSW and Univ.
NB_HITTEST_NOWHERE | There was no tab under this point. |
NB_HITTEST_ONICON | The point was over an icon (currently MSW only). |
NB_HITTEST_ONLABEL | The point was over a label (currently MSW only). |
NB_HITTEST_ONITEM | The point was over an item, but not on the label or icon. |
Returns the zero-based tab index or NOT_FOUND
if there is no tab is at
the specified position.
Inserts a new page at the specified position.
true if successful, false otherwise.
Do not delete the page, it will be deleted by the notebook.
An event handler function, called when the page selection is changed.
Deletes the specified page, without deleting the associated window.
Sets the image list which can be used to supply icons
for each tab within the notebook.
Once an image list has been assigned to a Notebook, it “belongs” to the
Notebook, and should not be set as the image list for another Notebook
or other control.
Sets the amount of space around each page’s icon and label, in pixels.
NB: The vertical padding cannot be changed in GTK.
Sets the width and height of the pages.
NB: This method is currently not implemented for GTK.
Sets the image index for the given page. image is an index into
the image list which was set with Notebook#set_image_list.
Sets the text for the given page.
Sets the selection for the given page, returning the previous selection.
The call to this function generates the page changing events.
[This page automatically generated from the Textile source at 2023-06-09 00:45:26 +0000]