Class: Sketchup::DefinitionObserver
- Inherits:
-
EntityObserver
- Object
- EntityObserver
- Sketchup::DefinitionObserver
- Defined in:
- lib/sketchup-api-stubs/stubs/Sketchup/DefinitionObserver.rb
Overview
This observer interface is implemented to react to component definition events. To implement this observer, create a Ruby class of this type, override the desired methods, and add an instance of the observer to the definitions of interests.
Instance Method Summary collapse
-
#onComponentInstanceAdded(definition, instance) ⇒ nil
The #onComponentInstanceAdded method is called when a new component instance is added to a model.
-
#onComponentInstanceRemoved(definition, instance) ⇒ nil
The #onComponentInstanceRemoved method is called when a component instance is removed from a model.
Methods inherited from EntityObserver
#onChangeEntity, #onEraseEntity
Instance Method Details
#onComponentInstanceAdded(definition, instance) ⇒ nil
The #onComponentInstanceAdded method is called when a new component instance is added to a model.
44 45 |
# File 'lib/sketchup-api-stubs/stubs/Sketchup/DefinitionObserver.rb', line 44 def onComponentInstanceAdded(definition, instance) end |
#onComponentInstanceRemoved(definition, instance) ⇒ nil
Due to the underlying way that the SketchUp Move Tool is implemented, this method is fired on a Move + Copy operation even though no ComponentInstance is apparently removed.
The #onComponentInstanceRemoved method is called when a component instance is removed from a model.
69 70 |
# File 'lib/sketchup-api-stubs/stubs/Sketchup/DefinitionObserver.rb', line 69 def onComponentInstanceRemoved(definition, instance) end |