3
4
5
6
7
8
9
10
11
12
15#include <pu/ui/ui_Container.hpp>
22 using OnInputCallback = std::function<
void(
const u64,
const u64,
const u64,
const TouchPoint)>;
23 using RenderCallback = std::function<
void()>;
32 OnInputCallback on_ipt;
33 std::vector<RenderCallback> render_cbs;
41 return !
this->elems.empty();
45 this->on_ipt = on_ipt_cb;
53 this->render_cbs.push_back(render_cb);
57 return this->render_cbs;
61 return this->over_bg_tex !=
nullptr;
65 return this->over_bg_tex;
69 return this->over_bg_color;
77 this->sim_touch_pos = sim_touch_pos;
Definition sdl2_Types.hpp:18
Definition ui_Container.hpp:21
Definition ui_Layout.hpp:20
void AddRenderCallback(RenderCallback render_cb)
Definition ui_Layout.hpp:52
bool HasBackgroundImage()
Definition ui_Layout.hpp:60
void SetBackgroundImage(sdl2::TextureHandle::Ref bg_tex)
void SetOnInput(OnInputCallback on_ipt_cb)
Definition ui_Layout.hpp:44
TouchPoint ConsumeSimulatedTouchPosition()
void ResetBackgroundImage()
bool HasChildren()
Definition ui_Layout.hpp:40
void SetBackgroundColor(const Color clr)
Color GetBackgroundColor()
Definition ui_Layout.hpp:68
std::vector< RenderCallback > & GetRenderCallbacks()
Definition ui_Layout.hpp:56
static constexpr Color DefaultBackgroundColor
Definition ui_Layout.hpp:25
void SimulateTouchPosition(const TouchPoint sim_touch_pos)
Definition ui_Layout.hpp:76
sdl2::TextureHandle::Ref & GetBackgroundImageTexture()
Definition ui_Layout.hpp:64
Layout()
Definition ui_Layout.hpp:36
OnInputCallback GetOnInput()
Definition ui_Layout.hpp:48
Definition sdl2_Types.hpp:10
#define PU_SMART_CTOR(type)
Definition pu_Include.hpp:20
Definition ui_Types.hpp:44
Definition ui_Types.hpp:67