Inherits from Coupon encodes empty field list;
Class TextCoupon is a subclass of Coupon that allows the user to drop text into an object. Objects of this class work by calling SetTextData on the coupon's target.
Remember that if the documentation and the software (especially the definition files) disagree, always trust the software.
Instantiate: rarely Subclass: rarely Call its methods: never
You might instantiate objects of this class if you wanted to have pre-made runs of text in your package for users to drag around, and you might create subclasses if you wanted to create coupons containing specialized subclasses of text.
Class TextCoupon defines the following methods:
Method | Description |
---|---|
ApplyCoupon |
Overridden to change target's text by calling SetTextData. |
CalcContentBox | Overridden to consider size of text when computing content box. |
CanStretch | Overridden to return false. |
Draw | Overridden to customize appearance of coupons. |
Class TextCoupon defines no fields.
overrides ApplyCoupon Call: rarely Override: sometimes
Magic Cap calls ApplyCoupon when the user drops a coupon into a viewable object. ApplyCoupon should perform the action represented by the coupon. TextCoupon_ApplyCoupon sets the target's text by calling SetTextData
overrides CalcContentBox Call: rarely Override: sometimes
Class TextCoupon overrides CalcContentBox to consider the coupon's text when computing the size of its content box.
overrides CanStretch Call: rarely Override: sometimes
Class TextCoupon overrides CanStretch to return false, preventing the user from stretching text coupons.
overrides Draw Call: rarely Override: sometimes
Magic Cap calls Draw to draw the coupon on the screen. TextCoupon_Draw draws the coupon with the first part of its text displayed.
See Viewable_Draw for more information.