Skip to content

Commit

Permalink
more attributes in tables
Browse files Browse the repository at this point in the history
  • Loading branch information
devleaks committed Jul 10, 2024
1 parent 2918571 commit 086ddf5
Show file tree
Hide file tree
Showing 3 changed files with 80 additions and 152 deletions.
24 changes: 13 additions & 11 deletions docs/Button.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,17 +33,19 @@ The button *Representation* page describes attributes specific to the *feedback*

# Common Button Attributes

| Attribute | Definition |
| -------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| index | **Mandatory**. There is no default value.<br><br>Each «Button» on a deck is designated by its [[Button Index|Index]].<br><br>On a given Page, the Index of a button must be unique on that Page since it addresses a very precise key, knob or slider on the deck.<br><br>Depending on the model of deck, buttons have [[Button Index|coded named index]].<br><br>On a simple deck with a number of similar keys, the index of a button is its ordering number: 0, 1, 2... until the number of keys is reached. On a more complex deck, with button and knobs, knobs may be indexed with name like knob0, knob1, knob2... until the number of knobs is reached.<br> |
| name | Optional. A button can be named.<br><br>The name of a button on a page must be unique. If more than one button have the same name, an error is reported and the definition of the button is ignored.<br><br>If no name is provided, a unique, long, technical name is created from deck name, page name, and index. |
| type | **Mandatory**.<br><br>The type of a button defines what the button will do and how it will be used.<br><br>The [[Button Activation|button activation]] describe button-type specific attributes. In other words, depending on the value of the type attribute, other button defining attributes will be expected.<br><br>For example, if the value of a button type is `page` to change a page on a deck, it is expected to find the attribute named `page` which contains the name of the page to switch to when pressed. |
| label | The label of a button is a short reminder of what the button does. The text of the label is laid over the button image if any. The labelling of a button uses the following attributes:<br><br>Note: The Button *Label* should not be confused with Button Text. The Label exist for all buttons, and is displayed according to its attributes if the underlying button is capable. The text of the label is defined as a button attribute and is static (cannot be changed dynamically).<br><br>The Button *Text* is a text that is part of the Button representation. |
| label-color | See [[Resources#Colors|Colors]]. |
| label-font | See [[Resources#Fonts|Fonts]]. |
| label-size | In pixels. Internally, Cockpitdecks uses 256 × 256 pixel images. |
| label-position | The position of the label is a 2 letter code:<br><br>1. l, c, or r for left, center, or right-justified on the image (horizontal alignment),<br>2. t, m, or b, for top, middle, or bottom of the image (vertical alignment). |
| options | Regularly, buttons have additional parameters.<br><br>The button options parameter is a string of comma separated options. An option is either a simple string or word, or a name=value string.<br><br>Options are, by nature, not indispensable to the button’s activation or rendering but rather add to it to alter behaviour or appearance. |
| Attribute | Definition |
| -------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| index | **Mandatory**. There is no default value.<br><br>Each «Button» on a deck is designated by its [[Button Index]].<br><br>On a given Page, the Index of a button must be unique on that Page since it addresses a very precise key, knob or slider on the deck.<br><br>Depending on the model of deck, buttons have [[Button Index]].<br><br>On a simple deck with a number of similar keys, the index of a button is its ordering number: 0, 1, 2... until the number of keys is reached. On a more complex deck, with button and knobs, knobs may be indexed with name like knob0, knob1, knob2... until the number of knobs is reached.<br> |
| name | Optional. A button can be named.<br><br>The name of a button on a page must be unique. If more than one button have the same name, an error is reported and the definition of the button is ignored.<br><br>If no name is provided, a unique, long, technical name is created from deck name, page name, and index. |
| type | **Mandatory**.<br><br>The type of a button defines what the button will do and how it will be used.<br><br>The [[Button Activation]] describe button-type specific attributes. In other words, depending on the value of the type attribute, other button defining attributes will be expected.<br><br>For example, if the value of a button type is `page` to change a page on a deck, it is expected to find the attribute named `page` which contains the name of the page to switch to when pressed. |
| label | The label of a button is a short reminder of what the button does. The text of the label is laid over the button image if any. The labelling of a button uses the following attributes:<br><br>Note: The Button *Label* should not be confused with Button Text. The Label exist for all buttons, and is displayed according to its attributes if the underlying button is capable. The text of the label is defined as a button attribute and is static (cannot be changed dynamically).<br><br>The Button *Text* is a text that is part of the Button representation. |
| label-color | See [[Resources#Colors]]. |
| label-font | See [[Resources#Fonts]]. |
| label-size | In pixels. Internally, Cockpitdecks uses 256 × 256 pixel images. |
| label-position | The position of the label is a 2 letter code:<br><br>1. l, c, or r for left, center, or right-justified on the image (horizontal alignment),<br>2. t, m, or b, for top, middle, or bottom of the image (vertical alignment). |
| options | Regularly, buttons have additional parameters.<br><br>The button options parameter is a string of comma separated options. An option is either a simple string or word, or a name=value string.<br><br>Options are, by nature, not indispensable to the button’s activation or rendering but rather add to it to alter behaviour or appearance. |
| view | The view attribute is a Command that is executed after the activation. |
| view-if | The view-if formula is evaluated before the view is executed. If present, the view will only be executed if view-if evaluates to True. |

# Button Value

Expand Down
Loading

0 comments on commit 086ddf5

Please sign in to comment.