previous chapter contents page top page next chapter

LineStyleCoupon

Inherits from Coupon
encodes empty field list;

Class Description

Class LineStyleCoupon is a subclass of Coupon that allows the user to change the line style of an object. Objects of this class work by calling SetLineStyle on the coupon's target.

For more information about line styles, see the description of classes LineStyle and HasLineStyleAttribute.

Programming information

Instantiate: rarely
Subclass: rarely
Call its methods: never

You might instantiate objects of this class if you wanted to create your own line style coupons, and you might create subclasses if you wanted to create a coupon for a specialized kind of line style.

Methods defined by class LineStyleCoupon

Class LineStyleCoupon defines the following methods:

Method Description
ApplyCoupon Overridden to call SetLineStyle on coupon's target.
Draw Overridden to show line style in coupon instead of text.

Fields defined by class LineStyleCoupon

Class LineStyleCoupon defines no fields.

Method Descriptions

ApplyCoupon

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. LineStyleCoupon_ApplyCoupon sets the target's line style by calling SetLineStyle.

Draw

overrides Draw

Call: rarely
Override: sometimes

Magic Cap calls Draw to draw the coupon on the screen. LineStyleCoupon_Draw draws the coupon with an image that indicates what the target's line will look like when the coupon is applied.

See Viewable_Draw for more information.