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

#include <elm_Toggle.hpp>

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

Public Member Functions

 Toggle (const i32 x, const i32 y, const std::string &content, const u64 toggle_key, const Color clr)
 
 ~Toggle ()
 
i32 GetX () override
 
void SetX (const i32 x)
 
i32 GetY () override
 
void SetY (const i32 y)
 
i32 GetWidth () override
 
i32 GetHeight () override
 
std::string GetContent ()
 
void SetContent (const std::string &content)
 
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 u32 DefaultContentHorizontalMargin = 30
 
static constexpr u32 DefaultContentVerticalMargin = 20
 
static constexpr DefaultFontSize DefaultContentFontSize = DefaultFontSize::MediumLarge
 
static constexpr u8 DefaultToggleAlphaIncrement = 48
 
static constexpr Color DefaultBackgroundColor = { 130, 130, 130, 255 }
 

Additional Inherited Members

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

Constructor & Destructor Documentation

◆ Toggle()

pu::ui::elm::Toggle::Toggle ( const i32 x,
const i32 y,
const std::string & content,
const u64 toggle_key,
const Color clr )

◆ ~Toggle()

pu::ui::elm::Toggle::~Toggle ( )

Member Function Documentation

◆ GetContent()

std::string pu::ui::elm::Toggle::GetContent ( )
inline

◆ GetHeight()

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

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

◆ GetWidth()

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

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

◆ GetX()

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

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

◆ GetY()

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

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

◆ OnInput()

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

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

◆ OnRender()

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

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

◆ SetColor()

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

◆ SetContent()

void pu::ui::elm::Toggle::SetContent ( const std::string & content)

◆ SetFont()

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

◆ SetX()

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

◆ SetY()

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

Member Data Documentation

◆ DefaultBackgroundColor

Color pu::ui::elm::Toggle::DefaultBackgroundColor = { 130, 130, 130, 255 }
staticconstexpr

◆ DefaultContentFontSize

DefaultFontSize pu::ui::elm::Toggle::DefaultContentFontSize = DefaultFontSize::MediumLarge
staticconstexpr

◆ DefaultContentHorizontalMargin

u32 pu::ui::elm::Toggle::DefaultContentHorizontalMargin = 30
staticconstexpr

◆ DefaultContentVerticalMargin

u32 pu::ui::elm::Toggle::DefaultContentVerticalMargin = 20
staticconstexpr

◆ DefaultToggleAlphaIncrement

u8 pu::ui::elm::Toggle::DefaultToggleAlphaIncrement = 48
staticconstexpr

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