PIP  0.5.0_alpha
Platform-Independent Primitives
PIScreenTile Class Reference

Console output class. More...

Inheritance diagram for PIScreenTile:

Protected Member Functions

virtual void sizeHint (int &w, int &h) const
 Returns desired tile size in "w" and "h".
 
virtual void resizeEvent (int w, int h)
 Tile has been resized to "w"x"h".
 
virtual void drawEvent (PIScreenDrawer *d)
 Draw tile with drawer "d" in world-space coordinates.
 
virtual bool keyEvent (PIKbdListener::KeyEvent key)
 Return "true" if you process key.
 
- Protected Member Functions inherited from PIObject
PIObjectemitter () const
 Returns PIObject* which has raised an event. This value is correct only in definition of some event handler.
 
virtual void propertyChanged (const PIString &name)
 Virtual function executes after property with name "name" has been changed.
 
void deleted ()
 Raise before object delete. More...
 

Additional Inherited Members

- Public Member Functions inherited from PIObject
 PIObject (const PIString &name=PIString())
 Contructs PIObject with name "name".
 
PIString name () const
 Returns object name.
 
virtual const char * className () const
 Returns object class name.
 
virtual const char * superClassName () const
 Returns object superclass name.
 
bool debug () const
 Return if debug of this object is active.
 
void setName (const PIString &name)
 Set object name.
 
void setDebug (bool debug)
 Set object debug active.
 
const PIMap< PIString, PIVariant > & properties () const
 Returns properties of the object.
 
int propertiesCount () const
 Returns properties count of the object.
 
PIVariant property (const PIString &name) const
 Returns property with name "name".
 
void setProperty (const PIString &name, const PIVariant &value)
 Set property with name "name" to "value". If there is no such property in object it will be added.
 
bool isPropertyExists (const PIString &name) const
 Returns if property with name "name" exists.
 
- Static Public Member Functions inherited from PIObject
static void piDisconnect (PIObject *src, const PIString &sig)
 Disconnect object "src" from all connections with event name "sig".
 
static void piDisconnect (PIObject *src)
 Disconnect object "src" from all connections, i.e. all connections where object "src" is emitter.
 
static PIObjectfindByName (const PIString &name)
 Returns PIObject* with name "name" or 0, if there is no object found.
 

Detailed Description

Console output class.

Synopsis

This class provides output to console with automatic alignment and update. It supports tabs, keyboard listening, formats and colors.

Layout

PIScreen works with variable pointers. You should add your variables with functions addVariable() which receives label name, pointer to variable and optional column and format. Columns count is dynamically increased if new column used. E.g. if you add variable to empty tab to column 3, columns count will be increased to 3, but two firsts columns will be empty. Each column filled from top to bottom, but you can add just string with function addString() or add empty line with function addEmptyLine(). Layout scheme:

piconsole_layout.png

Keyboard usage

PIScreen should to be single in application. PIScreen aggregate PIKbdListener which grab keyboard and automatic switch tabs by theirs bind keys. If there is no tab binded to pressed key external function "slot" will be called