Class Button
Definition
- Namespace:
- ElmSharp
- Assembly:
- ElmSharp.dll
The Button is a widget that works as a clickable input element to trigger events.
public class Button : Layout, IAccessibleObject
- Inheritance
- Implements
Constructors
View SourceButton(EvasObject)
Creates and initializes a new instance of the Button class.
Declaration
public Button(EvasObject parent)
Parameters
Type | Name | Description |
---|---|---|
EvasObject | parent | The EvasObject to which the new Button will be attached as a child. |
Properties
View SourceAutoRepeat
Sets or gets the autorepeat feature of a given Bbutton.
Declaration
public bool AutoRepeat { get; set; }
Property Value
Type | Description |
---|---|
bool |
Remarks
Autorepeat feature means the autorepeat event is generated when the button is kept pressed. When set to false, no autorepeat is performed and the buttons will trigger the Clicked event when they are clicked. When set to true, keeping a button pressed continuously will trigger the Repeated event until the button is released. The time it takes until it starts triggering, repeated is given by AutoRepeatInitialTime, and the time between each new emission is given by AutoRepeatGapTimeout.
AutoRepeatGapTimeout
Sets or gets the interval between each generated Repeat event.
Declaration
public double AutoRepeatGapTimeout { get; set; }
Property Value
Type | Description |
---|---|
double |
AutoRepeatInitialTime
Sets or gets the initial timeout before the Repeat event is generated.
Declaration
public double AutoRepeatInitialTime { get; set; }
Property Value
Type | Description |
---|---|
double |
BackgroundColor
Sets or gets the BackgroundColor of a given button in the normal and pressed status.
Declaration
public override Color BackgroundColor { set; }
Property Value
Type | Description |
---|---|
Color |
Overrides
Methods
View SourceCreateHandle(EvasObject)
Creates a widget handle.
Declaration
protected override IntPtr CreateHandle(EvasObject parent)
Parameters
Type | Name | Description |
---|---|---|
EvasObject | parent | Parent EvasObject. |
Returns
Type | Description |
---|---|
System.IntPtr | Handle IntPtr. |
Overrides
View SourceDeleteColorClass(string)
Deletes the object Color class.
Declaration
[Obsolete("DeleteColorClass is obsolete, please use EdjeObject.DeleteColorClass(string)")]
public void DeleteColorClass(string part)
Parameters
Type | Name | Description |
---|---|---|
string | part | The Color class to be deleted. |
Events
View SourceClicked
Clicked will be triggered when the button is clicked.
Declaration
public event EventHandler Clicked
Event Type
Type | Description |
---|---|
System.EventHandler |
Pressed
Pressed will be triggered when the button is pressed.
Declaration
public event EventHandler Pressed
Event Type
Type | Description |
---|---|
System.EventHandler |
Released
Released will be triggered when the button is released after being pressed.
Declaration
public event EventHandler Released
Event Type
Type | Description |
---|---|
System.EventHandler |
Repeated
Repeated will be triggered when the button is pressed without releasing it.
Declaration
public event EventHandler Repeated
Event Type
Type | Description |
---|---|
System.EventHandler |