Class: ModraUp::ModelObserver
- Inherits:
-
Object
- Object
- ModraUp::ModelObserver
Overview
Model Observer. Registered with ModraUp::Model#add_observer.
Instance Method Summary # collapse
-
#onTransactionStart(model) ⇒ nil
Called when a ModraUp::Model#start_operation begins.
-
#onTransactionCommit(model) ⇒ nil
Called when ModraUp::Model#commit_operation succeeds.
-
#onTransactionAbort(model) ⇒ nil
Called when ModraUp::Model#abort_operation succeeds.
-
#onTransactionUndo(model) ⇒ nil
Called when an undo transaction succeeds.
-
#onTransactionRedo(model) ⇒ nil
Called when a redo operation is successful.
-
#onActivePathChanged(model) ⇒ nil
Called when entering or exiting an edit path.
-
#onDeleteModel(model) ⇒ nil
Called before the current document is replaced (new/open).
-
#onPlaceComponent(instance) ⇒ nil
Called after ModraUp::Entities#add_instance places an instance.
-
#onPreSaveModel(model) ⇒ nil
Called before saving begins.
-
#onSaveModel(model) ⇒ nil
Called after a successful save.
-
#onPostSaveModel(model) ⇒ nil
Called after the save process completes.
-
#onTransactionEmpty(model) ⇒ nil
Called when a transaction with no changes is submitted. History does not yet distinguish between empty transactions, so no dispatch is currently issued.
-
#onEraseAll(model) ⇒ nil
Called when the model is erased entirely. ModraUp::Drawingelement#erase! / The viewport eraser dispatches this event after clearing the current drawing context.
-
#onExplode(model) ⇒ nil
Called after a group or component instance is exploded. Dispatched after ModraUp::Group#explode / ModraUp::ComponentInstance#explode succeeds.
-
#onPidChanged(model, old_pid, new_pid) ⇒ nil
Called when the persistent_id is rewritten. ModraUp does not alter the issued persistent_id (replicas are assigned new IDs when they are first numbered), so no event is dispatched.
-
#onBeforeComponentSaveAs(instance) ⇒ nil
Called before a component is saved as (for dynamic components, use instance). Currently, there is no right-click Save As path, and no dispatch occurs.
-
#onAfterComponentSaveAs(instance) ⇒ nil
Called after a component is saved as. Currently, no dispatch is issued.
-
#onClassificationChanged(model) ⇒ nil
Called after a classification is added to or removed from a definition, or after a classification attribute is written successfully.
Instance Method Details
observer.onTransactionStart(model) ⇒ nil
Called when a ModraUp::Model#start_operation begins.
observer.onTransactionCommit(model) ⇒ nil
Called when ModraUp::Model#commit_operation succeeds.
observer.onTransactionAbort(model) ⇒ nil
Called when ModraUp::Model#abort_operation succeeds.
observer.onTransactionUndo(model) ⇒ nil
Called when an undo transaction succeeds.
observer.onTransactionRedo(model) ⇒ nil
Called when a redo operation is successful.
observer.onActivePathChanged(model) ⇒ nil
Called when entering or exiting an edit path.
observer.onDeleteModel(model) ⇒ nil
Called before the current document is replaced (new/open).
observer.onPlaceComponent(instance) ⇒ nil
Called after ModraUp::Entities#add_instance places an instance.
observer.onPreSaveModel(model) ⇒ nil
Called before saving begins.
observer.onSaveModel(model) ⇒ nil
Called after a successful save.
observer.onPostSaveModel(model) ⇒ nil
Called after the save process completes.
observer.onTransactionEmpty(model) ⇒ nil
Called when a transaction with no changes is submitted. History does not yet distinguish between empty transactions, so no dispatch is currently issued.
observer.onEraseAll(model) ⇒ nil
Called when the model is erased entirely. ModraUp::Drawingelement#erase! / The viewport eraser dispatches this event after clearing the current drawing context.
observer.onExplode(model) ⇒ nil
Called after a group or component instance is exploded. Dispatched after ModraUp::Group#explode / ModraUp::ComponentInstance#explode succeeds.
observer.onPidChanged(model, old_pid, new_pid) ⇒ nil
Called when the persistent_id is rewritten. ModraUp does not alter the issued persistent_id (replicas are assigned new IDs when they are first numbered), so no event is dispatched.
observer.onBeforeComponentSaveAs(instance) ⇒ nil
Called before a component is saved as (for dynamic components, use instance). Currently, there is no right-click Save As path, and no dispatch occurs.
observer.onAfterComponentSaveAs(instance) ⇒ nil
Called after a component is saved as. Currently, no dispatch is issued.
observer.onClassificationChanged(model) ⇒ nil
Called after a classification is added to or removed from a definition, or after a classification attribute is written successfully.