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

Methods

abstract()

Description

The abstract constructor.

Declared at: include/ekg/ui/abstract/ui_abstract.hpp:159

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()

Description

Destroy the element.

Declared at: include/ekg/ui/abstract/ui_abstract.hpp:231

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()

Description

Returns the element ID.

Declared at: include/ekg/ui/abstract/ui_abstract.hpp:194

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()

Declared at: include/ekg/ui/abstract/ui_abstract.hpp:255

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()

Declared at: include/ekg/ui/abstract/ui_abstract.hpp:259

ekg::state get_state()

Description

Returns the current element state.

Declared at: include/ekg/ui/abstract/ui_abstract.hpp:251

uint16_t& get_sync()

Declared at: include/ekg/ui/abstract/ui_abstract.hpp:261

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)

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()

Declared at: include/ekg/ui/abstract/ui_abstract.hpp:257

bool has_children()

Declared at: include/ekg/ui/abstract/ui_abstract.hpp:295

bool has_parent() const

Declared at: include/ekg/ui/abstract/ui_abstract.hpp:293

bool is_alive()

Description

Returns current element alive state.

Declared at: include/ekg/ui/abstract/ui_abstract.hpp:216

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()

Description

Returns element visible state.

Declared at: include/ekg/ui/abstract/ui_abstract.hpp:226

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()

Declared at: include/ekg/ui/abstract/ui_abstract.hpp:287

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)

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)

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)

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)

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)

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)

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)

Description

Set the visibility of element.

Declared at: include/ekg/ui/abstract/ui_abstract.hpp:221

Parameters

bool state

ekg::rect& ui()

Declared at: include/ekg/ui/abstract/ui_abstract.hpp:291

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)

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)

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)

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)

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()

Declared at: include/ekg/ui/abstract/ui_abstract.hpp:289

~abstract()

Description

The abstract desconstructor.

Declared at: include/ekg/ui/abstract/ui_abstract.hpp:164