Abstract class. Every widget class inherits from this class. More...
#include <primitiveGui.h>
Public Types | |
enum | widgetTypeEnum { Button =0, TextEdit, CheckBox, Slider, ProgressBar, Window } |
Enumeration of the different types of widgets. More... | |
enum | widgetEventType { NoEvent =0, WidgetClicked } |
Enumeration of the different types of widgets. More... | |
Public Member Functions | |
pWidget (float x, float y, float width, float height) | |
void | setGeometry (float x, float y, float width, float height) |
void | setVisiblity (bool visiblity) |
virtual void | updateWidget ()=0 |
Public Attributes | |
int | widgetId |
Widget unique index. | |
int | widgetOnWindowId |
If widget is on some window this is a unique index of this window ( it's widgetId of this window ) else it is -1. | |
bool | visiblity |
visibility of widget | |
widgetTypeEnum | widgetType |
Type of the widget. | |
widgetEventType | widgetEvent |
Type of the event. | |
sf::Vector2f | widgetPosition |
Position of widget. | |
sf::Vector2f | widgetSize |
Size of widget. | |
Friends | |
class | pGui |
class | pButton |
class | pTextEdit |
class | pCheckBox |
class | pSlider |
class | pProgressBar |
class | pWindow |
Abstract class. Every widget class inherits from this class.
This class inherits of sf::Drawable class from SFML. It's a base class for all widgets.
pWidget::pWidget | ( | float | x, |
float | y, | ||
float | width, | ||
float | height | ||
) |
Default constructor.
x | |
y | |
width | |
height |
void pWidget::setGeometry | ( | float | x, |
float | y, | ||
float | width, | ||
float | height | ||
) |
Set window geometry - position and size If widget is in some pWindow widget you must set position ( x and y ) relative to this window
x | |
y | |
width | |
height |
void pWidget::setVisiblity | ( | bool | visiblity | ) |
Set visiblity of widget. If vidget visiblity is false widget isn't shown and isn't recive any event's.
visiblity |
|
pure virtual |