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

#include <ui_Layout.hpp>

Inheritance diagram for pu::ui::Layout:
pu::ui::Container

Public Types

using OnInputCallback = std::function<void(const u64, const u64, const u64, const TouchPoint)>
 
using RenderCallback = std::function<void()>
 

Public Member Functions

 Layout ()
 
virtual ~Layout ()
 
bool HasChildren ()
 
void SetOnInput (OnInputCallback on_ipt_cb)
 
OnInputCallback GetOnInput ()
 
void AddRenderCallback (RenderCallback render_cb)
 
std::vector< RenderCallback > & GetRenderCallbacks ()
 
bool HasBackgroundImage ()
 
sdl2::TextureHandle::Ref & GetBackgroundImageTexture ()
 
Color GetBackgroundColor ()
 
void SetBackgroundImage (sdl2::TextureHandle::Ref bg_tex)
 
void ResetBackgroundImage ()
 
void SetBackgroundColor (const Color clr)
 
void SimulateTouchPosition (const TouchPoint sim_touch_pos)
 
TouchPoint ConsumeSimulatedTouchPosition ()
 
- Public Member Functions inherited from pu::ui::Container
 Container (const i32 x, const i32 y, const i32 width, const i32 height)
 
void Add (elm::Element::Ref elem)
 
std::vector< elm::Element::Ref > & GetElements ()
 
bool Has (elm::Element::Ref &elem)
 
void Clear ()
 
void PreRender ()
 

Static Public Attributes

static constexpr Color DefaultBackgroundColor = { 0xE1, 0xE1, 0xE1, 0xFF }
 

Additional Inherited Members

- Protected Attributes inherited from pu::ui::Container
i32 x
 
i32 y
 
i32 w
 
i32 h
 
std::vector< elm::Element::Ref > elems
 

Member Typedef Documentation

◆ OnInputCallback

using pu::ui::Layout::OnInputCallback = std::function<void(const u64, const u64, const u64, const TouchPoint)>

◆ RenderCallback

using pu::ui::Layout::RenderCallback = std::function<void()>

Constructor & Destructor Documentation

◆ Layout()

pu::ui::Layout::Layout ( )
inline

◆ ~Layout()

virtual pu::ui::Layout::~Layout ( )
virtual

Member Function Documentation

◆ AddRenderCallback()

void pu::ui::Layout::AddRenderCallback ( RenderCallback render_cb)
inline

◆ ConsumeSimulatedTouchPosition()

TouchPoint pu::ui::Layout::ConsumeSimulatedTouchPosition ( )

◆ GetBackgroundColor()

Color pu::ui::Layout::GetBackgroundColor ( )
inline

◆ GetBackgroundImageTexture()

sdl2::TextureHandle::Ref & pu::ui::Layout::GetBackgroundImageTexture ( )
inline

◆ GetOnInput()

OnInputCallback pu::ui::Layout::GetOnInput ( )
inline

◆ GetRenderCallbacks()

std::vector< RenderCallback > & pu::ui::Layout::GetRenderCallbacks ( )
inline

◆ HasBackgroundImage()

bool pu::ui::Layout::HasBackgroundImage ( )
inline

◆ HasChildren()

bool pu::ui::Layout::HasChildren ( )
inline

◆ ResetBackgroundImage()

void pu::ui::Layout::ResetBackgroundImage ( )

◆ SetBackgroundColor()

void pu::ui::Layout::SetBackgroundColor ( const Color clr)

◆ SetBackgroundImage()

void pu::ui::Layout::SetBackgroundImage ( sdl2::TextureHandle::Ref bg_tex)

◆ SetOnInput()

void pu::ui::Layout::SetOnInput ( OnInputCallback on_ipt_cb)
inline

◆ SimulateTouchPosition()

void pu::ui::Layout::SimulateTouchPosition ( const TouchPoint sim_touch_pos)
inline

Member Data Documentation

◆ DefaultBackgroundColor

Color pu::ui::Layout::DefaultBackgroundColor = { 0xE1, 0xE1, 0xE1, 0xFF }
staticconstexpr

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