Namespace: button

WebiApplication.bar.button

Represents a button on the custom menu-button.

Members

(static) Events

An enum for the type of events of the button on the custom menu-button
Properties:
Name Type Description
CLICK String The button has been clicked.
PRESS String The button has been pressed.
RELEASE String The button has been released.

Methods

(static) getIconURL() → {String}

Returns the URL of the button icon.
Returns:
The URL of the button icon
Type
String

(static) getText() → {String}

Returns the text displayed in the button.
Returns:
The text of the button
Type
String

(static) isChecked() → {Boolean}

Returns whether the toggle button has been checked.
Returns:
true if the button is checked, false otherwise
Type
Boolean

(static) isDisabled() → {Boolean}

Returns whether the button has been disabled.
Returns:
true if the button is disabled, false otherwise
Type
Boolean

(static) isDisplayed() → {Boolean}

Returns whether the button has been displayed.
Returns:
true if the button is displayed, false otherwise
Type
Boolean

(static) setChecked(obj)

Checks or unchecks the toggle button.
Parameters:
Name Type Description
obj Boolean true to check the button, false to uncheck the button

(static) setDisabled(obj)

Disables or enables the button.
Parameters:
Name Type Description
obj Boolean true to disable the button, false to enable the button

(static) setDisplayed(obj)

Displays or hides the button.
Parameters:
Name Type Description
obj Boolean true to display the button, false to hide the button
Example
var context = WebiApplication.getContext()
WebiApplication.bar.button.setDisplayed(context.selectedPerspective == "design")

(static) setIconURL(obj)

Sets the URL of the button icon.
Parameters:
Name Type Description
obj String The URL of the button icon

(static) setText(obj)

Sets the text displayed in the button.
Parameters:
Name Type Description
obj String The text of the button