[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]

MagicCapMailExtras

inherits from Object
inherits from PartEncoder

Object <- MagicCapMailExtras



Operations

Get list of all operations

ApplyExtrasToMessage
CanEncodePart
ContentTypeForPart
Finalize
Init
RecordStylesForText
RegisterPartForEncoding


Attributes

Get list of all attributes

Adornments
FormForTelecard
NeedsEnvelope


Fields

Field Type
MagicCapMailExtras: formForTelecard: Form
adornments: ObjectList
envelopeSubviews: ObjectList
fontDescriptions: ObjectList
stylesForText: ObjectList
textWithStyles: ObjectList
telecardSize: Dot
needsEnvelope: Boolean


Instance template

instance MagicCapMailExtras tag;
formForTelecard: nilObject;
     adornments: nilObject;
envelopeSubviews: nilObject;
fontDescriptions: nilObject;
  stylesForText: nilObject;
 textWithStyles: nilObject;
   telecardSize: <0.0,0.0>;
  needsEnvelope: false;
end instance;

Class definition

#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;