VisuTwin Canvas
C++ 3D Engine — Metal Backend
Loading...
Searching...
No Matches
visutwin::canvas::ButtonComponent Class Reference

#include <framework/components/button/buttonComponent.h>

Inheritance diagram for visutwin::canvas::ButtonComponent:
[legend]

Public Member Functions

 ButtonComponent (IComponentSystem *system, Entity *entity)
EntityimageEntity () const
void initializeComponentData () override
void setImageEntity (Entity *entity)
 ~ButtonComponent () override
Public Member Functions inherited from visutwin::canvas::Component
virtual void cloneFrom (const Component *source)
 Component (IComponentSystem *system, Entity *entity)
virtual bool enabled () const
Entityentity () const
virtual void onDisable ()
virtual void onEnable ()
virtual void onPostStateChange ()
virtual void setEnabled (bool value)
IComponentSystemsystem () const
virtual ~Component ()=default
Public Member Functions inherited from visutwin::canvas::EventHandler
template<typename... Args>
EventHandlerfire (const std::string &name, Args &&... args)
bool hasEvent (const std::string &name) const
void initEventHandler ()
template<typename Callback>
requires (!std::is_same_v<std::decay_t<Callback>, HandleEventCallback>)
EventHandleroff (const std::string &name, Callback &&callback, void *scope=nullptr)
EventHandleroff (const std::string &name="", const HandleEventCallback &callback=HandleEventCallback(), void *scope=nullptr)
EventHandleroffByHandle (EventHandle *handle)
template<typename Callback>
requires (!std::is_same_v<std::decay_t<Callback>, HandleEventCallback>)
EventHandleon (const std::string &name, Callback &&callback, void *scope=nullptr)
EventHandleon (const std::string &name, HandleEventCallback callback, void *scope=nullptr)
template<typename Callback>
requires (!std::is_same_v<std::decay_t<Callback>, HandleEventCallback>)
EventHandleonce (const std::string &name, Callback &&callback, void *scope=nullptr)
EventHandleonce (const std::string &name, HandleEventCallback callback, void *scope=nullptr)
virtual ~EventHandler ()=default

Static Public Member Functions

static const std::vector< ButtonComponent * > & instances ()

Additional Inherited Members

Protected Member Functions inherited from visutwin::canvas::Component
virtual void onSetEnabled (bool oldValue, bool newValue)
Protected Member Functions inherited from visutwin::canvas::EventHandler
EventHandleaddCallback (const std::string &name, HandleEventCallback callback, void *scope=nullptr, bool once=false)
Protected Attributes inherited from visutwin::canvas::Component
bool _enabled = true
Entity_entity

Detailed Description

Definition at line 14 of file buttonComponent.h.

Constructor & Destructor Documentation

◆ ButtonComponent()

visutwin::canvas::ButtonComponent::ButtonComponent ( IComponentSystem * system,
Entity * entity )

◆ ~ButtonComponent()

visutwin::canvas::ButtonComponent::~ButtonComponent ( )
override

Definition at line 15 of file buttonComponent.cpp.

Member Function Documentation

◆ imageEntity()

Entity * visutwin::canvas::ButtonComponent::imageEntity ( ) const
inline

Definition at line 24 of file buttonComponent.h.

◆ initializeComponentData()

void visutwin::canvas::ButtonComponent::initializeComponentData ( )
inlineoverridevirtual

Implements visutwin::canvas::Component.

Definition at line 20 of file buttonComponent.h.

◆ instances()

const std::vector< ButtonComponent * > & visutwin::canvas::ButtonComponent::instances ( )
inlinestatic

Definition at line 22 of file buttonComponent.h.

◆ setImageEntity()

void visutwin::canvas::ButtonComponent::setImageEntity ( Entity * entity)
inline

Definition at line 25 of file buttonComponent.h.

References visutwin::canvas::Component::entity().


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