PasteUpMorph
Last updated at 1:46 pm UTC on 7 January 2022
A PasteUpMorph object (BorderedMorph subclass: #PasteUpMorph) has the following properties:
- It is a Morph of rectangular shape on which other morphs may be pasted. They stick as the PasteUpMorph instance is moved around.
- The pages of a BookMorph are PasteUpMorphs.
- A Playfield is a PasteUpMorph
- A morph whose submorphs comprise a paste-up of rectangular subparts which "show through".
- A PasteUpMorph can be pasted on other PasteUpMorphs.
- A reference to the topmost instance of PasteUpMorph is kept in the global variable World. This instance of a PasteUpMorph then has a WorldState. See also Project.
Note: It is possible to have worlds in worlds and, starting with 2.9a, multiple active worlds.
Implementation notes
Version Squeak5.1-16548
PasteUpMorph allSelectors size 2143
BorderedMorph allSelectors size 1744
Morph allSelectors size 1713
A lot of methods might be be refactored into specialized classes.
Looking at the instance variables, we see that a world can have a presenter and a model and much other stuff like a background or some not yet working (or again broken) things like support for hypercard-like stacks. More important are the variables of the WorldState.
PasteUpMorph >>
buildWorldMenu: evt
^(TheWorldMenu new
world: self
project: (self project ifNil: [Project current]) "mvc??"
hand: evt hand) buildWorldMenu.
buildWorldMenu
A PasteUpMorph object: state and methods
InspectorBrowser openOn: PasteUpMorph new.
