Object <- Viewable <- InputPanel |
|
|
AboutToHide AboutToShow CanAccept CanAcceptCoupon Draw DrawHighlight DrawKeys |
HitTestStandardKeys InternalMode KeyTyped NextKeyboardInput RequestCaps Shift Touch |
|
ButtonImage IsNativePanel Keyboard Mode |
| Field | Type | |
|---|---|---|
| Viewable: | superview: | Viewable |
| relativeOrigin: | Dot | |
| contentSize: | Dot | |
| viewFlags: | Flags | |
| labelStyle: | TextStyle | |
| color: | Unsigned | |
| altColor: | Unsigned | |
| shadow: | Shadow | |
| sound: | Playable | |
| InputPanel: | keyboard: | Keyboard |
| kbdFlags: | UnsignedShort | |
| isNativePanel: | Boolean | |
| backgroundImage: | Image | |
| buttonImage: | Image | |
| keytopImageList: | ObjectList | |
| rowCharsList: | ObjectList | |
| keyDownQueue: | DataList | |
| ownTool: | Tool | |
| numberOfSpecialKeys: | UnsignedShort | |
| boxList: | IntegerList | |
| typeList: | ShortIntegerList | |
| dataList: | ShortIntegerList |
Define Class InputPanel; inherits from Viewable; abstract; field keyboard: Keyboard, getter; // The keyboard that contains this InputPanel field kbdFlags: UnsignedShort; // internal flags of the InputPanel. The flag masks are defined in Utilities.h. field isNativePanel: Boolean, getter; field backgroundImage: Image; field buttonImage: Image, getter; // image for PanelChangeButton field keytopImageList: ObjectList; field rowCharsList: ObjectList; field keyDownQueue: DataList; field ownTool: Tool; // These fields contains the information about special keys (non standard shape keys) that is // not handled by rowCharsList. field numberOfSpecialKeys: UnsignedShort; field boxList: IntegerList; field typeList: ShortIntegerList; field dataList: ShortIntegerList; attribute IsNativePanel: Boolean, readOnly; operation InternalMode(forHitTest: Boolean): UnsignedShort, noMethod; // InputPanel has its own internal modes. // ex) RomanPanel has two internal modes, shifted and non-shifted. attribute Mode: Signed, safe; operation RequestCaps(caps: Boolean); // do nothing in default attribute ButtonImage: Image, readOnly; attribute Keyboard: Keyboard, readOnly; operation HitTestStandardKeys(probe: Dot; var highlightBox: Box): Character; // return zero in default, overwritten in decendants. operation Shift(), safe; operation KeyTyped(key: Character); operation DrawKeys(); operation DrawHighlight(); overrides Draw; overrides Touch; overrides AboutToShow, AboutToHide; operation NextKeyboardInput(var keyCode: Character; var highlightBox: Box; anyKey: Boolean): TouchInput, intrinsic; overrides CanAccept; overrides CanAcceptCoupon; end class;