BrailleTutorNS::IOEvent Struct Reference

A datatype describing Braille Tutor events of intermediate complexity. More...

#include <IOEvent.h>

Collaboration diagram for BrailleTutorNS::IOEvent:

Collaboration graph
[legend]

List of all members.

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.


Detailed Description

A datatype describing Braille Tutor events of intermediate complexity.

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.


Member Enumeration Documentation

enum BrailleTutorNS::IOEvent::Type

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.

Enumerator:
STYLUS_DOWN  Stylus insertion into a dot (instantaneous).
STYLUS_UP  Stylus withdrawal from a dot (instantaneous).
BUTTON_DOWN  Button press (instantaneous).
BUTTON_UP  Button release (instantaneous).
STYLUS  Complete stylus event: duration is from insertion to withdrawal.
BUTTON  Complete button event; duration is from press to release.
CELL_START  System thinks user is starting a new glyph in a cell (instantaneous).
CELL_DONE  System thinks user has completed a glyph in a cell (in duration time).
BUTTON_START  System thinks user is starting a new glyph on buttons (instantaneous).
BUTTON_DONE  System thinks user has completed a glyph on buttons (in duration time).
CELL_DOTS  User enters a dot pattern glyph in a cell.
BUTTON_DOTS  User enters a dot pattern glyph on buttons.
CELL_LETTER  User enters a letter in a cell.
BUTTON_LETTER  User enters a letter on buttons.
DONE  The app is terminating; clean up!


Member Data Documentation

GlyphMapping BrailleTutorNS::IOEvent::letter

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.


The documentation for this struct was generated from the following file:
Generated on Fri Nov 16 14:50:26 2007 for Braille Tutor Interface Library by  doxygen 1.5.3