class abstract
Declaration
class abstract { /* full declaration omitted */ };
Declared at: include/ekg/ui/abstract/ui_abstract.hpp:104
Member Variables
- protected std::array<ekg::task*, 8> action_register = {}
- protected std::array<ekg::gpu::sampler_t*, 4> layer_surfaces = {}
- protected int32_t id = {}
- protected int32_t parent_id = {}
- protected int32_t owner_id = {}
- protected std::vector<int32_t> child_id_list = {}
- protected bool alive = {true}
- protected bool visible = {true}
- protected bool immutable = {}
- protected uint16_t dock_flags = {}
- protected uint16_t sync_flags = {}
- protected std::string tag = {}
- protected ekg::state state = {}
- protected ekg::type type = {ekg::type::abstract}
- protected ekg::level level = {}
- protected ekg::rect rect_widget = {}
- protected ekg::rect sync_ui = {}
- protected int32_t scaled_height = {}
Method Overview
- public abstract()
- public ekg::ui::abstract * add_child(int32_t id)
- public void destroy()
- public std::vector<int32_t> & get_child_id_list()
- public int32_t get_id()
- public ekg::gpu::sampler_t * get_layer(ekg::layer layer)
- public ekg::level get_level()
- public int32_t get_parent_id()
- public uint16_t get_place_dock()
- public ekg::state get_state()
- public uint16_t & get_sync()
- public std::string_view get_tag()
- public ekg::task * get_task(ekg::action action)
- public ekg::type get_type()
- public bool has_children()
- public bool has_parent() const
- public bool is_alive()
- public bool is_immutable()
- public bool is_visible()
- public ekg::ui::abstract * remove_child(int32_t id)
- public void reset()
- public ekg::ui::abstract * set_alive(bool state)
- public ekg::ui::abstract * set_layer(ekg::gpu::sampler_t * p_sampler, ekg::layer layer)
- public ekg::ui::abstract * set_level(const ekg::level & _level)
- public ekg::ui::abstract * set_parent_id(int32_t parent_id)
- public ekg::ui::abstract * set_state(const ekg::state & _state)
- public ekg::ui::abstract * set_tag(std::string_view tag)
- public ekg::ui::abstract * set_task(ekg::task * p_task, ekg::action action)
- public ekg::ui::abstract * set_visible(bool state)
- public ekg::rect & ui()
- public void unsafe_destroy_childs()
- public ekg::ui::abstract * unsafe_set_id(int32_t id)
- public ekg::ui::abstract * unsafe_set_immutable(bool is_now_immutable)
- public ekg::ui::abstract * unsafe_set_scaled_height_layout(int32_t scaled_size)
- public ekg::ui::abstract * unsafe_set_type(ekg::type enum_type)
- public ekg::rect & widget()
- public ~abstract()
Methods
¶abstract()
abstract()
Description
The abstract constructor.
Declared at: include/ekg/ui/abstract/ui_abstract.hpp:159
¶ekg::ui::abstract* add_child(int32_t id)
ekg::ui::abstract* add_child(int32_t id)
Description
Add an UI element as child.
Declared at: include/ekg/ui/abstract/ui_abstract.hpp:179
Parameters
- int32_t id
¶void destroy()
void destroy()
Description
Destroy the element.
Declared at: include/ekg/ui/abstract/ui_abstract.hpp:231
¶std::vector<int32_t>& get_child_id_list()
std::vector<int32_t>& get_child_id_list()
Description
Returns the list of child elements, containing all UI element IDs.
Declared at: include/ekg/ui/abstract/ui_abstract.hpp:184
¶int32_t get_id()
int32_t get_id()
Description
Returns the element ID.
Declared at: include/ekg/ui/abstract/ui_abstract.hpp:194
¶ekg::gpu::sampler_t* get_layer(ekg::layer layer)
ekg::gpu::sampler_t* get_layer(ekg::layer layer)
Description
Get a sampler from the element layers.
Declared at: include/ekg/ui/abstract/ui_abstract.hpp:285
Parameters
- ekg::layer layer
¶ekg::level get_level()
ekg::level get_level()
Declared at: include/ekg/ui/abstract/ui_abstract.hpp:255
¶int32_t get_parent_id()
int32_t get_parent_id()
Description
Returns the parent element ID.
Declared at: include/ekg/ui/abstract/ui_abstract.hpp:204
¶uint16_t get_place_dock()
uint16_t get_place_dock()
Declared at: include/ekg/ui/abstract/ui_abstract.hpp:259
¶ekg::state get_state()
ekg::state get_state()
Description
Returns the current element state.
Declared at: include/ekg/ui/abstract/ui_abstract.hpp:251
¶uint16_t& get_sync()
uint16_t& get_sync()
Declared at: include/ekg/ui/abstract/ui_abstract.hpp:261
¶std::string_view get_tag()
std::string_view get_tag()
Description
Returns the general-purpose use tag.
Declared at: include/ekg/ui/abstract/ui_abstract.hpp:174
¶ekg::task* get_task(ekg::action action)
ekg::task* get_task(ekg::action action)
Description
Return a task from an action.
Declared at: include/ekg/ui/abstract/ui_abstract.hpp:274
Parameters
- ekg::action action
¶ekg::type get_type()
ekg::type get_type()
Declared at: include/ekg/ui/abstract/ui_abstract.hpp:257
¶bool has_children()
bool has_children()
Declared at: include/ekg/ui/abstract/ui_abstract.hpp:295
¶bool has_parent() const
bool has_parent() const
Declared at: include/ekg/ui/abstract/ui_abstract.hpp:293
¶bool is_alive()
bool is_alive()
Description
Returns current element alive state.
Declared at: include/ekg/ui/abstract/ui_abstract.hpp:216
¶bool is_immutable()
bool is_immutable()
Description
Returns if the element is immutable, with-no attention to the main processor.
Declared at: include/ekg/ui/abstract/ui_abstract.hpp:237
¶bool is_visible()
bool is_visible()
Description
Returns element visible state.
Declared at: include/ekg/ui/abstract/ui_abstract.hpp:226
¶ekg::ui::abstract* remove_child(int32_t id)
ekg::ui::abstract* remove_child(int32_t id)
Description
Remove an element from child list.
Declared at: include/ekg/ui/abstract/ui_abstract.hpp:189
Parameters
- int32_t id
¶void reset()
void reset()
Declared at: include/ekg/ui/abstract/ui_abstract.hpp:287
¶ekg::ui::abstract* set_alive(bool state)
ekg::ui::abstract* set_alive(bool state)
Description
Set current alive state, but the element is destroyed when GC task runs.
Declared at: include/ekg/ui/abstract/ui_abstract.hpp:211
Parameters
- bool state
¶ekg::ui::abstract* set_layer(
ekg::gpu::sampler_t* p_sampler,
ekg::layer layer)
ekg::ui::abstract* set_layer(
ekg::gpu::sampler_t* p_sampler,
ekg::layer layer)
Description
Set one drawing layer with a sampler. You must initialize and fill the sampler with pixels data before to use.
Declared at: include/ekg/ui/abstract/ui_abstract.hpp:280
Parameters
- ekg::gpu::sampler_t* p_sampler
- ekg::layer layer
¶ekg::ui::abstract* set_level(
const ekg::level& _level)
ekg::ui::abstract* set_level(
const ekg::level& _level)
Declared at: include/ekg/ui/abstract/ui_abstract.hpp:253
Parameters
- const ekg::level& _level
¶ekg::ui::abstract* set_parent_id(
int32_t parent_id)
ekg::ui::abstract* set_parent_id(
int32_t parent_id)
Description
Set parent element ID.
Declared at: include/ekg/ui/abstract/ui_abstract.hpp:199
Parameters
- int32_t parent_id
¶ekg::ui::abstract* set_state(
const ekg::state& _state)
ekg::ui::abstract* set_state(
const ekg::state& _state)
Description
Set the current element state, possibles states: enable, disable. An eneble element is interactive by IO inputs, while an disable element not.
Declared at: include/ekg/ui/abstract/ui_abstract.hpp:246
Parameters
- const ekg::state& _state
¶ekg::ui::abstract* set_tag(std::string_view tag)
ekg::ui::abstract* set_tag(std::string_view tag)
Description
Set general-purpose use tag.
Declared at: include/ekg/ui/abstract/ui_abstract.hpp:169
Parameters
- std::string_view tag
¶ekg::ui::abstract* set_task(ekg::task* p_task,
ekg::action action)
ekg::ui::abstract* set_task(ekg::task* p_task,
ekg::action action)
Description
Set a task to an action, possibles actions: press, release, hover, drag, focus, resize, activity. Actions supports allocated PTR and PTR reference.
Declared at: include/ekg/ui/abstract/ui_abstract.hpp:269
Parameters
- ekg::task* p_task
- ekg::action action
¶ekg::ui::abstract* set_visible(bool state)
ekg::ui::abstract* set_visible(bool state)
Description
Set the visibility of element.
Declared at: include/ekg/ui/abstract/ui_abstract.hpp:221
Parameters
- bool state
¶ekg::rect& ui()
ekg::rect& ui()
Declared at: include/ekg/ui/abstract/ui_abstract.hpp:291
¶void unsafe_destroy_childs()
void unsafe_destroy_childs()
Description
Destroy the element childs, which is unsafe due the performance overhead.
Declared at: include/ekg/ui/abstract/ui_abstract.hpp:142
¶ekg::ui::abstract* unsafe_set_id(int32_t id)
ekg::ui::abstract* unsafe_set_id(int32_t id)
Description
Set the element ID, which is unsafe due to collisions between others IDs.
Declared at: include/ekg/ui/abstract/ui_abstract.hpp:136
Parameters
- int32_t id
¶ekg::ui::abstract* unsafe_set_immutable(
bool is_now_immutable)
ekg::ui::abstract* unsafe_set_immutable(
bool is_now_immutable)
Description
Set the element out of main processor runtime, the main processor ekg::runtime does not care with immutable widgets.
Declared at: include/ekg/ui/abstract/ui_abstract.hpp:154
Parameters
- bool is_now_immutable
¶ekg::ui::abstract*
unsafe_set_scaled_height_layout(
int32_t scaled_size)
ekg::ui::abstract*
unsafe_set_scaled_height_layout(
int32_t scaled_size)
Declared at: include/ekg/ui/abstract/ui_abstract.hpp:130
Parameters
- int32_t scaled_size
¶ekg::ui::abstract* unsafe_set_type(
ekg::type enum_type)
ekg::ui::abstract* unsafe_set_type(
ekg::type enum_type)
Description
Set the element type, not recommend to use, due the object origin be incorrect with the current set.
Declared at: include/ekg/ui/abstract/ui_abstract.hpp:148
Parameters
- ekg::type enum_type
¶ekg::rect& widget()
ekg::rect& widget()
Declared at: include/ekg/ui/abstract/ui_abstract.hpp:289
¶~abstract()
~abstract()
Description
The abstract desconstructor.
Declared at: include/ekg/ui/abstract/ui_abstract.hpp:164