Class: Sketchup::DefinitionsObserver Abstract
- Inherits:
-
Object
- Object
- Sketchup::DefinitionsObserver
- Defined in:
- lib/sketchup-api-stubs/stubs/Sketchup/DefinitionsObserver.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 collection of interest.
This observer interface is implemented to react to events on a definitions collection.
Instance Method Summary collapse
-
#onComponentAdded(definitions, definition) ⇒ nil
The #onComponentAdded method is called whenever a definition is added to the definitions collection.
-
#onComponentPropertiesChanged(definitions, definition) ⇒ nil
The #onComponentPropertiesChanged method is called whenever a definition’s name or description are changed.
-
#onComponentRemoved(definitions, definition) ⇒ nil
The #onComponentAdded method is called whenever a definition is removed from the definitions collection.
-
#onComponentTypeChanged(definitions, definition) ⇒ nil
The #onComponentTypeChanged event is fired when a component is converted to a group or vice versa.
Instance Method Details
#onComponentAdded(definitions, definition) ⇒ nil
The #onComponentAdded method is called whenever a definition is added to the definitions collection.
40 41 |
# File 'lib/sketchup-api-stubs/stubs/Sketchup/DefinitionsObserver.rb', line 40 def onComponentAdded(definitions, definition) end |
#onComponentPropertiesChanged(definitions, definition) ⇒ nil
The #onComponentPropertiesChanged method is called whenever a definition’s name or description are changed.
This does not fire when “Glue To”, “Cuts Opening”, or “Face Camera” settings are changed.
61 62 |
# File 'lib/sketchup-api-stubs/stubs/Sketchup/DefinitionsObserver.rb', line 61 def onComponentPropertiesChanged(definitions, definition) end |
#onComponentRemoved(definitions, definition) ⇒ nil
This methods fires twice for each Component/Group erased.
The #onComponentAdded method is called whenever a definition is removed from the definitions collection.
81 82 |
# File 'lib/sketchup-api-stubs/stubs/Sketchup/DefinitionsObserver.rb', line 81 def onComponentRemoved(definitions, definition) end |
#onComponentTypeChanged(definitions, definition) ⇒ nil
The #onComponentTypeChanged event is fired when a component is converted to a group or vice versa. (In the underlying implementation, Groups are just a special kind of definition that is allowed to only have a single instance.)
101 102 |
# File 'lib/sketchup-api-stubs/stubs/Sketchup/DefinitionsObserver.rb', line 101 def onComponentTypeChanged(definitions, definition) end |