DefaultManager Class Reference

#include <DefaultManager.h>

List of all members.

Public Member Functions

void renderInfo (unsigned int canvasWidth, unsigned int canvasHeight)
virtual void resize (unsigned int width, unsigned int height)
void print ()

Static Public Member Functions

static float obtainRandomFloat (float max=1.0, float min=0.0)

Protected Member Functions

virtual void initComponents ()
void initTouchIndicators ()
unsigned long pickComponent (unsigned int x, unsigned int y)
unsigned long pickContainer (unsigned int x, unsigned int y, unsigned long excludeComponentId)
void renderText (float x, float y, float z, const std::string &str)


Detailed Description

This is a subclass of LargeDisplayManager and provides a default implementation of the Manager using OpenGL. It also has some auxiliary functions.

Author:
Fabricio Anastacio - fabriciocfa@yahoo.com
Since:
July 11, 2007


Member Function Documentation

void DefaultManager::renderInfo ( unsigned int  canvasWidth,
unsigned int  canvasHeight 
)

Renders additional information on top of the application canvas.

Parameters:
canvasWidth the width of the screen.
canvasHeight the height of the screen.

void DefaultManager::resize ( unsigned int  width,
unsigned int  height 
) [virtual]

Resizes the display. Here, it only forwards the resizing to the root component. More specific actions should be taken by the subclasses.

Parameters:
width the new width of the display.
height the new height of the display.

static float DefaultManager::obtainRandomFloat ( float  max = 1.0,
float  min = 0.0 
) [inline, static]

Returns a pseudo-random float value inside the given interval.

Parameters:
max the maximum value of the random value.
min the minimum value of the random value.
Returns:
a pseudo-random value in the interval [min, max].

void DefaultManager::print (  ) 

Prints the components in this manager.

virtual void DefaultManager::initComponents (  )  [inline, protected, virtual]

Initializes the component collection by creating and adding application specific components.

void DefaultManager::initTouchIndicators (  )  [protected]

Initializes the list of touch indicators.

unsigned long DefaultManager::pickComponent ( unsigned int  x,
unsigned int  y 
) [protected]

Returns the id of the component at the given coordinates or zero if no component was picked.

Parameters:
x the x-coordinate of the selection.
y the y-coordinate of the selection.
Returns:
the id of the selected component or zero if none was picked.

unsigned long DefaultManager::pickContainer ( unsigned int  x,
unsigned int  y,
unsigned long  excludeComponentId 
) [protected]

Returns the id of the container component (i. e., a component that is not a leaf in the composition tree) at the given coordinates or zero if no component was picked.

Parameters:
x the x-coordinate of the selection.
y the y-coordinate of the selection.
excludeComponentId the id of the component that should be excluded from the picking domain.
Returns:
the id of the selected container component or zero if none was picked.

void DefaultManager::renderText ( float  x,
float  y,
float  z,
const std::string &  str 
) [protected]

Renders a string of characters given a 3D position and a string object. It makes use of GLUT.

Parameters:
x the x-coordinate where the text is to be written.
y the y-coordinate where the text is to be written.
z the z-coordinate where the text is to be written.
str the string with the text that is to be written.


The documentation for this class was generated from the following files:
Generated on Fri Dec 21 17:46:07 2007 for LargeDisplayFrameworkToolkit by  doxygen 1.5.2