Class: Sketchup::DefinitionsObserver Abstract
Relationships | |
Inherits: | Object |
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
-
#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.
#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.
#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.
#onComponentTypeChanged(definitions, definition) ⇒ nil
The #onComponentTypeChanged
event is fired when a component is converted to a group or vice versa. (In the underlying implementation, Group
s are just a special kind of definition that is allowed to only have a single instance.)