Class: Sketchup::DefinitionObserver Abstract
- Inherits:
-
EntityObserver
- Object
- EntityObserver
- Sketchup::DefinitionObserver
- Defined in:
- lib/sketchup-api-stubs/stubs/Sketchup/DefinitionObserver.rb
Overview
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.
This observer interface is implemented to react to component definition events.
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.
46 47 |
# File 'lib/sketchup-api-stubs/stubs/Sketchup/DefinitionObserver.rb', line 46 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.
71 72 |
# File 'lib/sketchup-api-stubs/stubs/Sketchup/DefinitionObserver.rb', line 71 def onComponentInstanceRemoved(definition, instance) end |