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,356 @@
|
|
1
|
+
# Copyright:: Copyright 2017 Trimble Inc.
|
2
|
+
# License:: The MIT License (MIT)
|
3
|
+
|
4
|
+
# This observer interface is implemented to react to model events. To
|
5
|
+
# implement this observer, create a Ruby class of this type, override the
|
6
|
+
# desired methods, and add an instance of the observer to the model.
|
7
|
+
#
|
8
|
+
# Note that the observers related to transactions (aka undoable operations)
|
9
|
+
# are primarily for reporting and debugging. Performing any edit operations
|
10
|
+
# of your own (such as modifying the model) inside the observer callback
|
11
|
+
# should be avoided, as it could cause crashes or model corruption. The most
|
12
|
+
# common use for these callbacks is to help debug problems where your
|
13
|
+
# Ruby script's {Sketchup::Model#start_operation} and
|
14
|
+
# {Sketchup::Model#commit_operation} calls are somehow conflicting with
|
15
|
+
# SketchUp's native undo operations. You can set up an observer set to watch
|
16
|
+
# precisely what is going on.
|
17
|
+
#
|
18
|
+
# @example
|
19
|
+
# # This is an example of an observer that watches the
|
20
|
+
# # component placement event.
|
21
|
+
# class MyModelObserver < Sketchup::ModelObserver
|
22
|
+
# def onPlaceComponent(instance)
|
23
|
+
# puts "onPlaceComponent: #{instance}"
|
24
|
+
# end
|
25
|
+
# end
|
26
|
+
#
|
27
|
+
# # Attach the observer.
|
28
|
+
# Sketchup.active_model.add_observer(MyModelObserver.new)
|
29
|
+
#
|
30
|
+
# @version SketchUp 6.0
|
31
|
+
class Sketchup::ModelObserver
|
32
|
+
|
33
|
+
# Instance Methods
|
34
|
+
|
35
|
+
# The {#onActivePathChanged} method is invoked when the user opens or closes a
|
36
|
+
# {Sketchup::ComponentInstance} or {Sketchup::Group} for editing.
|
37
|
+
#
|
38
|
+
# When the user opens an instance for editing the positions and transformations
|
39
|
+
# of the entities in the opened instance will be relative to global world
|
40
|
+
# coordinates instead of the local coordinates relative to their parent.
|
41
|
+
#
|
42
|
+
# See {Sketchup::Model#active_path} and {Sketchup::Model#edit_transform} for
|
43
|
+
# methods that report the current edit origin vs. the global origin, etc.
|
44
|
+
#
|
45
|
+
# By using this observer callback, you can keep track of the various nested
|
46
|
+
# transformations as your users double click to drill into and out of
|
47
|
+
# component edits.
|
48
|
+
#
|
49
|
+
# @example
|
50
|
+
# # As the user double clicks into component edits, show the "path" along
|
51
|
+
# # the model hierarchy they have followed to get here.
|
52
|
+
# def onActivePathChanged(model)
|
53
|
+
# puts "onActivePathChanged: #{model}"
|
54
|
+
# end
|
55
|
+
#
|
56
|
+
# @param [Sketchup::Model] model
|
57
|
+
#
|
58
|
+
# @return [nil]
|
59
|
+
#
|
60
|
+
# @see Sketchup::Model#edit_transform
|
61
|
+
#
|
62
|
+
# @see Sketchup::Model#active_path
|
63
|
+
def onActivePathChanged(model)
|
64
|
+
end
|
65
|
+
|
66
|
+
# The {#onAfterComponentSaveAs} method is invoked when the user context-clicks >
|
67
|
+
# Save As on a component instance. It is called just after the component is
|
68
|
+
# written to disk, so you can restore the component to some state before
|
69
|
+
# returning control to the user.
|
70
|
+
#
|
71
|
+
# @example
|
72
|
+
# def onAfterComponentSaveAs(model)
|
73
|
+
# puts "onAfterComponentSaveAs: #{model}"
|
74
|
+
# end
|
75
|
+
#
|
76
|
+
# @param [Sketchup::Model] model
|
77
|
+
#
|
78
|
+
# @return [nil]
|
79
|
+
#
|
80
|
+
# @see #onBeforeComponentSaveAs
|
81
|
+
#
|
82
|
+
# @version SketchUp 7.0
|
83
|
+
def onAfterComponentSaveAs(model)
|
84
|
+
end
|
85
|
+
|
86
|
+
# The {#onBeforeComponentSaveAs} method is invoked when the user
|
87
|
+
# context-clicks > Save As on a component instance. It is called just before
|
88
|
+
# the component is written to disk, so you can make changes within the handler
|
89
|
+
# and it will make it into the save.
|
90
|
+
#
|
91
|
+
# For example, you may decide that you want to add some attribute to every
|
92
|
+
# component that is saved out, but you do not want that attribute sticking
|
93
|
+
# around inside the current model. Within {#onBeforeComponentSaveAs} you could
|
94
|
+
# add the attribute, and within {#onAfterComponentSaveAs} you could delete that
|
95
|
+
# attribute.
|
96
|
+
#
|
97
|
+
# The callback is not sent the component that is to be saved, but the
|
98
|
+
# model's selection will contain it.
|
99
|
+
#
|
100
|
+
# @example
|
101
|
+
# def onBeforeComponentSaveAs(model)
|
102
|
+
# puts "onBeforeComponentSaveAs: #{model}"
|
103
|
+
# end
|
104
|
+
#
|
105
|
+
# @param [Sketchup::Model] model
|
106
|
+
#
|
107
|
+
# @return [nil]
|
108
|
+
#
|
109
|
+
# @version SketchUp 7.0
|
110
|
+
def onBeforeComponentSaveAs(model)
|
111
|
+
end
|
112
|
+
|
113
|
+
# The {#onDeleteModel} method is invoked when a model is deleted.
|
114
|
+
#
|
115
|
+
# @example
|
116
|
+
# def onDeleteModel(model)
|
117
|
+
# puts "onDeleteModel: #{model}"
|
118
|
+
# end
|
119
|
+
#
|
120
|
+
# @param [Sketchup::Model] model
|
121
|
+
#
|
122
|
+
# @return [nil]
|
123
|
+
#
|
124
|
+
# @version SketchUp 6.0
|
125
|
+
def onDeleteModel(model)
|
126
|
+
end
|
127
|
+
|
128
|
+
# The {#onEraseAll} method is invoked when everything in a model is erased.
|
129
|
+
#
|
130
|
+
# @example
|
131
|
+
# def onEraseAll(model)
|
132
|
+
# puts "onEraseAll: #{model}"
|
133
|
+
# end
|
134
|
+
#
|
135
|
+
# @param [Sketchup::Model] model
|
136
|
+
#
|
137
|
+
# @return [nil]
|
138
|
+
#
|
139
|
+
# @version SketchUp 6.0
|
140
|
+
def onEraseAll(model)
|
141
|
+
end
|
142
|
+
|
143
|
+
# The {#onExplode method} is invoked whenever a component anywhere in this
|
144
|
+
# model is exploded. This is an easier way to watch explode events vs.
|
145
|
+
# attaching an InstanceObserver to every instance in the model.
|
146
|
+
#
|
147
|
+
# Since the callback does not return what was exploded, one solution is to
|
148
|
+
# place a selection observer that keeps track of which entities whose
|
149
|
+
# explosion you are interested in are in the selection. Since SketchUp's
|
150
|
+
# user interface only provides a means of exploding the selection, this
|
151
|
+
# method is a reliable way to know what was just exploded.
|
152
|
+
#
|
153
|
+
# Another method would be to watch
|
154
|
+
# {Sketchup::ComponentDefinition.count_instances} to determine what just
|
155
|
+
# changed, as any components that were exploded will now be less an instance.
|
156
|
+
#
|
157
|
+
# @example
|
158
|
+
# def onExplode(model)
|
159
|
+
# puts "onExplode: #{model}"
|
160
|
+
# end
|
161
|
+
#
|
162
|
+
# @param [Sketchup::Model] model
|
163
|
+
#
|
164
|
+
# @return [nil]
|
165
|
+
#
|
166
|
+
# @version SketchUp 7.0
|
167
|
+
def onExplode(model)
|
168
|
+
end
|
169
|
+
|
170
|
+
# The {#onPidChanged} method is invoked when a persistent id in the model
|
171
|
+
# changes. For example when entities are grouped.
|
172
|
+
#
|
173
|
+
# @example
|
174
|
+
# def onPidChanged(model, old_pid, new_pid)
|
175
|
+
# puts "onPidChanged: #{model}, #{old_pid} => #{new_pid}"
|
176
|
+
# end
|
177
|
+
#
|
178
|
+
# @param [Sketchup::Model] model
|
179
|
+
#
|
180
|
+
# @param [Integer] old_pid
|
181
|
+
#
|
182
|
+
# @param [Integer] new_pid
|
183
|
+
#
|
184
|
+
# @return [nil]
|
185
|
+
#
|
186
|
+
# @version SketchUp 2017
|
187
|
+
def onPidChanged(model, old_pid, new_pid)
|
188
|
+
end
|
189
|
+
|
190
|
+
# The {#onPlaceComponent} method is invoked when a component is "placed" into
|
191
|
+
# the model, meaning it is dragged from the Component Browser.
|
192
|
+
#
|
193
|
+
# @example
|
194
|
+
# def onPlaceComponent(model)
|
195
|
+
# puts "onPlaceComponent: #{model}"
|
196
|
+
# end
|
197
|
+
#
|
198
|
+
# @param [Sketchup::Model] model
|
199
|
+
#
|
200
|
+
# @return [nil]
|
201
|
+
#
|
202
|
+
# @version SketchUp 7.0
|
203
|
+
def onPlaceComponent(model)
|
204
|
+
end
|
205
|
+
|
206
|
+
# The {#onPostSaveModel} method is invoked after a model has been saved to disk.
|
207
|
+
#
|
208
|
+
# @example
|
209
|
+
# def onPostSaveModel(model)
|
210
|
+
# puts "onPostSaveModel: #{model}"
|
211
|
+
# end
|
212
|
+
#
|
213
|
+
# @param [Sketchup::Model] model
|
214
|
+
#
|
215
|
+
# @return [nil]
|
216
|
+
#
|
217
|
+
# @version SketchUp 8.0
|
218
|
+
def onPostSaveModel(model)
|
219
|
+
end
|
220
|
+
|
221
|
+
# The {#onPreSaveModel} method is invoked before a model is saved to disk.
|
222
|
+
#
|
223
|
+
# @example
|
224
|
+
# def onPreSaveModel(model)
|
225
|
+
# puts "onPreSaveModel: #{model}"
|
226
|
+
# end
|
227
|
+
#
|
228
|
+
# @param [Sketchup::Model] model
|
229
|
+
#
|
230
|
+
# @return [nil]
|
231
|
+
#
|
232
|
+
# @version SketchUp 8.0
|
233
|
+
def onPreSaveModel(model)
|
234
|
+
end
|
235
|
+
|
236
|
+
# The {#onSaveModel} method is invoked after a model has been saved to disk.
|
237
|
+
#
|
238
|
+
# @example
|
239
|
+
# def onSaveModel(model)
|
240
|
+
# puts "onSaveModel: #{model}"
|
241
|
+
# end
|
242
|
+
#
|
243
|
+
# @param [Sketchup::Model] model
|
244
|
+
#
|
245
|
+
# @return [nil]
|
246
|
+
#
|
247
|
+
# @version SketchUp 6.0
|
248
|
+
def onSaveModel(model)
|
249
|
+
end
|
250
|
+
|
251
|
+
# The {#onTransactionAbort} method is invoked when a transaction is aborted.
|
252
|
+
#
|
253
|
+
# @example
|
254
|
+
# def onTransactionAbort(model)
|
255
|
+
# puts "onTransactionAbort: #{model}"
|
256
|
+
# end
|
257
|
+
#
|
258
|
+
# @param [Sketchup::Model] model
|
259
|
+
#
|
260
|
+
# @return [nil]
|
261
|
+
#
|
262
|
+
# @see Sketchup::Model#abort_operation
|
263
|
+
#
|
264
|
+
# @version SketchUp 6.0
|
265
|
+
def onTransactionAbort(model)
|
266
|
+
end
|
267
|
+
|
268
|
+
# The {#onTransactionCommit} method is invoked when a transaction is completed.
|
269
|
+
#
|
270
|
+
# @example
|
271
|
+
# def onTransactionCommit(model)
|
272
|
+
# puts "onTransactionCommit: #{model}"
|
273
|
+
# end
|
274
|
+
#
|
275
|
+
# @param [Sketchup::Model] model
|
276
|
+
#
|
277
|
+
# @return [nil]
|
278
|
+
#
|
279
|
+
# @see Sketchup::Model#commit_operation
|
280
|
+
#
|
281
|
+
# @version SketchUp 6.0
|
282
|
+
def onTransactionCommit(model)
|
283
|
+
end
|
284
|
+
|
285
|
+
# The {#onTransactionEmpty} method is invoked when a transaction
|
286
|
+
# (aka an undoable operation) starts and then is committed without anything
|
287
|
+
# being altered in between.
|
288
|
+
#
|
289
|
+
# @example
|
290
|
+
# def onTransactionEmpty(model)
|
291
|
+
# puts "onTransactionEmpty: #{model}"
|
292
|
+
# end
|
293
|
+
#
|
294
|
+
# @param [Sketchup::Model] model
|
295
|
+
#
|
296
|
+
# @return [nil]
|
297
|
+
#
|
298
|
+
# @see Sketchup::Model#start_operation
|
299
|
+
#
|
300
|
+
# @version SketchUp 6.0
|
301
|
+
def onTransactionEmpty(model)
|
302
|
+
end
|
303
|
+
|
304
|
+
# The {#onTransactionRedo} method is invoked when the user "redoes" a
|
305
|
+
# transaction (aka undo operation.) You can programmatically fire a redo by
|
306
|
+
# calling +Sketchup.sendAction("editRedo")+.
|
307
|
+
#
|
308
|
+
# @example
|
309
|
+
# def onTransactionRedo(model)
|
310
|
+
# puts "onTransactionRedo: #{model}"
|
311
|
+
# end
|
312
|
+
#
|
313
|
+
# @param [Sketchup::Model] model
|
314
|
+
#
|
315
|
+
# @return [nil]
|
316
|
+
#
|
317
|
+
# @version SketchUp 6.0
|
318
|
+
def onTransactionRedo(model)
|
319
|
+
end
|
320
|
+
|
321
|
+
# The {#onTransactionStart} method is invoked when a transaction
|
322
|
+
# (aka an undoable operation) starts.
|
323
|
+
#
|
324
|
+
# @example
|
325
|
+
# def onTransactionStart(model)
|
326
|
+
# puts "onTransactionStart: #{model}"
|
327
|
+
# end
|
328
|
+
#
|
329
|
+
# @param [Sketchup::Model] model
|
330
|
+
#
|
331
|
+
# @return [nil]
|
332
|
+
#
|
333
|
+
# @see Sketchup::Model#start_operation
|
334
|
+
#
|
335
|
+
# @version SketchUp 6.0
|
336
|
+
def onTransactionStart(model)
|
337
|
+
end
|
338
|
+
|
339
|
+
# The {#onTransactionUndo method} is invoked when the user "undoes" a
|
340
|
+
# transaction (aka undo operation.) You can programmatically fire an undo by
|
341
|
+
# calling +Sketchup.sendAction("editUndo")+.
|
342
|
+
#
|
343
|
+
# @example
|
344
|
+
# def onTransactionUndo(model)
|
345
|
+
# puts "onTransactionUndo: #{model}"
|
346
|
+
# end
|
347
|
+
#
|
348
|
+
# @param [Sketchup::Model] model
|
349
|
+
#
|
350
|
+
# @return [nil]
|
351
|
+
#
|
352
|
+
# @version SketchUp 6.0
|
353
|
+
def onTransactionUndo(model)
|
354
|
+
end
|
355
|
+
|
356
|
+
end
|
@@ -0,0 +1,135 @@
|
|
1
|
+
# Copyright:: Copyright 2017 Trimble Inc.
|
2
|
+
# License:: The MIT License (MIT)
|
3
|
+
|
4
|
+
# The OptionsManager class manages various kinds of OptionsProviders on a
|
5
|
+
# Model.
|
6
|
+
#
|
7
|
+
# @version SketchUp 6.0
|
8
|
+
class Sketchup::OptionsManager
|
9
|
+
|
10
|
+
# Includes
|
11
|
+
|
12
|
+
include Enumerable
|
13
|
+
|
14
|
+
# Instance Methods
|
15
|
+
|
16
|
+
# The [] method is used to get an option provider by name or index.
|
17
|
+
#
|
18
|
+
# For example, to get the UnitsOptions on the Model, you could use the
|
19
|
+
# command:
|
20
|
+
#
|
21
|
+
# @example
|
22
|
+
# Sketchup.active_model.options["UnitsOptions"]
|
23
|
+
#
|
24
|
+
# @example
|
25
|
+
# model = Sketchup.active_model
|
26
|
+
# manager = model.options
|
27
|
+
# provider = manager[0]
|
28
|
+
# if (provider)
|
29
|
+
# UI.messagebox provider.name
|
30
|
+
# else
|
31
|
+
# UI.messagebox "Failure"
|
32
|
+
# end
|
33
|
+
#
|
34
|
+
# @overload [](index)
|
35
|
+
#
|
36
|
+
# @param index The index of the OptionsProvider object.
|
37
|
+
# @return optionprovider - an OptionsProvider object if
|
38
|
+
# successful, otherwise nil.
|
39
|
+
#
|
40
|
+
# @overload [](name)
|
41
|
+
#
|
42
|
+
# @param name The name of the OptionsProvider object.
|
43
|
+
# @return optionprovider - an OptionsProvider object if
|
44
|
+
# successful, otherwise nil.
|
45
|
+
#
|
46
|
+
# @version SketchUp 6.0
|
47
|
+
def [](arg)
|
48
|
+
end
|
49
|
+
|
50
|
+
#
|
51
|
+
# @example
|
52
|
+
# optionsmanager = Sketchup.active_model.options
|
53
|
+
# number = manager.count
|
54
|
+
#
|
55
|
+
# @note Since SketchUp 2014 the count method is inherited from Ruby's
|
56
|
+
# +Enumable+ mix-in module. Prior to that the {#count} method is an alias
|
57
|
+
# for {#length}.
|
58
|
+
#
|
59
|
+
# @return integer - number of OptionsProvider objects if
|
60
|
+
# successful
|
61
|
+
#
|
62
|
+
# @see #length
|
63
|
+
#
|
64
|
+
# @version SketchUp 6.0
|
65
|
+
def count
|
66
|
+
end
|
67
|
+
|
68
|
+
# The each method is used to iterate through options providers.
|
69
|
+
#
|
70
|
+
# @example
|
71
|
+
# model = Sketchup.active_model
|
72
|
+
# manager = model.options
|
73
|
+
# # Retrieves each provider
|
74
|
+
# manager.each { |provider| UI.messagebox provider.name }
|
75
|
+
#
|
76
|
+
# @return nil
|
77
|
+
#
|
78
|
+
# @version SketchUp 6.0
|
79
|
+
#
|
80
|
+
# @yield [opsprovider] A variable that will hold each OptionsProvider object
|
81
|
+
# as they are found.
|
82
|
+
def each
|
83
|
+
end
|
84
|
+
|
85
|
+
# The keys method is used to get a list of keys in the OptionsManager.
|
86
|
+
#
|
87
|
+
# @example
|
88
|
+
# model = Sketchup.active_model
|
89
|
+
# manager = model.options
|
90
|
+
# optionproviderarray = manager.keys
|
91
|
+
# if (optionproviderarray)
|
92
|
+
# UI.messagebox optionproviderarray
|
93
|
+
# else
|
94
|
+
# UI.messagebox "Failure"
|
95
|
+
# end
|
96
|
+
#
|
97
|
+
# @return keys - Array of string keys
|
98
|
+
#
|
99
|
+
# @version SketchUp 6.0
|
100
|
+
def keys
|
101
|
+
end
|
102
|
+
|
103
|
+
# The {#size} method returns the number of OptionsProvider objects inside this
|
104
|
+
# OptionsManager.
|
105
|
+
#
|
106
|
+
# The {#length} method is an alias for {#size} added in SketchUp 2014.
|
107
|
+
#
|
108
|
+
# @example
|
109
|
+
# optionsmanager = Sketchup.active_model.options
|
110
|
+
# number = manager.size
|
111
|
+
#
|
112
|
+
# @return integer - number of OptionsProvider objects if
|
113
|
+
# successful
|
114
|
+
#
|
115
|
+
# @version SketchUp 6.0
|
116
|
+
def length
|
117
|
+
end
|
118
|
+
|
119
|
+
# The {#size} method returns the number of OptionsProvider objects inside this
|
120
|
+
# OptionsManager.
|
121
|
+
#
|
122
|
+
# The {#length} method is an alias for {#size} added in SketchUp 2014.
|
123
|
+
#
|
124
|
+
# @example
|
125
|
+
# optionsmanager = Sketchup.active_model.options
|
126
|
+
# number = manager.size
|
127
|
+
#
|
128
|
+
# @return integer - number of OptionsProvider objects if
|
129
|
+
# successful
|
130
|
+
#
|
131
|
+
# @version SketchUp 6.0
|
132
|
+
def size
|
133
|
+
end
|
134
|
+
|
135
|
+
end
|