Object <- Input |
|
|
DispatchInput Done Finalize Init InputTime NowDone SetDone StartTime |
Class Input defines no new attributes.
Fields
| Field | Type | |
|---|---|---|
| Input: | startTime: | Unsigned |
| stopTime: | Unsigned |
// Input objects describe any kind of input; usually key strokes or screen touches Define Class Input; abstract; inherits from Object; field startTime: Unsigned; field stopTime: Unsigned; // two ways to use an input; ask it to handle itself, or handle it and tell it you did operation DispatchInput(), noMethod; // call to ask input to handle itself operation NowDone(); // call to say that you are finished with this Input (not needed if Done is returning true) // timing of inputs operation Done(): Boolean; // input is done, InputTime returns stop time operation StartTime(): Unsigned, noFail; // inputs are sorted by this operation InputTime(): Unsigned; // current time while input is not done; stop time once input is done // hook for subclasses operation SetDone(endTime: Unsigned); // called when input is done; override to forget unimportant stroke details overrides Init, Finalize; end class;