constants Namespace
The constants
namespace contains constants that are used by the Volt MX Iris API framework, the Volt MX Iris Widgets, and the Volt MX Iris Reference Architecture.
Alphabetical Listing of All Constants
Constant | Functional Area |
---|---|
constants.ACTION_ITEM_STYLE_CANCEL | Action Item Style Constants |
constants.ACTION_ITEM_STYLE_DEFAULT | Action Item Style Constants |
constants.ACTION_ITEM_STYLE_DESTRUCTIVE | Action Item Style Constants |
constants.ANCHOR_DIRECTION_BOTTOM | Action Sheet Anchor Direction Constants |
constants.ANCHOR_DIRECTION_LEFT | Action Sheet Anchor Direction Constants |
constants.ANCHOR_DIRECTION_RIGHT | Action Sheet Anchor Direction Constants |
constants.ANCHOR_DIRECTION_TOP | Action Sheet Anchor Direction Constants |
constants.AUTOMATIC | Tint Mode Constants |
constants.BAR_BUTTON_CUSTOM | ButtonBarItem Type Constants |
constants.BAR_BUTTON_IMAGE | ButtonBarItem Type Constants |
constants.BAR_BUTTON_SYSTEM_ITEM | ButtonBarItem Type Constants |
constants.BAR_BUTTON_TITLE | ButtonBarItem Type Constants |
constants.BAR_ITEM_STYLE_DONE | Bar Item Style Constants |
constants.BAR_ITEM_STYLE_PLAIN | Bar Item Style Constants |
constants.BAR_METRICS_COMPACT | Bar Metrics Constants |
constants.BAR_METRICS_DEFAULT | Bar Metrics Constants |
constants.BAR_STYLE_BLACK | Bar Style Constants |
constants.BAR_STYLE_DEFAULT | Bar Style Constants |
constants.BLUR_EFFECT_DARK | Blur Effect Constants |
constants.BLUR_EFFECT_EXTRALIGHT | Blur Effect Constants |
constants.BLUR_EFFECT_LIGHT | Blur Effect Constants |
constants.BLUR_EFFECT_NONE | Blur Effect Constants |
constants.BLUR_EFFECT_PROMINENT | Blur Effect Constants |
constants.BLUR_EFFECT_REGULAR | Blur Effect Constants |
constants.BREAKPOINT_MAX_VALUE | Breakpoint Constant |
constants.DIMMED | Toast Position Constants |
constants.TOAST_LENGTH_LONG | Toast Duration Constants |
constants.MULTIPLY | Toast Position Constants |
constants.NORMAL | Toast Position Constants |
constants.SCREEN | Toast Position Constants |
constants.TOAST_LENGTH_SHORT | Toast Duration Constants |
constants.SKIN_IMAGE_SCALE_MODE_DEFAULT | Skin Image Scale Mode Constants |
constants.SKIN_IMAGE_SCALE_MODE_FILL | Skin Image Scale Mode Constants |
constants.SKIN_IMAGE_SCALE_MODE_NONE | Skin Image Scale Mode Constants |
constants.SKIN_IMAGE_SCALE_MODE_UNIFORM | Skin Image Scale Mode Constants |
constants.SKIN_IMAGE_SCALE_MODE_UNIFORMTOFILL | Skin Image Scale Mode Constants |
constants.SRC_ATOP | Toast Position Constants |
constants.SRC_IN | Toast Position Constants |
constants.SRC_OVER | Toast Position Constants |
constants.SYSTEM_ITEM_ACTION | System Item Constants |
constants.SYSTEM_ITEM_ADD | System Item Constants |
constants.SYSTEM_ITEM_BOOKMARKS | System Item Constants |
constants.SYSTEM_ITEM_CAMERA | System Item Constants |
constants.SYSTEM_ITEM_CANCEL | System Item Constants |
constants.SYSTEM_ITEM_COMPOSE | System Item Constants |
constants.SYSTEM_ITEM_DONE | System Item Constants |
constants.SYSTEM_ITEM_EDIT | System Item Constants |
constants.SYSTEM_ITEM_FAST_FORWARD | System Item Constants |
constants.SYSTEM_ITEM_FIXED_SPACE | System Item Constants |
constants.SYSTEM_ITEM_FLEXIBLE_SPACE | System Item Constants |
constants.SYSTEM_ITEM_ORGANIZE | System Item Constants |
constants.SYSTEM_ITEM_PAGE_CURL | System Item Constants |
constants.SYSTEM_ITEM_PAUSE | System Item Constants |
constants.SYSTEM_ITEM_PLAY | System Item Constants |
constants.SYSTEM_ITEM_REDO | System Item Constants |
constants.SYSTEM_ITEM_REFRESH | System Item Constants |
constants.SYSTEM_ITEM_REPLY | System Item Constants |
constants.SYSTEM_ITEM_REWIND | System Item Constants |
constants.SYSTEM_ITEM_SAVE | System Item Constants |
constants.SYSTEM_ITEM_SEARCH | System Item Constants |
constants.SYSTEM_ITEM_STOP | System Item Constants |
constants.SYSTEM_ITEM_TRASH | System Item Constants |
constants.SYSTEM_ITEM_UNDO | System Item Constants |
constants.TOAST_POS_BOTTOM_CENTER | Toast Position Constants |
constants.TOAST_POS_BOTTOM_LEFT | Toast Position Constants |
constants.TOAST_POS_BOTTOM_RIGHT | Toast Position Constants |
constants.TOAST_POS_MIDDLE_CENTER | Toast Position Constants |
constants.TOAST_POS_MIDDLE_LEFT | Toast Position Constants |
constants.TOAST_POS_MIDDLE_RIGHT | Toast Position Constants |
constants.TOAST_POS_TOP_CENTER | Toast Position Constants |
constants.TOAST_POS_TOP_LEFT | Toast Position Constants |
constants.TOAST_POS_TOP_RIGHT | Toast Position Constants |
Constants by Functional Area
The constants
namespace provides groups of constants that are used by the rest of the Volt MX Iris API framework. The following constants are available, grouped by functional area.
Action Item Style Constants
The constants in this group select the style of an action item, which is used in an Action Sheet.
Constant | Description |
---|---|
constants.ACTION_ITEM_STYLE_CANCEL | Specifies that the action item is a Cancel button. |
constants.ACTION_ITEM_STYLE_DEFAULT | The default action item style for the device. |
constants.ACTION_ITEM_STYLE_DESTRUCTIVE | Specifies that the Action Sheet changes data. |
Action Sheet Anchor Direction Constants
These constants specify the anchor direction that is used to attach an Action Sheet to a widget on an iPad.
Constant | Description |
---|---|
constants.ANCHOR_DIRECTION_BOTTOM | The Action Sheet attaches to the bottom of the widget. |
constants.ANCHOR_DIRECTION_LEFT | The Action Sheet attaches to the left side of the widget. |
constants.ANCHOR_DIRECTION_RIGHT | The Action Sheet attaches to the right side of the widget. |
constants.ANCHOR_DIRECTION_TOP | The Action Sheet attaches to the top of the widget. |
ButtonBarItem Type Constants
Specifies the type of the ButtonBarItem
to create.
Constant | Description |
---|---|
constants.BAR_BUTTON_CUSTOM | Create a custom ButtonBarItem. |
constants.BAR_BUTTON_IMAGE | Create a button with a bitmapped image. |
constants.BAR_BUTTON_SYSTEM_ITEM | Create a button with a system icon. |
constants.BAR_BUTTON_TITLE | Create a button with a title. |
Remarks
These constants are passed to the ButtonBarItem
constructor to tell it what type of ButtonBarItem
to create.
Example
var item = new voltmx.ui.BarButtonItem(
{type:constants.BAR_BUTTON_IMAGE,
tintColor: hex color string,
style :constants.BAR_ITEM_STYLE_PLAIN,
enabled :true,
action : funtionObject,
metaData:{image:"imagename"}} );
Bar Metrics Constants
The constants in this group select the metrics for a Toolbar widget.
Constant | Description |
---|---|
constants.BAR_METRICS_COMPACT | Use compact metrics. Supported in landscape orientation only. |
constants.BAR_METRICS_DEFAULT | Use the default toolbar metrics for the hardware platform. Supported in all orientations. |
Bar Style Constants
These constants specify the style of a Toolbar widget.
Constant | Description |
---|---|
constants.BAR_STYLE_BLACK | Use a black toolbar. |
constants.BAR_STYLE_DEFAULT | Use the default style for the hardware platform. |
Skin Image Scale Mode Constants
The following constants set the skin image scaling mode.
Constant | Description |
---|---|
constants.SKIN_IMAGE_SCALE_MODE_DEFAULT | Selects the default scaling mode. |
constants.SKIN_IMAGE_SCALE_MODE_NONE | Uses no scaling. If the image is larger than the control, the widget expands to the size of the image, else, the image occupies its actual height within the control. Example: |
constants.SKIN_IMAGE_SCALE_MODE_FILL | Sets the image to scale to fill the size of the widget. Its aspect ratio is not preserved. Example: |
constants.SKIN_IMAGE_SCALE_MODE_UNIFORM | Selects uniform scaling for images. The image is scaled to fill the size of the widget while ensuring it’s aspect ratio is preserved. Example: |
constants.SKIN_IMAGE_SCALE_MODE_UNIFORMTOFILL | Sets the image to resize to fill the widget dimensions while preserving the native aspect ratio. If the aspect ratio of the widget differs from that of the image, the image is clipped to fit in the destination. Example: |
Platform Availability
Available on only Windows.
System Item Constants
Selects the type of BarButtonItem
from one of the system-provided items.
Constant | Description |
---|---|
constants.SYSTEM_ITEM_ACTION | The BarButtonItem is an Action button. |
constants.SYSTEM_ITEM_ADD | The BarButtonItem is and Add button. |
constants.SYSTEM_ITEM_BOOKMARKS | The BarButtonItem is a Bookmarks button. |
constants.SYSTEM_ITEM_CAMERA | The BarButtonItem is a Camera. |
constants.SYSTEM_ITEM_CANCEL | The BarButtonItem is a Cancel button. |
constants.SYSTEM_ITEM_COMPOSE | The BarButtonItem is a Compose button. |
constants.SYSTEM_ITEM_DONE | The BarButtonItem is a Done button. |
constants.SYSTEM_ITEM_EDIT | The BarButtonItem is an Edit button. |
constants.SYSTEM_ITEM_FAST_FORWARD | The BarButtonItem is a Fast Forward. |
constants.SYSTEM_ITEM_FIXED_SPACE | The BarButtonItem is a fixed space. |
constants.SYSTEM_ITEM_FLEXIBLE_SPACE | The BarButtonItem is a flexible space. |
constants.SYSTEM_ITEM_ORGANIZE | The BarButtonItem is an Organize button. |
constants.SYSTEM_ITEM_PAGE_CURL | The BarButtonItem is a Page Curl button. |
constants.SYSTEM_ITEM_PAUSE | The BarButtonItem is a Pause button. |
constants.SYSTEM_ITEM_PLAY | The BarButtonItem is a Play button. |
constants.SYSTEM_ITEM_REDO | The BarButtonItem is a Redo button. |
constants.SYSTEM_ITEM_REFRESH | The BarButtonItem is a Refresh button. |
constants.SYSTEM_ITEM_REPLY | The BarButtonItem is a Reply button. |
constants.SYSTEM_ITEM_REWIND | The BarButtonItem is is a Rewind button. |
constants.SYSTEM_ITEM_SAVE | The BarButtonItem is a Save button. |
constants.SYSTEM_ITEM_SEARCH | The BarButtonItem is a Search button. |
constants.SYSTEM_ITEM_STOP | The BarButtonItem is a Stop button. |
constants.SYSTEM_ITEM_TRASH | The BarButtonItem is a Trash button. |
constants.SYSTEM_ITEM_UNDO | The BarButtonItem is an Undo button |
Tint Mode Constants
The following constants select the tint mode for images.
Constant | Description | Availability |
---|---|---|
constants.AUTOMATIC | The tint mode is the same as the tint mode of the parent view. | iOS |
constants.DIMMED | The tint color is a desaturated, dimmed version of the view's tint color. iOS only. | iOS |
constants.MULTIPLY | The tint color is multiplied with the widget color. | Android, iOS |
constants.NORMAL | The tine color is the unmodified tint color of the view. | iOS |
constants.SCREEN | The tint color is calculated by adding the source and destination pixels, then subtracting the source pixels multiplied by the destination. | Android, iOS |
constants.SRC_ATOP | The tint color is calculated by discarding the source pixels that do not cover destination pixels. Draws remaining source pixels over destination pixels. | Android, iOS |
constants.SRC_IN | The tint color is calculated by keeping the source pixels that cover the destination pixels, and discarding the remaining source and destination pixels. | Android, iOS |
constants.SRC_OVER | Draws the source color over the destination color. This is the default mode if none is supplied. | Android, iOS, SPA |
Remarks
The iOS-specific tint modes are available only for the Button and Image widgets. When a tint mode is assigned to a set of skins, only one tint mode is applied even if there are other tint modes applied to individual skins in the set.
Platform Availability
Android, iOS, SPA
Toast Duration Constants
The following constants designate the length of time that toasts are displayed on the screen.
Constant | Description |
---|---|
constants.TOAST_LENGTH_LONG | The app displays the toast for a relatively long period of time. |
constants.TOAST_LENGTH_SHORT | The app displays the toast for a relatively short period of time. |
Remarks
These constants are defined only in relative terms. The exact length of time is determined by the underlying hardware platform.
Toast Position Constants
The constants in this group set the gravity point or anchor point of a toast.
Constant | Description |
---|---|
TOAST_POS_BOTTOM_CENTER | Specifies the toast should align at bottom center of the device screen. |
TOAST_POS_BOTTOM_LEFT | Specifies the toast should align at bottom left of the device screen. |
TOAST_POS_BOTTOM_RIGHT | Specifies the toast should align at bottom right of the device screen. |
TOAST_POS_MIDDLE_CENTER | Specifies the toast should align at center of the device screen. |
TOAST_POS_MIDDLE_LEFT | Specifies the toast should align at middle left of the device screen. |
TOAST_POS_MIDDLE_RIGHT | Specifies the toast should align at middle right of the device screen. |
TOAST_POS_TOP_CENTER | Specifies the toast should align at top center of the device screen. |
TOAST_POS_TOP_LEFT | Specifies the toast should align at top left corner of the device screen. |
TOAST_POS_TOP_RIGHT | Specifies the toast should align at top right of the device screen. |