34 class i_layout_item_cache;
94 virtual void update_layout(
bool aDeferLayout =
true,
bool aAncestors =
false) = 0;
105 template <
typename LayoutType>
108 return find_ancestor_layout<LayoutType>() !=
nullptr;
110 template <
typename LayoutType>
116 if (existing !=
nullptr)
118 return parent_layout().template find_ancestor_layout<LayoutType>();
122 template <
typename LayoutType>
125 auto existing = find_ancestor_layout<LayoutType>();
126 if (existing !=
nullptr)
137 template <
typename LayoutItemType, layout_item_category ParentItemCategory = layout_item_category::Unspecified>
141 typedef LayoutItemType base_type;
143 using base_type::base_type;
147 if (base_type::has_size_policy())
149 return base_type::size_policy();
151 else if (base_type::has_parent_layout_item())
155 if (base_type::has_parent_layout())
156 return base_type::parent_layout().size_policy();
157 return base_type::size_policy();
161 if (base_type::has_parent_widget())
162 return base_type::parent_widget().size_policy();
163 return base_type::size_policy();
166 return base_type::parent_layout_item().size_policy();
168 return base_type::size_policy();
175 virtual std::uint32_t
id()
const = 0;
180 static uuid const&
iid() {
static uuid const sIid{ 0xd7e05b0f, 0xc4eb, 0x440a, 0x844e, { 0x35, 0x18, 0xc0, 0x48, 0xee, 0x53 } };
return sIid; }
185 return service<i_item_layout>().id();
190 return service<i_item_layout>().querying_ideal_size();
virtual std::uint32_t id() const =0
virtual bool & in_progress()=0
virtual bool & querying_ideal_size()=0
virtual void increment_id()=0
static uuid const & iid()
virtual const i_widget & layout_manager() const =0
virtual i_widget & layout_manager()=0
virtual i_layout & as_layout()=0
i_layout_item abstract_type
virtual void layout_as(const point &aPosition, const size &aSize)=0
virtual const i_widget & as_widget() const =0
virtual const i_layout & parent_layout() const =0
virtual bool is_layout() const =0
virtual const i_layout_item & parent_layout_item() const =0
virtual void set_id(const i_string &aId)=0
bool has_ancestor_layout() const
virtual void set_parent_widget(i_widget *aParentWidget)=0
virtual void layout_item_enabled(i_layout_item &aItem)=0
virtual bool has_parent_layout() const =0
virtual i_spacer & as_spacer()=0
virtual bool has_parent_widget() const =0
virtual i_layout & parent_layout()=0
virtual i_layout_item & parent_layout_item()=0
LayoutType & ancestor_layout()
virtual i_widget & parent_widget()=0
virtual const i_spacer & as_spacer() const =0
virtual bool has_parent_layout_item() const =0
virtual bool visible() const =0
LayoutType * find_ancestor_layout()
virtual bool has_layout_manager() const =0
virtual void set_parent_layout(i_layout *aParentLayout)=0
virtual void fix_weightings(bool aRecalculate=true)=0
virtual const i_widget & parent_widget() const =0
virtual i_widget & as_widget()=0
bool same_parent_widget_as(i_layout_item const &aOther) const
virtual void invalidate_combined_transformation()=0
virtual void update_layout(bool aDeferLayout=true, bool aAncestors=false)=0
virtual bool is_widget() const =0
virtual const i_string & id() const =0
virtual bool is_cache() const =0
virtual void layout_item_disabled(i_layout_item &aItem)=0
virtual bool is_spacer() const =0
virtual ~i_layout_item()=default
virtual const i_layout & as_layout() const =0
neogfx::size_policy size_policy() const override
uint32_t global_layout_id()
bool querying_ideal_size()
ancestor_layout_type_not_found()