Class: Sketchup::DefinitionsObserver
- Inherits:
-
Object
- Object
- Sketchup::DefinitionsObserver
- Defined in:
- lib/sketchup-api-stubs/stubs/Sketchup/DefinitionsObserver.rb
Overview
This observer interface is implemented to react to events on a definitions collection. 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.
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.
38 39 |
# File 'lib/sketchup-api-stubs/stubs/Sketchup/DefinitionsObserver.rb', line 38 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.
59 60 |
# File 'lib/sketchup-api-stubs/stubs/Sketchup/DefinitionsObserver.rb', line 59 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.
79 80 |
# File 'lib/sketchup-api-stubs/stubs/Sketchup/DefinitionsObserver.rb', line 79 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.)
99 100 |
# File 'lib/sketchup-api-stubs/stubs/Sketchup/DefinitionsObserver.rb', line 99 def onComponentTypeChanged(definitions, definition) end |