Object <- MagicCapMailExtras |
|
|
ApplyExtrasToMessage CanEncodePart ContentTypeForPart Finalize Init RecordStylesForText RegisterPartForEncoding |
|
Adornments FormForTelecard NeedsEnvelope |
| Field | Type | |
|---|---|---|
| MagicCapMailExtras: | formForTelecard: | Form |
| adornments: | ObjectList | |
| envelopeSubviews: | ObjectList | |
| fontDescriptions: | ObjectList | |
| stylesForText: | ObjectList | |
| textWithStyles: | ObjectList | |
| telecardSize: | Dot | |
| needsEnvelope: | Boolean |
instance MagicCapMailExtras tag; formForTelecard: nilObject; adornments: nilObject; envelopeSubviews: nilObject; fontDescriptions: nilObject; stylesForText: nilObject; textWithStyles: nilObject; telecardSize: <0.0,0.0>; needsEnvelope: false; end instance;
#endif Define Class MagicCapMailExtras; inherits from Object; inherits from PartEncoder; field formForTelecard: Form, getter, setter; // if the telecard uses a non-standard form, the form is put here to be sent field adornments: ObjectList, getter, setter; // top-level viewables on the Telecard lacking a natural MIME encoding field envelopeSubviews: ObjectList; // top-level viewables on the envelope of the telecard field fontDescriptions: ObjectList; // a flat list of text styles, referred to by index from stylesForText field stylesForText: ObjectList; // a list of integer lists, one for each element in textWithStyles // the integer lists are sequences of (font index, character count) pairs field textWithStyles: ObjectList; // a list of text containers corresponding to the elements of stylesForText field telecardSize: Dot; // the ContentSize of the telecard field needsEnvelope: Boolean, getter, setter; // the telecard uses a non-standard form and has a separate envelope attribute FormForTelecard: Form; attribute Adornments: ObjectList; attribute NeedsEnvelope: Boolean, safe; operation RecordStylesForText(text: HasText; defaultStyle: TextStyle), noFail; // creates entries in stylesForText and textWithStyles for the styles in text operation ApplyExtrasToMessage(telecard: Telecard; decoder: MailDecoder), noFail; // marks the items in textWithStyles with the text styles recorded in stylesForText // adds the items in adornments to the telecard // PartEncoder methods overrides CanEncodePart; // just encode ourselves overrides ContentTypeForPart; // application/X-Magic-Cap-Extras overrides RegisterPartForEncoding; // only registers this object if it contains useful state, such as a form, // adornments, or text styles overrides Init; // creates initial values for adornments, fontDescriptions, and stylesForText. overrides Finalize; // clears out the owning lists so we don't own what we shouldn't when destroyed end class;