sketchup-api-stubs 0.1.2 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (92) hide show
  1. checksums.yaml +4 -4
  2. data/SketchUp/Geom/BoundingBox.rb +17 -20
  3. data/SketchUp/Geom/Bounds2d.rb +172 -0
  4. data/SketchUp/Geom/LatLong.rb +31 -16
  5. data/SketchUp/Geom/OrientedBounds2d.rb +102 -0
  6. data/SketchUp/Geom/Point2d.rb +365 -0
  7. data/SketchUp/Geom/Point3d.rb +121 -110
  8. data/SketchUp/Geom/PolygonMesh.rb +30 -21
  9. data/SketchUp/Geom/Transformation.rb +8 -4
  10. data/SketchUp/Geom/Transformation2d.rb +125 -0
  11. data/SketchUp/Geom/UTM.rb +43 -37
  12. data/SketchUp/Geom/Vector2d.rb +497 -0
  13. data/SketchUp/Geom/Vector3d.rb +143 -131
  14. data/SketchUp/Layout.rb +25 -0
  15. data/SketchUp/Layout/AngularDimension.rb +569 -0
  16. data/SketchUp/Layout/AutoTextDefinition.rb +417 -0
  17. data/SketchUp/Layout/AutoTextDefinitions.rb +186 -0
  18. data/SketchUp/Layout/ConnectionPoint.rb +70 -0
  19. data/SketchUp/Layout/Document.rb +458 -0
  20. data/SketchUp/Layout/Ellipse.rb +29 -0
  21. data/SketchUp/Layout/Entities.rb +155 -0
  22. data/SketchUp/Layout/Entity.rb +363 -0
  23. data/SketchUp/Layout/FormattedText.rb +349 -0
  24. data/SketchUp/Layout/Grid.rb +131 -0
  25. data/SketchUp/Layout/Group.rb +261 -0
  26. data/SketchUp/Layout/Image.rb +86 -0
  27. data/SketchUp/Layout/Label.rb +371 -0
  28. data/SketchUp/Layout/Layer.rb +222 -0
  29. data/SketchUp/Layout/LayerInstance.rb +128 -0
  30. data/SketchUp/Layout/Layers.rb +232 -0
  31. data/SketchUp/Layout/LinearDimension.rb +563 -0
  32. data/SketchUp/Layout/LockedEntityError.rb +10 -0
  33. data/SketchUp/Layout/LockedLayerError.rb +11 -0
  34. data/SketchUp/Layout/Page.rb +187 -0
  35. data/SketchUp/Layout/PageInfo.rb +393 -0
  36. data/SketchUp/Layout/Pages.rb +216 -0
  37. data/SketchUp/Layout/Path.rb +326 -0
  38. data/SketchUp/Layout/Rectangle.rb +174 -0
  39. data/SketchUp/Layout/SketchUpModel.rb +522 -0
  40. data/SketchUp/Layout/Style.rb +1520 -0
  41. data/SketchUp/Layout/Table.rb +290 -0
  42. data/SketchUp/Layout/TableCell.rb +149 -0
  43. data/SketchUp/Layout/TableColumn.rb +139 -0
  44. data/SketchUp/Layout/TableRow.rb +135 -0
  45. data/SketchUp/Sketchup/Animation.rb +7 -4
  46. data/SketchUp/Sketchup/ArcCurve.rb +10 -10
  47. data/SketchUp/Sketchup/AttributeDictionaries.rb +13 -4
  48. data/SketchUp/Sketchup/AttributeDictionary.rb +12 -12
  49. data/SketchUp/Sketchup/Color.rb +68 -78
  50. data/SketchUp/Sketchup/ComponentDefinition.rb +60 -60
  51. data/SketchUp/Sketchup/ComponentInstance.rb +57 -55
  52. data/SketchUp/Sketchup/DefinitionList.rb +34 -17
  53. data/SketchUp/Sketchup/Drawingelement.rb +19 -21
  54. data/SketchUp/Sketchup/Edge.rb +22 -24
  55. data/SketchUp/Sketchup/Entities.rb +173 -162
  56. data/SketchUp/Sketchup/Entity.rb +71 -55
  57. data/SketchUp/Sketchup/Face.rb +45 -44
  58. data/SketchUp/Sketchup/Group.rb +47 -49
  59. data/SketchUp/Sketchup/Image.rb +16 -0
  60. data/SketchUp/Sketchup/ImageRep.rb +226 -0
  61. data/SketchUp/Sketchup/InstancePath.rb +13 -13
  62. data/SketchUp/Sketchup/Layer.rb +15 -17
  63. data/SketchUp/Sketchup/Material.rb +40 -30
  64. data/SketchUp/Sketchup/Materials.rb +40 -22
  65. data/SketchUp/Sketchup/Menu.rb +5 -5
  66. data/SketchUp/Sketchup/Model.rb +230 -228
  67. data/SketchUp/Sketchup/Page.rb +32 -0
  68. data/SketchUp/Sketchup/Pages.rb +3 -4
  69. data/SketchUp/Sketchup/RenderingOptions.rb +21 -16
  70. data/SketchUp/Sketchup/SectionPlane.rb +64 -0
  71. data/SketchUp/Sketchup/Selection.rb +20 -28
  72. data/SketchUp/Sketchup/ShadowInfo.rb +14 -14
  73. data/SketchUp/Sketchup/Text.rb +24 -26
  74. data/SketchUp/Sketchup/Texture.rb +28 -12
  75. data/SketchUp/Sketchup/Vertex.rb +14 -11
  76. data/SketchUp/Sketchup/View.rb +126 -116
  77. data/SketchUp/UI/Command.rb +17 -17
  78. data/SketchUp/UI/HtmlDialog.rb +8 -5
  79. data/SketchUp/UI/Notification.rb +1 -1
  80. data/SketchUp/UI/Toolbar.rb +13 -14
  81. data/SketchUp/UI/WebDialog.rb +55 -59
  82. data/SketchUp/_top_level.rb +139 -27
  83. data/SketchUp/{Array.rb → array.rb} +167 -30
  84. data/SketchUp/{Geom.rb → geom.rb} +9 -7
  85. data/SketchUp/{LanguageHandler.rb → languagehandler.rb} +15 -15
  86. data/SketchUp/{Length.rb → length.rb} +15 -15
  87. data/SketchUp/{Numeric.rb → numeric.rb} +19 -19
  88. data/SketchUp/sketchup.rb +167 -156
  89. data/SketchUp/{SketchupExtension.rb → sketchupextension.rb} +27 -27
  90. data/SketchUp/{String.rb → string.rb} +1 -1
  91. data/SketchUp/ui.rb +113 -87
  92. metadata +46 -9
@@ -0,0 +1,417 @@
1
+ # Copyright:: Copyright 2017 Trimble Inc.
2
+ # License:: The MIT License (MIT)
3
+
4
+ # References an auto text definition. Some auto text definitions are mandatory.
5
+ # Mandatory auto text definitions may not be removed, added, or modified.
6
+ #
7
+ # A mandatory {Layout::AutoTextDefinition} is one of the following types:
8
+ # [+Layout::AutoTextDefinition::TYPE_MODEL_GROUP_NAME+]
9
+ # [+Layout::AutoTextDefinition::TYPE_MODEL_COMPONENT_INSTANCE_NAME+]
10
+ # [+Layout::AutoTextDefinition::TYPE_MODEL_COMPONENT_DEFINITION_NAME+]
11
+ # [+Layout::AutoTextDefinition::TYPE_MODEL_COMPONENT_DESCRIPTION+]
12
+ # [+Layout::AutoTextDefinition::TYPE_MODEL_VOLUME+]
13
+ # [+Layout::AutoTextDefinition::TYPE_MODEL_FACE_AREA+]
14
+ # [+Layout::AutoTextDefinition::TYPE_MODEL_EDGE_LENGTH+]
15
+ # [+Layout::AutoTextDefinition::TYPE_MODEL_COORDINATES+]
16
+ # [+Layout::AutoTextDefinition::TYPE_MODEL_DYNAMIC_COMPONENT_ATTRIBUTE+]
17
+ # [+Layout::AutoTextDefinition::TYPE_MODEL_CLASSIFIER_ATTRIBUTE+]
18
+ #
19
+ # @example
20
+ # doc = Layout::Document.open("C:/path/to/document.layout")
21
+ # definitions = doc.auto_text_definitions
22
+ # definitions.each { |auto_text|
23
+ # definitions.remove(auto_text) unless auto_text.mandatory?
24
+ # }
25
+ #
26
+ # @version LayOut 2018
27
+ class Layout::AutoTextDefinition
28
+
29
+ # Constants
30
+
31
+ NUMBER_STYLE_ARABIC = nil # Stub value.
32
+ NUMBER_STYLE_ARABIC_PADDED = nil # Stub value.
33
+ NUMBER_STYLE_LC_ALPHA = nil # Stub value.
34
+ NUMBER_STYLE_LC_ROMAN = nil # Stub value.
35
+ NUMBER_STYLE_UC_ALPHA = nil # Stub value.
36
+ NUMBER_STYLE_UC_ROMAN = nil # Stub value.
37
+
38
+ TYPE_CUSTOM_TEXT = nil # Stub value.
39
+ TYPE_DATE_CREATED = nil # Stub value.
40
+ TYPE_DATE_CURRENT = nil # Stub value.
41
+ TYPE_DATE_MODIFIED = nil # Stub value.
42
+ TYPE_DATE_PUBLISHED = nil # Stub value.
43
+ TYPE_FILE = nil # Stub value.
44
+ TYPE_MODEL_CLASSIFIER_ATTRIBUTE = nil # Stub value.
45
+ TYPE_MODEL_COMPONENT_DEFINITION_ATTRIBUTE = nil # Stub value.
46
+ TYPE_MODEL_COMPONENT_DEFINITION_NAME = nil # Stub value.
47
+ TYPE_MODEL_COMPONENT_DESCRIPTION = nil # Stub value.
48
+ TYPE_MODEL_COMPONENT_INSTANCE_ATTRIBUTE = nil # Stub value.
49
+ TYPE_MODEL_COMPONENT_INSTANCE_NAME = nil # Stub value.
50
+ TYPE_MODEL_COORDINATES = nil # Stub value.
51
+ TYPE_MODEL_DYNAMIC_COMPONENT_ATTRIBUTE = nil # Stub value.
52
+ TYPE_MODEL_EDGE_LENGTH = nil # Stub value.
53
+ TYPE_MODEL_FACE_AREA = nil # Stub value.
54
+ TYPE_MODEL_GROUP_NAME = nil # Stub value.
55
+ TYPE_MODEL_VOLUME = nil # Stub value.
56
+ TYPE_PAGE_NAME = nil # Stub value.
57
+ TYPE_PAGE_NUMBER = nil # Stub value.
58
+
59
+ # Instance Methods
60
+
61
+ # The {#==} method checks to see if the two {Layout::AutoTextDefinition}s are
62
+ # equal. This checks whether the Ruby Objects are pointing to the same internal
63
+ # object.
64
+ #
65
+ # @example
66
+ # doc = Layout::Document.open("C:/path/to/document.layout")
67
+ # definitions = doc.auto_text_definitions
68
+ # definitions.first == defs.last
69
+ #
70
+ # @param [Layout::AutoTextDefinition] other
71
+ #
72
+ # @return [Boolean]
73
+ #
74
+ # @version LayOut 2018
75
+ def ==(other)
76
+ end
77
+
78
+ # The {#custom_text} method returns the custom text of the
79
+ # +Layout::AutoTextDefinition::TYPE_CUSTOM_TEXT+ {Layout::AutoTextDefinition}.
80
+ #
81
+ # @example
82
+ # doc = Layout::Document.open("C:/path/to/document.layout")
83
+ # definitions = doc.auto_text_definitions
84
+ # text = definitions.last.custom_text
85
+ #
86
+ # @raise [ArgumentError] if the {Layout::AutoTextDefinition}'s type is not
87
+ # +Layout::AutoTextDefinition::TYPE_CUSTOM_TEXT+
88
+ #
89
+ # @return [String]
90
+ #
91
+ # @version LayOut 2018
92
+ def custom_text
93
+ end
94
+
95
+ # The {#custom_text} method sets the custom text of the
96
+ # +Layout::AutoTextDefinition::TYPE_CUSTOM_TEXT+ {Layout::AutoTextDefinition}.
97
+ #
98
+ # @example
99
+ # doc = Layout::Document.open("C:/path/to/document.layout")
100
+ # definitions = doc.auto_text_definitions
101
+ # definitions.last.custom_text = "Boop"
102
+ #
103
+ # @param [String] custom_text
104
+ #
105
+ # @raise [ArgumentError] if the {Layout::AutoTextDefinition}'s type is not
106
+ # +Layout::AutoTextDefinition::TYPE_CUSTOM_TEXT+
107
+ #
108
+ # @version LayOut 2018
109
+ def custom_text=(custom_text)
110
+ end
111
+
112
+ # The {#date_format} method returns the date format of a
113
+ # +Layout::AutoTextDefinition::TYPE_DATE_*+ {Layout::AutoTextDefinition}.
114
+ #
115
+ # @example
116
+ # doc = Layout::Document.open("C:/path/to/document.layout")
117
+ # definitions = doc.auto_text_definitions
118
+ # date_format = definitions.last.date_format
119
+ #
120
+ # @raise [ArgumentError] if the {Layout::AutoTextDefinition}'s type is not
121
+ # +Layout::AutoTextDefinition::TYPE_DATE_*+.
122
+ #
123
+ # @return [String]
124
+ #
125
+ # @version LayOut 2018
126
+ def date_format
127
+ end
128
+
129
+ # The {#date_format} method sets the date format of a
130
+ # +Layout::AutoTextDefinition::TYPE_DATE_*+ {Layout::AutoTextDefinition}.
131
+ #
132
+ # @example
133
+ # doc = Layout::Document.open("C:/path/to/document.layout")
134
+ # definitions = doc.auto_text_definitions
135
+ # definitions.last.date_format = "mmddyyyy"
136
+ #
137
+ # @param [String] date_format
138
+ #
139
+ # @raise [ArgumentError] if the {Layout::AutoTextDefinition}'s type is not
140
+ # +Layout::AutoTextDefinition::TYPE_DATE_*+.
141
+ #
142
+ # @version LayOut 2018
143
+ def date_format=(date_format)
144
+ end
145
+
146
+ # The {#display_file_extension=} method sets whether the
147
+ # +Layout::AutoTextDefinition::TYPE_FILE+ {Layout::AutoTextDefinition} displays
148
+ # the file extension.
149
+ #
150
+ # @example
151
+ # doc = Layout::Document.open("C:/path/to/document.layout")
152
+ # definitions = doc.auto_text_definitions
153
+ # definitions.last.display_file_extension = false
154
+ #
155
+ # @param [Boolean] display_file_extension
156
+ #
157
+ # @raise [ArgumentError] if the {Layout::AutoTextDefinition}'s type is not
158
+ # +Layout::AutoTextDefinition::TYPE_FILE+.
159
+ #
160
+ # @version LayOut 2018
161
+ def display_file_extension=(display_file_extension)
162
+ end
163
+
164
+ # The {#display_file_extension?} method returns whether the
165
+ # +Layout::AutoTextDefinition::TYPE_FILE+ {Layout::AutoTextDefinition} displays
166
+ # the file extension.
167
+ #
168
+ # @example
169
+ # doc = Layout::Document.open("C:/path/to/document.layout")
170
+ # definitions = doc.auto_text_definitions
171
+ # show_file_extension = definitions.last.display_file_extension?
172
+ #
173
+ # @raise [ArgumentError] if the {Layout::AutoTextDefinition}'s type is not
174
+ # +Layout::AutoTextDefinition::TYPE_FILE+.
175
+ #
176
+ # @return [Boolean]
177
+ #
178
+ # @return [Boolean]
179
+ #
180
+ # @version LayOut 2018
181
+ def display_file_extension?
182
+ end
183
+
184
+ # The {#display_full_path=} method sets whether the
185
+ # +Layout::AutoTextDefinition::TYPE_FILE+ {Layout::AutoTextDefinition} displays
186
+ # the full path.
187
+ #
188
+ # @example
189
+ # doc = Layout::Document.open("C:/path/to/document.layout")
190
+ # definitions = doc.auto_text_definitions
191
+ # definitions.last.display_full_path = true
192
+ #
193
+ # @param [Boolean] display_full_path
194
+ #
195
+ # @raise [ArgumentError] if the {Layout::AutoTextDefinition}'s type is not
196
+ # +Layout::AutoTextDefinition::TYPE_FILE+.
197
+ #
198
+ # @version LayOut 2018
199
+ def display_full_path=(display_full_path)
200
+ end
201
+
202
+ # The {#display_full_path?} method returns whether the
203
+ # +Layout::AutoTextDefinition::TYPE_FILE+ {Layout::AutoTextDefinition} displays
204
+ # the full path.
205
+ #
206
+ # @example
207
+ # doc = Layout::Document.open("C:/path/to/document.layout")
208
+ # definitions = doc.auto_text_definitions
209
+ # is_full_path = definitions.last.display_full_path?
210
+ #
211
+ # @raise [ArgumentError] if the {Layout::AutoTextDefinition}'s type is not
212
+ # +Layout::AutoTextDefinition::TYPE_FILE+.
213
+ #
214
+ # @return [Boolean]
215
+ #
216
+ # @return [Boolean]
217
+ #
218
+ # @version LayOut 2018
219
+ def display_full_path?
220
+ end
221
+
222
+ # The {#mandatory?} method returns whether the {Layout::AutoTextDefinition} is
223
+ # mandatory or not.
224
+ #
225
+ # A mandatory {Layout::AutoTextDefinition} is one of the following types:
226
+ # [+Layout::AutoTextDefinition::TYPE_MODEL_GROUP_NAME+]
227
+ # [+Layout::AutoTextDefinition::TYPE_MODEL_COMPONENT_INSTANCE_NAME+]
228
+ # [+Layout::AutoTextDefinition::TYPE_MODEL_COMPONENT_DEFINITION_NAME+]
229
+ # [+Layout::AutoTextDefinition::TYPE_MODEL_COMPONENT_DESCRIPTION+]
230
+ # [+Layout::AutoTextDefinition::TYPE_MODEL_VOLUME+]
231
+ # [+Layout::AutoTextDefinition::TYPE_MODEL_FACE_AREA+]
232
+ # [+Layout::AutoTextDefinition::TYPE_MODEL_EDGE_LENGTH+]
233
+ # [+Layout::AutoTextDefinition::TYPE_MODEL_COORDINATES+]
234
+ # [+Layout::AutoTextDefinition::TYPE_MODEL_DYNAMIC_COMPONENT_ATTRIBUTE+]
235
+ # [+Layout::AutoTextDefinition::TYPE_MODEL_CLASSIFIER_ATTRIBUTE+]
236
+ #
237
+ # @example
238
+ # doc = Layout::Document.open("C:/path/to/document.layout")
239
+ # definitions = doc.auto_text_definitions
240
+ # definitions.each { |auto_text|
241
+ # definitions.remove(auto_text) unless auto_text.mandatory?
242
+ # }
243
+ #
244
+ # @return [Boolean]
245
+ #
246
+ # @return [Boolean]
247
+ #
248
+ # @version LayOut 2018
249
+ def mandatory?
250
+ end
251
+
252
+ # The {#name} method returns the name of the {Layout::AutoTextDefinition}.
253
+ #
254
+ # @example
255
+ # doc = Layout::Document.open("C:/path/to/document.layout")
256
+ # definitions = doc.auto_text_definitions
257
+ # name = definitions.first.name
258
+ #
259
+ # @return [String]
260
+ #
261
+ # @version LayOut 2018
262
+ def name
263
+ end
264
+
265
+ # The {#name=} method sets the name of the {Layout::AutoTextDefinition}.
266
+ #
267
+ # @example
268
+ # doc = Layout::Document.open("C:/path/to/document.layout")
269
+ # definitions = doc.auto_text_definitions
270
+ # definitions.last.name = "New Name"
271
+ #
272
+ # @param [String] name
273
+ #
274
+ # @raise [ArgumentError] if the {Layout::AutoTextDefinition} is a mandatory type
275
+ #
276
+ # @raise [ArgumentError] if name is an empty string
277
+ #
278
+ # @raise [ArgumentError] if name matches an existing
279
+ # {Layout::AutoTextDefinition}
280
+ #
281
+ # @version LayOut 2018
282
+ def name=(name)
283
+ end
284
+
285
+ # The {#page_number_style} method returns the numbering style for the
286
+ # +Layout::AutoTextDefinition::TYPE_PAGE_NUMBER+ {Layout::AutoTextDefinition}.
287
+ #
288
+ # The page numbering style can be one of the following values:
289
+ # [+Layout::AutoTextDefinition::NUMBER_STYLE_ARABIC+]
290
+ # [+Layout::AutoTextDefinition::NUMBER_STYLE_ARABIC_PADDED+]
291
+ # [+Layout::AutoTextDefinition::NUMBER_STYLE_UC_ALPHA+]
292
+ # [+Layout::AutoTextDefinition::NUMBER_STYLE_LC_ALPHA+]
293
+ # [+Layout::AutoTextDefinition::NUMBER_STYLE_UC_ROMAN+]
294
+ # [+Layout::AutoTextDefinition::NUMBER_STYLE_LC_ROMAN+]
295
+ #
296
+ # @example
297
+ # doc = Layout::Document.open("C:/path/to/document.layout")
298
+ # definitions = doc.auto_text_definitions
299
+ # number_style = definitions.last.page_number_style
300
+ #
301
+ # @raise [ArgumentError] if the {Layout::AutoTextDefinition}'s type is not
302
+ # +Layout::AutoTextDefinition::TYPE_PAGE_NUMBER+.
303
+ #
304
+ # @return [Integer]
305
+ #
306
+ # @version LayOut 2018
307
+ def page_number_style
308
+ end
309
+
310
+ # The {#page_number_style=} method sets the numbering style for the
311
+ # +Layout::AutoTextDefinition::TYPE_PAGE_NUMBER+ {Layout::AutoTextDefinition}.
312
+ #
313
+ # The page numbering style can be one of the following values:
314
+ # [+Layout::AutoTextDefinition::NUMBER_STYLE_ARABIC+]
315
+ # [+Layout::AutoTextDefinition::NUMBER_STYLE_ARABIC_PADDED+]
316
+ # [+Layout::AutoTextDefinition::NUMBER_STYLE_UC_ALPHA+]
317
+ # [+Layout::AutoTextDefinition::NUMBER_STYLE_LC_ALPHA+]
318
+ # [+Layout::AutoTextDefinition::NUMBER_STYLE_UC_ROMAN+]
319
+ # [+Layout::AutoTextDefinition::NUMBER_STYLE_LC_ROMAN+]
320
+ #
321
+ # @example
322
+ # doc = Layout::Document.open("C:/path/to/document.layout")
323
+ # definitions = doc.auto_text_definitions
324
+ # definitions.last.page_number_style = Layout::AutoTextDefinition::NUMBER_STYLE_UC_ROMAN
325
+ #
326
+ # @param [Integer] number_style
327
+ #
328
+ # @raise [ArgumentError] if number_style is not a valid page numbering style
329
+ #
330
+ # @raise [ArgumentError] if the {Layout::AutoTextDefinition}'s type is not
331
+ # +Layout::AutoTextDefinition::TYPE_PAGE_NUMBER+.
332
+ #
333
+ # @version LayOut 2018
334
+ def page_number_style=(number_style)
335
+ end
336
+
337
+ # The {#start_index} method returns the start index for the
338
+ # +Layout::AutoTextDefinition::TYPE_PAGE_NUMBER+ {Layout::AutoTextDefinition}.
339
+ #
340
+ # @example
341
+ # doc = Layout::Document.open("C:/path/to/document.layout")
342
+ # definitions = doc.auto_text_definitions
343
+ # start_index = definitions.first.start_index
344
+ #
345
+ # @raise [ArgumentError] if the {Layout::AutoTextDefinition}'s type is not
346
+ # +Layout::AutoTextDefinition::TYPE_PAGE_NUMBER+.
347
+ #
348
+ # @return [Integer]
349
+ #
350
+ # @version LayOut 2018
351
+ def start_index
352
+ end
353
+
354
+ # The {#start_index} method returns the start index for the
355
+ # +Layout::AutoTextDefinition::TYPE_PAGE_NUMBER+ {Layout::AutoTextDefinition}.
356
+ #
357
+ # @example
358
+ # doc = Layout::Document.open("C:/path/to/document.layout")
359
+ # definitions = doc.auto_text_definitions
360
+ # definitions.first.start_index = 3
361
+ #
362
+ # @param [Integer] index
363
+ #
364
+ # @raise [ArgumentError] if the {Layout::AutoTextDefinition}'s type is not
365
+ # +Layout::AutoTextDefinition::TYPE_PAGE_NUMBER+.
366
+ #
367
+ # @version LayOut 2018
368
+ def start_index=(index)
369
+ end
370
+
371
+ # The {#tag} method returns the tag string of the {Layout::AutoTextDefinition}.
372
+ #
373
+ # @example
374
+ # doc = Layout::Document.open("C:/path/to/document.layout")
375
+ # definitions = doc.auto_text_definitions
376
+ # tag = definitions.first.tag
377
+ #
378
+ # @return [String]
379
+ #
380
+ # @version LayOut 2018
381
+ def tag
382
+ end
383
+
384
+ # The {#type} method returns the type of the {Layout::AutoTextDefinition}.
385
+ #
386
+ # The type can be one of the following values:
387
+ # [+Layout::AutoTextDefinition::TYPE_FILE+]
388
+ # [+Layout::AutoTextDefinition::TYPE_PAGE_NAME+]
389
+ # [+Layout::AutoTextDefinition::TYPE_PAGE_NUMBER+]
390
+ # [+Layout::AutoTextDefinition::TYPE_CUSTOM_TEXT+]
391
+ # [+Layout::AutoTextDefinition::TYPE_DATE_CURRENT+]
392
+ # [+Layout::AutoTextDefinition::TYPE_DATE_CREATED+]
393
+ # [+Layout::AutoTextDefinition::TYPE_DATE_MODIFIED+]
394
+ # [+Layout::AutoTextDefinition::TYPE_DATE_PUBLISHED+]
395
+ # [+Layout::AutoTextDefinition::TYPE_MODEL_GROUP_NAME+]
396
+ # [+Layout::AutoTextDefinition::TYPE_MODEL_COMPONENT_INSTANCE_NAME+]
397
+ # [+Layout::AutoTextDefinition::TYPE_MODEL_COMPONENT_DEFINITION_NAME+]
398
+ # [+Layout::AutoTextDefinition::TYPE_MODEL_COMPONENT_DESCRIPTION+]
399
+ # [+Layout::AutoTextDefinition::TYPE_MODEL_VOLUME+]
400
+ # [+Layout::AutoTextDefinition::TYPE_MODEL_FACE_AREA+]
401
+ # [+Layout::AutoTextDefinition::TYPE_MODEL_EDGE_LENGTH+]
402
+ # [+Layout::AutoTextDefinition::TYPE_MODEL_COORDINATES+]
403
+ # [+Layout::AutoTextDefinition::TYPE_MODEL_DYNAMIC_COMPONENT_ATTRIBUTE+]
404
+ # [+Layout::AutoTextDefinition::TYPE_MODEL_CLASSIFIER_ATTRIBUTE+]
405
+ #
406
+ # @example
407
+ # doc = Layout::Document.open("C:/path/to/document.layout")
408
+ # definitions = doc.auto_text_definitions
409
+ # type = definitions.first.type
410
+ #
411
+ # @return [Integer]
412
+ #
413
+ # @version LayOut 2018
414
+ def type
415
+ end
416
+
417
+ end
@@ -0,0 +1,186 @@
1
+ # Copyright:: Copyright 2017 Trimble Inc.
2
+ # License:: The MIT License (MIT)
3
+
4
+ # The AutoTextDefinitions class is a container class for all
5
+ # {Layout::AutoTextDefinition}s in a {Layout::Document}.
6
+ #
7
+ # @example
8
+ # # Grab a handle to an existing LayOut document's auto text definitions.
9
+ # doc = Layout::Document.open("C:/path/to/document.layout")
10
+ # auto_texts = doc.auto_text_definitions
11
+ #
12
+ # # From here, we can add auto text definitions to or remove them from the
13
+ # # document.
14
+ # auto_texts.add("PageNum", Layout::AutoTextDefinition::TYPE_PAGE_NUM)
15
+ # auto_texts.remove("PageNum")
16
+ #
17
+ # @version LayOut 2018
18
+ class Layout::AutoTextDefinitions
19
+
20
+ # Includes
21
+
22
+ include Enumerable
23
+
24
+ # Instance Methods
25
+
26
+ # The {#[]} method returns a value from the array of
27
+ # {Layout::AutoTextDefinition}s.
28
+ #
29
+ # @example
30
+ # doc = Layout::Document.open("C:/path/to/document.layout")
31
+ # auto_texts = doc.auto_text_definitions
32
+ # auto_text = auto_texts[2]
33
+ #
34
+ # @overload [](index)
35
+ #
36
+ # @param [Integer] index The index of the {Layout::AutoTextDefinition} to
37
+ # return
38
+ # @return [Layout::AutoTextDefinition]
39
+ #
40
+ # @overload [](name)
41
+ #
42
+ # @param [String] name The name of the {Layout::AutoTextDefinition} to
43
+ # return
44
+ # @return [Layout::AutoTextDefinition]
45
+ #
46
+ # @raise [IndexError] if index is out of range
47
+ #
48
+ # @version LayOut 2018
49
+ def [](index)
50
+ end
51
+
52
+ # The {#add} method adds an {Layout::AutoTextDefinition} to the
53
+ # {Layout::Document}.
54
+ #
55
+ # The type can be one of the following values:
56
+ # [+Layout::AutoTextDefinition::TYPE_FILE+]
57
+ # [+Layout::AutoTextDefinition::TYPE_PAGE_NAME+]
58
+ # [+Layout::AutoTextDefinition::TYPE_PAGE_NUMBER+]
59
+ # [+Layout::AutoTextDefinition::TYPE_CUSTOM_TEXT+]
60
+ # [+Layout::AutoTextDefinition::TYPE_DATE_CURRENT+]
61
+ # [+Layout::AutoTextDefinition::TYPE_DATE_CREATED+]
62
+ # [+Layout::AutoTextDefinition::TYPE_DATE_MODIFIED+]
63
+ # [+Layout::AutoTextDefinition::TYPE_DATE_PUBLISHED+]
64
+ #
65
+ # @example
66
+ # doc = Layout::Document.open("C:/path/to/document.layout")
67
+ # doc.auto_text_definitions.add("current date",
68
+ # Layout::AutoTextDefinition::TYPE_DATE_CURRENT);
69
+ #
70
+ # @param [String] name
71
+ #
72
+ # @param [Integer] type
73
+ #
74
+ # @raise [ArgumentError] if type is not a valid auto text type, or is mandatory.
75
+ #
76
+ # @return [Layout::AutoTextDefinition]
77
+ #
78
+ # @version LayOut 2018
79
+ def add(name, type)
80
+ end
81
+
82
+ # The {#each} method iterates through all of the {Layout::AutoTextDefinition}s.
83
+ #
84
+ # @example
85
+ # doc = Layout::Document.open("C:/path/to/document.layout")
86
+ # auto_texts = doc.auto_text_definitions
87
+ # auto_texts.each { |auto_text|
88
+ # puts auto_text.name
89
+ # }
90
+ #
91
+ # @version LayOut 2018
92
+ #
93
+ # @yieldparam [Layout::AutoTextDefinition] auto_text
94
+ def each
95
+ end
96
+
97
+ # The {#index} method returns the index of the {Layout::AutoTextDefinition},
98
+ # or +nil+ if it doesn't exist in the {Layout::Document}.
99
+ #
100
+ # @example
101
+ # doc = Layout::Document.open("C:/path/to/document.layout")
102
+ # auto_texts = doc.auto_text_definitions
103
+ # index = auto_texts.index(definitions.first) # Returns 0
104
+ #
105
+ # @overload index(auto_text)
106
+ #
107
+ # @param [Layout::AutoTextDefinition] auto_text
108
+ # @return [Integer, nil]
109
+ #
110
+ # @overload index(name)
111
+ #
112
+ # @param [String] name The name of the {Layout::AutoTextDefinition} to get
113
+ # the index of
114
+ # @return [Integer, nil]
115
+ #
116
+ # @version LayOut 2018
117
+ def index(auto_text)
118
+ end
119
+
120
+ # The {#length} method returns the number of {Layout::AutoTextDefinition}s.
121
+ #
122
+ # @example
123
+ # doc = Layout::Document.open("C:/path/to/document.layout")
124
+ # auto_texts = doc.auto_text_definitions
125
+ # num_auto_texts = auto_texts.length
126
+ #
127
+ # @return [Integer]
128
+ #
129
+ # @version LayOut 2018
130
+ def length
131
+ end
132
+
133
+ # The {#remove} method removes an {Layout::AutoTextDefinition} from the
134
+ # {Layout::Document}.
135
+ #
136
+ # The {Layout::AutoTextDefinition} must be one of the following types:
137
+ # [+Layout::AutoTextDefinition::TYPE_FILE+]
138
+ # [+Layout::AutoTextDefinition::TYPE_PAGE_NAME+]
139
+ # [+Layout::AutoTextDefinition::TYPE_PAGE_NUMBER+]
140
+ # [+Layout::AutoTextDefinition::TYPE_CUSTOM_TEXT+]
141
+ # [+Layout::AutoTextDefinition::TYPE_DATE_CURRENT+]
142
+ # [+Layout::AutoTextDefinition::TYPE_DATE_CREATED+]
143
+ # [+Layout::AutoTextDefinition::TYPE_DATE_MODIFIED+]
144
+ # [+Layout::AutoTextDefinition::TYPE_DATE_PUBLISHED+]
145
+ #
146
+ # @example
147
+ # doc = Layout::Document.open("C:/path/to/document.layout")
148
+ # auto_texts = doc.auto_text_definitions
149
+ # auto_texts.remove(auto_texts[10], true)
150
+ #
151
+ # @overload remove(definition, convert_tags_to_text = true)
152
+ #
153
+ # @param [Layout::AutoTextDefinition] definition
154
+ # @param [Boolean] convert_tags_to_text
155
+ #
156
+ # @overload remove(name, convert_tags_to_text = true)
157
+ #
158
+ # @param [String] name The name of the {Layout::AutoTextDefinition} to remove
159
+ # @param [Boolean] convert_tags_to_text
160
+ #
161
+ # @overload remove(index, convert_tags_to_text = true)
162
+ #
163
+ # @param [Integer] index The index of the {Layout::AutoTextDefinition} to
164
+ # remove
165
+ # @param [Boolean] convert_tags_to_text
166
+ #
167
+ # @raise [ArgumentError] if the definition that is being removed is mandatory
168
+ #
169
+ # @version LayOut 2018
170
+ def remove(*args)
171
+ end
172
+
173
+ # The {#length} method returns the number of {Layout::AutoTextDefinition}s.
174
+ #
175
+ # @example
176
+ # doc = Layout::Document.open("C:/path/to/document.layout")
177
+ # auto_texts = doc.auto_text_definitions
178
+ # num_auto_texts = auto_texts.length
179
+ #
180
+ # @return [Integer]
181
+ #
182
+ # @version LayOut 2018
183
+ def size
184
+ end
185
+
186
+ end