presage
0.9.2~beta
|
#include <presageCallback.h>
Public Member Functions | |
virtual | ~PresageCallback () |
virtual std::string | get_past_stream () const =0 |
virtual std::string | get_future_stream () const =0 |
Protected Member Functions | |
PresageCallback () | |
Abstract callback object used to retrieve context from user application.
A concrete callback implementation must implement the getPastStream() and getFutureStream() method which are responsible for retrieving the context from the user text buffer.
Using a callback object decouples the user application from the chosen text buffer (which could be a simple string, a graphical text widget, a file stream, etc.) and frees the caller from having to explicitly notify of any updates to the context. Presage will invoke on the callback whenever access to contextual data is required.
getPastStream() must return a string containing the text preceding the current insertion point.
getFutureStream() must return a string containing the text following the current insertion point.
Definition at line 66 of file presageCallback.h.
|
inlinevirtual |
Definition at line 68 of file presageCallback.h.
|
inlineprotected |
Definition at line 74 of file presageCallback.h.
|
pure virtual |
Implemented in CPresageCallback, LegacyPresageCallback, PresageDemoCallback, and SimulatorPresageCallback.
Referenced by ContextTracker::getFutureStream(), and ContextTracker::toString().
|
pure virtual |
Implemented in CPresageCallback, LegacyPresageCallback, PresageDemoCallback, and SimulatorPresageCallback.
Referenced by ContextTracker::getPastStream(), ContextTracker::getToken(), and ContextTracker::toString().