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 {|key, value| ... } ⇒ 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 {|key, value| ... } ⇒ nil
The each method is used to iterate through all of the commands attached to a toolbar.
109 110 |
# File 'lib/sketchup-api-stubs/stubs/UI/Toolbar.rb', line 109 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.
123 124 |
# File 'lib/sketchup-api-stubs/stubs/UI/Toolbar.rb', line 123 def get_last_state end |
#hide ⇒ nil
The hide method is used to hide the toolbar on the user interface.
148 149 |
# File 'lib/sketchup-api-stubs/stubs/UI/Toolbar.rb', line 148 def hide end |
#length ⇒ Integer
The #length method returns the number of items in the toolbar.
161 162 |
# File 'lib/sketchup-api-stubs/stubs/UI/Toolbar.rb', line 161 def length end |
#name ⇒ String
The name method returns the name of the toolbar.
179 180 |
# File 'lib/sketchup-api-stubs/stubs/UI/Toolbar.rb', line 179 def name end |
#restore ⇒ nil
The restore method is used to reposition the toolbar to its previous location and show if not hidden.
191 192 |
# File 'lib/sketchup-api-stubs/stubs/UI/Toolbar.rb', line 191 def restore end |
#show ⇒ nil
The show method is used to display the toolbar in the user interface.
213 214 |
# File 'lib/sketchup-api-stubs/stubs/UI/Toolbar.rb', line 213 def show end |
#size ⇒ Integer
226 227 |
# File 'lib/sketchup-api-stubs/stubs/UI/Toolbar.rb', line 226 def size end |
#visible? ⇒ Boolean
The visible? method is used to find out if a toolbar is currently visible.
237 238 |
# File 'lib/sketchup-api-stubs/stubs/UI/Toolbar.rb', line 237 def visible? end |