Main Page | Modules | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | Examples

LCDScroller Class Reference
[Widgets]

#include "api/LCDScroller.h"

Inheritance diagram for LCDScroller:

Inheritance graph
[legend]
Collaboration diagram for LCDScroller:

Collaboration graph
[legend]
List of all members.

Detailed Description

This widget is used to display some text that will scroll on the screen.
Examples:

client.cpp.

Definition at line 12 of file LCDScroller.h.

Public Types

typedef std::list< std::string > ParameterList
 A list of parameters for set method.


Public Member Functions

 LCDScroller (LCDElement *parent=0, const std::string &id="")
 Default Constructor.

void set (const std::string &text, int left=1, int top=1, int right=10, int bottom=1, int speed=8, Direction direction=Horizontal)
 Set the values for the widget.

void setText (const std::string &text)
 Set the displayed text.

std::string getText ()
 Get the displayed text.

void setWidth (int width)
 Set the width of the scroller.

void setHeight (int height)
 Set the height of the scroller.

void setSpeed (int speed)
 Set the speed of the scroller.

void move (int x, int y=1)
 Move the widget to a new location.

void set (const ParameterList &pList)
 Generic method to set widget parameter.

void add (LCDElement *child)
 Add a child to the component.

const std::string & getId ()
 Returns Id of the element.


Static Public Member Functions

bool exists (std::string id)
 Test if a widget with given Id exists.


Member Typedef Documentation

typedef std::list<std::string> ParameterList [inherited]
 

This is a list containing strings. Each string corresponds to a parameter.

Definition at line 42 of file LCDWidget.h.


Constructor & Destructor Documentation

LCDScroller LCDElement parent = 0,
const std::string &  id = ""
 

This constructor can be used without parameter in most cases. But the widget will have to be added to a parent (screen or frame).

Parameters:
parent A pointer to parent of this screen. It should be a LCDClient object.
id A string with the identifier for the screen. If not provided, a unique one will be generated automatically.

Definition at line 7 of file LCDScroller.cpp.


Member Function Documentation

void add LCDElement child  )  [inherited]
 

This method is used to add a child to a component.

Parameters:
child The element to be added in the children list.
Examples:
client.cpp.

Definition at line 110 of file LCDElement.cpp.

bool exists std::string  id  )  [static, inherited]
 

This static method is used to test the existence of a widget.

Parameters:
id The identifier of the widget to test.

Definition at line 76 of file LCDElement.cpp.

const string & getId  )  [inherited]
 

With this method one can have read access to the element identifier.

Returns:
A string.

Definition at line 82 of file LCDElement.cpp.

string getText  ) 
 

Get the text displayed on the LCD by this widget.

Returns:
A string containing the text that is displayed.

Definition at line 56 of file LCDScroller.cpp.

void move int  x,
int  y = 1
[inherited]
 

Change the coordinate of a widget. Even if all the widgets have this method, it won't have an effect on all of them.

Parameters:
x Integer containing 1-based value for column number.
y Integer containing 1-based value for row number.
See also:
LCDScreen::setCursorPosition
Examples:
client.cpp.

Definition at line 22 of file LCDWidget.cpp.

void set const ParameterList pList  )  [inherited]
 

This method can be used to set all parameters of a widget. You should know the ones that are used by the protocol to put all of them in correct order.

Parameters:
pList A list of all the parameters values.

Definition at line 34 of file LCDWidget.cpp.

void set const std::string &  text,
int  left = 1,
int  top = 1,
int  right = 10,
int  bottom = 1,
int  speed = 8,
Direction  direction = Horizontal
 

Set or change the useful values for this widget.

Parameters:
text A string containing the text that will be displayed.
left Integer containing 1-based left position of the widget.
top Integer containing 1-based top position of the widget.
right Integer containing 1-based right position of the widget.
bottom Integer containing 1-based bottom position of the widget.
speed Number of movements per rendering stroke (8 times/second).
direction Can be 'h' for Horizontal or 'v' for Vertical.

Definition at line 39 of file LCDScroller.cpp.

void setHeight int  height  ) 
 

Set or change the height of the widget.

Parameters:
height The new height to be used (in characters).

Definition at line 65 of file LCDScroller.cpp.

void setSpeed int  speed  ) 
 

Set or change the speed of the scrolling.

Parameters:
speed The new speed to be used . Is is a number of movements per rendering stroke (8 times/second).
Examples:
client.cpp.

Definition at line 70 of file LCDScroller.cpp.

void setText const std::string &  text  ) 
 

Set or change the text displayed on the LCD by this widget.

Parameters:
text A string containing the text that will be displayed.

Definition at line 51 of file LCDScroller.cpp.

void setWidth int  width  ) 
 

Set or change the width of the widget.

Parameters:
width The new width to be used (in characters).
Examples:
client.cpp.

Definition at line 60 of file LCDScroller.cpp.


Generated on Wed Aug 4 19:39:10 2004 for LCDApi by doxygen 1.3.6