Expand Minimize Picture-in-picture Power Device Status Voice Recognition Skip Back Skip Forward Minus Plus Play Search
Internet Explorer alert
This browser is not recommended for use with smartdevicelink.com, and may not function properly. Upgrade to a different browser to guarantee support of all features.
close alert
To Top Created with Sketch. To Top
To Bottom Created with Sketch. To Bottom
JavaScript Suite Documentation
MenuParams

MenuParams Class Reference

Constructors

Instance Methods

Constructors

new MenuParams(parameters)

Initializes an instance of MenuParams.

Instance Methods

menuParams.getMenuName() ⇒ String

Get the MenuName

Kind: Instance method of MenuParams
Returns: String - the KEY_MENU_NAME value

menuParams.getParentID() ⇒ Number

Get the ParentID

Kind: Instance method of MenuParams
Returns: Number - the KEY_PARENT_ID value

menuParams.getPosition() ⇒ Number

Get the Position

Kind: Instance method of MenuParams
Returns: Number - the KEY_POSITION value

menuParams.getSecondaryText() ⇒ String

Get the SecondaryText

Kind: Instance method of MenuParams
Returns: String - the KEY_SECONDARY_TEXT value

menuParams.getTertiaryText() ⇒ String

Get the TertiaryText

Kind: Instance method of MenuParams
Returns: String - the KEY_TERTIARY_TEXT value

menuParams.setMenuName(name) ⇒ MenuParams

Set the MenuName

Kind: Instance method of MenuParams
Returns: MenuParams - The class instance for method chaining.

ParamTypeDescription
name String Text to show in the menu for this sub menu. - The desired MenuName. {'string_min_length': 1, 'string_max_length': 500}

menuParams.setParentID(id) ⇒ MenuParams

Set the ParentID

Kind: Instance method of MenuParams
Returns: MenuParams - The class instance for method chaining.

ParamTypeDescription
id Number unique ID of the sub menu, the command will be added to. If not provided, it will be provided to the top level of the in application menu. - The desired ParentID. {'default_value': 0, 'num_min_value': 0, 'num_max_value': 2000000000}

menuParams.setPosition(position) ⇒ MenuParams

Set the Position

Kind: Instance method of MenuParams
Returns: MenuParams - The class instance for method chaining.

ParamTypeDescription
position Number Position within the items that are at top level of the in application menu. 0 will insert at the front. 1 will insert at the second position. if position is greater or equal than the number of items on top level, the sub menu will be appended to the end. If this param was omitted the entry will be added at the end. - The desired Position. {'num_min_value': 0, 'num_max_value': 1000}

menuParams.setSecondaryText(text) ⇒ MenuParams

Set the SecondaryText

Kind: Instance method of MenuParams
Returns: MenuParams - The class instance for method chaining.

ParamTypeDescription
text String Optional secondary text to display - The desired SecondaryText. {'string_min_length': 1, 'string_max_length': 500}

menuParams.setTertiaryText(text) ⇒ MenuParams

Set the TertiaryText

Kind: Instance method of MenuParams
Returns: MenuParams - The class instance for method chaining.

ParamTypeDescription
text String Optional tertiary text to display - The desired TertiaryText. {'string_min_length': 1, 'string_max_length': 500}
View on GitHub.com
Previous Section Next Section