QSDK 1.1 Documentation
Main Page | Modules | Class Hierarchy | Alphabetical List | Compound List | File List | Compound Members | File Members | Related Pages

Q::LogLayer Struct Reference
[User Interface]

On screen error reports. More...

#include <Q/q.h>

Inheritance diagram for Q::LogLayer:

Q::Layer Q::ObjectBase List of all members.

Public Member Functions

 LogLayer ()
 ~LogLayer ()
Maths::Color4b color () const
unsigned int pointSize () const
Utils::Result setColor (Maths::Color4b c)
Utils::Result setPointSize (unsigned int pointSize)
Utils::Result addLog (const char *text)

Static Public Member Functions

LogLayer create (const Screen &, const Font &font, unsigned int pointSize, float margin, Font::textJustification, const Maths::Vec2f &center, const Maths::Vec2f &extent, const Maths::Vec2f &alignment, const Maths::Color4b &color, bool isAlwaysTop=false)
ClassType classType ()
LogLayer cast (const ObjectBase &obj)

Detailed Description

On screen error reports.

A LogLayer receives log messages and displays them in a layer.


Constructor & Destructor Documentation

Q::LogLayer::LogLayer  ) 
 

Create a null log layer handle.

Q::LogLayer::~LogLayer  ) 
 

Destroy the layer, removing it from its parent screen.


Member Function Documentation

Utils::Result Q::LogLayer::addLog const char *  text  ) 
 

Add a line to the log.

LogLayer Q::LogLayer::cast const ObjectBase obj  )  [static]
 

If the object referenced by obj is a LogLayer, then return a suitable reference to the object.

ClassType Q::LogLayer::classType  )  [static]
 

Return the type of this class.

Maths::Color4b Q::LogLayer::color  )  const
 

Return the color of the layer.

LogLayer Q::LogLayer::create const Screen ,
const Font font,
unsigned int  pointSize,
float  margin,
Font::textJustification  ,
const Maths::Vec2f center,
const Maths::Vec2f extent,
const Maths::Vec2f alignment,
const Maths::Color4b color,
bool  isAlwaysTop = false
[static]
 

Create a log layer with the given dimensions and position. The specified font is used to render the text. The value of pointSize is the height of an individual character of text in the screen's virtual coordinate system. The text inside the layer is offset from the edge of the layer by the margin.

Parameters:
font The font object to use to render the text. An invalid object will result in a line font being used.
pointSize The font height in pixels (of the virtual screen)
margin The space between the edge of the layer and the text.
center The center of the layer. It determines the location of the rectangle in the screen's virtual coordinate system.
extent The extent of the layer. It indicates its width and height in the screen's virtual coordinate system.
alignment The alignment of the layer. It determines the location of the origin of the layer's local coordinate system. An alignment of (0,0) places the origin at the bottom left of the layer and an alignment of (1,1) places it at the top right.
isAlwaysTop If true, the layer is treated in a special way by the screen. It will always be rendered last (i.e. appear on top).
color The color of the rendered log text.

unsigned int Q::LogLayer::pointSize  )  const
 

Return the point size of the text.

Utils::Result Q::LogLayer::setColor Maths::Color4b  c  ) 
 

Set the color of the layer.

Utils::Result Q::LogLayer::setPointSize unsigned int  pointSize  ) 
 

Set the point size of the text.

Return to QSDK documentation Contents page. Contact details for support, information and fault-reporting.
Qube Software Limited © 2000-2004