Class: Sketchup::LayerFolder
- Includes:
- Comparable
- Defined in:
- lib/sketchup-api-stubs/stubs/Sketchup/LayerFolder.rb
Overview
As of SketchUp 2020 “Layers” were renamed to “Tags” in the UI. The API retains the use of “Layer” for compatibility and is synonymous with “Tag”.
Allows layers to be organized in folders. Folders may have duplicate names.
Instance Method Summary collapse
-
#<=>(other) ⇒ Integer?
The #<=> method is used to compare two layer folders based on their names.
-
#==(other) ⇒ Boolean
The #== method is used to determine if two layer folders are the same.
-
#add_folder(arg) ⇒ Sketchup::LayerFolder
The #add_folder method adds or moves a layer folder.
-
#add_layer(layer) ⇒ nil
The #add_layer method adds a layer to a folder.
-
#count_folders ⇒ Integer
The #count_folders method retrieves the number of child folders in the folder.
-
#count_layers ⇒ Integer
(also: #length, #size)
The #count_layers method retrieves the number of layers in the folder.
-
#each_folder {|folder| ... } ⇒ Object
The #each_folder method is used to iterate through the folders that are direct children to the folder.
-
#each_layer {|layer| ... } ⇒ Object
(also: #each)
The #each_layer method is used to iterate through the layers that are direct children to the folder.
-
#folder ⇒ Sketchup::LayerFolder?
The #folder method is used to return the parent layer folder of a layer folder.
-
#folder=(parent) ⇒ Object
The #folder= method is used to set the parent layer folder of a layer folder.
-
#folders ⇒ Array<Sketchup::LayerFolder>
The #folders returns the direct child-folders of the folder.
-
#layers ⇒ Array<Sketchup::Layer>
The #layers method retrieves the child layers of a folder.
-
#name ⇒ String
(also: #display_name)
The #name method gets the name of the folder.
-
#name=(name) ⇒ Object
The #name= method sets the name of the folder.
-
#remove_folder(folder) ⇒ nil
The #remove_folder method removes the folder from the model.
-
#remove_layer(layer) ⇒ nil
The #remove_layer method removes a layer from a folder.
-
#visible=(visible) ⇒ Object
The #visible= method is used to set if the layer folder is visible.
-
#visible? ⇒ Boolean
The #visible? method is used to determine if the layer folder is visible.
-
#visible_on_new_pages=(visible) ⇒ Object
The #visible_on_new_pages= method is used to set if the layer folder is by default visible on new pages.
-
#visible_on_new_pages? ⇒ Boolean
The #visible_on_new_pages? method is used to determine if the layer folder is by default visible on new pages.
Methods inherited from Entity
#add_observer, #attribute_dictionaries, #attribute_dictionary, #delete_attribute, #deleted?, #entityID, #get_attribute, #inspect, #model, #parent, #persistent_id, #remove_observer, #set_attribute, #to_s, #typename, #valid?
Instance Method Details
#<=>(other) ⇒ Integer?
The #<=> method is used to compare two layer folders based on their names. You could use this for sorting if you’re building a list of folder names.
43 44 |
# File 'lib/sketchup-api-stubs/stubs/Sketchup/LayerFolder.rb', line 43 def <=>(other) end |
#==(other) ⇒ Boolean
The #== method is used to determine if two layer folders are the same.
62 63 |
# File 'lib/sketchup-api-stubs/stubs/Sketchup/LayerFolder.rb', line 62 def ==(other) end |
#add_folder(name) ⇒ Sketchup::LayerFolder #add_folder(folder) ⇒ Sketchup::LayerFolder
The #add_folder method adds or moves a layer folder.
93 94 |
# File 'lib/sketchup-api-stubs/stubs/Sketchup/LayerFolder.rb', line 93 def add_folder(arg) end |
#add_layer(layer) ⇒ nil
The #add_layer method adds a layer to a folder.
116 117 |
# File 'lib/sketchup-api-stubs/stubs/Sketchup/LayerFolder.rb', line 116 def add_layer(layer) end |
#count_folders ⇒ Integer
The #count_folders method retrieves the number of child folders in the folder.
133 134 |
# File 'lib/sketchup-api-stubs/stubs/Sketchup/LayerFolder.rb', line 133 def count_folders end |
#count_layers ⇒ Integer Also known as: length, size
The #count_layers method retrieves the number of layers in the folder.
154 155 |
# File 'lib/sketchup-api-stubs/stubs/Sketchup/LayerFolder.rb', line 154 def count_layers end |
#each_folder {|folder| ... } ⇒ Object
The #each_folder method is used to iterate through the folders that are direct children to the folder.
176 177 |
# File 'lib/sketchup-api-stubs/stubs/Sketchup/LayerFolder.rb', line 176 def each_folder end |
#each_layer {|layer| ... } ⇒ Object Also known as: each
The #each_layer method is used to iterate through the layers that are direct children to the folder.
197 198 |
# File 'lib/sketchup-api-stubs/stubs/Sketchup/LayerFolder.rb', line 197 def each_layer end |
#folder ⇒ Sketchup::LayerFolder?
The #folder method is used to return the parent layer folder of a layer folder.
219 220 |
# File 'lib/sketchup-api-stubs/stubs/Sketchup/LayerFolder.rb', line 219 def folder end |
#folder=(parent) ⇒ Object
The #folder= method is used to set the parent layer folder of a layer folder.
This will trigger onLayerFolderRemoved
followed by onLayerFolderAdded
.
242 243 |
# File 'lib/sketchup-api-stubs/stubs/Sketchup/LayerFolder.rb', line 242 def folder=(parent) end |
#folders ⇒ Array<Sketchup::LayerFolder>
The #folders returns the direct child-folders of the folder.
258 259 |
# File 'lib/sketchup-api-stubs/stubs/Sketchup/LayerFolder.rb', line 258 def folders end |
#layers ⇒ Array<Sketchup::Layer>
The #layers method retrieves the child layers of a folder.
276 277 |
# File 'lib/sketchup-api-stubs/stubs/Sketchup/LayerFolder.rb', line 276 def layers end |
#name ⇒ String Also known as: display_name
The #name method gets the name of the folder.
291 292 |
# File 'lib/sketchup-api-stubs/stubs/Sketchup/LayerFolder.rb', line 291 def name end |
#name=(name) ⇒ Object
The #name= method sets the name of the folder.
309 310 |
# File 'lib/sketchup-api-stubs/stubs/Sketchup/LayerFolder.rb', line 309 def name=(name) end |
#remove_folder(folder) ⇒ nil
The #remove_folder method removes the folder from the model. All children are preserved, but move up one level.
330 331 |
# File 'lib/sketchup-api-stubs/stubs/Sketchup/LayerFolder.rb', line 330 def remove_folder(folder) end |
#remove_layer(layer) ⇒ nil
The #remove_layer method removes a layer from a folder. The layer will be parent to the layer manager.
351 352 |
# File 'lib/sketchup-api-stubs/stubs/Sketchup/LayerFolder.rb', line 351 def remove_layer(layer) end |
#visible=(visible) ⇒ Object
The #visible= method is used to set if the layer folder is visible.
367 368 |
# File 'lib/sketchup-api-stubs/stubs/Sketchup/LayerFolder.rb', line 367 def visible=(visible) end |
#visible? ⇒ Boolean
The #visible? method is used to determine if the layer folder is visible.
383 384 |
# File 'lib/sketchup-api-stubs/stubs/Sketchup/LayerFolder.rb', line 383 def visible? end |
#visible_on_new_pages=(visible) ⇒ Object
The #visible_on_new_pages= method is used to set if the layer folder is by default visible on new pages.
402 403 |
# File 'lib/sketchup-api-stubs/stubs/Sketchup/LayerFolder.rb', line 402 def visible_on_new_pages=(visible) end |
#visible_on_new_pages? ⇒ Boolean
The #visible_on_new_pages? method is used to determine if the layer folder is by default visible on new pages.
419 420 |
# File 'lib/sketchup-api-stubs/stubs/Sketchup/LayerFolder.rb', line 419 def visible_on_new_pages? end |