#include <IOEvent.h>


Public Member Functions | |
| IOEventParser () | |
| Constructor. | |
| virtual void | operator() (std::deque< BaseIOEvent > &events) |
| Callback method for BrailleTutor object to supply events. | |
| void | setGlyphDelay (const TimeInterval &delay) |
| Set the time delay for the user to be "finished" with a glyph. | |
| void | flushGlyph () |
| Flush the current glyph. | |
| void | wantEvent (const IOEvent::Type &type) |
| Tells the IOEventParser to start adding type of event to the event list. | |
| void | ignoreEvent (const IOEvent::Type &type) |
| Tells the IOEventParser to stop adding a type of event to the event list. | |
| void | clearEvents () |
| Tells the IOEventParser not to add any events to the event list. | |
| void | setIOEventHandler (IOEventHandler &ioeh) |
| Register an IOEventHandler functor with this IOEventParser. | |
| void | pollIOEvents (IOEventHandler &ioeh) |
| Call an IOEventHandler functor on the events list immediately. | |
| void | setCharset (const Charset &my_charset=Charset::defaultCharset()) |
| Set the current braille character set. | |
| virtual | ~IOEventParser () |
| Destructor. | |
A BaseIOEventHandler that takes basic Braille Tutor events (e.g. button presses, stylus insertions/deletions) and creates events of intermediate complexity, represented with IOEvent objects. Register IOEventHandler functors with setIOEventHandler to process the events generated by an IOEventHandler
| void BrailleTutorNS::IOEventParser::setGlyphDelay | ( | const TimeInterval & | delay | ) |
Set the time delay for the user to be "finished" with a glyph.
If a time interval longer than delay (in seconds) elapses between the user's last button press/stylus withdrawal, the system deems the user to have completed the glyph. Will throw an BT_EDOM BTException if delay <= 0. Use a value of infinity (HUGE_VAL in cmath) for no delay.
| void BrailleTutorNS::IOEventParser::flushGlyph | ( | ) |
Flush the current glyph.
Normally the IOEventParser will not analyze what the user has typed into a braille cell until the user starts using a different cell or until a timeout without input expires. This method skips the wait and processes the user's input right away. Note that if no glyph is under construction now, this routine creates no new events.
| void BrailleTutorNS::IOEventParser::setIOEventHandler | ( | IOEventHandler & | ioeh | ) |
Register an IOEventHandler functor with this IOEventParser.
Register an IOEventHandler functor with this IOEventParser. The functor will be called whenever a new IOEvent is added to the events list. Note that the IOEventParser object does NOT keep its own copy of ioeh, so don't destroy ioeh until the IOEventParser is gone.
| void BrailleTutorNS::IOEventParser::pollIOEvents | ( | IOEventHandler & | ioeh | ) |
Call an IOEventHandler functor on the events list immediately.
Calls the furnished IOEventHandler functor on the current events list. This will occur ASAP, but because another thread may be writing to the list, there's no guarantee that this will happen absolutely immediately.
| void BrailleTutorNS::IOEventParser::setCharset | ( | const Charset & | my_charset = Charset::defaultCharset() |
) |
Set the current braille character set.
Sets the current character set object for transliting braille glyphs into Unicode strings. This class does not maintain a local copy of the character set object---do not destroy or alter the argument object while it's in use by an IOEventParser class.
1.5.3