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

LCDScreen Class Reference
[Main components]

#include "api/LCDScreen.h"

Inheritance diagram for LCDScreen:

Inheritance graph
[legend]
Collaboration diagram for LCDScreen:

Collaboration graph
[legend]
List of all members.

Detailed Description

With this class, you can create a new screen. It will contain some widgets. You can create as many screen as you want. The server will rotate them on the display.
Examples:

client.cpp.

Definition at line 16 of file LCDScreen.h.

Public Member Functions

 LCDScreen (LCDElement *parent=0, std::string name="", std::string id="")
 Default Constructor.

void setName (std::string name)
 Change the name of the screen.

void setWidth (int width)
 Change the width of the screen.

void setHeight (int height)
 Change the height of the screen.

void setPriority (std::string priority)
 Change the priority of the screen.

void setHeartBeat (std::string heartbeat)
 Enable or disable heart beat.

void setBackLight (std::string backlight)
 Enable or disable screen backlight.

void setDuration (int secondEights)
 Set the time the screen is displayed during each rotation.

void setTimeOut (int secondEights)
 Set the time to live of the screen.

void setCursor (std::string cursor)
 Set the cursor state.

void setCursorPosition (int x, int y)
 Set the cursor position on screen.

void setCursorX (int x)
 Set the x coordinate of the cursor.

void setCursorY (int y)
 Set the y coordinate of the cursor.

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.


Constructor & Destructor Documentation

LCDScreen LCDElement parent = 0,
std::string  name = "",
std::string  id = ""
 

This constructor can be used without parameter in most cases. But the screen will have to be added to a client.

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

Definition at line 6 of file LCDScreen.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.

void setBackLight std::string  backlight  ) 
 

Enable or disable the backlight for the current screen.

Parameters:
backlight A string with the value to set. Constants LCD_BACKLIGHT_ON, LCD_BACKLIGHT_OFF, LCD_BACKLIGHT_OPEN, LCD_BACKLIGHT_TOGGLE, LCD_BACKLIGHT_BLINK and LCD_BACKLIGHT_FLASH can be used.

Definition at line 55 of file LCDScreen.cpp.

void setCursor std::string  cursor  ) 
 

Change the way the cursor is displayed.

Parameters:
cursor A string with the value to set. Constants LCD_CURSOR_ON, LCD_CURSOR_OFF,LCD_CURSOR_UNDER and LCD_CURSOR_BLOCK can be used.

Definition at line 70 of file LCDScreen.cpp.

void setCursorPosition int  x,
int  y
 

Move the cursor to a point specified with its coordinates. They are always 1-based, wich means that top-left is (1,1).

Parameters:
x Integer containing 1-based value for column number.
y Integer containing 1-based value for row number.

Definition at line 85 of file LCDScreen.cpp.

void setCursorX int  x  ) 
 

Change only the x coordinate of the cursor position on screen.

See also:
setCursorPosition

Definition at line 75 of file LCDScreen.cpp.

void setCursorY int  y  ) 
 

Change only the y coordinate of the cursor position on screen.

See also:
setCursorPosition

Definition at line 80 of file LCDScreen.cpp.

void setDuration int  secondEights  ) 
 

Change the time the screen will be visible during each rotation.

Parameters:
secondEights The time in eights of a second to display the screen.
Examples:
client.cpp.

Definition at line 60 of file LCDScreen.cpp.

void setHeartBeat std::string  heartbeat  ) 
 

Enable or disable the heart beat used by LCDproc to show data transmission.

Parameters:
heartbeat A string with the value to set. Constants LCD_HEARTBEAT_ON, LCD_HEARTBEAT_OFF and LCD_HEARTBEAT_OPEN can be used.

Definition at line 50 of file LCDScreen.cpp.

void setHeight int  height  ) 
 

Sets the height of the screen in characters. If unset, the full display size is assumed.

Parameters:
height An integer containing the new number of characters to be used as height.

Definition at line 40 of file LCDScreen.cpp.

void setName std::string  name  ) 
 

Sets the screen's name as visible to a user.

Parameters:
name A string containing the new name.

Definition at line 30 of file LCDScreen.cpp.

void setPriority std::string  priority  ) 
 

Sets priority of the screen. Only screens with highest priority at a moment will be shown.

Parameters:
priority A string containing the priority class. These constants can be used: LCD_PRIORITY_HIDDEN, LCD_PRIORITY_BACKGROUND, LCD_PRIORITY_INFO, LCD_PRIORITY_FOREGROUND, LCD_PRIORITY_ALERT, LCD_PRIORITY_INPUT.

Definition at line 45 of file LCDScreen.cpp.

void setTimeOut int  secondEights  ) 
 

Change the time to live of the screen. After the screen has been visible for a total of this amount of time, it will be deleted

Parameters:
secondEights The time in eights of a second for the time to live.

Definition at line 65 of file LCDScreen.cpp.

void setWidth int  width  ) 
 

Sets the width of the screen in characters. If unset, the full display size is assumed.

Parameters:
width An integer containing the new number of characters to be used as width.

Definition at line 35 of file LCDScreen.cpp.


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