Layouting a System Browser Window - LucPrestin/Hidden-Modularity GitHub Wiki
Description
The purpose of this scenario is to investigate how a morph behaves when its layout has been invalidated and must now be recalculated. A SystemBrowser
is suitable for this, because it consists of many submorphs, which then have to be layouted as well.
First we open a SystemBrowser
and get its window. Then we invalidate its layout by manually invalidating that of the direct submorphs. Then we send the window the message fullBounds
which forces it to recalculate the whole layout.
Code
| browser window cursor |
browser := SystemBrowser defaultOpenBrowser.
window := browser containingWindow.
window submorphsDo: [:submorph | submorph layoutChanged].
^ TDBCursor traceForBlock: [window fullBounds].
Hypotheses
Hypotheses to the Communicator Graph
- Involved classes will be different types of morphs. In addition, we expect to see a layout strategy.
- The classes involved will come from only a few packages. First of all Morphic, Graphics and Numbers
- The largest will be
Rectangle
,Point
and thePluggableSystemWindow
. - The
PluggableSystemWindow
will be laid out close to the submorphs.
Hypotheses to the Method Category Graph
- Involved categories will be
geometry
,layout
,submorph
,access
andtesting
. The first three because they are directly related to layouting and graph output, the last two because no code can do without them. - Testing should be close to access, because it is mostly tests on instance variables.