MoSync 3.3
Navigation Bar

Defines

#define MAW_NAV_BAR_TITLE   "title"
 Sets or gets the title.
#define MAW_NAV_BAR_ICON   "icon"
#define MAW_NAV_BAR_BACK_BTN   "backBtn"
 Sets the text for the back button. This can be set only when the navigation bar was attached to a screen that is not part of a stack screen. Note: this is available only on iOS. On Android the back behavior is handled by the device's back button.
#define MAW_NAV_BAR_TITLE_FONT_COLOR   "titleFontColor"
 Sets the font color of the title.
#define MAW_NAV_BAR_TITLE_FONT_SIZE   "titleFontSize"
 Sets the font size in points of the title.
#define MAW_NAV_BAR_TITLE_FONT_HANDLE   "titleFontHandle"
 Sets the typeface and style in which the title should be displayed.

Detailed Description

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


Define Documentation

#define MAW_NAV_BAR_TITLE   "title"

Sets or gets the title.

Valid values
A null-terminated string.
Operations
Set and get.
Example
        maWidgetSetProperty(navBarHandle, MAW_NAV_BAR_TITLE, "MyScreen");
#define MAW_NAV_BAR_ICON   "icon"

Sets the icon of the nav bar. This won't be scaled at all.

Valid values
MoSync handle to an uncompressed image resource. The size of the image should be small enough to fit in the nav bar.
Operations
Set only.
Example
        maWidgetSetProperty(navBarHandle, MAW_NAV_BAR_ICON, toString(R_MY_IMAGE));
#define MAW_NAV_BAR_BACK_BTN   "backBtn"

Sets the text for the back button. This can be set only when the navigation bar was attached to a screen that is not part of a stack screen. Note: this is available only on iOS. On Android the back behavior is handled by the device's back button.

Valid values
A null-terminated string.
Operations
Set and get.
Example
        maWidgetSetProperty(navBarHandle, MAW_NAV_BAR_BACK_BTN, "Home");
#define MAW_NAV_BAR_TITLE_FONT_COLOR   "titleFontColor"

Sets the font color of the title.

Valid values
A hexadecimal value 0xRRGGBB, where R, G and B are the red, green and blue components respectively.
Operations
Set only.
Example
#define MAW_NAV_BAR_TITLE_FONT_SIZE   "titleFontSize"

Sets the font size in points of the title.

Valid values
A float that specifies the number of pixels on Android and WP7, and number of points on iOS.
Operations
Set only.
Example
#define MAW_NAV_BAR_TITLE_FONT_HANDLE   "titleFontHandle"

Sets the typeface and style in which the title should be displayed.

Valid values
A font handle received from loading fonts using maFontGetName and maFontLoadWithName syscalls.
Operations
Set only.
Example
        int nrFonts = maFontGetCount();
         char buf[256];
         // Get first font name.
         maFontGetName(1, buf, 256);
         // Load that font for size 10.
         int fontHandle = maFontLoadWithName(buf, 10);
         // Set that font to the label.
        maWidgetSetProperty(navBarHandle, MAW_NAV_BAR_TITLE_FONT_HANDLE, toString(fontHandle));
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines