Class: Sketchup::Styles
- Includes:
- Enumerable
- Defined in:
- SketchUp/Sketchup/Styles.rb
Overview
The Styles class contains methods for manipulating a collection of styles in a model. Typically, you will access this via the active_model:
Instance Method Summary collapse
-
#[](arg) ⇒ Object
The #[] method is used to retrieves a style by either name or index.
-
#active_style ⇒ Sketchup::Style
The ##active_style method is used to retrieve the active style.
-
#active_style_changed ⇒ Boolean
The #active_style_changed method tells you if the active style has been edited by the user since it was last saved.
-
#add_style(filename, select) ⇒ Boolean
The #add_style method is used to create and load a style from the given file.
- #count ⇒ Integer
-
#each {|style| ... } ⇒ nil
The #each method is used to iterate through styles.
- #length ⇒ Integer
-
#parent ⇒ Sketchup::Model
The #parent method is used to return the model for the styles.
-
#purge_unused ⇒ true
The #purge_unused method is used to remove unused styles from the model.
-
#selected_style ⇒ Sketchup::Style
The #selected_style method is used to retrieve the currently selected style.
-
#selected_style=(style) ⇒ false
The #selected_style= method is used to set the currently selected style.
-
#size ⇒ Integer
The #size method is used to retrieve the number of styles in the collection.
-
#update_selected_style ⇒ true
The #update_selected_style method commits the current style settings to the style selected in the Style Browser.
Methods inherited from Entity
#add_observer, #attribute_dictionaries, #attribute_dictionary, #delete_attribute, #deleted?, #entityID, #get_attribute, #inspect, #model, #persistent_id, #remove_observer, #set_attribute, #to_s, #typename, #valid?
Instance Method Details
#[](name) ⇒ Sketchup::Style? #[](index) ⇒ Sketchup::Style?
The #[] method is used to retrieves a style by either name or index.
38 39 |
# File 'SketchUp/Sketchup/Styles.rb', line 38 def [](arg) end |
#active_style ⇒ Sketchup::Style
The ##active_style method is used to retrieve the active style.
50 51 |
# File 'SketchUp/Sketchup/Styles.rb', line 50 def active_style end |
#active_style_changed ⇒ Boolean
The #active_style_changed method tells you if the active style has been edited by the user since it was last saved.
63 64 |
# File 'SketchUp/Sketchup/Styles.rb', line 63 def active_style_changed end |
#add_style(filename, select) ⇒ Boolean
The #add_style method is used to create and load a style from the given file.
83 84 |
# File 'SketchUp/Sketchup/Styles.rb', line 83 def add_style(filename, select) end |
#count ⇒ Integer
98 99 |
# File 'SketchUp/Sketchup/Styles.rb', line 98 def count end |
#each {|style| ... } ⇒ nil
The #each method is used to iterate through styles.
114 115 |
# File 'SketchUp/Sketchup/Styles.rb', line 114 def each end |
#length ⇒ Integer
128 129 |
# File 'SketchUp/Sketchup/Styles.rb', line 128 def length end |
#parent ⇒ Sketchup::Model
The #parent method is used to return the model for the styles.
140 141 |
# File 'SketchUp/Sketchup/Styles.rb', line 140 def parent end |
#purge_unused ⇒ true
The #purge_unused method is used to remove unused styles from the model.
152 153 |
# File 'SketchUp/Sketchup/Styles.rb', line 152 def purge_unused end |
#selected_style ⇒ Sketchup::Style
The #selected_style method is used to retrieve the currently selected style.
164 165 |
# File 'SketchUp/Sketchup/Styles.rb', line 164 def selected_style end |
#selected_style=(style) ⇒ false
The #selected_style= method is used to set the currently selected style.
178 179 |
# File 'SketchUp/Sketchup/Styles.rb', line 178 def selected_style=(style) end |
#size ⇒ Integer
The #size method is used to retrieve the number of styles in the collection.
193 194 |
# File 'SketchUp/Sketchup/Styles.rb', line 193 def size end |
#update_selected_style ⇒ true
The #update_selected_style method commits the current style settings to the style selected in the Style Browser.
208 209 |
# File 'SketchUp/Sketchup/Styles.rb', line 208 def update_selected_style end |