19 export template <
typename ContextType>
23export using children_list = std::vector<cydui::components::component_holder_t>;
50 template<fabric::async::EventType EV>
52 if (
nullptr == this->
window)
return;
53 this->
window->emit<EV>(ev);
79 child->parent_ =
this;
88 return is_text_input_;
105 std::shared_ptr<fabric::async::async_bus_t>
window =
nullptr;
115 bool animated =
false;
116 bool is_text_input_ =
false;
122 it->animated = animated;
126 it->is_text_input_ = is_text_input;
static void set_is_text_input(component_state_t *it, bool is_text_input)
static void set_animated(component_state_t *it, bool animated)
void set_component_name(const std::string &name)
void force_redraw()
Emits a RedrawEvent for this component.
bool is_text_input() const
component_state_t * parent()
std::optional< std::shared_ptr< component_base_t > > component_instance
void add_children_state(const std::string &id, const component_state_ref &child)
std::shared_ptr< fabric::async::async_bus_t > window
component_state_t()=default
void mark_dirty()
Marks this component state as needing to be redrawn.
component_state_t * parent_
virtual ~component_state_t()=default
std::string component_name_
component_state_t(void *props)
friend class component_state_delegate_t
std::string component_name() const
std::unordered_map< std::string, component_state_ref > children_states
friend class component_base_t
std::vector< cydui::components::component_holder_t > children_list
std::shared_ptr< component_state_t > component_state_ref