sketchup-api-stubs 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/SketchUp/Geom/BoundingBox.rb +335 -0
- data/SketchUp/Geom/LatLong.rb +123 -0
- data/SketchUp/Geom/Point3d.rb +643 -0
- data/SketchUp/Geom/PolygonMesh.rb +478 -0
- data/SketchUp/Geom/Transformation.rb +476 -0
- data/SketchUp/Geom/UTM.rb +135 -0
- data/SketchUp/Geom/Vector3d.rb +684 -0
- data/SketchUp/Sketchup/Animation.rb +137 -0
- data/SketchUp/Sketchup/AppObserver.rb +157 -0
- data/SketchUp/Sketchup/ArcCurve.rb +209 -0
- data/SketchUp/Sketchup/AttributeDictionaries.rb +146 -0
- data/SketchUp/Sketchup/AttributeDictionary.rb +280 -0
- data/SketchUp/Sketchup/Axes.rb +149 -0
- data/SketchUp/Sketchup/Behavior.rb +338 -0
- data/SketchUp/Sketchup/Camera.rb +594 -0
- data/SketchUp/Sketchup/ClassificationSchema.rb +63 -0
- data/SketchUp/Sketchup/Classifications.rb +118 -0
- data/SketchUp/Sketchup/Color.rb +291 -0
- data/SketchUp/Sketchup/ComponentDefinition.rb +562 -0
- data/SketchUp/Sketchup/ComponentInstance.rb +597 -0
- data/SketchUp/Sketchup/Console.rb +78 -0
- data/SketchUp/Sketchup/ConstructionLine.rb +257 -0
- data/SketchUp/Sketchup/ConstructionPoint.rb +32 -0
- data/SketchUp/Sketchup/Curve.rb +196 -0
- data/SketchUp/Sketchup/DefinitionList.rb +312 -0
- data/SketchUp/Sketchup/DefinitionObserver.rb +73 -0
- data/SketchUp/Sketchup/DefinitionsObserver.rb +102 -0
- data/SketchUp/Sketchup/Dimension.rb +167 -0
- data/SketchUp/Sketchup/DimensionLinear.rb +232 -0
- data/SketchUp/Sketchup/DimensionObserver.rb +38 -0
- data/SketchUp/Sketchup/DimensionRadial.rb +87 -0
- data/SketchUp/Sketchup/Drawingelement.rb +400 -0
- data/SketchUp/Sketchup/Edge.rb +517 -0
- data/SketchUp/Sketchup/EdgeUse.rb +213 -0
- data/SketchUp/Sketchup/Entities.rb +1011 -0
- data/SketchUp/Sketchup/EntitiesObserver.rb +125 -0
- data/SketchUp/Sketchup/Entity.rb +522 -0
- data/SketchUp/Sketchup/EntityObserver.rb +59 -0
- data/SketchUp/Sketchup/ExtensionsManager.rb +129 -0
- data/SketchUp/Sketchup/Face.rb +737 -0
- data/SketchUp/Sketchup/FrameChangeObserver.rb +104 -0
- data/SketchUp/Sketchup/Group.rb +705 -0
- data/SketchUp/Sketchup/Http.rb +27 -0
- data/SketchUp/Sketchup/Http/Request.rb +285 -0
- data/SketchUp/Sketchup/Http/Response.rb +62 -0
- data/SketchUp/Sketchup/Image.rb +393 -0
- data/SketchUp/Sketchup/Importer.rb +192 -0
- data/SketchUp/Sketchup/InputPoint.rb +393 -0
- data/SketchUp/Sketchup/InstanceObserver.rb +82 -0
- data/SketchUp/Sketchup/InstancePath.rb +297 -0
- data/SketchUp/Sketchup/Layer.rb +240 -0
- data/SketchUp/Sketchup/Layers.rb +235 -0
- data/SketchUp/Sketchup/LayersObserver.rb +136 -0
- data/SketchUp/Sketchup/Licensing.rb +47 -0
- data/SketchUp/Sketchup/Licensing/ExtensionLicense.rb +88 -0
- data/SketchUp/Sketchup/Loop.rb +141 -0
- data/SketchUp/Sketchup/Material.rb +384 -0
- data/SketchUp/Sketchup/Materials.rb +283 -0
- data/SketchUp/Sketchup/MaterialsObserver.rb +141 -0
- data/SketchUp/Sketchup/Menu.rb +97 -0
- data/SketchUp/Sketchup/Model.rb +1459 -0
- data/SketchUp/Sketchup/ModelObserver.rb +356 -0
- data/SketchUp/Sketchup/OptionsManager.rb +135 -0
- data/SketchUp/Sketchup/OptionsProvider.rb +277 -0
- data/SketchUp/Sketchup/OptionsProviderObserver.rb +58 -0
- data/SketchUp/Sketchup/Page.rb +636 -0
- data/SketchUp/Sketchup/Pages.rb +349 -0
- data/SketchUp/Sketchup/PagesObserver.rb +76 -0
- data/SketchUp/Sketchup/PickHelper.rb +457 -0
- data/SketchUp/Sketchup/RegionalSettings.rb +43 -0
- data/SketchUp/Sketchup/RenderingOptions.rb +337 -0
- data/SketchUp/Sketchup/RenderingOptionsObserver.rb +44 -0
- data/SketchUp/Sketchup/SectionPlane.rb +88 -0
- data/SketchUp/Sketchup/Selection.rb +470 -0
- data/SketchUp/Sketchup/SelectionObserver.rb +115 -0
- data/SketchUp/Sketchup/Set.rb +253 -0
- data/SketchUp/Sketchup/ShadowInfo.rb +257 -0
- data/SketchUp/Sketchup/ShadowInfoObserver.rb +57 -0
- data/SketchUp/Sketchup/Style.rb +77 -0
- data/SketchUp/Sketchup/Styles.rb +204 -0
- data/SketchUp/Sketchup/Text.rb +241 -0
- data/SketchUp/Sketchup/Texture.rb +211 -0
- data/SketchUp/Sketchup/TextureWriter.rb +237 -0
- data/SketchUp/Sketchup/Tool.rb +808 -0
- data/SketchUp/Sketchup/Tools.rb +120 -0
- data/SketchUp/Sketchup/ToolsObserver.rb +154 -0
- data/SketchUp/Sketchup/UVHelper.rb +61 -0
- data/SketchUp/Sketchup/Vertex.rb +143 -0
- data/SketchUp/Sketchup/View.rb +965 -0
- data/SketchUp/Sketchup/ViewObserver.rb +40 -0
- data/SketchUp/UI/Command.rb +307 -0
- data/SketchUp/UI/HtmlDialog.rb +346 -0
- data/SketchUp/UI/Notification.rb +229 -0
- data/SketchUp/UI/Toolbar.rb +243 -0
- data/SketchUp/UI/WebDialog.rb +623 -0
- data/SketchUp/_top_level.rb +193 -0
- data/SketchUp/array.rb +593 -0
- data/SketchUp/geom.rb +231 -0
- data/SketchUp/languagehandler.rb +92 -0
- data/SketchUp/length.rb +210 -0
- data/SketchUp/numeric.rb +249 -0
- data/SketchUp/sketchup.rb +1290 -0
- data/SketchUp/sketchupextension.rb +355 -0
- data/SketchUp/string.rb +24 -0
- data/SketchUp/ui.rb +637 -0
- metadata +176 -0
@@ -0,0 +1,229 @@
|
|
1
|
+
# Copyright:: Copyright 2017 Trimble Inc.
|
2
|
+
# License:: The MIT License (MIT)
|
3
|
+
|
4
|
+
# UI::Notification objects allows you to show native notifications in the
|
5
|
+
# desktop, they are positioned in the top right of your screen, they can be
|
6
|
+
# customized to have a message, icon and accept and/or dismiss buttons with
|
7
|
+
# callback blocks.
|
8
|
+
#
|
9
|
+
# @version SketchUp 2017
|
10
|
+
class UI::Notification
|
11
|
+
|
12
|
+
# Instance Methods
|
13
|
+
|
14
|
+
# Gets the icon name, this is the path that will be used to get the icon from
|
15
|
+
# the file system path.
|
16
|
+
#
|
17
|
+
# @example
|
18
|
+
# notification = UI::Notification.new(sketchup_extension, "Hello world", "/path/to/icon", "icon Tooltip")
|
19
|
+
# puts "Icon Name: #{notification.icon_name}"
|
20
|
+
# notification.show
|
21
|
+
#
|
22
|
+
# @return [String]
|
23
|
+
#
|
24
|
+
# @version SketchUp 2017
|
25
|
+
def icon_name
|
26
|
+
end
|
27
|
+
|
28
|
+
# Sets the icon path, this icon will be loaded from the path give, the path
|
29
|
+
# has to be a local filesystem path.
|
30
|
+
#
|
31
|
+
# @example
|
32
|
+
# notification = UI::Notification.new(sketchup_extension, "Hello world")
|
33
|
+
# notification.icon_name = "/path/to/icon"
|
34
|
+
# notification.show
|
35
|
+
#
|
36
|
+
# @param [String] icon_name
|
37
|
+
# String providing the icon filesystem path.
|
38
|
+
#
|
39
|
+
# @return [Boolean]
|
40
|
+
#
|
41
|
+
# @version SketchUp 2017
|
42
|
+
def icon_name=(icon_name)
|
43
|
+
end
|
44
|
+
|
45
|
+
# Gets the icon Tooltip, this is the string that appear when the mouse is over
|
46
|
+
# the icon.
|
47
|
+
#
|
48
|
+
# @example
|
49
|
+
# notification = UI::Notification.new(sketchup_extension, "Hello world", "/path/to/icon", "icon Tooltip")
|
50
|
+
# puts "Tooltip: " notification.icon_tooltip
|
51
|
+
# notification.show
|
52
|
+
#
|
53
|
+
# @return [String]
|
54
|
+
#
|
55
|
+
# @version SketchUp 2017
|
56
|
+
def icon_tooltip
|
57
|
+
end
|
58
|
+
|
59
|
+
# Sets the icon Tooltip, this string will appear when the mouse is over the
|
60
|
+
# icon.
|
61
|
+
#
|
62
|
+
# @example
|
63
|
+
# notification = UI::Notification.new(sketchup_extension, "Hello world")
|
64
|
+
# notification.icon_tooltip = "icon Tooltip"
|
65
|
+
# notification.show
|
66
|
+
#
|
67
|
+
# @param [String] icon_tooltip
|
68
|
+
# String providing the new icon Tooltip.
|
69
|
+
#
|
70
|
+
# @return [Boolean]
|
71
|
+
#
|
72
|
+
# @version SketchUp 2017
|
73
|
+
def icon_tooltip=(icon_tooltip)
|
74
|
+
end
|
75
|
+
|
76
|
+
# The new method is used to create a new {UI::Notification}.
|
77
|
+
#
|
78
|
+
# In order to insert line breaks into the message you need to use +\\r\\n+.
|
79
|
+
#
|
80
|
+
# @example
|
81
|
+
# notification = UI::Notification.new(sketchup_extension, "Hello world", "/path/to/icon", "icon Tooltip")
|
82
|
+
# notification.show
|
83
|
+
#
|
84
|
+
# @param [String] icon_tooltip
|
85
|
+
# Optionally set an image tooltip.
|
86
|
+
#
|
87
|
+
# @param [String] icon_name
|
88
|
+
# Optionally set a path to an image.
|
89
|
+
#
|
90
|
+
# @param [String] message
|
91
|
+
# Optionally assign the message.
|
92
|
+
#
|
93
|
+
# @param [SketchupExtension] sketchup_extension
|
94
|
+
# Required sketchup_extension
|
95
|
+
# to identify the sender.
|
96
|
+
#
|
97
|
+
# @return [UI::Notification]
|
98
|
+
#
|
99
|
+
# @version SketchUp 2017
|
100
|
+
def initialize(sketchup_extension, message, icon_name, icon_tooltip)
|
101
|
+
end
|
102
|
+
|
103
|
+
# Gets the message as string.
|
104
|
+
#
|
105
|
+
# @example
|
106
|
+
# notification = UI::Notification.new(sketchup_extension)
|
107
|
+
# puts "This is the current message: ${notification.message}"
|
108
|
+
# notification.show
|
109
|
+
#
|
110
|
+
# @return [String]
|
111
|
+
#
|
112
|
+
# @version SketchUp 2017
|
113
|
+
def message
|
114
|
+
end
|
115
|
+
|
116
|
+
# Sets a new message, notifications are meant for quick & brief messages,
|
117
|
+
# remember that they are dismissed automatically.
|
118
|
+
#
|
119
|
+
# @example
|
120
|
+
# notification = UI::Notification.new(sketchup_extension)
|
121
|
+
# notification.message = "Hello world"
|
122
|
+
# notification.show
|
123
|
+
#
|
124
|
+
# @param [String] message
|
125
|
+
# String providing the new message.
|
126
|
+
#
|
127
|
+
# @return [Boolean]
|
128
|
+
#
|
129
|
+
# @version SketchUp 2017
|
130
|
+
def message=(message)
|
131
|
+
end
|
132
|
+
|
133
|
+
# Shows a button in the notification with the given title and callback block,
|
134
|
+
# both arguments are required.
|
135
|
+
#
|
136
|
+
# @example
|
137
|
+
# notification = UI::Notification.new(sketchup_extension, "Hello world")
|
138
|
+
# notification.on_accept("Accept") do |notification, title|
|
139
|
+
# puts "The user pressed [#{title}] with message #{notification.message}"
|
140
|
+
# end
|
141
|
+
# notification.show
|
142
|
+
#
|
143
|
+
# @param [String] title
|
144
|
+
# Sets the title of the button.
|
145
|
+
#
|
146
|
+
# @param [Block] block
|
147
|
+
# Sets the action callback, this will be called when
|
148
|
+
# the user clicks on the dismiss button.
|
149
|
+
#
|
150
|
+
# @raise [RuntimeError] When calling on_accept when the notification has
|
151
|
+
# already been shown.
|
152
|
+
#
|
153
|
+
# @return [Boolean]
|
154
|
+
#
|
155
|
+
# @version SketchUp 2017
|
156
|
+
def on_accept(title, block)
|
157
|
+
end
|
158
|
+
|
159
|
+
# Returns the accept's button title.
|
160
|
+
#
|
161
|
+
# @example
|
162
|
+
# notification = UI::Notification.new(sketchup_extension, "Hello world")
|
163
|
+
# notification.on_accept("Accept") do |notification, title|
|
164
|
+
# puts "The user pressed #{notification.on_accept_title}"
|
165
|
+
# end
|
166
|
+
# notification.show
|
167
|
+
#
|
168
|
+
# @return [String]
|
169
|
+
#
|
170
|
+
# @version SketchUp 2017
|
171
|
+
def on_accept_title
|
172
|
+
end
|
173
|
+
|
174
|
+
# Shows a button in the notification with the given title and callback block,
|
175
|
+
# both arguments are required.
|
176
|
+
#
|
177
|
+
# @example
|
178
|
+
# notification = UI::Notification.new(sketchup_extension, "Hello world")
|
179
|
+
# notification.on_dismiss("Close") do |notification, title|
|
180
|
+
# puts "The user pressed [#{title}] with message #{notification.message}"
|
181
|
+
# end
|
182
|
+
# notification.show
|
183
|
+
#
|
184
|
+
# @param [String] title
|
185
|
+
# Sets the title of the button.
|
186
|
+
#
|
187
|
+
# @param [Block] block
|
188
|
+
# Sets the action callback, this will be called when
|
189
|
+
# the user clicks on the dismiss button.
|
190
|
+
#
|
191
|
+
# @raise [RuntimeError] When calling on_dismiss when the notification has
|
192
|
+
# already been shown.
|
193
|
+
#
|
194
|
+
# @return [Boolean]
|
195
|
+
#
|
196
|
+
# @version SketchUp 2017
|
197
|
+
def on_dismiss(title, block)
|
198
|
+
end
|
199
|
+
|
200
|
+
# Returns the dismiss's button title.
|
201
|
+
#
|
202
|
+
# @example
|
203
|
+
# notification = UI::Notification.new(sketchup_extension, "Hello world")
|
204
|
+
# notification.on_dismiss("Close") do |notification, title|
|
205
|
+
# puts "The user pressed #{notification.on_dismiss_title}"
|
206
|
+
# end
|
207
|
+
# notification.show
|
208
|
+
#
|
209
|
+
# @return [String]
|
210
|
+
#
|
211
|
+
# @version SketchUp 2017
|
212
|
+
def on_dismiss_title
|
213
|
+
end
|
214
|
+
|
215
|
+
# Shows the notification in the top right of the screen, the notifications will
|
216
|
+
# be ordered from top to bottom if multiple notifications are shown, it will
|
217
|
+
# automatically be dismissed if no action is taken.
|
218
|
+
#
|
219
|
+
# @example
|
220
|
+
# notification = UI::Notification.new(sketchup_extension, "Hello world")
|
221
|
+
# notification.show
|
222
|
+
#
|
223
|
+
# @return [Boolean]
|
224
|
+
#
|
225
|
+
# @version SketchUp 2017
|
226
|
+
def show
|
227
|
+
end
|
228
|
+
|
229
|
+
end
|
@@ -0,0 +1,243 @@
|
|
1
|
+
# Copyright:: Copyright 2017 Trimble Inc.
|
2
|
+
# License:: The MIT License (MIT)
|
3
|
+
|
4
|
+
# The Toolbar class contains methods to create and manipulate SketchUp
|
5
|
+
# toolbars in Ruby. Toolbars are collections of buttons that you can use
|
6
|
+
# to activate custom Tools or ruby scripts.
|
7
|
+
#
|
8
|
+
# Also see the Command object for details on creating "commands" which
|
9
|
+
# can be called from your toolbars.
|
10
|
+
#
|
11
|
+
# @example
|
12
|
+
# toolbar = UI::Toolbar.new "Test"
|
13
|
+
# # This toolbar icon simply displays Hello World on the screen
|
14
|
+
# cmd = UI::Command.new("Test") {
|
15
|
+
# UI.messagebox "Hello World"
|
16
|
+
# }
|
17
|
+
# cmd.small_icon = "ToolPencilSmall.png"
|
18
|
+
# cmd.large_icon = "ToolPencilLarge.png"
|
19
|
+
# cmd.tooltip = "Test Toolbars"
|
20
|
+
# cmd.status_bar_text = "Testing the toolbars class"
|
21
|
+
# cmd.menu_text = "Test"
|
22
|
+
# toolbar = toolbar.add_item cmd
|
23
|
+
# toolbar.show
|
24
|
+
#
|
25
|
+
# @version SketchUp 6.0
|
26
|
+
class UI::Toolbar
|
27
|
+
|
28
|
+
# Includes
|
29
|
+
|
30
|
+
include Enumerable
|
31
|
+
|
32
|
+
# Class Methods
|
33
|
+
|
34
|
+
# The new method creates a new Toolbar object.
|
35
|
+
#
|
36
|
+
# @example
|
37
|
+
# toolbar = UI::Toolbar.new "Test"
|
38
|
+
#
|
39
|
+
# @param toolbarname
|
40
|
+
# The name for the new toolbar.
|
41
|
+
#
|
42
|
+
# @return toolbar - the newly created toolbar object
|
43
|
+
#
|
44
|
+
# @version SketchUp 6.0
|
45
|
+
def self.new(toolbarname)
|
46
|
+
end
|
47
|
+
|
48
|
+
# Instance Methods
|
49
|
+
|
50
|
+
# The add_item method is used to add an item to the toolbar.
|
51
|
+
#
|
52
|
+
# @example
|
53
|
+
# toolbar = toolbar.add_item command
|
54
|
+
#
|
55
|
+
# @param command
|
56
|
+
# A Command object representing the command to add to the
|
57
|
+
# toolbar.
|
58
|
+
#
|
59
|
+
# @return toolbar - the toolbar where the command was just added
|
60
|
+
#
|
61
|
+
# @version SketchUp 6.0
|
62
|
+
def add_item(command)
|
63
|
+
end
|
64
|
+
|
65
|
+
# The add_separator method is used to add a line separator to the toolbar.
|
66
|
+
#
|
67
|
+
# @example
|
68
|
+
# toolbar = toolbar.add_separator
|
69
|
+
#
|
70
|
+
# @return toolbar - the toolbar where the line separator was just
|
71
|
+
# added
|
72
|
+
#
|
73
|
+
# @version SketchUp 6.0
|
74
|
+
def add_separator
|
75
|
+
end
|
76
|
+
|
77
|
+
# The {#count} method is inherited from the +Enumerable+ mix-in module.
|
78
|
+
#
|
79
|
+
# @example
|
80
|
+
# number = toolbar.count
|
81
|
+
#
|
82
|
+
# @return integer
|
83
|
+
#
|
84
|
+
# @version SketchUp 2014
|
85
|
+
def count
|
86
|
+
end
|
87
|
+
|
88
|
+
# The each method is used to iterate through all of the commands
|
89
|
+
# attached to a toolbar.
|
90
|
+
#
|
91
|
+
# @example
|
92
|
+
# toolbar = UI::Toolbar.new "Test"
|
93
|
+
# # This command displays Hello World on the screen when clicked
|
94
|
+
# cmd = UI::Command.new("Test") { UI.messagebox("Hello World") }
|
95
|
+
# toolbar.add_item cmd
|
96
|
+
# toolbar = toolbar.add_separator
|
97
|
+
# cmd = UI::Command.new("Test 2") { UI.messagebox("Hello World 2") }
|
98
|
+
# toolbar.add_item cmd
|
99
|
+
# toolbar.show
|
100
|
+
# toolbar.each { | item |
|
101
|
+
# puts item
|
102
|
+
# }
|
103
|
+
#
|
104
|
+
# @return nil
|
105
|
+
#
|
106
|
+
# @version SketchUp 8.0 M1
|
107
|
+
#
|
108
|
+
# @yield [key, value] Variables that will hold each key and value as they are
|
109
|
+
# found.
|
110
|
+
def each
|
111
|
+
end
|
112
|
+
|
113
|
+
# The get_last_state method is used to determine if the toolbar was hidden or
|
114
|
+
# visible in the previous session of SketchUp.
|
115
|
+
#
|
116
|
+
# Valid states are 1 for visible, 0 for hidden, -1 for before never shown.
|
117
|
+
#
|
118
|
+
# @example
|
119
|
+
# state = toolbar.get_last_state
|
120
|
+
#
|
121
|
+
# @return state - the last state of the toolbar (see comments)
|
122
|
+
#
|
123
|
+
# @version SketchUp 6.0
|
124
|
+
def get_last_state
|
125
|
+
end
|
126
|
+
|
127
|
+
# The hide method is used to hide the toolbar on the user interface.
|
128
|
+
#
|
129
|
+
# @example
|
130
|
+
# toolbar = UI::Toolbar.new "Test"
|
131
|
+
# # This toolbar icon simply displays Hello World on the screen
|
132
|
+
# cmd = UI::Command.new("Test") {
|
133
|
+
# UI.messagebox "Hello World"
|
134
|
+
# }
|
135
|
+
# cmd.small_icon = "ToolPencilSmall.png"
|
136
|
+
# cmd.large_icon = "ToolPencilLarge.png"
|
137
|
+
# cmd.tooltip = "Test Toolbars"
|
138
|
+
# cmd.status_bar_text = "Testing the toolbars class"
|
139
|
+
# cmd.menu_text = "Test"
|
140
|
+
# toolbar = toolbar.add_item cmd
|
141
|
+
# toolbar.show
|
142
|
+
# UI.messagebox "Toolbar Showing"
|
143
|
+
# toolbar.hide
|
144
|
+
# UI.messagebox "Toolbar Hidden"
|
145
|
+
#
|
146
|
+
# @return nil
|
147
|
+
#
|
148
|
+
# @version SketchUp 6.0
|
149
|
+
def hide
|
150
|
+
end
|
151
|
+
|
152
|
+
# The {#length} method returns the number of items in the toolbar.
|
153
|
+
#
|
154
|
+
# The {#size} method is an alias of {#length}.
|
155
|
+
#
|
156
|
+
# @example
|
157
|
+
# number = toolbar.length
|
158
|
+
#
|
159
|
+
# @return integer
|
160
|
+
#
|
161
|
+
# @version SketchUp 2014
|
162
|
+
def length
|
163
|
+
end
|
164
|
+
|
165
|
+
# The name method returns the name of the toolbar.
|
166
|
+
#
|
167
|
+
# @example
|
168
|
+
# toolbar = UI::Toolbar.new "Test"
|
169
|
+
# # This command displays Hello World on the screen when clicked
|
170
|
+
# cmd = UI::Command.new("Test") { UI.messagebox("Hello World") }
|
171
|
+
# toolbar.add_item cmd
|
172
|
+
# toolbar = toolbar.add_separator
|
173
|
+
# cmd = UI::Command.new("Test 2") { UI.messagebox("Hello World 2") }
|
174
|
+
# puts toolbar.name
|
175
|
+
# toolbar.show
|
176
|
+
#
|
177
|
+
# @return string - the name of the toolbar.
|
178
|
+
#
|
179
|
+
# @version SketchUp 8.0 M1
|
180
|
+
def name
|
181
|
+
end
|
182
|
+
|
183
|
+
# The restore method is used to reposition the toolbar to its previous
|
184
|
+
# location and show if not hidden.
|
185
|
+
#
|
186
|
+
# @example
|
187
|
+
# toolbar.restore
|
188
|
+
#
|
189
|
+
# @return nil
|
190
|
+
#
|
191
|
+
# @version SketchUp 6.0
|
192
|
+
def restore
|
193
|
+
end
|
194
|
+
|
195
|
+
# The show method is used to display the toolbar in the user interface.
|
196
|
+
#
|
197
|
+
# @example
|
198
|
+
# toolbar = UI::Toolbar.new "Test"
|
199
|
+
# # This toolbar icon simply displays Hello World on the screen
|
200
|
+
# cmd = UI::Command.new("Test") {
|
201
|
+
# UI.messagebox "Hello World"
|
202
|
+
# }
|
203
|
+
# cmd.small_icon = "ToolPencilSmall.png"
|
204
|
+
# cmd.large_icon = "ToolPencilLarge.png"
|
205
|
+
# cmd.tooltip = "Test Toolbars"
|
206
|
+
# cmd.status_bar_text = "Testing the toolbars class"
|
207
|
+
# cmd.menu_text = "Test"
|
208
|
+
# toolbar = toolbar.add_item cmd
|
209
|
+
# toolbar.show
|
210
|
+
#
|
211
|
+
# @return nil
|
212
|
+
#
|
213
|
+
# @version SketchUp 6.0
|
214
|
+
def show
|
215
|
+
end
|
216
|
+
|
217
|
+
# The {#length} method returns the number of items in the toolbar.
|
218
|
+
#
|
219
|
+
# The {#size} method is an alias of {#length}.
|
220
|
+
#
|
221
|
+
# @example
|
222
|
+
# number = toolbar.length
|
223
|
+
#
|
224
|
+
# @return integer
|
225
|
+
#
|
226
|
+
# @version SketchUp 2014
|
227
|
+
def size
|
228
|
+
end
|
229
|
+
|
230
|
+
# The visible? method is used to find out if a toolbar is currently visible.
|
231
|
+
#
|
232
|
+
# @example
|
233
|
+
# visible = toolbar.visible?
|
234
|
+
#
|
235
|
+
# @return true if visible
|
236
|
+
#
|
237
|
+
# @return [Boolean]
|
238
|
+
#
|
239
|
+
# @version SketchUp 6.0
|
240
|
+
def visible?
|
241
|
+
end
|
242
|
+
|
243
|
+
end
|