Class: Sketchup::SelectionObserver Abstract
- Inherits:
-
Object
- Object
- Sketchup::SelectionObserver
- Defined in:
- lib/sketchup-api-stubs/stubs/Sketchup/SelectionObserver.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 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.
45 46 |
# File 'lib/sketchup-api-stubs/stubs/Sketchup/SelectionObserver.rb', line 45 def onSelectionAdded(selection, entity) end |
#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.
65 66 |
# File 'lib/sketchup-api-stubs/stubs/Sketchup/SelectionObserver.rb', line 65 def onSelectionBulkChange(selection) end |
#onSelectionCleared(selection) ⇒ nil
The #onSelectionCleared method is called when the selection is completely emptied.
81 82 |
# File 'lib/sketchup-api-stubs/stubs/Sketchup/SelectionObserver.rb', line 81 def onSelectionCleared(selection) end |
#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.
112 113 |
# File 'lib/sketchup-api-stubs/stubs/Sketchup/SelectionObserver.rb', line 112 def onSelectionRemoved(selection, entity) end |