Elements: button

A button is used inside a layout to trigger an action when the user click on it.

Attributes

Attribute Description
action Define the click action. See below.
tooltip See the Tooltip attributes reference
upState Required. Default aspect. Referencing media or library skin elements.
downState Reference a previously loaded media. Referencing media or library skin elements.
overState Asppect when the button is being pressed. Referencing media or library skin elements.
disabledState Aspect when the mouse is over the button. Referencing media or library skin elements.
overState Aspect when the button cannot currently be used. Referencing media or library skin elements.

If a state is missing, upState is used instead.

Actions

Action Description
verticalSubmenu Displays a vertical submenu (see below)
horizontalSubmenu Displays an horizontal submenu (see below)
toc Displays the publication's table of contents, when available
thumbnails Displays the pages' thumbnails
subscription Displays the subscription's other publications
search Opens the search box
annotate_add Adds an annotation
annotate_all Displays all annotations of the document
annotate_page Displays the annotations of the current page
zoom Displays the zoom slider
fullscreen Displays the publication in fullscreen mode
download Downloads the original document
print Prints the publication
firstPage Goes to the front cover
previousPage Goes to the previous page
lastPage Goes to the back cover
nextPage Goes to the next page
page#n Goes to page n (no default tooltip text)

Submenu

A button can contain other buttons, to build a submenu. The parent button must have verticalSubMenu or HorizontalSubMenu as an action.
The following additionnal attributes are then available:

Attribute Description
spacer Sets the space between the submenu's buttons (in pixels). If not specified, the parent layout spacer value is used instead.
backgroundColor Sets the submenu's background color (hexadecimal format: 0xRRGGBB)
borderColor Sets the submenu's border color (hexadecimal)
borderSize Set the borsder's thickness (in pixels)
cornerRadius Sets the border corner's roundness (in pixels, 0 being square corners)
horizontalMargin Sets the margin between the side borders and the submenu's content
verticalMargin Sets the margin between the top and bottom borders and the submenu's content