Inherits from Proxy, Swallower, StarburstHilite Inherits interface from HasGoTo
Minicards are tiny representatives of cards. Minicards act as proxies in representing cards that aren't currently displayed. For example, when the user moves a telecard out of the in box and onto the desk, a minicard represents the unopened card on the desk. When the user slides a page out of the notebook index, a minicard represents the page.
Instantiate: often Subclass: rarely Call its methods: sometimes
You will often create minicards and hop them about the Magic Cap landscape. The two methods you're most likely to call are InstallMiniCard, a method of class Card, and HopToOutBox. Here's a common line of code that uses both methods:
HopToOutBox(InstallMiniCard(cardToMakeMinicardFor, nilObject));
This fragment makes a minicard for a card and hops the new minicard into the out box.
Class MiniCard defines the following methods:
Method | Description |
---|---|
AboutToShow | Overridden to update the minicard's name before it's shown |
CanDeleteDeep | Overridden to avoid unpacking telecard by Object_CanDeleteDeep |
CanSetName | Overridden to return the value that target card returns |
Confirmed | Overridden to check confirmFlag and if it's set, move target card to the | appropriate scene |
Copy | Overridden to bracket the copy with RemoveCurrentCard/ | InstallCurrentCard to prevent two cards from being in a one-card scene |
Draw | Overridden to draw the number of items if the target card is a folder |
Finalize | Overridden to clear step back spot if it points to this minicard, and detach | undeletable cards to avoid destroying them |
GoTo | Overridden to handle setting up the minicard stack and to set the stack of | the current minicard properly |
GoToVia | Go to the minicard's target card |
GoToFeedback | Animate a card zooming open |
HopToOutBox | Put the minicard's target card into the out box |
Idle | Overridden to destroy the minicard if its target is destroyed |
Image | Overridden to call CardIcon on the minicard's target if the image field is | nilObject |
Pressed | Overridden to prevent minicards from landing on their own target card, thus | avoiding an unfortunate recursion; also to handle class Scene's | expandMiniCards bit |
SetImage | Overridden to do nothing if the target card is a NoteCard |
SetName | Overridden to set the name of the target card if CanSetName on target | returns true |
SetTarget | Overridden to dirty bounds and update the minicard's name |
Tap | Overridden to call GoTo on self; If the minicard is in a window or otherwise | not on a scene, hop the minicard to the desk first |
Touch | Overridden to highlight self before inherited call, then unhighlight itself | afterwards |
TranslationPrototype | Overridden to return DirectID(iMiniCardTranslationPrototype) |
UpdateName | Set the name of the minicard to the name of its target |
Class MiniCard defines the following fields:
Field | Type | Description |
---|---|---|
Inherited from SingleLinkable: | ||
next | Object | Next item in view list |
Inherited from Linkable: | ||
previous | Object | Previous item in view list |
Inherited from Viewable: | ||
superview | Viewable | Container for this object |
subview | Viewable | Object contained by this object |
relativeOrigin | Dot | Origin relative to superview |
contentSize | Dot | Size of content rectangle |
viewFlags | Unsigned | Property settings |
labelStyle | TextStyle | Text style of object's label |
color | Color | Color of object's content |
shadow | Shadow | Shadow drawn with object |
sound | Sound | Sound associated with object |
Inherited from Stamp: | ||
image | Image | Image used to draw stamp |
Inherited from Proxy: | ||
target | Object | The object for which this proxy is a stand-in; used by the | Target attribute |
proxyFlags | Unsigned | Flags that control various aspects of the proxy object |
Defined by MiniCard | ||
stationery | Stationery | The stationery that this minicard was created from |
Class MiniCard defines the following attributes:
Attribute | Type | Description |
---|---|---|
Stationery | Stationery | The stationery that this mini card was created from, | used by MessageIcon to set the default stationery |
overrides GoToVia Call: sometimes Override: rarely
Call GoToVia on a minicard to go to its target card. GoToVia is overridden to handle clearing other cards from one-card scenes, and setting up step back information.
operation GoToFeedback(), noFail, safe; Call: rarely Override: sometimes
The system calls GoToFeedback when it goes to a scene or a card via a minicard. GoToFeedback draws an animation of a card zooming open. If the minicard is a telecard of a type that doesn't have an envelope, such as a postcard, the animation also draws "postcard lines." Postcard lines are the faint rulings on postcards that divide the address half of the card from the message half. This is a nice detail which helps distinguish postcards from standard letters as they zoom open.
Override GoToFeedback to provide your own visual effect.
operation HopToOutBox(); Call: sometimes Override: rarely
Call HopToOutBox on a mini-card to put the minicard's target into the out box. HopToOutBox also drawns an animation showing the mini-card hopping to the out box icon. If the outbox is not visible in the current scene, HopToOutBox uses a surrogate icon in a window. The target card is moved to the outbox stack, then the minicard destroys itself.
operation UpdateName(); Call: sometimes Override: rarely
Call UpdateName to set the name of the mini-card to the name of its target card. If the keepNameAsIs
flag is set, UpdateName does nothing.