A World typically corresponds to a CET drawing (cmdrw). Each World can hold multiple Spaces. However, not all Worlds are drawings - non-drawing Worlds can be used to hold temporary Spaces as used in the Reconfiguration Tool, for example.
Characteristics
- Each Space belongs to a World.
- Manages an UndoChain in which UndoSteps of this world are recorded.
- World-specific data can be stored in
auxillaryData
(streamed) andcachedData
(not streamed), such as drawing settings. - World event callbacks can be invoked via hooks, such as
saveWorldHooks()
andloadWorldHooks()
.
Undo
Each construction of a World will initiate an UndoChain, which holds all the Undo information within that World.
The UndoChain will be reset each time the drawing is loaded. Meaning a cmdrw will not have any undo-able action after just being loaded.
ViewMode
A World contains viewModes
in which are groups of layers. A View can then show Snappers that contain any of the layer's in a ViewMode.
Usually, a set of viewModes
belong to extensions, as each extension can define its own layers, which means an extension's ViewMode can be incompatible with another extension's ViewMode.
To initialize the set of viewModes
of your extension, you can use World's setViewModes()
, and then update the ViewModeBar
highlighted in the above image by using viewModeBar.update()
.
Comments
0 comments
Please sign in to leave a comment.