Class: Layout::Layers
- Inherits:
-
Object
- Object
- Layout::Layers
- Includes:
- Enumerable
Overview
The list of layout layers, with the first one at the top and enumerable.
Instance Method Summary # collapse
-
#length ⇒ Integer
Number of layers.
-
#size ⇒ Integer
Alias for #length.
-
#each ⇒ Layout::Layers
Traverse the layers from top to bottom.
-
#[] ⇒ Layout::Layer, nil
Retrieve a layer by index or name.
-
#index(layer) ⇒ Integer
Layer position, with 0 being at the topmost position.
-
#active ⇒ Layout::Layer
The current layer is default, which is named "Default Layer".
-
#active= ⇒ Layout::Layer
Set the current layer.
-
#add(name = nil, shared = false) ⇒ Layout::Layer
Create a new layer at the top, and undo it in one step.
-
#remove(layer, delete_entities = false) ⇒ Layout::Layers
Remove layers and their objects in one undo step. The default layer cannot be deleted.
-
#reorder(layer, index) ⇒ Layout::Layers
Move the layer to a new position, with one-step undo.
Instance Method Details
layers.length ⇒ Integer
Number of layers.
layers.size ⇒ Integer
Alias for #length.
layers.each { |layer| ... } ⇒ Layout::Layers
Traverse the layers from top to bottom.
layers[index] ⇒ Layout::Layerlayers[name] ⇒ Layout::Layer, nil
Retrieve a layer by index or name.
layers.index(layer) ⇒ Integer
Layer position, with 0 being at the topmost position.
layers.active ⇒ Layout::Layer
The current layer is default, which is named "Default Layer".
layers.active = layer
Set the current layer.
layers.add(name = nil, shared = false) ⇒ Layout::Layer
Create a new layer at the top, and undo it in one step.
layers.remove(layer, delete_entities = false) ⇒ Layout::Layers
Remove layers and their objects in one undo step. The default layer cannot be deleted.
layers.reorder(layer, index) ⇒ Layout::Layers
Move the layer to a new position, with one-step undo.