Public Member Functions | Public Attributes | List of all members
pTextEdit Class Reference

Text edit class. More...

#include <primitiveGui.h>

Inheritance diagram for pTextEdit:
pWidget

Public Member Functions

 pTextEdit (float x, float y, float width, float height)
 
void setColors (sf::Color borderColor, sf::Color notActiveColor, sf::Color activeColor)
 
void setText (sf::String &text)
 
sf::String getText ()
 
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

pText textEditText
 Text in text edit.
 
sf::Color borderColor
 Text edit border color - default (117,119,114,255)
 
sf::Color notActiveColor
 Background color of text edit when it isn't active - default (200,165,157,255)
 
sf::Color activeColor
 Background color of text edit when it is active - default (177,177,177,255)
 
sf::Color colorToDraw
 Color which is actually draw - default.
 
- 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.
 

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

Text edit class.

This class inherits of pWidget class. This is very simple text edit allow only put new character on the and of string and remove last character. Text edit have two states active and not active.

User must click on text edit to have premmision to enter text.

Constructor & Destructor Documentation

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

Default constructor.

Parameters
x
y
width
height

Member Function Documentation

sf::String pTextEdit::getText ( )

Get the full string from text edit

Returns
sf::String
See Also
pText
void pTextEdit::setColors ( sf::Color  borderColor,
sf::Color  notActiveColor,
sf::Color  activeColor 
)

Set text edit colors.

Parameters
borderColor
notActiveColor
activeColor
void pTextEdit::setText ( sf::String &  text)

Set new string on text edit

Parameters
text
void pTextEdit::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: