Definition at line 26 of file component_state.cppm.
◆ ~component_state_t()
virtual cydui::components::component_state_t::~component_state_t |
( |
| ) |
|
|
virtualdefault |
◆ component_state_t() [1/2]
cydui::components::component_state_t::component_state_t |
( |
| ) |
|
|
default |
◆ component_state_t() [2/2]
cydui::components::component_state_t::component_state_t |
( |
void * | props | ) |
|
|
inlineexplicit |
◆ add_children_state()
void cydui::components::component_state_t::add_children_state |
( |
const std::string & | id, |
|
|
const component_state_ref & | child ) |
|
inline |
◆ component_name()
std::string cydui::components::component_state_t::component_name |
( |
| ) |
const |
|
inline |
◆ emit()
template<fabric::async::EventType EV>
void cydui::components::component_state_t::emit |
( |
EV | ev | ) |
|
|
inline |
◆ force_redraw()
void cydui::components::component_state_t::force_redraw |
( |
| ) |
|
|
inline |
Emits a RedrawEvent for this component.
- Warning
- This is only meant to be called from custom event handlers. Event handlers for events declared in
cydui_events.h
automatically trigger a redraw if state->mark_dirty()
gets called. Use that instead.
Definition at line 64 of file component_state.cppm.
◆ is_animated()
bool cydui::components::component_state_t::is_animated |
( |
| ) |
const |
|
inline |
◆ is_text_input()
bool cydui::components::component_state_t::is_text_input |
( |
| ) |
const |
|
inline |
◆ mark_dirty()
void cydui::components::component_state_t::mark_dirty |
( |
| ) |
|
|
inline |
Marks this component state as needing to be redrawn.
Events declared in cydui_events.h
are dispatched automatically by the layout, which then checks for any dirty
components that need redrawing.
It is due diligence of the component developer to appropriately mark the component as dirty when appropriate. As a baseline, any mutation to the state of a component should mark it dirty if said mutation affects how the component, or its children, are rendered.
Definition at line 46 of file component_state.cppm.
◆ parent()
◆ set_component_name()
void cydui::components::component_state_t::set_component_name |
( |
const std::string & | name | ) |
|
|
inlineprotected |
◆ component_base_t
◆ component_state_delegate_t
◆ _dirty
bool cydui::components::component_state_t::_dirty = false |
◆ children_states
std::unordered_map<std::string, component_state_ref> cydui::components::component_state_t::children_states { } |
◆ component_instance
std::optional<std::shared_ptr<component_base_t> > cydui::components::component_state_t::component_instance = std::nullopt |
◆ component_name_
std::string cydui::components::component_state_t::component_name_ |
◆ focused
bool cydui::components::component_state_t::focused = false |
◆ hovering
bool cydui::components::component_state_t::hovering = false |
◆ parent_
◆ window
std::shared_ptr<fabric::async::async_bus_t> cydui::components::component_state_t::window = nullptr |
The documentation for this class was generated from the following file: