CYD-UI
A C++ library for building native graphic user interfaces
Loading...
Searching...
No Matches
cydui.components.base Module Reference

Exported Modules

module  cydui.components.base.style
 
module  cydui.styling
 
module  cydui.styling
 
module  cydui.components.base.identifier
 
module  quantify
 
module  quantify
 
module  quantify
 
module  quantify
 
module  quantify
 
module  quantify
 
module  cydui.graphics
 
module  cydui.graphics
 
module  cydui.graphics
 
module  reflect
 
module  reflect
 
module  reflect
 
module  reflect
 
module  reflect
 
module  reflect
 
module  reflect
 
module  cydui.events
 
module  cydui.events
 
module  cydui.events
 
module  cydui.dimensions
 
module  cydui.dimensions
 
module  cydui.dimensions
 
module  cydui.dimensions
 
module  cydui.dimensions
 
module  cydui.dimensions
 
module  cydui.dimensions
 

Concepts

concept  cydui::components::ComponentConcept
 

Classes

class  cydui::components::component_base_t
 
struct  cydui::components::component_actor_t
 
class  cydui::components::event_dispatcher_base_t
 
struct  ContextUpdate< ContextType >
 
class  with_context
 
class  cydui::components::context_store_t
 
struct  cydui::use_context< ContextType >
 
struct  cydui::provide_context< ContextType >
 
class  cydui::components::component_state_t
 
struct  cydui::components::str_literal_t< N >
 
struct  cydui::components::internal_relations_t
 
struct  cydui::components::component_dimensional_relations_t
 
struct  cydui::components::component_builder_t
 
struct  cydui::components::component_holder_t
 
struct  attribute_i
 
struct  attr_content< E >
 
struct  attrs_component< T >
 

Typedefs

using sptr = std::shared_ptr<component_base_t>
 
using wptr = std::weak_ptr<component_base_t>
 
using children_list = std::vector<cydui::components::component_holder_t>
 
using cydui::components::component_state_ref = std::shared_ptr<component_state_t>
 
using content = std::vector<cydui::components::component_builder_t>
 

Functions

 component_base_t (identifier_t identifier={})
 
virtual ~component_base_t ()=default
 
virtual void * get_props ()=0
 
virtual component_base_tfind_by_coords (dimension_t::value_type x, dimension_t::value_type y)=0
 
virtual component_dimensional_relations_t get_dimensional_relations ()=0
 
virtual std::shared_ptr< dimension_ctx_tget_dimensional_context ()=0
 
virtual const refl::type_info & get_style_type_info () const =0
 
virtual attrs_componentattrs ()=0
 
virtual std::string name () const =0
 
component_state_ref state () const
 
template<typename T>
auto & get_data ()
 
template<typename T>
bool remove_data ()
 
template<typename ContextType>
void add_context (provide_context< ContextType > &ptr)
 
template<typename ContextType>
std::optional< ContextType * > find_context ()
 
internal_relations_tget_internal_relations ()
 
event_dispatcher_base_tget_event_dispatcher ()
 
style_base_tget_style ()
 
style_data_base_tget_style_data ()
 
void clear_children ()
 
void set_id (const std::string &id)
 
std::string get_id ()
 
std::string get_id () const
 
void tag (const std::string &tag_)
 
void untag (const std::string &tag_)
 
bool has_tag (const std::string &tag_) const
 
std::optional< sptrfind_child (const std::string &id)
 
std::list< sptrfind_children (const std::string &id)
 
void set_state (const component_state_ref &state)
 
static void set_component_state (component_base_t *component, component_state_ref state)
 
static std::shared_ptr< component_state_tcreate_state_instance (component_base_t *component)
 
static bool update_component_with (component_base_t *component, std::shared_ptr< component_base_t > other)
 
static void mount_component (component_base_t *component)
 
static void dismount_component (component_base_t *component)
 
virtual ~event_dispatcher_base_t ()=default
 
virtual std::vector< component_holder_tupdate (StyleArchive &style_archive, component_builder_t &content_children_builder)=0
 
virtual void paint_fragment (vg::fragment_t &fragment)=0
 
virtual void dispatch_key_press (const KeyEvent &ev)=0
 
virtual void dispatch_key_release (const KeyEvent &ev)=0
 
virtual void dispatch_text_input (const TextInputEvent &ev)=0
 
virtual void dispatch_button_press (const Button &ev, dimension_t::value_type x, dimension_t::value_type y)=0
 
virtual void dispatch_button_release (const Button &ev, dimension_t::value_type x, dimension_t::value_type y)=0
 
virtual void dispatch_scroll (dimension_t::value_type dx, dimension_t::value_type dy)=0
 
virtual void dispatch_mouse_enter (dimension_t::value_type x, dimension_t::value_type y)=0
 
virtual void dispatch_mouse_exit (dimension_t::value_type x, dimension_t::value_type y)=0
 
virtual void dispatch_mouse_motion (dimension_t::value_type x, dimension_t::value_type y)=0
 
virtual void dispatch_focus_changed ()=0
 
 context_store_t ()=default
 
template<typename T>
void add_context (const std::shared_ptr< T > &ptr)
 
template<typename T>
std::optional< T * > find_context ()
 
bool empty () const
 
constexpr str_literal_t (const char(&str)[N])
 
 component_builder_t ()=default
 
template<ComponentConcept C>
 component_builder_t (C comp)
 
std::vector< std::shared_ptr< component_base_t > > get_components () const
 
const auto & get_component_constructors () const
 
void append_component (const std::function< std::shared_ptr< component_base_t >()> &component)
 
void transform (auto &&fun)
 
bool empty () const
 
std::size_t size () const
 
 component_holder_t ()=default
 
template<ComponentConcept ... C>
 component_holder_t (C... comps) noexcept
 
template<ComponentConcept C>
 component_holder_t (std::vector< C > comps) noexcept
 
template<ComponentConcept C>
 component_holder_t (C comp)
 
 component_holder_t (const component_builder_t &builder)
 
 component_holder_t (const component_holder_t &other)
 
 component_holder_t (component_holder_t &&other) noexcept
 
component_holder_toperator= (const component_holder_t &other)
 
component_holder_toperator= (component_holder_t &&other) noexcept
 
component_holder_tappend (const component_holder_t &other)
 
 component_holder_t (const std::vector< std::shared_ptr< component_base_t > > &components_)
 
auto & get_components ()
 
const auto & get_components () const
 
void append_component (std::shared_ptr< component_base_t > component)
 
auto begin ()
 
auto begin () const
 
auto end ()
 
auto end () const
 

Variables

std::optional< component_base_t * > parent = std::nullopt
 
std::list< std::shared_ptr< component_base_t > > children {}
 
internal_relations_t internal_relations {}
 
std::optional< std::shared_ptr< event_dispatcher_base_t > > event_dispatcher {std::nullopt}
 
std::shared_ptr< style_data_base_tstyle_data {}
 
char value [N]
 
dimension_t cx {}
 
dimension_t cy {}
 
dimension_t cw {}
 
dimension_t ch {}
 
dimension_tx
 
dimension_ty
 
dimension_twidth
 
dimension_theight
 
dimension_tmargin_top
 
dimension_tmargin_bottom
 
dimension_tmargin_left
 
dimension_tmargin_right
 
dimension_tpadding_top
 
dimension_tpadding_bottom
 
dimension_tpadding_left
 
dimension_tpadding_right
 

Files

file  include/cyd_ui/components/base/component_base.cppm
 
file  include/cyd_ui/components/base/component_attributes.cppm
 
file  include/cyd_ui/components/base/component_contexts.cppm
 
file  include/cyd_ui/components/base/component_ev_dispatcher.cppm
 
file  include/cyd_ui/components/base/component_holder.cppm
 
file  include/cyd_ui/components/base/component_state.cppm
 
file  include/cyd_ui/components/base/component_types.cppm