Stores a position for a UI widget. More...
#include <gui_anchor.hpp>
Public Member Functions | |
| anchor () | |
| Default constructor. | |
| anchor (uiobject *pObj, anchor_point mPoint, const std::string &pParent, anchor_point mParentPoint) | |
| Constructor. | |
| int | get_abs_x () const |
| Returns this anchor absolute X (in pixel). | |
| int | get_abs_y () const |
| Returns this anchor absolute Y (in pixel). | |
| const uiobject * | get_object () const |
| Returns this anchor's base widget. | |
| const uiobject * | get_parent () const |
| Returns this anchor's parent widget. | |
| const std::string & | get_parent_raw_name () const |
| Returns this anchor's parent's raw name (unmodified). | |
| anchor_point | get_point () const |
| Returns this anchor's point. | |
| anchor_point | get_parent_point () const |
| Returns this anchor's parent point. | |
| anchor_type | get_type () const |
| Returns the type of this anchor (abs or rel). | |
| int | get_abs_offset_x () const |
| Returns this anchor's absolute horizontal offset. | |
| int | get_abs_offset_y () const |
| Returns this anchor's absolute vertical offset. | |
| float | get_rel_offset_x () const |
| Returns this anchor's relative horizontal offset. | |
| float | get_rel_offset_y () const |
| Returns this anchor's relative vertical offset. | |
| void | set_object (uiobject *pObj) |
| Sets this anchor's base widget. | |
| void | set_parent_raw_name (const std::string &sName) |
| Sets this anchor's parent's raw name. | |
| void | set_point (anchor_point mPoint) |
| Sets this anchor's point. | |
| void | set_parent_point (anchor_point mParentPoint) |
| Sets this anchor's parent point. | |
| void | set_abs_offset (int iX, int iY) |
| Sets this anchor's absolute offset. | |
| void | set_rel_offset (float fX, float fY) |
| Sets this anchor's relative offset. | |
| std::string | serialize (const std::string &sTab) const |
| Prints all relevant information about this anchor in a string. | |
| void | update_parent () const |
| get_s the anchor parent from the parent string. | |
Static Public Member Functions | |
| static std::string | get_string_point (anchor_point mPoint) |
| Returns the name of an anchor point. | |
| static anchor_point | get_anchor_point (const std::string &sPoint) |
| Returns the anchor point from its name. | |
Stores a position for a UI widget.
Definition at line 38 of file gui_anchor.hpp.
| gui::anchor::anchor | ( | ) |
Default constructor.
Definition at line 12 of file gui_anchor.cpp.
| gui::anchor::anchor | ( | uiobject * | pObj, | |
| anchor_point | mPoint, | |||
| const std::string & | pParent, | |||
| anchor_point | mParentPoint | |||
| ) |
Constructor.
Definition at line 19 of file gui_anchor.cpp.
| int gui::anchor::get_abs_offset_x | ( | ) | const |
Returns this anchor's absolute horizontal offset.
Definition at line 170 of file gui_anchor.cpp.
| int gui::anchor::get_abs_offset_y | ( | ) | const |
Returns this anchor's absolute vertical offset.
Definition at line 175 of file gui_anchor.cpp.
| int gui::anchor::get_abs_x | ( | ) | const |
Returns this anchor absolute X (in pixel).
Definition at line 61 of file gui_anchor.cpp.
| int gui::anchor::get_abs_y | ( | ) | const |
Returns this anchor absolute Y (in pixel).
Definition at line 100 of file gui_anchor.cpp.
| anchor_point gui::anchor::get_anchor_point | ( | const std::string & | sPoint | ) | [static] |
Returns the anchor point from its name.
| sPoint | The name of the anchor point |
Definition at line 270 of file gui_anchor.cpp.
| const uiobject * gui::anchor::get_object | ( | ) | const |
Returns this anchor's base widget.
Definition at line 139 of file gui_anchor.cpp.
| const uiobject * gui::anchor::get_parent | ( | ) | const |
Returns this anchor's parent widget.
Definition at line 144 of file gui_anchor.cpp.
| anchor_point gui::anchor::get_parent_point | ( | ) | const |
Returns this anchor's parent point.
Definition at line 160 of file gui_anchor.cpp.
| const std::string & gui::anchor::get_parent_raw_name | ( | ) | const |
Returns this anchor's parent's raw name (unmodified).
Definition at line 150 of file gui_anchor.cpp.
| anchor_point gui::anchor::get_point | ( | ) | const |
Returns this anchor's point.
Definition at line 155 of file gui_anchor.cpp.
| float gui::anchor::get_rel_offset_x | ( | ) | const |
Returns this anchor's relative horizontal offset.
Definition at line 180 of file gui_anchor.cpp.
| float gui::anchor::get_rel_offset_y | ( | ) | const |
Returns this anchor's relative vertical offset.
Definition at line 185 of file gui_anchor.cpp.
| std::string gui::anchor::get_string_point | ( | anchor_point | mPoint | ) | [static] |
Returns the name of an anchor point.
| mPoint | The anchor point |
Definition at line 253 of file gui_anchor.cpp.
| anchor_type gui::anchor::get_type | ( | ) | const |
Returns the type of this anchor (abs or rel).
Definition at line 165 of file gui_anchor.cpp.
| std::string gui::anchor::serialize | ( | const std::string & | sTab | ) | const |
Prints all relevant information about this anchor in a string.
| sTab | The offset to give to all lines |
Definition at line 225 of file gui_anchor.cpp.
| void gui::anchor::set_abs_offset | ( | int | iX, | |
| int | iY | |||
| ) |
Sets this anchor's absolute offset.
| iX | The new horizontal offset | |
| iY | The new vertical offset |
Definition at line 211 of file gui_anchor.cpp.
| void gui::anchor::set_object | ( | uiobject * | pObj | ) |
Sets this anchor's base widget.
| pObj | The new base widget |
Definition at line 190 of file gui_anchor.cpp.
| void gui::anchor::set_parent_point | ( | anchor_point | mParentPoint | ) |
Sets this anchor's parent point.
| mParentPoint | The new parent point |
Definition at line 206 of file gui_anchor.cpp.
| void gui::anchor::set_parent_raw_name | ( | const std::string & | sName | ) |
Sets this anchor's parent's raw name.
| sName | The parent's raw name |
Definition at line 195 of file gui_anchor.cpp.
| void gui::anchor::set_point | ( | anchor_point | mPoint | ) |
Sets this anchor's point.
| mPoint | The new point |
Definition at line 201 of file gui_anchor.cpp.
| void gui::anchor::set_rel_offset | ( | float | fX, | |
| float | fY | |||
| ) |
Sets this anchor's relative offset.
| fX | The new horizontal offset | |
| fY | The new vertical offset |
Definition at line 218 of file gui_anchor.cpp.
| void gui::anchor::update_parent | ( | ) | const |
get_s the anchor parent from the parent string.
Definition at line 27 of file gui_anchor.cpp.
1.6.1