µGFX  2.9
version 2.9
Tabset

Detailed Description

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

Data Structures

struct  GEventGWinTabset
 A Tabset Event. More...
 

Modules

 Renderings
 Built-in rendering functions for the tabset widget.
 

Functions

GHandle gwinGTabsetCreate (GDisplay *g, GTabsetObject *fo, GWidgetInit *pInit, gU32 flags)
 Create a tabset widget. More...
 
GHandle gwinTabsetAddTab (GHandle gh, const char *title, gBool useAlloc)
 Add a tab-page to the tabset. More...
 
int gwinTabsetCountTabs (GHandle gh)
 Count the number of tabs in the tabset. More...
 
GHandle gwinTabsetGetTabByIndex (GHandle gh, int index)
 Get the GHandle of a tab based on its position. More...
 
GHandle gwinTabsetGetTabByTitle (GHandle gh, const char *title)
 Get the GHandle of a tab based on its title. More...
 
void gwinTabsetSetTitle (GHandle gh, const char *title, gBool useAlloc)
 Set the title of a tab-page. More...
 
void gwinTabsetSetTab (GHandle gh)
 Set the active tab in a tabset. More...
 
#define GWIN_TABSET_BORDER   0x00000001
 Flags for gwinTabsetCreate() More...
 

Macros

#define GEVENT_GWIN_TABSET   (GEVENT_GWIN_CTRL_FIRST+5)
 The Event Type for a Tabset Event. More...
 
#define gwinTabsetDeleteTab(gh)   gwinDestroy(gh)
 Delete a tab-page. More...
 
#define gwinTabsetGetTitle(gh)   gwinGetText(gh)
 Get the title of a tab-page. More...
 

Typedefs

typedef struct GEventGWinTabset GEventGWinTabset
 A Tabset Event. More...
 

Function Documentation

◆ gwinGTabsetCreate()

GHandle gwinGTabsetCreate ( GDisplay *  g,
GTabsetObject *  fo,
GWidgetInit pInit,
gU32  flags 
)

Create a tabset widget.

This widget provides a set of tabs.

Parameters
[in]gThe GDisplay to display this window on
[in]foThe GTabsetObject structure to initialize. If this is NULL the structure is dynamically allocated.
[in]pInitThe initialization parameters
[in]flagsSome 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]ghThe tabset handle
[in]titleThe text to set. This must be a constant string unless useAlloc is set.
[in]useAllocIf 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
[in]ghThe tabset handle
Function Class: Normal API, this function can be invoked by regular system threads.

◆ gwinTabsetGetTabByIndex()

GHandle gwinTabsetGetTabByIndex ( GHandle  gh,
int  index 
)

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]ghThe tabset handle
[in]indexThe 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()

GHandle gwinTabsetGetTabByTitle ( GHandle  gh,
const char *  title 
)

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]ghThe tabset handle
[in]titleThe 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]ghThe 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]ghThe tab-page handle (NB: Use the page handle NOT the tabset handle)
[in]titleThe text to set. This must be a constant string unless useAlloc is set.
[in]useAllocIf 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.

Macro Definition Documentation

◆ 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

Flags for gwinTabsetCreate()

Definition at line 55 of file gwin_tabset.h.

◆ gwinTabsetDeleteTab

#define gwinTabsetDeleteTab (   gh)    gwinDestroy(gh)

Delete a tab-page.

Any widgets on the page will also be destroyed

Parameters
[in]ghThe 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

#define gwinTabsetGetTitle (   gh)    gwinGetText(gh)

Get the title of a tab-page.

Returns
The title of the tab.
Parameters
[in]ghThe 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.

Typedef Documentation

◆ GEventGWinTabset

A Tabset Event.

Note
There are currently no GEventGWinTabset listening flags - use 0 as the flags to gwinAttachListener()