Class: UI::Toolbar
Relationships | |
Super Chains via Extension / Inclusion / Inheritance | |
Instance Chain:
self,
Enumerable
|
|
Inherits: | Object |
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
-
.new(toolbarname) ⇒ UI::Toolbar
constructor
The new method creates a new
Toolbar
object.
Instance Attribute Summary
-
#visible? ⇒ Boolean
readonly
The visible? method is used to find out if a toolbar is currently visible.
Instance Method Summary
-
#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
Constructor Details
.new(toolbarname) ⇒ Toolbar
The new method creates a new Toolbar
object.
Instance Attribute Details
#visible? ⇒ Boolean
(readonly)
The visible? method is used to find out if a toolbar is currently visible.
Instance Method Details
#add_item(command) ⇒ Toolbar
The add_item method is used to add an item to the toolbar.
#add_separator(arg) ⇒ 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.
Valid states are 1 for visible, 0 for hidden, -1 for before never shown.
#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
The #size
method is an alias of #length.