TGUI
0.7.8
|
Public Member Functions | |
virtual | ~Transformable () |
Virtual destructor. | |
virtual void | setPosition (const Layout2d &position) |
set the position of the widget More... | |
void | setPosition (const Layout &x, const Layout &y) |
set the position of the widget More... | |
sf::Vector2f | getPosition () const |
get the position of the widget More... | |
void | move (const Layout2d &offset) |
Move the widget by a given offset. More... | |
void | move (const Layout &x, const Layout &y) |
Move the widget by a given offset. More... | |
virtual void | setSize (const Layout2d &size) |
Changes the size of the widget. More... | |
void | setSize (const Layout &width, const Layout &height) |
Changes the size of the widget. More... | |
virtual sf::Vector2f | getSize () const |
Returns the size of the widget. More... | |
virtual sf::Vector2f | getFullSize () const |
Returns the entire size that the widget is using. More... | |
void | scale (const Layout2d &factors) |
Scale the widget. More... | |
void | scale (const Layout &x, const Layout &y) |
Scale the widget. More... | |
|
inlinevirtual |
Returns the entire size that the widget is using.
This function will return a value equal or greater than what getSize returns. If the widget would e.g. have borders around it then this function will return the size, including these borders.
Reimplemented in tgui::Button, tgui::ChatBox, tgui::ChildWindow, tgui::ComboBox, tgui::EditBox, tgui::Knob, tgui::Label, tgui::ListBox, tgui::ProgressBar, tgui::RadioButton, tgui::Slider, tgui::SpinButton, and tgui::TextBox.
|
inline |
|
inlinevirtual |
Returns the size of the widget.
Reimplemented in tgui::Grid, and tgui::Tab.
Move the widget by a given offset.
This function adds to the current position of the widget, unlike setPosition which overwrites it. Thus, it is equivalent to the following code:
x | Horizontal offset |
y | Vertical offset |
void tgui::Transformable::move | ( | const Layout2d & | offset | ) |
Move the widget by a given offset.
This function adds to the current position of the widget, unlike setPosition which overwrites it. Thus, it is equivalent to the following code:
offset | Offset |
Scale the widget.
x | horizontal scale factor |
y | vertical scale factor |
This function multiplies the current size of the widget with the given scale factors. Thus, it is equivalent to the following code:
void tgui::Transformable::scale | ( | const Layout2d & | factors | ) |
set the position of the widget
This function completely overwrites the previous position. See the move function to apply an offset based on the previous position instead. The default position of a transformable widget is (0, 0).
x | New x coordinate |
y | New y coordinate |
Usage examples:
|
virtual |
set the position of the widget
This function completely overwrites the previous position. See the move function to apply an offset based on the previous position instead. The default position of a transformable widget is (0, 0).
position | New position |
Usage examples:
Reimplemented in tgui::Widget, tgui::Button, tgui::Canvas, tgui::ChildWindow, tgui::ComboBox, tgui::EditBox, tgui::Knob, tgui::Label, tgui::ListBox, tgui::MenuBar, tgui::Picture, tgui::ProgressBar, tgui::RadioButton, tgui::Scrollbar, tgui::Slider, tgui::SpinButton, tgui::Tab, tgui::TextBox, tgui::Widget, tgui::Button, tgui::Canvas, tgui::ChildWindow, tgui::ComboBox, tgui::EditBox, tgui::Knob, tgui::Label, tgui::ListBox, tgui::MenuBar, tgui::Picture, tgui::ProgressBar, tgui::RadioButton, tgui::Scrollbar, tgui::Slider, tgui::SpinButton, tgui::Tab, and tgui::TextBox.
Changes the size of the widget.
width | Width of the widget |
height | Height of the widget |
Usage examples:
|
virtual |
Changes the size of the widget.
size | Size of the widget |
Usage examples:
Reimplemented in tgui::BoxLayout, tgui::Widget, tgui::Button, tgui::Canvas, tgui::ChatBox, tgui::ChildWindow, tgui::ComboBox, tgui::EditBox, tgui::Grid, tgui::Knob, tgui::Label, tgui::ListBox, tgui::MenuBar, tgui::Picture, tgui::ProgressBar, tgui::RadioButton, tgui::Scrollbar, tgui::Slider, tgui::SpinButton, tgui::Tab, tgui::TextBox, tgui::BoxLayout, tgui::Widget, tgui::Button, tgui::Canvas, tgui::ChatBox, tgui::ChildWindow, tgui::ComboBox, tgui::EditBox, tgui::Grid, tgui::Knob, tgui::Label, tgui::ListBox, tgui::MenuBar, tgui::Picture, tgui::ProgressBar, tgui::RadioButton, tgui::Scrollbar, tgui::Slider, tgui::SpinButton, tgui::Tab, and tgui::TextBox.