#include <IOEvent.h>

Public Types | |
| enum | Type { STYLUS_DOWN, STYLUS_UP, BUTTON_DOWN, BUTTON_UP, STYLUS, BUTTON, CELL_START, CELL_DONE, BUTTON_START, BUTTON_DONE, CELL_DOTS, BUTTON_DOTS, CELL_LETTER, BUTTON_LETTER, DONE } |
| IO Event type symbols. More... | |
Static Public Member Functions | |
| static IOEvent | makeStylusDownEvent (const TimeInterval &my_timestamp, const unsigned short int &my_cell, const unsigned char &my_dot) |
| Named constructor for making STYLUS_DOWN events. | |
| static IOEvent | makeStylusUpEvent (const TimeInterval &my_timestamp, const unsigned short int &my_cell, const unsigned char &my_dot) |
| Named constructor for making STYLUS_UP events. | |
| static IOEvent | makeButtonDownEvent (const TimeInterval &my_timestamp, const unsigned short int &my_button) |
| Named constructor for creating BUTTON_DOWN events. | |
| static IOEvent | makeButtonUpEvent (const TimeInterval &my_timestamp, const unsigned short int &my_button) |
| Named constructor for creating BUTTON_UP events. | |
| static IOEvent | makeStylusEvent (const TimeInterval &my_timestamp, const TimeInterval &my_duration, const unsigned short int &my_cell, const unsigned char &my_dot) |
| Named constructor for creating STYLUS events. | |
| static IOEvent | makeButtonEvent (const TimeInterval &my_timestamp, const TimeInterval &my_duration, const unsigned short int &my_button) |
| Named constructor for creating BUTTON events. | |
| static IOEvent | makeCellStartEvent (const TimeInterval &my_timestamp, const unsigned short int &my_cell) |
| Named constructor for creating CELL_START events. | |
| static IOEvent | makeCellDoneEvent (const TimeInterval &my_timestamp, const unsigned short int &my_cell, const TimeInterval &my_duration) |
| Named constructor for creating CELL_DONE events. | |
| static IOEvent | makeButtonStartEvent (const TimeInterval &my_timestamp) |
| Named constructor for creating BUTTON_START events. | |
| static IOEvent | makeButtonDoneEvent (const TimeInterval &my_timestamp, const TimeInterval &my_duration) |
| Named constructor for creating BUTTON_DONE events. | |
| static IOEvent | makeCellDotsEvent (const TimeInterval &my_timestamp, const TimeInterval &my_duration, const unsigned short int &my_cell, const unsigned char &my_dots) |
| Named constructor for creating CELL_DOTS events. | |
| static IOEvent | makeButtonDotsEvent (const TimeInterval &my_timestamp, const TimeInterval &my_duration, const unsigned char &my_dots) |
| Named constructor for creating BUTTON_DOTS events. | |
| static IOEvent | makeCellLetterEvent (const TimeInterval &my_timestamp, const TimeInterval &my_duration, const unsigned short int &my_cell, const GlyphMapping &my_letter, const unsigned char &my_dots) |
| Named constructor for creating CELL_LETTER events. | |
| static IOEvent | makeButtonLetterEvent (const TimeInterval &my_timestamp, const TimeInterval &my_duration, const GlyphMapping &my_letter, const unsigned char &my_dots) |
| Named constructor for creating BUTTON_LETTER events. | |
| static IOEvent | makeDoneEvent () |
| Named constructor for DONE events. Only to be called internally! | |
Public Attributes | |
| Type | type |
| Event type. | |
| TimeInterval | timestamp |
| Timestamp of the event. | |
| TimeInterval | duration |
| Duration of the event. | |
| GlyphMapping | letter |
| unsigned short int | cell |
| Cell in which the stylus event occurred. | |
| unsigned short int | button |
| Button emitting the button event. | |
| unsigned char | dot |
| Cell dot in which the stylus event occurred. | |
| unsigned char | dots |
| Bitmap of a dot pattern glyph; use DOT_* variables to decompose. | |
This class describes several kinds of events for the Braille Tutor. It includes low-level events (button presses, stylus insertions/extractions) but also more complex events as well, including combinations of dots within a braille cell and braille letters. In addition to a timestamp, the class includes a duration measure that indicates how long it took the user to complete the event action, e.g. writing a letter. Note that multiple events can describe the same action: the same gestures that can cause a braille letter event can also yield multiple stylus events, for example.
For detecting high level events like writing a letter or any "glyph" (i.e. combination of dots within a cell or on the buttons), the system contains some heuristics to determine when the user has completed the task (see IOEventParser for more information). The *_START and *_DONE events signal the beginning and end of heuristically determined glyph input periods.
Note the existance of a DONE event, which signals that this BrailleTutor instance is about to be destroyed (e.g. due to program quit). If your IOEvent handler receives this event, it should handle it appropriately. DONE events cannot be ignored.
IO Event type symbols.
IO Event type symbols, in order from lowest level to highest level. Events noted as instantaneous will always have duration 0.
Letter or word interpretation of the user's dot glyph. It's OK to change the data in this GlyphMapping; it's a separate copy.
1.5.3