AcceptsTyping |
|
|
AcceptTyping Activate CurrentTypingTarget Deactivate DefaultKeyboard DispatchExtendedKeys |
DispatchKeys DoneTyping Retype SetCurrentTypingTarget TypeKeys |
|
Editable ModeAlteration |
// This include statement will be replaced by a line of the form // define interface XXXXPlatformInterface #include "DefinePlatformSpecification.h" class PlatformSpecification = 1; intrinsic CheckPlatform = 1; end interface; Define Class AcceptsTyping; mixes in with Viewable; // managing the typing target intrinsic CurrentTypingTarget(): AcceptsTyping; intrinsic SetCurrentTypingTarget(newTarget: AcceptsTyping); // typing intrinsic DispatchKeys(keys: CharactersPointer; count: Unsigned); #ifdef WINDOWS intrinsic DispatchExtendedKeys(keys: CharactersPointer; count: Unsigned; extendedKey: Unsigned); #endif // managing the typing target from the point of view of a specific object operation AcceptTyping(), noFail; // ask an object to become the current typing target operation DoneTyping(), noFail; // ask an object to stop being the current typing target // notification about being the target // using Activate, you can refuse to accept typing by failing with exception: cannotActivate // using Deactivate, you can refuse to yield to another typing target with exception: cannotDeactivate operation Activate(), noFail; // override to do extra setup before the user can type into your object (will always be called) operation Deactivate(), noFail; // override to do extra cleanup after the user is done typing into your object (will always be called) // willingness to be edited attribute Editable: Boolean, readOnly; // control of which keybaord is used operation DefaultKeyboard(): Viewable; // control of keyboard mode // getter return kDefaultAlphabetMode. // setter do nothing attribute ModeAlteration: UnsignedShort; // accepting keys (starts with TypeKeys, which is built into Viewable) overrides TypeKeys; operation Retype(newCharacter: Character); // type a composed character over uncomposed piece end class;