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

Keys handling


Detailed Description

To assign a callback to a key event, there is the need to create a new class inheriting from LCDCallback.

The operator() should then be overriden to do actions. It will be called when the key event occurs.

To define only a single function, there are some useful macros (see below).

Then the callback is associated to the event with the method LCDClient::assignKey()


Classes

class  LCDCallback
 Main class to create new callback for key events. More...


Defines

#define LCD_CALLBACK_FUNCTION_BEGIN(fname)
#define LCD_CALLBACK_FUNCTION_END(fname)

Typedefs

typedef char KeyEvent


Define Documentation

#define LCD_CALLBACK_FUNCTION_BEGIN fname   ) 
 

Value:

class LCDClass_fname : public LCDCallback \
{ \
public: \
  void operator()(KeyEvent lcdKey)
A macro that can be used when only a function is needed and not a real class. Use it with the name of the pseudo function you want to create and then you can define your function code (between braces)
Examples:
client.cpp.

Definition at line 30 of file LCDCallback.h.

#define LCD_CALLBACK_FUNCTION_END fname   ) 
 

Value:

}; \
LCDClass_fname fname;
A macro that can be used when only a function is needed and not a real class. It has to be used after the function code and match the name that was used for LCD_CALLBACK_FUNCTION_BEGIN
Examples:
client.cpp.

Definition at line 42 of file LCDCallback.h.


Typedef Documentation

typedef char KeyEvent
 

The type used to define a key event.

Definition at line 51 of file LCDCallback.h.


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