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
SoftButton

SoftButton Class Reference

Constructors

Instance Methods

Constructors

new SoftButton(parameters)

Initializes an instance of SoftButton.

Instance Methods

softButton.getImage() ⇒ Image

Get the Image

Kind: Instance method of SoftButton
Returns: Image - the KEY_IMAGE value

softButton.getIsHighlighted() ⇒ Boolean

Get the IsHighlighted

Kind: Instance method of SoftButton
Returns: Boolean - the KEY_IS_HIGHLIGHTED value

softButton.getSoftButtonID() ⇒ Number

Get the SoftButtonID

Kind: Instance method of SoftButton
Returns: Number - the KEY_SOFT_BUTTON_ID value

softButton.getSystemAction() ⇒ SystemAction

Get the SystemAction

Kind: Instance method of SoftButton
Returns: SystemAction - the KEY_SYSTEM_ACTION value

softButton.getText() ⇒ String

Get the Text

Kind: Instance method of SoftButton
Returns: String - the KEY_TEXT value

softButton.getType() ⇒ SoftButtonType

Get the Type

Kind: Instance method of SoftButton
Returns: SoftButtonType - the KEY_TYPE value

softButton.setImage(image) ⇒ SoftButton

Set the Image

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

ParamTypeDescription
image Image Optional image struct for SoftButton (if defined as IMAGE or BOTH) - The desired Image.

softButton.setIsHighlighted(highlighted) ⇒ SoftButton

Set the IsHighlighted

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

ParamTypeDescription
highlighted Boolean True, if highlighted False, if not highlighted - The desired IsHighlighted. {'default_value': False}

softButton.setSoftButtonID(id) ⇒ SoftButton

Set the SoftButtonID

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

ParamTypeDescription
id Number Value which is returned via OnButtonPress / OnButtonEvent - The desired SoftButtonID. {'num_min_value': 0, 'num_max_value': 65535}

softButton.setSystemAction(action) ⇒ SoftButton

Set the SystemAction

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

ParamTypeDescription
action SystemAction Parameter indicating whether selecting a SoftButton shall call a specific system action. This is intended to allow Notifications to bring the callee into full / focus; or in the case of persistent overlays, the overlay can persist when a SoftButton is pressed. - The desired SystemAction. {'default_value': 'DEFAULT_ACTION'}

softButton.setText(text) ⇒ SoftButton

Set the Text

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

ParamTypeDescription
text String Optional text to display (if defined as TEXT or BOTH) - The desired Text. {'string_min_length': 0, 'string_max_length': 500}

softButton.setType(type) ⇒ SoftButton

Set the Type

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

ParamTypeDescription
type SoftButtonType Describes, whether it is text, highlighted text, icon, or dynamic image. See softButtonType - The desired Type.
View on GitHub.com
Previous Section Next Section