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

#include <framework/components/screen/screenComponent.h>

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

Public Member Functions

void initializeComponentData () override
const Vector2referenceResolution () const
const Vector2resolution () const
float scale () const
 ScreenComponent (IComponentSystem *system, Entity *entity)
bool screenSpace () const
void setReferenceResolution (const Vector2 &value)
void setScreenSpace (const bool value)
void updateScaleFromWindow (int windowWidth, int windowHeight)
 ~ScreenComponent () 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< ScreenComponent * > & 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 13 of file screenComponent.h.

Constructor & Destructor Documentation

◆ ScreenComponent()

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

◆ ~ScreenComponent()

visutwin::canvas::ScreenComponent::~ScreenComponent ( )
override

Definition at line 15 of file screenComponent.cpp.

Member Function Documentation

◆ initializeComponentData()

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

Implements visutwin::canvas::Component.

Definition at line 19 of file screenComponent.h.

◆ instances()

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

◆ referenceResolution()

const Vector2 & visutwin::canvas::ScreenComponent::referenceResolution ( ) const
inline

Definition at line 23 of file screenComponent.h.

◆ resolution()

const Vector2 & visutwin::canvas::ScreenComponent::resolution ( ) const
inline

Definition at line 26 of file screenComponent.h.

◆ scale()

float visutwin::canvas::ScreenComponent::scale ( ) const
inline

Definition at line 31 of file screenComponent.h.

◆ screenSpace()

bool visutwin::canvas::ScreenComponent::screenSpace ( ) const
inline

Definition at line 28 of file screenComponent.h.

◆ setReferenceResolution()

void visutwin::canvas::ScreenComponent::setReferenceResolution ( const Vector2 & value)
inline

Definition at line 24 of file screenComponent.h.

◆ setScreenSpace()

void visutwin::canvas::ScreenComponent::setScreenSpace ( const bool value)
inline

Definition at line 29 of file screenComponent.h.

◆ updateScaleFromWindow()

void visutwin::canvas::ScreenComponent::updateScaleFromWindow ( int windowWidth,
int windowHeight )

Definition at line 20 of file screenComponent.cpp.


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