Class: Sketchup::DefinitionsObserver
- Inherits:
-
Object
- Object
- Sketchup::DefinitionsObserver
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.
↑ #onComponentPropertiesChanged(definitions, definition) ⇒ nil
The #onComponentPropertiesChanged method is called whenever a definition's name or description are changed.
This does not fire when 鈥淕lue To鈥, 鈥淐uts Opening鈥, or 鈥淔ace 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, Groups are just a special kind of definition that is allowed to only have a single instance.)