Class: UI::Toolbar
- Inherits:
-
Object
- Object
- UI::Toolbar
- Includes:
- Enumerable
- Defined in:
- lib/sketchup-api-stubs/stubs/UI/Toolbar.rb
Overview
The Toolbar class contains methods to create and manipulate SketchUp toolbars in Ruby. Toolbars are collections of buttons that you can use to activate custom Tools or ruby scripts.
Also see the Command object for details on creating “commands” which can be called from your toolbars.
Class Method Summary collapse
-
.new(toolbarname) ⇒ UI::Toolbar
The new method creates a new Toolbar object.
Instance Method Summary collapse
-
#add_item(command) ⇒ UI::Toolbar
The add_item method is used to add an item to the toolbar.
-
#add_separator(arg) ⇒ UI::Toolbar
The add_separator method is used to add a line separator to the toolbar.
-
#count ⇒ Integer
The #count method is inherited from the
Enumerable
mix-in module. -
#each {|command| ... } ⇒ nil
The #each method is used to iterate through all of the commands attached to a toolbar.
-
#get_last_state ⇒ Boolean
The get_last_state method is used to determine if the toolbar was hidden or visible in the previous session of SketchUp.
-
#hide ⇒ nil
The hide method is used to hide the toolbar on the user interface.
-
#length ⇒ Integer
The #length method returns the number of items in the toolbar.
-
#name ⇒ String
The name method returns the name of the toolbar.
-
#restore ⇒ nil
The restore method is used to reposition the toolbar to its previous location and show if not hidden.
-
#show ⇒ nil
The show method is used to display the toolbar in the user interface.
- #size ⇒ Integer
-
#visible? ⇒ Boolean
The visible? method is used to find out if a toolbar is currently visible.
Class Method Details
.new(toolbarname) ⇒ UI::Toolbar
The new method creates a new Toolbar object.
45 46 |
# File 'lib/sketchup-api-stubs/stubs/UI/Toolbar.rb', line 45 def self.new() end |
Instance Method Details
#add_item(command) ⇒ UI::Toolbar
The add_item method is used to add an item to the toolbar.
62 63 |
# File 'lib/sketchup-api-stubs/stubs/UI/Toolbar.rb', line 62 def add_item(command) end |
#add_separator(arg) ⇒ UI::Toolbar
The add_separator method is used to add a line separator to the toolbar.
73 74 |
# File 'lib/sketchup-api-stubs/stubs/UI/Toolbar.rb', line 73 def add_separator(arg) end |
#count ⇒ Integer
The #count method is inherited from the Enumerable
mix-in module.
84 85 |
# File 'lib/sketchup-api-stubs/stubs/UI/Toolbar.rb', line 84 def count end |
#each {|command| ... } ⇒ nil
The #each method is used to iterate through all of the commands attached to a toolbar.
110 111 |
# File 'lib/sketchup-api-stubs/stubs/UI/Toolbar.rb', line 110 def each end |
#get_last_state ⇒ Boolean
The get_last_state method is used to determine if the toolbar was hidden or visible in the previous session of SketchUp.
Valid states are 1 for visible, 0 for hidden, -1 for before never shown.
124 125 |
# File 'lib/sketchup-api-stubs/stubs/UI/Toolbar.rb', line 124 def get_last_state end |
#hide ⇒ nil
The hide method is used to hide the toolbar on the user interface.
149 150 |
# File 'lib/sketchup-api-stubs/stubs/UI/Toolbar.rb', line 149 def hide end |
#length ⇒ Integer
The #length method returns the number of items in the toolbar.
162 163 |
# File 'lib/sketchup-api-stubs/stubs/UI/Toolbar.rb', line 162 def length end |
#name ⇒ String
The name method returns the name of the toolbar.
180 181 |
# File 'lib/sketchup-api-stubs/stubs/UI/Toolbar.rb', line 180 def name end |
#restore ⇒ nil
The restore method is used to reposition the toolbar to its previous location and show if not hidden.
192 193 |
# File 'lib/sketchup-api-stubs/stubs/UI/Toolbar.rb', line 192 def restore end |
#show ⇒ nil
The show method is used to display the toolbar in the user interface.
214 215 |
# File 'lib/sketchup-api-stubs/stubs/UI/Toolbar.rb', line 214 def show end |
#size ⇒ Integer
227 228 |
# File 'lib/sketchup-api-stubs/stubs/UI/Toolbar.rb', line 227 def size end |
#visible? ⇒ Boolean
The visible? method is used to find out if a toolbar is currently visible.
238 239 |
# File 'lib/sketchup-api-stubs/stubs/UI/Toolbar.rb', line 238 def visible? end |