previous chapter contents page top page next chapter


TrashWindow

February 29, 1996

inherits from ContainerWindow;
inherits from HasButtonInTitleBar;
 

Class Description

Magic Cap defines class TrashWindow for the window that appears when the user taps the trash. The trash window is a container window that has an empty button in the title bar if there are any objects in the trash.

Programming information

Instantiate: rarely
Subclass: rarely
Call its methods: never

You probably won't ever create an object or a subclass of class TrashWindow. The information in this chapter is provided for debugging and curiosity only.

Methods defined by class TrashWindow

Class TrashWindow defines the following methods:

Method Description
CanAccept Overridden to reject objects that can't be deleted.
ChangedContents Overridden to redraw button in title bar appropriately.
Clear Overridden to destroy all objects in trash.
MovedContents Overridden to destroy objects in trash according to trash rules.
ContentsInTransit Overridden to always return true.

Fields defined by class TrashWindow

Class TrashWindow defines no fields.

Method Descriptions

CanAccept

overrides CanAccept

Call: rarely
Override: sometimes

Class TrashWindow overrides CanAccept to reject objects that can't be deleted.

ChangedContents

overrides ChangedContents

Call: rarely
Override: sometimes

Class TrashWindow overrides ChangedContents to draw the empty button in the title bar if the trash contains any objects, or to remove the button if the trash is empty.

Clear

overrides Clear

Call: rarely
Override: sometimes

Class TrashWindow overrides Clear to destroy all items in the trash.

MovedContents

overrides MovedContents

Call: rarely
Override: sometimes

Class TrashWindow overrides MovedContents to destroy objects in the trash if there are more than the number indicated by the user in the trash rules.

ContentsInTransit

overrides ContentsInTransit

Call: rarely
Override: sometimes

Class TrashWindow overrides ContentsInTransit to always return true, indicating that trash contents are in transit.