neoGFX
Cross-platform C++ app/game engine
Loading...
Searching...
No Matches
neogfx::i_layout Class Referenceabstract

#include <i_layout.hpp>

Inheritance diagram for neogfx::i_layout:
neogfx::i_layout_item neolib::i_reference_counted neogfx::i_property_owner neogfx::i_anchorable neogfx::i_object neolib::i_object neolib::i_lifetime

Classes

struct  bad_item_index
 
struct  incompatible_layouts
 
struct  item_not_found
 
struct  wrong_item_type
 

Public Member Functions

virtual ~i_layout ()=default
 
virtual i_layout_itemadd (i_layout_item &aItem)=0
 
virtual i_layout_itemadd_at (layout_item_index aPosition, i_layout_item &aItem)=0
 
virtual i_layout_itemadd (i_ref_ptr< i_layout_item > const &aItem)=0
 
virtual i_layout_itemadd_at (layout_item_index aPosition, i_ref_ptr< i_layout_item > const &aItem)=0
 
virtual i_spacer & add_spacer ()=0
 
virtual i_spacer & add_spacer_at (layout_item_index aPosition)=0
 
virtual void remove_at (layout_item_index aIndex)=0
 
virtual bool remove (i_layout_item &aItem)=0
 
virtual void remove_all ()=0
 
virtual void move_all_to (i_layout &aDestination)=0
 
virtual layout_item_index count () const =0
 
virtual layout_item_index index_of (const i_layout_item &aItem) const =0
 
virtual optional_layout_item_index find (const i_layout_item &aItem) const =0
 
virtual bool is_widget_at (layout_item_index aIndex) const =0
 
virtual const i_layout_itemitem_at (layout_item_index aIndex) const =0
 
virtual i_layout_itemitem_at (layout_item_index aIndex)=0
 
virtual const i_widgetget_widget_at (layout_item_index aIndex) const =0
 
virtual i_widgetget_widget_at (layout_item_index aIndex)=0
 
virtual const i_layoutget_layout_at (layout_item_index aIndex) const =0
 
virtual i_layoutget_layout_at (layout_item_index aIndex)=0
 
virtual layout_direction direction () const =0
 
virtual bool has_spacing () const =0
 
virtual size spacing () const =0
 
virtual void set_spacing (optional_size const &sSpacing, bool aUpdateLayout=true)=0
 
virtual bool always_use_spacing () const =0
 
virtual void set_always_use_spacing (bool aAlwaysUseSpacing)=0
 
virtual bool has_alignment () const =0
 
virtual neogfx::alignment alignment () const =0
 
virtual void set_alignment (optional_alignment const &aAlignment, bool aUpdateLayout=true)=0
 
virtual neogfx::autoscale autoscale () const =0
 
virtual void set_autoscale (neogfx::autoscale aAutoscale, bool aUpdateLayout=true)=0
 
virtual visibility_constraint child_visibility () const =0
 
virtual bool ignore_child_visibility () const =0
 
virtual void set_ignore_child_visibility (bool aIgnoreChildVisibility)=0
 
virtual void enable (bool aEnable)=0
 
virtual bool enabled () const =0
 
virtual void layout_items (const point &aPosition, const size &aSize)=0
 
virtual bool invalidated () const =0
 
virtual void invalidate (bool aDeferLayout=true)=0
 
virtual void validate ()=0
 
template<typename ItemType >
ItemType & add ()
 
template<typename ItemType >
ItemType & add (i_ref_ptr< ItemType > const &aItem)
 
template<typename ItemType >
ItemType & add_at (layout_item_index aPosition, i_ref_ptr< ItemType > const &aItem)
 
template<typename ItemType >
ItemType & add (ref_ptr< ItemType > const &aItem)
 
template<typename ItemType >
ItemType & add_at (layout_item_index aPosition, ref_ptr< ItemType > const &aItem)
 
template<typename ItemType , typename... Args>
ItemType & emplace (Args &&... args)
 
template<typename ItemType , typename... Args>
ItemType & emplace_at (layout_item_index aPosition, Args &&... args)
 
template<typename ItemType >
ItemType & replace_item_at (layout_item_index aPosition, ItemType &&aItem)
 
template<typename ItemType >
ItemType & replace_item_at (layout_item_index aPosition, i_ref_ptr< ItemType > const &aItem)
 
template<typename WidgetT >
const WidgetT & get_widget_at (layout_item_index aIndex) const
 
template<typename WidgetT >
WidgetT & get_widget_at (layout_item_index aIndex)
 
bool is_descendent_of (const i_layout &aAncestor) const
 
void enable ()
 
void disable ()
 
- Public Member Functions inherited from neogfx::i_layout_item
virtual ~i_layout_item ()=default
 
virtual const i_stringid () const =0
 
virtual void set_id (const i_string &aId)=0
 
virtual bool is_cache () const =0
 
virtual bool is_layout () const =0
 
virtual const i_layoutas_layout () const =0
 
virtual i_layoutas_layout ()=0
 
virtual bool is_spacer () const =0
 
virtual const i_spacer & as_spacer () const =0
 
virtual i_spacer & as_spacer ()=0
 
virtual bool is_widget () const =0
 
virtual const i_widgetas_widget () const =0
 
virtual i_widgetas_widget ()=0
 
virtual bool has_parent_layout_item () const =0
 
virtual const i_layout_itemparent_layout_item () const =0
 
virtual i_layout_itemparent_layout_item ()=0
 
virtual bool has_parent_layout () const =0
 
virtual const i_layoutparent_layout () const =0
 
virtual i_layoutparent_layout ()=0
 
virtual void set_parent_layout (i_layout *aParentLayout)=0
 
virtual bool has_parent_widget () const =0
 
virtual const i_widgetparent_widget () const =0
 
virtual i_widgetparent_widget ()=0
 
virtual void set_parent_widget (i_widget *aParentWidget)=0
 
virtual bool has_layout_manager () const =0
 
virtual const i_widgetlayout_manager () const =0
 
virtual i_widgetlayout_manager ()=0
 
virtual void update_layout (bool aDeferLayout=true, bool aAncestors=false)=0
 
virtual void layout_as (const point &aPosition, const size &aSize)=0
 
virtual void invalidate_combined_transformation ()=0
 
virtual void fix_weightings (bool aRecalculate=true)=0
 
virtual void layout_item_enabled (i_layout_item &aItem)=0
 
virtual void layout_item_disabled (i_layout_item &aItem)=0
 
virtual bool visible () const =0
 
template<typename LayoutType >
bool has_ancestor_layout () const
 
template<typename LayoutType >
LayoutType * find_ancestor_layout ()
 
template<typename LayoutType >
LayoutType & ancestor_layout ()
 
bool same_parent_widget_as (i_layout_item const &aOther) const
 
- Public Member Functions inherited from neolib::i_reference_counted
virtual ~i_reference_counted ()=default
 
virtual void add_ref () const noexcept=0
 
virtual void release () const =0
 
virtual int32_t use_count () const noexcept=0
 
virtual const i_reference_countedrelease_and_take_ownership () const =0
 
virtual i_reference_countedrelease_and_take_ownership ()=0
 
virtual void pin () const noexcept=0
 
virtual void unpin () const =0
 
virtual i_ref_control_blockcontrol_block ()=0
 
- Public Member Functions inherited from neogfx::i_property_owner
virtual ~i_property_owner ()=default
 
virtual void property_changed (i_property &aProperty)=0
 
virtual const i_propertiesproperties () const =0
 
virtual i_propertiesproperties ()=0
 
- Public Member Functions inherited from neogfx::i_object
virtual ~i_object ()=default
 
virtual i_objectas_object ()=0
 
virtual void class_name (neolib::i_string &aClassName) const =0
 
virtual neogfx::object_type object_type () const =0
 
- Public Member Functions inherited from neolib::i_object
 declare_event (destroying)
 
 declare_event (destroyed)
 
- Public Member Functions inherited from neolib::i_lifetime
virtual ~i_lifetime ()=default
 
virtual lifetime_state object_state () const =0
 
virtual std::shared_ptr< std::atomic< lifetime_state > > object_state_ptr () const =0
 
virtual bool is_creating () const =0
 
virtual bool is_alive () const =0
 
virtual bool is_destroying () const =0
 
virtual bool is_destroyed () const =0
 
virtual void set_alive ()=0
 
virtual void set_destroying ()=0
 
virtual void set_destroyed ()=0
 
- Public Member Functions inherited from neogfx::i_anchorable
virtual i_objectas_object ()=0
 
virtual i_anchor & anchor_to (i_anchorable &aRhs, const i_string &aLhsAnchor, anchor_constraint_function aLhsFunction, const i_string &aRhsAnchor, anchor_constraint_function aRhsFunction)=0
 
virtual const anchor_map_typeanchors () const =0
 
virtual anchor_map_typeanchors ()=0
 
i_anchor & anchor_to (i_anchorable &aRhs, std::string const &aLhsAnchor, anchor_constraint_function aLhsFunction, std::string const &aRhsAnchor, anchor_constraint_function aRhsFunction)
 

Additional Inherited Members

- Public Types inherited from neogfx::i_layout_item
typedef i_layout_item abstract_type
 
- Public Types inherited from neogfx::i_anchorable
typedef i_anchorable abstract_type
 
typedef neolib::i_map< i_string, i_anchor * > anchor_map_type
 

Detailed Description

Definition at line 230 of file i_layout.hpp.

Constructor & Destructor Documentation

◆ ~i_layout()

virtual neogfx::i_layout::~i_layout ( )
virtualdefault

Member Function Documentation

◆ add() [1/5]

template<typename ItemType >
ItemType & neogfx::i_layout::add ( )
inline

Definition at line 292 of file i_layout.hpp.

◆ add() [2/5]

virtual i_layout_item & neogfx::i_layout::add ( i_layout_item aItem)
pure virtual

◆ add() [3/5]

virtual i_layout_item & neogfx::i_layout::add ( i_ref_ptr< i_layout_item > const &  aItem)
pure virtual

◆ add() [4/5]

template<typename ItemType >
ItemType & neogfx::i_layout::add ( i_ref_ptr< ItemType > const &  aItem)
inline

Definition at line 298 of file i_layout.hpp.

◆ add() [5/5]

template<typename ItemType >
ItemType & neogfx::i_layout::add ( ref_ptr< ItemType > const &  aItem)
inline

Definition at line 308 of file i_layout.hpp.

◆ add_at() [1/4]

virtual i_layout_item & neogfx::i_layout::add_at ( layout_item_index  aPosition,
i_layout_item aItem 
)
pure virtual

◆ add_at() [2/4]

virtual i_layout_item & neogfx::i_layout::add_at ( layout_item_index  aPosition,
i_ref_ptr< i_layout_item > const &  aItem 
)
pure virtual

◆ add_at() [3/4]

template<typename ItemType >
ItemType & neogfx::i_layout::add_at ( layout_item_index  aPosition,
i_ref_ptr< ItemType > const &  aItem 
)
inline

Definition at line 303 of file i_layout.hpp.

◆ add_at() [4/4]

template<typename ItemType >
ItemType & neogfx::i_layout::add_at ( layout_item_index  aPosition,
ref_ptr< ItemType > const &  aItem 
)
inline

Definition at line 313 of file i_layout.hpp.

◆ add_spacer()

virtual i_spacer & neogfx::i_layout::add_spacer ( )
pure virtual

◆ add_spacer_at()

virtual i_spacer & neogfx::i_layout::add_spacer_at ( layout_item_index  aPosition)
pure virtual

◆ alignment()

virtual neogfx::alignment neogfx::i_layout::alignment ( ) const
pure virtual

◆ always_use_spacing()

virtual bool neogfx::i_layout::always_use_spacing ( ) const
pure virtual

◆ autoscale()

virtual neogfx::autoscale neogfx::i_layout::autoscale ( ) const
pure virtual

◆ child_visibility()

virtual visibility_constraint neogfx::i_layout::child_visibility ( ) const
pure virtual

◆ count()

virtual layout_item_index neogfx::i_layout::count ( ) const
pure virtual

◆ direction()

virtual layout_direction neogfx::i_layout::direction ( ) const
pure virtual

◆ disable()

void neogfx::i_layout::disable ( )
inline

Definition at line 373 of file i_layout.hpp.

◆ emplace()

template<typename ItemType , typename... Args>
ItemType & neogfx::i_layout::emplace ( Args &&...  args)
inline

Definition at line 318 of file i_layout.hpp.

◆ emplace_at()

template<typename ItemType , typename... Args>
ItemType & neogfx::i_layout::emplace_at ( layout_item_index  aPosition,
Args &&...  args 
)
inline

Definition at line 325 of file i_layout.hpp.

◆ enable() [1/2]

void neogfx::i_layout::enable ( )
inline

Definition at line 369 of file i_layout.hpp.

◆ enable() [2/2]

virtual void neogfx::i_layout::enable ( bool  aEnable)
pure virtual

◆ enabled()

virtual bool neogfx::i_layout::enabled ( ) const
pure virtual

◆ find()

virtual optional_layout_item_index neogfx::i_layout::find ( const i_layout_item aItem) const
pure virtual

◆ get_layout_at() [1/2]

virtual const i_layout & neogfx::i_layout::get_layout_at ( layout_item_index  aIndex) const
pure virtual

◆ get_layout_at() [2/2]

virtual i_layout & neogfx::i_layout::get_layout_at ( layout_item_index  aIndex)
pure virtual

◆ get_widget_at() [1/4]

template<typename WidgetT >
WidgetT & neogfx::i_layout::get_widget_at ( layout_item_index  aIndex)
inline

Definition at line 354 of file i_layout.hpp.

◆ get_widget_at() [2/4]

template<typename WidgetT >
const WidgetT & neogfx::i_layout::get_widget_at ( layout_item_index  aIndex) const
inline

Definition at line 349 of file i_layout.hpp.

◆ get_widget_at() [3/4]

virtual const i_widget & neogfx::i_layout::get_widget_at ( layout_item_index  aIndex) const
pure virtual

◆ get_widget_at() [4/4]

virtual i_widget & neogfx::i_layout::get_widget_at ( layout_item_index  aIndex)
pure virtual

◆ has_alignment()

virtual bool neogfx::i_layout::has_alignment ( ) const
pure virtual

◆ has_spacing()

virtual bool neogfx::i_layout::has_spacing ( ) const
pure virtual

◆ ignore_child_visibility()

virtual bool neogfx::i_layout::ignore_child_visibility ( ) const
pure virtual

◆ index_of()

virtual layout_item_index neogfx::i_layout::index_of ( const i_layout_item aItem) const
pure virtual

◆ invalidate()

virtual void neogfx::i_layout::invalidate ( bool  aDeferLayout = true)
pure virtual

◆ invalidated()

virtual bool neogfx::i_layout::invalidated ( ) const
pure virtual

◆ is_descendent_of()

bool neogfx::i_layout::is_descendent_of ( const i_layout aAncestor) const
inline

Definition at line 358 of file i_layout.hpp.

◆ is_widget_at()

virtual bool neogfx::i_layout::is_widget_at ( layout_item_index  aIndex) const
pure virtual

◆ item_at() [1/2]

virtual const i_layout_item & neogfx::i_layout::item_at ( layout_item_index  aIndex) const
pure virtual

◆ item_at() [2/2]

virtual i_layout_item & neogfx::i_layout::item_at ( layout_item_index  aIndex)
pure virtual

◆ layout_items()

virtual void neogfx::i_layout::layout_items ( const point aPosition,
const size aSize 
)
pure virtual

◆ move_all_to()

virtual void neogfx::i_layout::move_all_to ( i_layout aDestination)
pure virtual

◆ remove()

virtual bool neogfx::i_layout::remove ( i_layout_item aItem)
pure virtual

◆ remove_all()

virtual void neogfx::i_layout::remove_all ( )
pure virtual

◆ remove_at()

virtual void neogfx::i_layout::remove_at ( layout_item_index  aIndex)
pure virtual

◆ replace_item_at() [1/2]

template<typename ItemType >
ItemType & neogfx::i_layout::replace_item_at ( layout_item_index  aPosition,
i_ref_ptr< ItemType > const &  aItem 
)
inline

Definition at line 342 of file i_layout.hpp.

◆ replace_item_at() [2/2]

template<typename ItemType >
ItemType & neogfx::i_layout::replace_item_at ( layout_item_index  aPosition,
ItemType &&  aItem 
)
inline

Definition at line 335 of file i_layout.hpp.

◆ set_alignment()

virtual void neogfx::i_layout::set_alignment ( optional_alignment const &  aAlignment,
bool  aUpdateLayout = true 
)
pure virtual

◆ set_always_use_spacing()

virtual void neogfx::i_layout::set_always_use_spacing ( bool  aAlwaysUseSpacing)
pure virtual

◆ set_autoscale()

virtual void neogfx::i_layout::set_autoscale ( neogfx::autoscale  aAutoscale,
bool  aUpdateLayout = true 
)
pure virtual

◆ set_ignore_child_visibility()

virtual void neogfx::i_layout::set_ignore_child_visibility ( bool  aIgnoreChildVisibility)
pure virtual

◆ set_spacing()

virtual void neogfx::i_layout::set_spacing ( optional_size const &  sSpacing,
bool  aUpdateLayout = true 
)
pure virtual

◆ spacing()

virtual size neogfx::i_layout::spacing ( ) const
pure virtual

◆ validate()

virtual void neogfx::i_layout::validate ( )
pure virtual

The documentation for this class was generated from the following file: