Window class. More...
#include <primitiveGui.h>
Public Member Functions | |
| pWindow (float x, float y, float width, float height) | |
| void | addWidget (pWidget *widget) |
| void | setWindowTitle (sf::String &text) |
| sf::String | getWindowTitle () |
| void | setMovable (bool movable) |
| bool | checkMovable () |
| void | setToggle (bool toggle) |
| bool | checkToggled () |
| void | setColors (sf::Color borderColor, sf::Color titleBarColor, sf::Color windowColor, sf::Color notActiveMaskColor) |
| virtual void | updateWidget () |
Public Member Functions inherited from pWidget | |
| pWidget (float x, float y, float width, float height) | |
| void | setGeometry (float x, float y, float width, float height) |
| void | setVisiblity (bool visiblity) |
Public Attributes | |
| int | zValue |
| pText | titleBarLabel |
| Text on title bar. | |
| sf::Color | borderColor |
| Border color of window - default ( 117, 119, 114, 255 ) | |
| sf::Color | titleBarColor |
| Color of window title bar - default ( 81, 130, 66, 255 ) | |
| sf::Color | windowColor |
| Color of window content - default ( 85, 87, 82, 200 ) | |
| sf::Color | notActiveMaskColor |
| Color of mask drawn when window is not active - default ( 255, 0, 0, 50 ) | |
Public Attributes inherited from pWidget | |
| 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 | pWidget |
| class | pButton |
| class | pTextEdit |
| class | pCheckBox |
| class | pSlider |
| class | pProgressBar |
Additional Inherited Members | |
Public Types inherited from pWidget | |
| 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... | |
Window class.
This class inherits of pWidget class.
This is basic window. It is movable in main window rect. You can toggle content of window.
Warning:
1) If window cover a part of some widget this widget don't recive events.
2) If window is not active there is drawn mask on it.
3) Default window is movable and toggled.
| pWindow::pWindow | ( | float | x, |
| float | y, | ||
| float | width, | ||
| float | height | ||
| ) |
Default constructor.
| x | |
| y | |
| width | |
| height |
| void pWindow::addWidget | ( | pWidget * | widget | ) |
Add widget to window.
| *widget |
| bool pWindow::checkMovable | ( | ) |
Check window is movable.
| bool pWindow::checkToggled | ( | ) |
Check is window content toggled.
| sf::String pWindow::getWindowTitle | ( | ) |
| void pWindow::setColors | ( | sf::Color | borderColor, |
| sf::Color | titleBarColor, | ||
| sf::Color | windowColor, | ||
| sf::Color | notActiveMaskColor | ||
| ) |
Set window colors.
| borderColor | |
| titleBarColor | |
| windowColor | |
| notActiveMaskColor |
| void pWindow::setMovable | ( | bool | movable | ) |
Set window movalbe.
| movable |
| void pWindow::setToggle | ( | bool | toggle | ) |
Toggle window content ( Window title bar is still shown ).
| toggle |
| void pWindow::setWindowTitle | ( | sf::String & | text | ) |
Set new windowTitle.
| text |
|
virtual |
Update widget. Every widget have own impementation of this function, because some widgets have more elements to draw.
Implements pWidget.
1.8.3.1