Plutonium framework API 0.3.0
UI framework libraries for libnx
Loading...
Searching...
No Matches
pu::ui::elm::TextBlock Class Reference

#include <elm_TextBlock.hpp>

Inheritance diagram for pu::ui::elm::TextBlock:
pu::ui::elm::Element

Public Member Functions

 TextBlock (const i32 x, const i32 y, const std::string &text)
 
 ~TextBlock ()
 
i32 GetX () override
 
void SetX (const i32 x)
 
i32 GetY () override
 
void SetY (const i32 y)
 
i32 GetWidth () override
 
i32 GetHeight () override
 
std::string GetText ()
 
void SetText (const std::string &text)
 
void SetFont (const std::string &font_name)
 
void SetColor (const Color clr)
 
void OnRender (render::Renderer::Ref &drawer, const i32 x, const i32 y) override
 
void OnInput (const u64 keys_down, const u64 keys_up, const u64 keys_held, const TouchPoint touch_pos) override
 
- Public Member Functions inherited from pu::ui::elm::Element
 Element ()
 
virtual ~Element ()
 
bool IsVisible ()
 
void SetVisible (const bool visible)
 
void SetHorizontalAlign (const HorizontalAlign align)
 
HorizontalAlign GetHorizontalAlign ()
 
void SetVerticalAlign (const VerticalAlign align)
 
VerticalAlign GetVerticalAlign ()
 
void SetParentContainer (Container *parent_container)
 
i32 GetProcessedX ()
 
i32 GetProcessedY ()
 

Static Public Attributes

static constexpr Color DefaultColor = { 0, 0, 0, 0xFF }
 

Additional Inherited Members

- Protected Attributes inherited from pu::ui::elm::Element
bool visible
 
HorizontalAlign h_align
 
VerticalAlign v_align
 
Containerparent_container
 

Constructor & Destructor Documentation

◆ TextBlock()

pu::ui::elm::TextBlock::TextBlock ( const i32 x,
const i32 y,
const std::string & text )

◆ ~TextBlock()

pu::ui::elm::TextBlock::~TextBlock ( )

Member Function Documentation

◆ GetHeight()

i32 pu::ui::elm::TextBlock::GetHeight ( )
overridevirtual

Implements pu::ui::elm::Element.

◆ GetText()

std::string pu::ui::elm::TextBlock::GetText ( )
inline

◆ GetWidth()

i32 pu::ui::elm::TextBlock::GetWidth ( )
overridevirtual

Implements pu::ui::elm::Element.

◆ GetX()

i32 pu::ui::elm::TextBlock::GetX ( )
inlineoverridevirtual

Implements pu::ui::elm::Element.

◆ GetY()

i32 pu::ui::elm::TextBlock::GetY ( )
inlineoverridevirtual

Implements pu::ui::elm::Element.

◆ OnInput()

void pu::ui::elm::TextBlock::OnInput ( const u64 keys_down,
const u64 keys_up,
const u64 keys_held,
const TouchPoint touch_pos )
inlineoverridevirtual

Implements pu::ui::elm::Element.

◆ OnRender()

void pu::ui::elm::TextBlock::OnRender ( render::Renderer::Ref & drawer,
const i32 x,
const i32 y )
overridevirtual

Implements pu::ui::elm::Element.

◆ SetColor()

void pu::ui::elm::TextBlock::SetColor ( const Color clr)

◆ SetFont()

void pu::ui::elm::TextBlock::SetFont ( const std::string & font_name)

◆ SetText()

void pu::ui::elm::TextBlock::SetText ( const std::string & text)

◆ SetX()

void pu::ui::elm::TextBlock::SetX ( const i32 x)
inline

◆ SetY()

void pu::ui::elm::TextBlock::SetY ( const i32 y)
inline

Member Data Documentation

◆ DefaultColor

Color pu::ui::elm::TextBlock::DefaultColor = { 0, 0, 0, 0xFF }
staticconstexpr

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