Kanzi 3.9.10
kanzi::ButtonConceptImpl< TBaseClass, TDerivedClass > Class Template Reference

Implementation class for ButtonConcept. More...

#include <kanzi/ui/node/concept/button.hpp>

Inheritance diagram for kanzi::ButtonConceptImpl< TBaseClass, TDerivedClass >:
[legend]

Public Types

using ToggleButtonGroup
 

Public Member Functions

float getAutoClickInterval () const
 
optional< size_t > getEffectiveButtonGroupIndex () const
 Returns the index that Kanzi assigned to the Button when it was registered to a Toggle Button Group.
 
int getIndexInGroup () const
 Returns the value of IndexInGroupProperty.
 
float getLongPressInterval () const
 
unsigned int getToggleState () const
 Returns the value of ToggleStateProperty.
 
unsigned int getToggleStateCount () const
 Returns the value of ToggleStateCountProperty.
 
bool isCurrentlyRegistered () const
 Returns whether the Button is registered to a Toggle Button Group.
 
bool isPressed () const
 
bool isPressOnHover () const
 
void setAutoClickInterval (float value)
 
void setIndexInGroup (int value)
 Sets the value of IndexInGroupProperty.
 
void setLongPressInterval (float value)
 
void setPressed (bool value)
 
void setPressOnHover (bool value)
 
void setToggleState (unsigned int state)
 Sets the value of ToggleStateProperty.
 
void setToggleStateCount (unsigned int value)
 Sets the value of ToggleStateCountProperty.
 
void toggle ()
 Toggles the button.
 
- Public Member Functions inherited from kanzi::ClickConceptImpl< TBaseClass, TDerivedClass >
bool isDoubleClickEnabled () const
 Gets the value of DoubleClickEnabledProperty.
 
void setDoubleClickEnabled (bool value)
 Sets the value of DoubleClickEnabledProperty.
 

Static Public Member Functions

static PropertyTypeEditorInfoSharedPtr makeEditorInfo ()
 
- Static Public Member Functions inherited from kanzi::ClickConceptImpl< TBaseClass, TDerivedClass >
static PropertyTypeEditorInfoSharedPtr makeEditorInfo ()
 
- Static Public Member Functions inherited from kanzi::ClickConcept
static PropertyTypeEditorInfoSharedPtr makeEditorInfo ()
 
- Static Public Member Functions inherited from kanzi::ButtonConcept
static PropertyTypeEditorInfoSharedPtr makeEditorInfo ()
 

Protected Member Functions

 ButtonConceptImpl (Domain *domain, string_view name)
 
void initialize ()
 
void onAttached () override
 
void onClick (ClickManipulator::ClickMessageArguments &)
 
void onClickBegin (ClickManipulator::ClickBeginMessageArguments &)
 
void onClickCancel (ClickManipulator::ClickCancelMessageArguments &)
 
void onClickEnter (ClickManipulator::ClickEnterMessageArguments &)
 
void onClickLeave (ClickManipulator::ClickLeaveMessageArguments &)
 
void onDetached () override
 
void onKeyCancel (KeyManipulator::KeyCanceledMessageArguments &arguments)
 
void onKeyDown (KeyManipulator::KeyPressedMessageArguments &arguments)
 
void onKeyUp (KeyManipulator::KeyReleasedMessageArguments &arguments)
 
void onLongPress (LongPressManipulator::LongPressMessageArguments &arguments)
 
void onNodePropertyChanged (AbstractPropertyType propertyType, PropertyNotificationReason reason) override
 
void repeatHandler ()
 
- Protected Member Functions inherited from kanzi::ClickConceptImpl< TBaseClass, TDerivedClass >
 ClickConceptImpl (Domain *domain, string_view name)
 Constructor.
 
void configureDoubleClick ()
 Configures a MultiClickManipulator for an ClickConcept-derived class based on the value of the DoubleClickEnabledProperty:
 
void onAttached () override
 Overrides TBaseClass::onAttached().
 
void onClicked (ClickManipulator::ClickMessageArguments &messageArguments)
 Handles click event.
 
void onDetached () override
 Overrides TBaseClass::onDetached().
 
void onMultiClicked (MultiClickManipulator::MultiClickMessageArguments &messageArguments)
 Handles multi-click event.
 
void onNodePropertyChanged (AbstractPropertyType propertyType, PropertyNotificationReason reason) override
 Overrides TBaseClass::onNodePropertyChanged().
 

Friends

class ::KzTestButtons
 

Additional Inherited Members

- Static Public Attributes inherited from kanzi::ClickConcept
static PropertyType< boolDoubleClickEnabledProperty
 Enables the double-click gesture for a node.
 
- Static Public Attributes inherited from kanzi::ButtonConcept
static PropertyType< boolIsPressedProperty
 Indicates whether the button is in the down state.
 
static PropertyType< floatLongPressIntervalProperty
 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.
 
static PropertyType< boolPressOnHoverProperty
 Indicates whether hovering the pointer over the button sets the button in the down state.
 
static PropertyType< floatAutoClickIntervalProperty
 Sets the time in milliseconds after which a button that the user keeps pressed down sends the ButtonConcept::ClickedMessage.
 
static PropertyType< intToggleStateProperty
 Sets the toggle state of a Button.
 
static PropertyType< intToggleStateCountProperty
 Sets the number of toggle states of a Button.
 
static PropertyType< intIndexInGroupProperty
 Sets the predefined index of a Button in the Toggle Button Group to which that Button is registered.
 
static MessageType< ClickedMessageArgumentsClickedMessage
 
static MessageType< PressedMessageArgumentsPressedMessage
 
static MessageType< CanceledMessageArgumentsCanceledMessage
 
static MessageType< PointerEnteredMessageArgumentsPointerEnteredMessage
 
static MessageType< PointerLeftMessageArgumentsPointerLeftMessage
 
static MessageType< LongPressMessageArgumentsLongPressMessage
 
static MessageType< ToggledOnMessageArgumentsToggledOnMessage
 
static MessageType< ToggledOffMessageArgumentsToggledOffMessage
 
static MessageType< ToggleStateChangedMessageArgumentsToggleStateChangedMessage
 
- Static Protected Member Functions inherited from kanzi::ButtonConcept
static Vector2 measure2D (Node2D *button, Vector2 availableSize)
 Measure function for a Node2D button.
 
- Protected Attributes inherited from kanzi::ClickConcept
ClickManipulatorSharedPtr m_clickManipulator
 The ClickManipulator.
 
MultiClickManipulatorSharedPtr m_multiClickManipulator
 Multi-Click manipulator.
 

Detailed Description

template<typename TBaseClass, typename TDerivedClass>
class kanzi::ButtonConceptImpl< TBaseClass, TDerivedClass >

Implementation class for ButtonConcept.

Member Typedef Documentation

◆ ToggleButtonGroup

template<typename TBaseClass , typename TDerivedClass >
using kanzi::ButtonConceptImpl< TBaseClass, TDerivedClass >::ToggleButtonGroup

Constructor & Destructor Documentation

◆ ButtonConceptImpl()

template<typename TBaseClass , typename TDerivedClass >
kanzi::ButtonConceptImpl< TBaseClass, TDerivedClass >::ButtonConceptImpl ( Domain * domain,
string_view name )
explicitprotected

Member Function Documentation

◆ makeEditorInfo()

template<typename TBaseClass , typename TDerivedClass >
PropertyTypeEditorInfoSharedPtr kanzi::ButtonConceptImpl< TBaseClass, TDerivedClass >::makeEditorInfo ( )
static

◆ isPressed()

template<typename TBaseClass , typename TDerivedClass >
bool kanzi::ButtonConceptImpl< TBaseClass, TDerivedClass >::isPressed ( ) const

◆ setPressed()

template<typename TBaseClass , typename TDerivedClass >
void kanzi::ButtonConceptImpl< TBaseClass, TDerivedClass >::setPressed ( bool value)

◆ getLongPressInterval()

template<typename TBaseClass , typename TDerivedClass >
float kanzi::ButtonConceptImpl< TBaseClass, TDerivedClass >::getLongPressInterval ( ) const

◆ setLongPressInterval()

template<typename TBaseClass , typename TDerivedClass >
void kanzi::ButtonConceptImpl< TBaseClass, TDerivedClass >::setLongPressInterval ( float value)

◆ isPressOnHover()

template<typename TBaseClass , typename TDerivedClass >
bool kanzi::ButtonConceptImpl< TBaseClass, TDerivedClass >::isPressOnHover ( ) const

◆ setPressOnHover()

template<typename TBaseClass , typename TDerivedClass >
void kanzi::ButtonConceptImpl< TBaseClass, TDerivedClass >::setPressOnHover ( bool value)

◆ getAutoClickInterval()

template<typename TBaseClass , typename TDerivedClass >
float kanzi::ButtonConceptImpl< TBaseClass, TDerivedClass >::getAutoClickInterval ( ) const

◆ setAutoClickInterval()

template<typename TBaseClass , typename TDerivedClass >
void kanzi::ButtonConceptImpl< TBaseClass, TDerivedClass >::setAutoClickInterval ( float value)

◆ toggle()

template<typename TBaseClass , typename TDerivedClass >
void kanzi::ButtonConceptImpl< TBaseClass, TDerivedClass >::toggle ( )

Toggles the button.

◆ getToggleState()

template<typename TBaseClass , typename TDerivedClass >
unsigned int kanzi::ButtonConceptImpl< TBaseClass, TDerivedClass >::getToggleState ( ) const

Returns the value of ToggleStateProperty.

See also
setToggleState()

◆ setToggleState()

template<typename TBaseClass , typename TDerivedClass >
void kanzi::ButtonConceptImpl< TBaseClass, TDerivedClass >::setToggleState ( unsigned int state)

Sets the value of ToggleStateProperty.

See also
getToggleState()

◆ getToggleStateCount()

template<typename TBaseClass , typename TDerivedClass >
unsigned int kanzi::ButtonConceptImpl< TBaseClass, TDerivedClass >::getToggleStateCount ( ) const

Returns the value of ToggleStateCountProperty.

See also
setToggleStateCount()

◆ setToggleStateCount()

template<typename TBaseClass , typename TDerivedClass >
void kanzi::ButtonConceptImpl< TBaseClass, TDerivedClass >::setToggleStateCount ( unsigned int value)

Sets the value of ToggleStateCountProperty.

See also
getToggleStateCount()

◆ getIndexInGroup()

template<typename TBaseClass , typename TDerivedClass >
int kanzi::ButtonConceptImpl< TBaseClass, TDerivedClass >::getIndexInGroup ( ) const

Returns the value of IndexInGroupProperty.

See also
setIndexInGroup()

◆ setIndexInGroup()

template<typename TBaseClass , typename TDerivedClass >
void kanzi::ButtonConceptImpl< TBaseClass, TDerivedClass >::setIndexInGroup ( int value)

Sets the value of IndexInGroupProperty.

See also
getIndexInGroup()

◆ isCurrentlyRegistered()

template<typename TBaseClass , typename TDerivedClass >
bool kanzi::ButtonConceptImpl< TBaseClass, TDerivedClass >::isCurrentlyRegistered ( ) const

Returns whether the Button is registered to a Toggle Button Group.

Returns
If the Button is registered to a Toggle Button Group, true, otherwise false.
Since
Kanzi 3.9.0

◆ getEffectiveButtonGroupIndex()

template<typename TBaseClass , typename TDerivedClass >
optional< size_t > kanzi::ButtonConceptImpl< TBaseClass, TDerivedClass >::getEffectiveButtonGroupIndex ( ) const
inline

Returns the index that Kanzi assigned to the Button when it was registered to a Toggle Button Group.

Returns
The index that Kanzi assigned to the Button when it was registered to a Toggle Button Group or nullopt if the Button is not registered to a Toggle Button Group.
Since
Kanzi 3.9.0

◆ initialize()

template<typename TBaseClass , typename TDerivedClass >
void kanzi::ButtonConceptImpl< TBaseClass, TDerivedClass >::initialize ( )
protected

◆ onNodePropertyChanged()

template<typename TBaseClass , typename TDerivedClass >
void kanzi::ButtonConceptImpl< TBaseClass, TDerivedClass >::onNodePropertyChanged ( AbstractPropertyType propertyType,
PropertyNotificationReason reason )
overrideprotected

◆ onAttached()

template<typename TBaseClass , typename TDerivedClass >
void kanzi::ButtonConceptImpl< TBaseClass, TDerivedClass >::onAttached ( )
overrideprotected

◆ onDetached()

template<typename TBaseClass , typename TDerivedClass >
void kanzi::ButtonConceptImpl< TBaseClass, TDerivedClass >::onDetached ( )
overrideprotected

◆ onClickEnter()

template<typename TBaseClass , typename TDerivedClass >
void kanzi::ButtonConceptImpl< TBaseClass, TDerivedClass >::onClickEnter ( ClickManipulator::ClickEnterMessageArguments & )
protected

◆ onClickLeave()

template<typename TBaseClass , typename TDerivedClass >
void kanzi::ButtonConceptImpl< TBaseClass, TDerivedClass >::onClickLeave ( ClickManipulator::ClickLeaveMessageArguments & )
protected

◆ onClickBegin()

template<typename TBaseClass , typename TDerivedClass >
void kanzi::ButtonConceptImpl< TBaseClass, TDerivedClass >::onClickBegin ( ClickManipulator::ClickBeginMessageArguments & )
protected

◆ onClick()

◆ onClickCancel()

template<typename TBaseClass , typename TDerivedClass >
void kanzi::ButtonConceptImpl< TBaseClass, TDerivedClass >::onClickCancel ( ClickManipulator::ClickCancelMessageArguments & )
protected

◆ onLongPress()

template<typename TBaseClass , typename TDerivedClass >
void kanzi::ButtonConceptImpl< TBaseClass, TDerivedClass >::onLongPress ( LongPressManipulator::LongPressMessageArguments & arguments)
protected

◆ onKeyDown()

template<typename TBaseClass , typename TDerivedClass >
void kanzi::ButtonConceptImpl< TBaseClass, TDerivedClass >::onKeyDown ( KeyManipulator::KeyPressedMessageArguments & arguments)
protected

◆ onKeyUp()

template<typename TBaseClass , typename TDerivedClass >
void kanzi::ButtonConceptImpl< TBaseClass, TDerivedClass >::onKeyUp ( KeyManipulator::KeyReleasedMessageArguments & arguments)
protected

◆ onKeyCancel()

template<typename TBaseClass , typename TDerivedClass >
void kanzi::ButtonConceptImpl< TBaseClass, TDerivedClass >::onKeyCancel ( KeyManipulator::KeyCanceledMessageArguments & arguments)
protected

◆ repeatHandler()

template<typename TBaseClass , typename TDerivedClass >
void kanzi::ButtonConceptImpl< TBaseClass, TDerivedClass >::repeatHandler ( )
protected

Friends And Related Symbol Documentation

◆ ::KzTestButtons

template<typename TBaseClass , typename TDerivedClass >
friend class ::KzTestButtons
friend

The documentation for this class was generated from the following files: