MoSync 3.3
Tab screen

Defines

#define MAW_TAB_SCREEN_TITLE   "title"
#define MAW_TAB_SCREEN_ICON   "icon"
#define MAW_TAB_SCREEN_CURRENT_TAB   "currentTab"
 Sets or gets the currently open tab to the tab with the given index.
#define MAW_TAB_SCREEN_IS_SHOWN   "isShown"
 Check if a tab screen is shown.

Detailed Description

The available widget properties for a MAW_TAB_SCREEN. See Widget properties for more properties.


Define Documentation

#define MAW_TAB_SCREEN_TITLE   "title"

Sets the title of a screen. The screen title is used by tab screen to display a text on the tab indicator.

Valid values
Null terminated string. The length of the string should be short enough to fit in a tab indicator.
Operations
Set only.
Example
        maWidgetSetProperty(screenHandle, MAW_SCREEN_TITLE, "My title");
#define MAW_TAB_SCREEN_ICON   "icon"

Sets an icon for a screen. The icon is used by a tab screen to display an icon on the tab indicator.

Valid values
MoSync handle to an uncompressed image resource. The size of the image should be small enough to fit in a tab indicator.
Operations
Set only.
Example
        maWidgetSetProperty(screenHandle, MAW_SCREEN_ICON, toString(R_MY_ICON));
#define MAW_TAB_SCREEN_CURRENT_TAB   "currentTab"

Sets or gets the currently open tab to the tab with the given index.

Valid values
A 0-indexed tab number.
Operations
Set and get.
Example set
Example get
        char currentTabBuffer[BUFFER_SIZE];
        int result = maWidgetGetProperty(
        tabScreenHandle,
        MAW_WEB_VIEW_CURRENT_TAB,
        currentTabBuffer,
        BUFFER_SIZE);
        if (result > 0)
        {
        // Do something with current tab.
        }
#define MAW_TAB_SCREEN_IS_SHOWN   "isShown"

Check if a tab screen is shown.

Valid values
"true" if the tab screen is visible, "false" otherwise.
Operations
Get only.
Example
        char buffer[BUFFER_SIZE];
        int result = maWidgetGetProperty(tabScreenHandle, MAW_TAB_SCREEN_IS_SHOWN,
                                    buffer, BUFFER_SIZE);
        if(result == MAW_RES_OK && strcmp(buffer, "true") == 0)
        {
        // Tab screen is visible.
        }
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines