Module observer
This module contains base classes for various kinds of Observers, and some utility functions for managing them.
You should always base your custom observer classes on one of these, otherwise they won't work properly on Windows.
Class AppObserver
Abstract Methods
onNewModel(model)
onOpenModel(model)
onQuit()
Class DefinitionsObserver
Abstract Methods
onComponentAdded(definitions, definition)
onComponentPropertiesChanged(definitions)
onComponentRemoved(definitions, definition)
onComponentTypeChanged(definitions, definition)
Class DefinitionObserver
Abstract Methods
onComponentInstanceAdded(definition, instance)
onComponentInstanceRemoved(definition, instance)
Class EntitiesObserver
Abstract Methods
onElementAdded(entities, entity)
onElementRemoved(entities, entity)
onContentsModified(entities, entity)
Class EntityObserver
Abstract Methods
onEraseEntity(entity)
onChangeEntity(entity)
Class InstanceObserver
Abstract Methods
onOpen(instance)
onClose(instance)
Class LayersObserver
Abstract Methods
onCurrentLayerAdded(layers, layer)
onLayerAdded(layers, layer)
onLayerRemoved(layers, layer)
onRemoveAllLayers(layers)
Class MaterialsObserver
Abstract Methods
onMaterialAdd(materials, material)
onMaterialChange(materials, material)
onMaterialRemove(materials, material)
onMaterialRefChange(materials, material)
onMaterialSetCurrent(materials, material)
onMaterialUndoRedo(materials, material)
onMaterialRemoveAll(materials, material) # Is this right?
Class ModelObserver
Abstract Methods
onDeleteModel(model)
onEraseAll(model)
onTransactionEnd(model)
onTransactionStart(model)
Class OptionsProviderObserver
Abstract Methods
onOptionsProviderChanged(options, name)
Class PagesObserver
Abstract Methods
Argument info appears to be missing from Ruby documentation.
onElementAdded(???)
onElementRemoved(???)
onContentsModified(???)
Class RenderingOptionsObserver
Not currently implemented because Ruby documentation is incomplete.
Class SelectionObserver
Abstract Methods
onSelectionAdded(selection, element)
onSelectionBulkChange(selection)
onSelectionCleared(selection)
onSelectionRemoved(selection)
Class ShadowInfoObserver
Abstract Methods
onShadowInfoChanged(???)
Class ToolsObserver
Abstract Methods
onActiveToolChanged(tools, toolname, toolid)
onToolStateChanged(tools, toolname, toolid)
Class ViewObserver
Abstract Methods
onViewChanged(view)
Module Functions
- add_app_observer(observer, name = None)
Adds
an application observer. If an application observer has been added
before under the same name, the previous one is removed. This allows
you to reload your scripts without old versions of your application
observers piling up.
If no name is specified, a default name is constructed from the module and class names of the observer.