1 #ifndef LXGUI_GUI_ANCHOR_HPP
2 #define LXGUI_GUI_ANCHOR_HPP
4 #include "lxgui/gui_vector2.hpp"
5 #include "lxgui/lxgui.hpp"
6 #include "lxgui/utils.hpp"
7 #include "lxgui/utils_observer.hpp"
44 const std::string& input_parent,
45 point input_parent_point,
56 const std::string& input_parent,
77 point input_parent_point,
145 std::string
serialize(
const std::string& tab)
const;
160 void update_parent_(
region&
object);
162 utils::observer_ptr<region> parent_ =
nullptr;
Stores a position for a UI region.
anchor(const anchor &)=delete
vector2f get_point(const region &object) const
Returns this anchor's absolute coordinates (in pixels).
utils::observer_ptr< const region > get_parent() const
Returns this anchor's parent region.
anchor(region &object, const anchor_data &data)
Constructor.
const utils::observer_ptr< region > & get_parent()
Returns this anchor's parent region.
anchor & operator=(const anchor &)=delete
std::string serialize(const std::string &tab) const
Prints all relevant information about this anchor in a string.
anchor & operator=(anchor &&)=delete
const anchor_data & get_data() const
Returns the raw data used for this anchor.
The base class of all elements in the GUI.
Raw data of an anchor (value type)
anchor_data(point input_point, const std::string &input_parent, point input_parent_point)
anchor_data(point input_point, point input_parent_point, const vector2f &input_offset, anchor_type input_type=anchor_type::abs)
anchor_data(point input_point, point input_parent_point)
anchor_data(point input_point, const std::string &input_parent)
anchor_data(point input_point)
anchor_data(point input_point, const std::string &input_parent, point input_parent_point, const vector2f &input_offset, anchor_type input_type=anchor_type::abs)
anchor_data(point input_point, const vector2f &input_offset, anchor_type input_type=anchor_type::abs)
anchor_data(point input_point, const std::string &input_parent, const vector2f &input_offset, anchor_type input_type=anchor_type::abs)