SYNOPSIS
|
DESCRIPTION
![]() |
INHERITANCE HIERARCHY
AG_Object(3)-> AG_Widget(3)-> AG_Notebook. |
INITIALIZATION
The AG_NotebookNew() function allocates, initializes, and attaches a new AG_Notebook widget. Acceptable flags include:
AG_NotebookSetPadding() and AG_NotebookSetSpacing() sets the default AG_Box(3) padding and spacing to use for new tabs. By default, tabs are drawn at the top of the widget. AG_NotebookSetTabAlignment() changes the location of the tabs, where the argument is one of:
AG_NotebookSetTabVisibility() toggles the visibility of the tab header. |
TAB MANAGEMENT
AG_NotebookAdd() creates a new tabbed container. name is an arbitrary text label to be displayed on the tab header. The type argument sets the type of AG_Box(3), that is either for AG_BOX_HORIZ horizontal packing, or AG_BOX_VERT for vertical packing (see AG_Box(3) for details). AG_NotebookAdd() returns a pointer to the newly created AG_NotebookTab container widget (a subclass of AG_Box(3)). AG_NotebookDel() removes the given tabbed container, detaching and freeing all associated child widgets. AG_NotebookGetByID() returns the tab with given numerical ID (or NULL). AG_NotebookGetByName() looks up a tab based on the contents of its text label and returns a pointer to the tab (or NULL). The AG_NotebookSelect() function selects the active tabbed container. AG_NotebookSelectByID() selects the container by numerical ID. |
EVENTS
The AG_Notebook widget does not generate any event. |
STRUCTURE DATA
For the
AG_Notebook object:
For the AG_NotebookTab object:
|
EXAMPLES
The following code fragment creates a notebook with two tabs:
|
SEE ALSO
AG_Intro(3), AG_Widget(3), AG_Window(3) |
HISTORY
The AG_Notebook widget first appeared in Agar 1.0. AG_NotebookGetByID() and AG_NotebookSelectByID() appeared in Agar 1.6.0. |