1 #ifndef LXGUI_GUI_FRAME_CONTAINER_HPP
2 #define LXGUI_GUI_FRAME_CONTAINER_HPP
4 #include "lxgui/gui_frame_core_attributes.hpp"
5 #include "lxgui/lxgui.hpp"
6 #include "lxgui/utils_observer.hpp"
7 #include "lxgui/utils_view.hpp"
40 adaptor<root_frame_list, utils::view::smart_ptr_dereferencer, utils::view::non_null_filter>;
90 typename std::enable_if<std::is_base_of<gui::frame, FrameType>::value>::type>
111 typename std::enable_if<std::is_base_of<gui::frame, FrameType>::value>::type>
194 utils::observer_ptr<frame_renderer> renderer_;
Handles the creation of new UI objects.
frame_container(frame_container &&)=delete
virtual utils::observer_ptr< frame > create_root_frame_(frame_core_attributes attr)
utils::observer_ptr< frame > create_root_frame(const std::string &name)
Creates a new frame, ready for use, and owned by this frame_container.
const factory & get_factory() const
Returns the GUI object factory.
void garbage_collect()
Clean deleted entries from the frame list.
utils::owner_ptr< frame > remove_root_frame(const utils::observer_ptr< frame > &obj)
Remove a frame from the list of frames owned by this frame_container.
frame_container(factory &fac, registry ®, utils::observer_ptr< frame_renderer > rdr)
Constructor.
const registry & get_registry() const
Returns the UI object registry, which keeps track of all objects in the UI.
std::list< utils::owner_ptr< frame > > root_frame_list
Type of the root frame list.
virtual ~frame_container()=default
frame_container(const frame_container &)=delete
frame_container & operator=(frame_container &&)=delete
utils::view::adaptor< const root_frame_list, utils::view::smart_ptr_dereferencer, utils::view::non_null_filter > const_root_frame_list_view
utils::view::adaptor< root_frame_list, utils::view::smart_ptr_dereferencer, utils::view::non_null_filter > root_frame_list_view
root_frame_list_view get_root_frames()
Returns the root frame list.
registry & get_registry()
Returns the UI object registry, which keeps track of all objects in the UI.
factory & get_factory()
Returns the GUI object factory.
frame_container & operator=(const frame_container &)=delete
utils::observer_ptr< frame > add_root_frame(utils::owner_ptr< frame > obj)
Make a frame owned by this frame_container.
utils::observer_ptr< frame > create_root_frame(frame_core_attributes attr)
Creates a new frame, ready for use, and owned by this frame_container.
utils::observer_ptr< frame > create_root_frame(frame_core_attributes attr)
Creates a new frame, ready for use, and owned by this frame_container.
Keeps track of created UI objects and records their names for lookup.
Allow iterating over a container without access to the container itself.
oup::observable_sealed_ptr< T > owner_ptr
Struct holding all the core information about a frame necessary for its creation.
utils::observer_ptr< frame > parent
Convert unique_ptr or shared_ptr to standard pointer.