Button nodes provide an area that receives keyboard and touch input which Kanzi translates to state events. More...
#include <kanzi/ui/node/concept/button.hpp>
Classes | |
class | CanceledMessageArguments |
class | ClickedMessageArguments |
class | LongPressMessageArguments |
class | PointerEnteredMessageArguments |
class | PointerLeftMessageArguments |
class | PressedMessageArguments |
class | ToggledOffMessageArguments |
Message arguments used by the ToggledOffMessage. More... | |
class | ToggledOnMessageArguments |
Message arguments used by the ToggledOnMessage. More... | |
class | ToggleStateChangedMessageArguments |
Message arguments used by the ToggleStateChangedMessage. More... | |
Static Public Member Functions | |
static PropertyTypeEditorInfoSharedPtr | makeEditorInfo () |
Static Public Attributes | |
Properties | |
static PropertyType< bool > | IsPressedProperty |
Indicates whether the button is in the down state. More... | |
static PropertyType< float > | LongPressIntervalProperty |
Sets the amount of time in milliseconds that the user must hold the button pressed down for Kanzi to recognize it as a long-press gesture. More... | |
static PropertyType< bool > | PressOnHoverProperty |
Indicates whether hovering the pointer over the button sets the button in the down state. More... | |
static PropertyType< float > | AutoClickIntervalProperty |
Sets the time in milliseconds after which a button that the user keeps pressed down sends the ButtonConcept::ClickedMessage. More... | |
static PropertyType< int > | ToggleStateProperty |
Sets the toggle state of a Button. More... | |
static PropertyType< int > | ToggleStateCountProperty |
Sets the number of toggle states of a Button. More... | |
static PropertyType< int > | IndexInGroupProperty |
Sets the predefined index of a Button in the Toggle Button Group to which that Button is registered. More... | |
Messages | |
static MessageType< ClickedMessageArguments > | ClickedMessage |
static MessageType< PressedMessageArguments > | PressedMessage |
static MessageType< CanceledMessageArguments > | CanceledMessage |
static MessageType< PointerEnteredMessageArguments > | PointerEnteredMessage |
static MessageType< PointerLeftMessageArguments > | PointerLeftMessage |
static MessageType< LongPressMessageArguments > | LongPressMessage |
static MessageType< ToggledOnMessageArguments > | ToggledOnMessage |
static MessageType< ToggledOffMessageArguments > | ToggledOffMessage |
static MessageType< ToggleStateChangedMessageArguments > | ToggleStateChangedMessage |
Static Protected Member Functions | |
static Vector2 | measure2D (Node2D *button, Vector2 availableSize) |
Measure function for a Node2D button. More... | |
Button nodes provide an area that receives keyboard and touch input which Kanzi translates to state events.
In addition to the area that receives input, the Toggle Button nodes provide a toggled state.
To disable a Button node set the Node::EnabledProperty to false. A disabled Button does not produce user events. To visually indicate the disabled state of a Button node, create a state manager and use the Node::EffectivelyEnabledProperty as its controller property. When Kanzi disables a Button node, it cancels the pressed state. Kanzi preserves the toggled state of a Toggle Button node when that Toggle Button is disabled.
|
static |
|
staticprotected |
Measure function for a Node2D button.
|
static |
Indicates whether the button is in the down state.
Whether the button is in down state. The default value is false.
|
static |
Sets the amount of time in milliseconds that the user must hold the button pressed down for Kanzi to recognize it as a long-press gesture.
To disable the long-press gesture, set to 0. The default value is 0.0f.
|
static |
Indicates whether hovering the pointer over the button sets the button in the down state.
The default value is false.
|
static |
Sets the time in milliseconds after which a button that the user keeps pressed down sends the ButtonConcept::ClickedMessage.
While the user holds the button down, the button keeps sending the ClickedMessage at the time interval set by this property. To disable the behavior, set to 0. The default value is 0.0f.
|
static |
Sets the toggle state of a Button.
The default value is 0.
|
static |
Sets the number of toggle states of a Button.
The default value is 0.
|
static |
Sets the predefined index of a Button in the Toggle Button Group to which that Button is registered.
If a Button does not have local value set for this property, it is not registered to the Toggle Button Group. Multiple Buttons in a Toggle Button Group cannot have the same index. When the value of this property is -1, the Toggle Button Group automatically assigns an index for the Button.
The default value is -1.
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |