GigaPasjans
Loading...
Searching...
No Matches
Andromenda::SelectionTextComponent Class Reference

Text component that can be selectable. More...

#include <SelectionTextComponent.h>

Inheritance diagram for Andromenda::SelectionTextComponent:
Collaboration diagram for Andromenda::SelectionTextComponent:

Public Member Functions

 SelectionTextComponent (const WideString &text)
 
bool IsSelectable () const override
 Returns value indicating, whether component is selectable.
 
void ProvideActions (ActionRegistry &registry) override
 Provides own actions to the ActionRegistry.
 
void Draw (DrawContext &context) override
 Draws self.
 
- Public Member Functions inherited from Andromenda::Component
bool UpdateState ()
 Checks whether component is dirty, if yes then returns true and sets dirty state to false, else returns false.
 
void SetActive (bool active)
 Sets m_IsActive to given state.
 
Box GetBounds ()
 Returns Component bounds. Position is already aligned.
 
void SetPosition (const Int2 &position)
 Sets position to given.
 

Public Attributes

WideString Text = L""
 Text that should be drawed on screen.
 

Protected Member Functions

Int2 getSize () override
 Returns size of a component.
 
- Protected Member Functions inherited from Andromenda::Component
int32 getCenteredX ()
 Returns X aligned to the center.
 
void markAsDirty ()
 Sets m_Dirty to true.
 

Additional Inherited Members

- Protected Attributes inherited from Andromenda::Component
bool m_IsActive = false
 A value indicating, whether object is being pointed by pointer.
 
std::atomic< bool > m_Dirty = false
 A value indicating, whether object is dirty.
 
String m_Id = ""
 Object identifier, that is unique per ComponentRegistry.
 
ComponentCallback m_Callback
 Action component callback.
 
Surfacem_OwnerSurface = nullptr
 Owning surface.
 
Int2 m_Position
 Component position.
 

Detailed Description

Text component that can be selectable.

Member Function Documentation

◆ Draw()

void Andromenda::SelectionTextComponent::Draw ( DrawContext & context)
inlineoverridevirtual

Draws self.

Implements Andromenda::Component.

◆ getSize()

Int2 Andromenda::SelectionTextComponent::getSize ( )
inlineoverrideprotectedvirtual

Returns size of a component.

Returns
Int2

Implements Andromenda::Component.

◆ IsSelectable()

bool Andromenda::SelectionTextComponent::IsSelectable ( ) const
inlineoverridevirtual

Returns value indicating, whether component is selectable.

Implements Andromenda::Component.

◆ ProvideActions()

void Andromenda::SelectionTextComponent::ProvideActions ( ActionRegistry & registry)
inlineoverridevirtual

Provides own actions to the ActionRegistry.

Implements Andromenda::Component.


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