Tabwidget to implement different "Tabs" or "Pages". Used to structure menus.
A tabset is a set of tabs that control visibility of a number of pages of widgets. Note: Although the tabset is implemented as a container - you don't put your controls directly on the tabset. Instead you create a page and put your widgets on the page.
- Precondition
- GFX_USE_GWIN must be set to GFXON in your gfxconf.h
-
GWIN_NEED_TABSET must be set to GFXON in your gfxconf.h
|
| Renderings |
| Built-in rendering functions for the tabset widget.
|
|
◆ gwinGTabsetCreate()
GHandle gwinGTabsetCreate |
( |
GDisplay * |
g, |
|
|
GTabsetObject * |
fo, |
|
|
GWidgetInit * |
pInit, |
|
|
gU32 |
flags |
|
) |
| |
Create a tabset widget.
This widget provides a set of tabs.
- Parameters
-
[in] | g | The GDisplay to display this window on |
[in] | fo | The GTabsetObject structure to initialize. If this is NULL the structure is dynamically allocated. |
[in] | pInit | The initialization parameters |
[in] | flags | Some flags, see notes. |
- Note
- Possible flags are: GWIN_TABSET_BORDER
- Returns
- NULL if there is no resulting widget. A valid GHandle otherwise.
- Function Class: Normal API, this function can be invoked by regular system threads.
◆ gwinTabsetAddTab()
GHandle gwinTabsetAddTab |
( |
GHandle |
gh, |
|
|
const char * |
title, |
|
|
gBool |
useAlloc |
|
) |
| |
Add a tab-page to the tabset.
- Returns
- The GHandle of the tab-page container.
- Parameters
-
[in] | gh | The tabset handle |
[in] | title | The text to set. This must be a constant string unless useAlloc is set. |
[in] | useAlloc | If gTrue the string specified will be copied into dynamically allocated memory. |
- Function Class: Normal API, this function can be invoked by regular system threads.
◆ gwinTabsetCountTabs()
int gwinTabsetCountTabs |
( |
GHandle |
gh | ) |
|
Count the number of tabs in the tabset.
- Returns
- The number of tabs or zero if none exist.
- Parameters
-
- Function Class: Normal API, this function can be invoked by regular system threads.
◆ gwinTabsetGetTabByIndex()
Get the GHandle of a tab based on its position.
- Returns
- The GHandle of the tab-page container or NULL if that tab-page doesn't exist.
- Parameters
-
[in] | gh | The tabset handle |
[in] | index | The tab-page handle to return (0 to number of pages - 1) |
- Function Class: Normal API, this function can be invoked by regular system threads.
◆ gwinTabsetGetTabByTitle()
Get the GHandle of a tab based on its title.
- Returns
- The GHandle of the tab-page container or NULL if that tab-page doesn't exist.
- Parameters
-
[in] | gh | The tabset handle |
[in] | title | The title to search for |
- Function Class: Normal API, this function can be invoked by regular system threads.
◆ gwinTabsetSetTab()
void gwinTabsetSetTab |
( |
GHandle |
gh | ) |
|
Set the active tab in a tabset.
- Parameters
-
[in] | gh | The tab-page handle (NB: Use the page handle NOT the tabset handle) |
- Function Class: Normal API, this function can be invoked by regular system threads.
◆ gwinTabsetSetTitle()
void gwinTabsetSetTitle |
( |
GHandle |
gh, |
|
|
const char * |
title, |
|
|
gBool |
useAlloc |
|
) |
| |
Set the title of a tab-page.
- Parameters
-
[in] | gh | The tab-page handle (NB: Use the page handle NOT the tabset handle) |
[in] | title | The text to set. This must be a constant string unless useAlloc is set. |
[in] | useAlloc | If gTrue the string specified will be copied into dynamically allocated memory. |
- Note
- This function should be used to change the text associated with a tab-page rather than
gwinSetText()
.
- Function Class: Normal API, this function can be invoked by regular system threads.
◆ GEVENT_GWIN_TABSET
#define GEVENT_GWIN_TABSET (GEVENT_GWIN_CTRL_FIRST+5) |
The Event Type for a Tabset Event.
Definition at line 34 of file gwin_tabset.h.
◆ GWIN_TABSET_BORDER
#define GWIN_TABSET_BORDER 0x00000001 |
◆ gwinTabsetDeleteTab
Delete a tab-page.
Any widgets on the page will also be destroyed
- Parameters
-
[in] | gh | The tab-page handle |
- Note
- The index position of all tabs after this tab in the tabset are automatically renumbered.
- Function Class: Normal API, this function can be invoked by regular system threads.
Definition at line 104 of file gwin_tabset.h.
◆ gwinTabsetGetTitle
Get the title of a tab-page.
- Returns
- The title of the tab.
- Parameters
-
[in] | gh | The tab-page handle (NB: Use the page handle NOT the tabset handle) |
- Function Class: Normal API, this function can be invoked by regular system threads.
Definition at line 160 of file gwin_tabset.h.
◆ GEventGWinTabset