Public Member Functions | Public Attributes | Friends | List of all members
pWindow Class Reference

Window class. More...

#include <primitiveGui.h>

Inheritance diagram for pWindow:
pWidget

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...
 

Detailed Description

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.

Constructor & Destructor Documentation

pWindow::pWindow ( float  x,
float  y,
float  width,
float  height 
)

Default constructor.

Parameters
x
y
width
height

Member Function Documentation

void pWindow::addWidget ( pWidget widget)

Add widget to window.

Parameters
*widget
bool pWindow::checkMovable ( )

Check window is movable.

Returns
bool
bool pWindow::checkToggled ( )

Check is window content toggled.

Returns
bool
sf::String pWindow::getWindowTitle ( )

Get the current window title.

Returns
sf::String : fullString from titleBarLabel
See Also
pText
void pWindow::setColors ( sf::Color  borderColor,
sf::Color  titleBarColor,
sf::Color  windowColor,
sf::Color  notActiveMaskColor 
)

Set window colors.

Parameters
borderColor
titleBarColor
windowColor
notActiveMaskColor
void pWindow::setMovable ( bool  movable)

Set window movalbe.

Parameters
movable
void pWindow::setToggle ( bool  toggle)

Toggle window content ( Window title bar is still shown ).

Parameters
toggle
void pWindow::setWindowTitle ( sf::String &  text)

Set new windowTitle.

Parameters
text
void pWindow::updateWidget ( )
virtual

Update widget. Every widget have own impementation of this function, because some widgets have more elements to draw.

Implements pWidget.


The documentation for this class was generated from the following files: