A button a PlatformModule shows in the header of its panel, next to the standard buttons of the platform. Create it, set its properties and add it to IPlatformModuleContext.Buttons; the same code works in ATAS and ATAS X. Changing a property of a button that is in the list updates the header.
More...
|
| string | Id [get] |
| | The id of the button, unique among the buttons of the module (for example "pause").
|
| |
| string? | Text [get, set] |
| | The caption shown on the button, or null for a button with an icon only.
|
| |
| string? | ToolTip [get, set] |
| | The hint shown when the mouse is over the button.
|
| |
| string? | Icon [get, set] |
| | The icon as path geometry data in a 16×16 box, in the syntax WPF and Avalonia share (for example "M4,2 L14,8 L4,14 Z"): the platform fills it with the color of the header texts. PlatformModuleIcons has ready-made ones. null: no icon. Data the platform cannot read is ignored (the button shows its text or its id).
|
| |
| bool | IsCheckable [get, set] |
| | True for a toggle: every click of the user flips IsChecked before the click is delivered to the module.
|
| |
| bool | IsChecked [get, set] |
| | The state of a toggle (IsCheckable): a checked button is highlighted.
|
| |
| bool | IsEnabled [get, set] |
| | False shows the button greyed out; it is not clicked.
|
| |
| bool | IsVisible [get, set] |
| | False hides the button without removing it from the list.
|
| |
| Action? | Click [get, set] |
| | Called when the user clicks the button (by the default PlatformModule.OnButtonClick). An exception thrown here stops the module like an exception of any other callback.
|
| |
A button a PlatformModule shows in the header of its panel, next to the standard buttons of the platform. Create it, set its properties and add it to IPlatformModuleContext.Buttons; the same code works in ATAS and ATAS X. Changing a property of a button that is in the list updates the header.
A click is delivered to PlatformModule.OnButtonClick (which calls Click by default) like every other callback of the module: never concurrently with another one, and with the same error and time limit rules. Change the buttons only from the callbacks of the module.
◆ PlatformModuleButton() [1/2]
| ATAS.Indicators.Modules.PlatformModuleButton.PlatformModuleButton |
( |
string |
id | ) |
|
- Parameters
-
| id | The id of the button, unique among the buttons of the module. |
◆ PlatformModuleButton() [2/2]
| ATAS.Indicators.Modules.PlatformModuleButton.PlatformModuleButton |
( |
string |
id, |
|
|
string? |
text, |
|
|
Action? |
click = null |
|
) |
| |
- Parameters
-
| id | The id of the button, unique among the buttons of the module. |
| text | The caption of the button. |
| click | Called when the user clicks the button. |
◆ ToString()
| override string ATAS.Indicators.Modules.PlatformModuleButton.ToString |
( |
| ) |
|
◆ Click
| Action? ATAS.Indicators.Modules.PlatformModuleButton.Click |
|
getset |
Called when the user clicks the button (by the default PlatformModule.OnButtonClick). An exception thrown here stops the module like an exception of any other callback.
◆ Icon
| string? ATAS.Indicators.Modules.PlatformModuleButton.Icon |
|
getset |
The icon as path geometry data in a 16×16 box, in the syntax WPF and Avalonia share (for example "M4,2 L14,8 L4,14 Z"): the platform fills it with the color of the header texts. PlatformModuleIcons has ready-made ones. null: no icon. Data the platform cannot read is ignored (the button shows its text or its id).
◆ Id
| string ATAS.Indicators.Modules.PlatformModuleButton.Id |
|
get |
The id of the button, unique among the buttons of the module (for example "pause").
◆ IsCheckable
| bool ATAS.Indicators.Modules.PlatformModuleButton.IsCheckable |
|
getset |
True for a toggle: every click of the user flips IsChecked before the click is delivered to the module.
◆ IsChecked
| bool ATAS.Indicators.Modules.PlatformModuleButton.IsChecked |
|
getset |
The state of a toggle (IsCheckable): a checked button is highlighted.
◆ IsEnabled
| bool ATAS.Indicators.Modules.PlatformModuleButton.IsEnabled |
|
getset |
False shows the button greyed out; it is not clicked.
◆ IsVisible
| bool ATAS.Indicators.Modules.PlatformModuleButton.IsVisible |
|
getset |
False hides the button without removing it from the list.
◆ Text
| string? ATAS.Indicators.Modules.PlatformModuleButton.Text |
|
getset |
The caption shown on the button, or null for a button with an icon only.
◆ ToolTip
| string? ATAS.Indicators.Modules.PlatformModuleButton.ToolTip |
|
getset |
The hint shown when the mouse is over the button.
The documentation for this class was generated from the following file: