Object <- Viewable <- Control |
|
|
Border CanDrawIn Editable Fraction Image Level LevelText Max Min |
Orientation Orientation Percent Target Target TargetAttribute TargetAttributeType UseScaledText |
| Field | Type | |
|---|---|---|
| Viewable: | superview: | Viewable |
| relativeOrigin: | Dot | |
| contentSize: | Dot | |
| viewFlags: | Flags | |
| labelStyle: | TextStyle | |
| color: | Unsigned | |
| altColor: | Unsigned | |
| shadow: | Shadow | |
| sound: | Playable | |
| HasBorder: | border: | Border |
| Control: | image: | Image |
| textStyle: | TextStyle | |
| controlFlags: | Unsigned | |
| level: | Fixed | |
| min: | Fixed | |
| max: | Fixed | |
| target: | Object | |
| targetAttribute: | OperationNumber |
instance Control tag; relativeOrigin: <0.0,0.0>; contentSize: <0.0,0.0>; viewFlags: 0x00000000; labelStyle: nilObject; color: 0; altColor: 0; shadow: nilObject; sound: nilObject; border: nilObject; image: nilObject; textStyle: nilObject; controlFlags: 0; level: 0; min: 0; max: 0; target: nilObject; targetAttribute: nilOperation; end instance;
Define Class Control; inherits from Viewable; inherits interface from FormElement; inherits from HasBorder; inherits interface from EditsTarget; field image: Image, getter; field textStyle: TextStyle; field controlFlags: Unsigned; field level: Fixed; field min: Fixed, getter; field max: Fixed, getter; field target: Object, weak; field targetAttribute: OperationNumber, getter; // value attribute Level: Fixed, safe, common; attribute Min: Fixed, safe; attribute Max: Fixed, safe; attribute Fraction: Fixed, safe; attribute Percent: Fixed, safe; operation LevelChanged(newLevel: Fixed); // this is what scripts override overrides Draw; operation DrawControlMechanism(); overrides Action; overrides Border; overrides AdjustSize; overrides CalcOpaqueBox; overrides CanAcceptCoupon; overrides CanDrawIn; operation BumpValue(decrementFlag: Boolean): Fixed; overrides Confirm; attribute Editable: Boolean, safe; operation ActWhen(): UnsignedShort; overrides Orientation, SetOrientation; attribute LevelText: Text, safe; operation TextFromValue(theValue: Fixed): Text; overrides Target, SetTarget; attribute TargetAttributeType: UnsignedShort, readOnly; // returns the type of the target attribute, stored in controlFlags // used by level routines to do proper conversion from target attribute to fixed overrides TextStyle; operation ValueAction(): UnsignedShort; operation ValueBox(var valueBox: Box); operation ValueMode(): UnsignedShort; operation ValueAsText(theValue: Fixed): Text, safe; overrides SetImage; overrides SetTextStyle; operation SetValueMode(newMode: Unsigned); attribute TargetAttribute: OperationNumber, safe; overrides Touch; #ifdef SCALED_SCREEN overrides UseScaledText; #endif operation ValueInContent(): Boolean; operation SetObjectAttributeOfTarget(attribute: OperationNumber; newValue: Object); // handle targets that are Shared when setting object attribute values operation SetIntegerAttributeOfTarget(attribute: OperationNumber; newValue: Unsigned); // handle targets that are Shared when setting unsigned attribute values operation PushLevel(newValue: Fixed), safe; operation UpdateLevel(); overrides IsFormElement, FormDataInfo, FormData, SetFormData; overrides CalcInsidePart; overrides PartColor, SetPartColor; overrides AboutToShow, AboutToHide; overrides Idle; overrides OpeningTinkerWindow; #ifdef VALIDATE overrides Validate; #endif operation NewPlusMinusValue(var value: Fixed; valueAction: SignedShort; hitLoc: Dot; var shouldChange: Boolean; var dontCallAgain: Boolean), intrinsic; end class;