42 virtual void drag(
point const& aPosition,
bool aIgnoreConstraints) = 0;
63 class i_element_library;
83 struct no_parent : std::logic_error {
no_parent() : std::logic_error{
"neogfx::DesignStudio::i_element::no_parent" } {} };
85 struct no_caddy : std::logic_error {
no_caddy() : std::logic_error{
"neogfx::DesignStudio::i_element::no_caddy" } {} };
117 virtual void select(
bool aSelected =
true,
bool aDeselectRest =
true) = 0;
130 std::size_t result = 0;
139 child->visit(aVisitor);
144 (*iterChild)->visit(aVisitor);
158 template <
typename T>
165 template <
typename Type>
virtual void end_drag()=0
virtual void start_drag(cardinal aPart, point const &aPosition)=0
virtual void drag(point const &aPosition, bool aIgnoreConstraints)=0
virtual i_element_caddy & caddy() const =0
virtual void remove_child(i_element &aChild)=0
virtual i_layout_item & layout_item() const =0
virtual children_t const & children() const =0
children_t::const_iterator end() const
virtual i_project & project() const =0
virtual bool has_parent() const =0
virtual i_element const & parent() const =0
virtual neolib::i_string const & id() const =0
virtual void set_mode(element_mode aMode)=0
virtual void add_child(i_element &aChild)=0
virtual neolib::i_string const & type() const =0
virtual element_group group() const =0
virtual bool has_layout_item() const =0
virtual void create_layout_item(i_widget &aParent)=0
void reverse_visit(std::function< void(i_element &)> aVisitor)
std::size_t selected_child_count() const
i_widget & widget() const
virtual i_element_library const & library() const =0
virtual i_element & root()=0
neolib::i_vector< i_ref_ptr< i_element > > children_t
virtual i_element & parent()=0
virtual bool is_selected() const =0
void visit(std::function< void(i_element &)> aVisitor)
children_t::iterator end()
children_t::iterator begin()
virtual children_t & children()=0
virtual void set_caddy(i_element_caddy &aCaddy)=0
declare_event(mode_changed) declare_event(selection_changed) declare_event(context_menu
children_t::const_iterator begin() const
virtual void select(bool aSelected=true, bool aDeselectRest=true)=0
virtual void create_default_children()=0
virtual bool needs_caddy() const =0
virtual void set_parent(i_element &aParent)=0
virtual i_element const & root() const =0
virtual element_mode mode() const =0
virtual bool has_caddy() const =0
virtual const i_widget & as_widget() const =0
virtual bool is_widget() const =0
const_iterator end() const
const_reverse_iterator rend() const
const_iterator begin() const
offset_iterator< value_type > iterator
offset_iterator< const value_type > const_iterator
void create_default_children(i_element &aParent)
#define declare_event(declName,...)
static constexpr bool needsCaddy