[operations] [attributes] [fields] [template] [definition]
[implementation] [documentation]
To use the search tool you need to use a browser which supports JAVA (c)

[next] [prev] [superclass] [next peer] [prev peer] [subclass] [index] [hierarchy]

Coupon

abstract
inherits from Viewable
inherits from BackgroundWithBorder

Object <- Viewable <- Coupon



Operations

Get list of all operations

Accepted
ApplyAndDiscardCoupon
ApplyCoupon
CalcContentBox
CanAcceptCoupon
CanApply
CouponImage
CouponObject
CouponText
Draw
DrawCoupon
GiveObjectToCoupon
Pressed
SetPartColor
Tap
TextStyle


Attributes

Get list of all attributes

Amount
AutoMove
Border
CanDrawIn
CanStretch
Mode


Fields

Field Type
Viewable: superview: Viewable
relativeOrigin: Dot
contentSize: Dot
viewFlags: Flags
labelStyle: TextStyle
color: Unsigned
altColor: Unsigned
shadow: Shadow
sound: Playable
Coupon: couponObject: Object
selector: Unsigned
amount: Signed


Instance template

Class Coupon cannot be instantiated.


Class definition

Define Class Coupon;
    abstract;
    inherits from Viewable, BackgroundWithBorder;

    field couponObject: Object;
    field selector: Unsigned;
    field amount: Signed, getter, setter;

    attribute Amount: Signed;
    attribute Mode: Signed, safe;

    operation DrawCoupon(): Object;

    operation CouponImage(): Image;
    operation CouponText(): Text;

    operation CouponObject(): Object;
    operation GiveObjectToCoupon(newObject: Object; makeShared: Boolean);
        // sets couponObject field with a copy of <newObject>
        // if makeShared is true, makes a shared copy of <newObject>
        // caller owns <newObject> and is responsible for destroying it

    operation CanApply(applyTo: Viewable): Boolean;
    operation Accepted();
    operation ApplyCoupon(applyTo: Viewable; where: Dot), noMethod;
    operation ApplyAndDiscardCoupon(applyTo: Viewable);
    
    overrides AutoMove, CalcContentBox, CanAcceptCoupon, CanDrawIn, CanStretch, Draw, Pressed, Tap;
    overrides Border, TextStyle, SetPartColor;
end class;