Class: Sketchup::EntitiesObserver Abstract
- Inherits:
-
Object
- Object
- Sketchup::EntitiesObserver
- Defined in:
- lib/sketchup-api-stubs/stubs/Sketchup/EntitiesObserver.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 objects of interests.
The methods of this observer fire in such a way that making changes to the model while inside of them is dangerous. If you experience sudden crashes, it could be because of this observer. A potential workaround is to use a ToolsObserver to watch what the user is doing instead.
This observer interface is implemented to react to Entities collection events.
Direct Known Subclasses
Instance Method Summary collapse
-
#onActiveSectionPlaneChanged(entities) ⇒ nil
The #onActiveSectionPlaneChanged method is invoked when a section plane within this entities is activated or the active one is deactivated.
-
#onElementAdded(entities, entity) ⇒ nil
The onElementAdded method is invoked when a single element is added to the Entities collection.
-
#onElementModified(entities, entity) ⇒ nil
The #onElementModified method is invoked whenever one or more elements in the collection are modified.
-
#onElementRemoved(entities, entity_id) ⇒ nil
The #onElementRemoved method is invoked when a single element is removed from the Entities collection.
-
#onEraseEntities(entities) ⇒ nil
The #onEraseEntities method is invoked when one or more entities are erased.
Instance Method Details
#onActiveSectionPlaneChanged(entities) ⇒ nil
The #onActiveSectionPlaneChanged method is invoked when a section plane within this entities is activated or the active one is deactivated.
51 52 |
# File 'lib/sketchup-api-stubs/stubs/Sketchup/EntitiesObserver.rb', line 51 def onActiveSectionPlaneChanged(entities) end |
#onElementAdded(entities, entity) ⇒ nil
The onElementAdded method is invoked when a single element is added to the Sketchup::Entities collection.
69 70 |
# File 'lib/sketchup-api-stubs/stubs/Sketchup/EntitiesObserver.rb', line 69 def onElementAdded(entities, entity) end |
#onElementModified(entities, entity) ⇒ nil
The #onElementModified method is invoked whenever one or more elements in the collection are modified.
87 88 |
# File 'lib/sketchup-api-stubs/stubs/Sketchup/EntitiesObserver.rb', line 87 def onElementModified(entities, entity) end |
#onElementRemoved(entities, entity_id) ⇒ nil
The #onElementRemoved method is invoked when a single element is removed from the Sketchup::Entities collection. Note that the entity has been deleted and should not be used in anyway except to know that the entity has been deleted.
109 110 |
# File 'lib/sketchup-api-stubs/stubs/Sketchup/EntitiesObserver.rb', line 109 def onElementRemoved(entities, entity_id) end |
#onEraseEntities(entities) ⇒ nil
The #onEraseEntities method is invoked when one or more entities are erased.
124 125 |
# File 'lib/sketchup-api-stubs/stubs/Sketchup/EntitiesObserver.rb', line 124 def onEraseEntities(entities) end |