Class: Sketchup::SelectionObserver Abstract
- Inherits:
-
Object
- Object
- Sketchup::SelectionObserver
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.
This observer interface is implemented to react to selection events.
Instance Method Summary # collapse
- #onSelectionAdded(selection, entity) ⇒ nil
-
#onSelectionBulkChange(selection) ⇒ nil
The #onSelectionBulkChange method is called whenever items are added or removed from the selection set.
-
#onSelectionCleared(selection) ⇒ nil
The #onSelectionCleared method is called when the selection is completely emptied.
- #onSelectionRemoved(selection, entity) ⇒ nil
Instance Method Details
↑ #onSelectionAdded(selection, entity) ⇒ nil
This event might not trigger even if a single element is selected. For instance the Selection tool will trigger #onSelectionBulkChange regardless.
↑ #onSelectionBulkChange(selection) ⇒ nil
The #onSelectionBulkChange method is called whenever items are added or removed from the selection set.
The #onSelectionBulkChange callback will not trigger if the selection is cleared by clicking on empty model space. Use the #onSelectionCleared method to catch this case.
↑ #onSelectionCleared(selection) ⇒ nil
The #onSelectionCleared method is called when the selection is completely emptied.
↑ #onSelectionRemoved(selection, entity) ⇒ nil
This event might not trigger even if a single element is deselected. For instance the Selection tool will trigger #onSelectionBulkChange regardless.