Class: ModraUp::OverlaysManager
- Inherits:
-
Object
- Object
- ModraUp::OverlaysManager
Overview
A list of ModraUp::Overlay for a model, ordered as they appear in the tray and the drawing order. The same overlay_id cannot be added twice. After the user rearranges the overlays in the tray, remember the order by id. On subsequent additions, insert them at the remembered position.
Instance Method Summary # collapse
-
#add(overlay) ⇒ Boolean
Register the overlay layer, which will immediately appear in the "Overlays" tray (it will not open by default). Returns false if the ID conflicts.
-
#remove(overlay) ⇒ Boolean
Remove the overlay layer and set its ModraUp::Overlay#valid? to false. The overlay will first receive a ModraUp::Overlay#stop event if it is open.
- #each ⇒ nil
- #size ⇒ Integer
-
#length ⇒ Integer
Same as #size.
- #[] ⇒ ModraUp::Overlay, nil
-
#at(index) ⇒ ModraUp::Overlay, nil
Equivalent to #[].
-
#inspect ⇒ String
Returns a string of the form #<Sketchup::OverlaysManager:0x...>, omitting instance variables.
Instance Method Details
overlays.add(overlay) ⇒ Boolean
Register the overlay layer, which will immediately appear in the "Overlays" tray (it will not open by default). Returns false if the ID conflicts.
overlays.remove(overlay) ⇒ Boolean
Remove the overlay layer and set its ModraUp::Overlay#valid? to false. The overlay will first receive a ModraUp::Overlay#stop event if it is open.
overlays.each {|overlay| ... } ⇒ nil
overlays.size ⇒ Integer
overlays.length ⇒ Integer
Same as #size.
overlays[index] ⇒ ModraUp::Overlay, nil
overlays.at(index) ⇒ ModraUp::Overlay, nil
Equivalent to #[].
overlays.inspect ⇒ String
Returns a string of the form #<Sketchup::OverlaysManager:0x...>, omitting instance variables.