Kanzi  3.9.6
Kanzi Engine API
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 = typename conditional< is_base_of< Node2D, TBaseClass >::value, ToggleButtonGroup2D, ToggleButtonGroup3D >::type
 

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. More...
 
int getIndexInGroup () const
 Returns the value of IndexInGroupProperty. More...
 
float getLongPressInterval () const
 
unsigned int getToggleState () const
 Returns the value of ToggleStateProperty. More...
 
unsigned int getToggleStateCount () const
 Returns the value of ToggleStateCountProperty. More...
 
bool isCurrentlyRegistered () const
 Returns whether the Button is registered to a Toggle Button Group. More...
 
bool isPressed () const
 
bool isPressOnHover () const
 
void setAutoClickInterval (float value)
 
void setIndexInGroup (int value)
 Sets the value of IndexInGroupProperty. More...
 
void setLongPressInterval (float value)
 
void setPressed (bool value)
 
void setPressOnHover (bool value)
 
void setToggleState (unsigned int state)
 Sets the value of ToggleStateProperty. More...
 
void setToggleStateCount (unsigned int value)
 Sets the value of ToggleStateCountProperty. More...
 
void toggle ()
 Toggles the button. More...
 
- Public Member Functions inherited from kanzi::ClickConceptImpl< TBaseClass, TDerivedClass >
bool isDoubleClickEnabled () const
 Gets the value of DoubleClickEnabledProperty. More...
 
void setDoubleClickEnabled (bool value)
 Sets the value of DoubleClickEnabledProperty. More...
 

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. More...
 
void configureDoubleClick ()
 Configures a MultiClickManipulator for an ClickConcept-derived class based on the value of the DoubleClickEnabledProperty: More...
 
void onAttached () override
 Overrides TBaseClass::onAttached(). More...
 
void onClicked (ClickManipulator::ClickMessageArguments &messageArguments)
 Handles click event. More...
 
void onDetached () override
 Overrides TBaseClass::onDetached(). More...
 
void onMultiClicked (MultiClickManipulator::MultiClickMessageArguments &messageArguments)
 Handles multi-click event. More...
 
void onNodePropertyChanged (AbstractPropertyType propertyType, PropertyNotificationReason reason) override
 Overrides TBaseClass::onNodePropertyChanged(). More...
 

Friends

class ::KzTestButtons
 

Additional Inherited Members

- Static Public Attributes inherited from kanzi::ClickConcept
static PropertyType< bool > DoubleClickEnabledProperty
 Enables the double-click gesture for a node. More...
 
- Static Public Attributes inherited from kanzi::ButtonConcept
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...
 
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. More...
 
- Protected Attributes inherited from kanzi::ClickConcept
ClickManipulatorSharedPtr m_clickManipulator
 The ClickManipulator. More...
 
MultiClickManipulatorSharedPtr m_multiClickManipulator
 Multi-Click manipulator. More...
 

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 = typename conditional<is_base_of<Node2D, TBaseClass>::value, ToggleButtonGroup2D, ToggleButtonGroup3D>::type

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()

template<typename TBaseClass , typename TDerivedClass >
void kanzi::ButtonConceptImpl< TBaseClass, TDerivedClass >::onClick ( ClickManipulator::ClickMessageArguments )
protected

◆ 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 Function Documentation

◆ ::KzTestButtons

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

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