sketchup-api-stubs 0.7.7 → 0.7.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/sketchup-api-stubs/sketchup.rb +2 -1
- data/lib/sketchup-api-stubs/stubs/{array.rb → Array.rb} +1 -1
- data/lib/sketchup-api-stubs/stubs/Geom/BoundingBox.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Geom/Bounds2d.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Geom/LatLong.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Geom/OrientedBounds2d.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Geom/Point2d.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Geom/Point3d.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Geom/PolygonMesh.rb +18 -4
- data/lib/sketchup-api-stubs/stubs/Geom/Transformation.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Geom/Transformation2d.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Geom/UTM.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Geom/Vector2d.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Geom/Vector3d.rb +16 -14
- data/lib/sketchup-api-stubs/stubs/{geom.rb → Geom.rb} +1 -1
- data/lib/sketchup-api-stubs/stubs/{languagehandler.rb → LanguageHandler.rb} +5 -4
- data/lib/sketchup-api-stubs/stubs/Layout/AngularDimension.rb +76 -54
- data/lib/sketchup-api-stubs/stubs/Layout/AutoTextDefinition.rb +311 -24
- data/lib/sketchup-api-stubs/stubs/Layout/AutoTextDefinitions.rb +8 -4
- data/lib/sketchup-api-stubs/stubs/Layout/ConnectionPoint.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/Document.rb +2 -1
- data/lib/sketchup-api-stubs/stubs/Layout/Ellipse.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/Entities.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/Entity.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/FormattedText.rb +16 -11
- data/lib/sketchup-api-stubs/stubs/Layout/Grid.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/Group.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/Image.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/Label.rb +2 -2
- data/lib/sketchup-api-stubs/stubs/Layout/Layer.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/LayerInstance.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/Layers.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/LinearDimension.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/LockedEntityError.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/LockedLayerError.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/Page.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/PageInfo.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/Pages.rb +2 -2
- data/lib/sketchup-api-stubs/stubs/Layout/Path.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/Rectangle.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/SketchUpModel.rb +9 -11
- data/lib/sketchup-api-stubs/stubs/Layout/Style.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/Table.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/TableCell.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/TableColumn.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/TableRow.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/{length.rb → Length.rb} +1 -1
- data/lib/sketchup-api-stubs/stubs/{numeric.rb → Numeric.rb} +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Animation.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/AppObserver.rb +13 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/ArcCurve.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/AttributeDictionaries.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/AttributeDictionary.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Axes.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Behavior.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Camera.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/ClassificationSchema.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Classifications.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Color.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/ComponentDefinition.rb +50 -8
- data/lib/sketchup-api-stubs/stubs/Sketchup/ComponentInstance.rb +7 -8
- data/lib/sketchup-api-stubs/stubs/Sketchup/Console.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/ConstructionLine.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/ConstructionPoint.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Curve.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/DefinitionList.rb +7 -6
- data/lib/sketchup-api-stubs/stubs/Sketchup/DefinitionObserver.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/DefinitionsObserver.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Dimension.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/DimensionLinear.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/DimensionObserver.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/DimensionRadial.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Drawingelement.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Edge.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/EdgeUse.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Entities.rb +120 -41
- data/lib/sketchup-api-stubs/stubs/Sketchup/EntitiesBuilder.rb +272 -0
- data/lib/sketchup-api-stubs/stubs/Sketchup/EntitiesObserver.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Entity.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/EntityObserver.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/ExtensionsManager.rb +2 -2
- data/lib/sketchup-api-stubs/stubs/Sketchup/Face.rb +27 -7
- data/lib/sketchup-api-stubs/stubs/Sketchup/FrameChangeObserver.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Group.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Http/Request.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Http/Response.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Http.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Image.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/ImageRep.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Importer.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/InputPoint.rb +4 -2
- data/lib/sketchup-api-stubs/stubs/Sketchup/InstanceObserver.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/InstancePath.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Layer.rb +7 -8
- data/lib/sketchup-api-stubs/stubs/Sketchup/LayerFolder.rb +8 -8
- data/lib/sketchup-api-stubs/stubs/Sketchup/Layers.rb +2 -2
- data/lib/sketchup-api-stubs/stubs/Sketchup/LayersObserver.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Licensing/ExtensionLicense.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Licensing.rb +3 -3
- data/lib/sketchup-api-stubs/stubs/Sketchup/LineStyle.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/LineStyles.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Loop.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Material.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Materials.rb +2 -2
- data/lib/sketchup-api-stubs/stubs/Sketchup/MaterialsObserver.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Menu.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Model.rb +68 -71
- data/lib/sketchup-api-stubs/stubs/Sketchup/ModelObserver.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/OptionsManager.rb +2 -2
- data/lib/sketchup-api-stubs/stubs/Sketchup/OptionsProvider.rb +2 -2
- data/lib/sketchup-api-stubs/stubs/Sketchup/OptionsProviderObserver.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Page.rb +7 -7
- data/lib/sketchup-api-stubs/stubs/Sketchup/Pages.rb +2 -2
- data/lib/sketchup-api-stubs/stubs/Sketchup/PagesObserver.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/PickHelper.rb +4 -5
- data/lib/sketchup-api-stubs/stubs/Sketchup/RegionalSettings.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/RenderingOptions.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/RenderingOptionsObserver.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/SectionPlane.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Selection.rb +2 -2
- data/lib/sketchup-api-stubs/stubs/Sketchup/SelectionObserver.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Set.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/ShadowInfo.rb +7 -4
- data/lib/sketchup-api-stubs/stubs/Sketchup/ShadowInfoObserver.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Skp.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Style.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Styles.rb +2 -2
- data/lib/sketchup-api-stubs/stubs/Sketchup/Text.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Texture.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/TextureWriter.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Tool.rb +5 -3
- data/lib/sketchup-api-stubs/stubs/Sketchup/Tools.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/ToolsObserver.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/UVHelper.rb +9 -5
- data/lib/sketchup-api-stubs/stubs/Sketchup/Vertex.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/View.rb +14 -4
- data/lib/sketchup-api-stubs/stubs/Sketchup/ViewObserver.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/{sketchup.rb → Sketchup.rb} +10 -3
- data/lib/sketchup-api-stubs/stubs/{sketchupextension.rb → SketchupExtension.rb} +1 -1
- data/lib/sketchup-api-stubs/stubs/{string.rb → String.rb} +1 -1
- data/lib/sketchup-api-stubs/stubs/UI/Command.rb +79 -7
- data/lib/sketchup-api-stubs/stubs/UI/HtmlDialog.rb +26 -8
- data/lib/sketchup-api-stubs/stubs/UI/Notification.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/UI/Toolbar.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/UI/WebDialog.rb +18 -16
- data/lib/sketchup-api-stubs/stubs/{ui.rb → UI.rb} +25 -14
- data/lib/sketchup-api-stubs/stubs/_top_level.rb +1 -1
- metadata +12 -11
@@ -1,8 +1,8 @@
|
|
1
|
-
# Copyright:: Copyright
|
1
|
+
# Copyright:: Copyright 2022 Trimble Inc.
|
2
2
|
# License:: The MIT License (MIT)
|
3
3
|
|
4
|
-
# References an auto
|
5
|
-
# Mandatory auto
|
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
6
|
#
|
7
7
|
# A mandatory {Layout::AutoTextDefinition} is one of the following types:
|
8
8
|
# [+Layout::AutoTextDefinition::TYPE_MODEL_GROUP_NAME+]
|
@@ -15,6 +15,11 @@
|
|
15
15
|
# [+Layout::AutoTextDefinition::TYPE_MODEL_COORDINATES+]
|
16
16
|
# [+Layout::AutoTextDefinition::TYPE_MODEL_DYNAMIC_COMPONENT_ATTRIBUTE+]
|
17
17
|
# [+Layout::AutoTextDefinition::TYPE_MODEL_CLASSIFIER_ATTRIBUTE+]
|
18
|
+
# [+Layout::AutoTextDefinition::TYPE_MODEL_SCENE_NAME+]
|
19
|
+
# [+Layout::AutoTextDefinition::TYPE_MODEL_SCENE_DESCRIPTION+]
|
20
|
+
# [+Layout::AutoTextDefinition::TYPE_MODEL_SCALE+]
|
21
|
+
# [+Layout::AutoTextDefinition::TYPE_MODEL_SECTION_NAME+]
|
22
|
+
# [+Layout::AutoTextDefinition::TYPE_MODEL_SECTION_SYMBOL+]
|
18
23
|
#
|
19
24
|
# @example
|
20
25
|
# doc = Layout::Document.open("C:/path/to/document.layout")
|
@@ -52,9 +57,17 @@ class Layout::AutoTextDefinition
|
|
52
57
|
TYPE_MODEL_EDGE_LENGTH = nil # Stub value.
|
53
58
|
TYPE_MODEL_FACE_AREA = nil # Stub value.
|
54
59
|
TYPE_MODEL_GROUP_NAME = nil # Stub value.
|
60
|
+
TYPE_MODEL_RATIO = nil # Stub value.
|
61
|
+
TYPE_MODEL_SCALE = nil # Stub value.
|
62
|
+
TYPE_MODEL_SCENE_DESCRIPTION = nil # Stub value.
|
63
|
+
TYPE_MODEL_SCENE_NAME = nil # Stub value.
|
64
|
+
TYPE_MODEL_SECTION_NAME = nil # Stub value.
|
65
|
+
TYPE_MODEL_SECTION_SYMBOL = nil # Stub value.
|
55
66
|
TYPE_MODEL_VOLUME = nil # Stub value.
|
67
|
+
TYPE_PAGE_COUNT = nil # Stub value.
|
56
68
|
TYPE_PAGE_NAME = nil # Stub value.
|
57
69
|
TYPE_PAGE_NUMBER = nil # Stub value.
|
70
|
+
TYPE_SEQUENCE = nil # Stub value.
|
58
71
|
|
59
72
|
# Instance Methods
|
60
73
|
|
@@ -105,6 +118,8 @@ class Layout::AutoTextDefinition
|
|
105
118
|
# @raise [ArgumentError] if the {Layout::AutoTextDefinition}'s type is not
|
106
119
|
# +Layout::AutoTextDefinition::TYPE_CUSTOM_TEXT+
|
107
120
|
#
|
121
|
+
# @raise [TypeError] if +custom_text+ is not a String or convertable to a String.
|
122
|
+
#
|
108
123
|
# @version LayOut 2018
|
109
124
|
def custom_text=(custom_text)
|
110
125
|
end
|
@@ -139,6 +154,8 @@ class Layout::AutoTextDefinition
|
|
139
154
|
# @raise [ArgumentError] if the {Layout::AutoTextDefinition}'s type is not
|
140
155
|
# +Layout::AutoTextDefinition::TYPE_DATE_*+.
|
141
156
|
#
|
157
|
+
# @raise [TypeError] if date_format is not a String or convertable to a String.
|
158
|
+
#
|
142
159
|
# @version LayOut 2018
|
143
160
|
def date_format=(date_format)
|
144
161
|
end
|
@@ -215,6 +232,82 @@ class Layout::AutoTextDefinition
|
|
215
232
|
def display_full_path?
|
216
233
|
end
|
217
234
|
|
235
|
+
# The {#end_page} method returns the end page for the
|
236
|
+
# +Layout::AutoTextDefinition::TYPE_PAGE_COUNT+ {Layout::AutoTextDefinition}.
|
237
|
+
#
|
238
|
+
# @example
|
239
|
+
# doc = Layout::Document.open("C:/path/to/document.layout")
|
240
|
+
# page_count_def =
|
241
|
+
# doc.auto_text_definitions.add("PageCount", Layout::AutoTextDefinition::TYPE_PAGE_COUNT)
|
242
|
+
# # Default end_page value is nil, meaning count to the end of the document
|
243
|
+
# page = page_count_def.end_page
|
244
|
+
#
|
245
|
+
# @raise [ArgumentError] if the {Layout::AutoTextDefinition}'s type is not
|
246
|
+
# +Layout::AutoTextDefinition::TYPE_PAGE_COUNT+.
|
247
|
+
#
|
248
|
+
# @return [Layout::Page, nil]
|
249
|
+
#
|
250
|
+
# @version LayOut 2022.0
|
251
|
+
def end_page
|
252
|
+
end
|
253
|
+
|
254
|
+
# The {#end_page=} method sets the end page for the
|
255
|
+
# +Layout::AutoTextDefinition::TYPE_PAGE_COUNT+ {Layout::AutoTextDefinition}.
|
256
|
+
#
|
257
|
+
# @example
|
258
|
+
# doc = Layout::Document.open("C:/path/to/document.layout")
|
259
|
+
# definitions = doc.auto_text_definitions
|
260
|
+
# page_count_def =
|
261
|
+
# doc.auto_text_definitions.add("PageCount", Layout::AutoTextDefinition::TYPE_PAGE_COUNT)
|
262
|
+
# # Stop the PageCount auto-text at this newly created page instead of at the end of the document
|
263
|
+
# page_count_def.end_page = doc.pages.add("new page")
|
264
|
+
#
|
265
|
+
# @param [Layout::Page, nil] page
|
266
|
+
#
|
267
|
+
# @raise [ArgumentError] if the {Layout::AutoTextDefinition}'s type is not
|
268
|
+
# +Layout::AutoTextDefinition::TYPE_PAGE_COUNT+.
|
269
|
+
#
|
270
|
+
# @version LayOut 2022.0
|
271
|
+
def end_page=(page)
|
272
|
+
end
|
273
|
+
|
274
|
+
# The {#increment} method returns the increment value for
|
275
|
+
# +Layout::AutoTextDefinition::TYPE_SEQUENCE+ {Layout::AutoTextDefinition}s.
|
276
|
+
#
|
277
|
+
# @example
|
278
|
+
# doc = Layout::Document.open("C:/path/to/document.layout")
|
279
|
+
# sequence_def =
|
280
|
+
# doc.auto_text_definitions.add("Seq1", Layout::AutoTextDefinition::TYPE_SEQUENCE)
|
281
|
+
# # Default sequence increment value is 1
|
282
|
+
# increment = sequence_def.increment
|
283
|
+
#
|
284
|
+
# @raise [ArgumentError] if the {Layout::AutoTextDefinition}'s type is not
|
285
|
+
# +Layout::AutoTextDefinition::TYPE_SEQUENCE+.
|
286
|
+
#
|
287
|
+
# @return [Integer]
|
288
|
+
#
|
289
|
+
# @version LayOut 2022.0
|
290
|
+
def increment
|
291
|
+
end
|
292
|
+
|
293
|
+
# The {#increment=} method sets the increment value for
|
294
|
+
# +Layout::AutoTextDefinition::TYPE_SEQUENCE+ {Layout::AutoTextDefinition}s.
|
295
|
+
#
|
296
|
+
# @example
|
297
|
+
# doc = Layout::Document.open("C:/path/to/document.layout")
|
298
|
+
# sequence_def =
|
299
|
+
# doc.auto_text_definitions.add("Seq1", Layout::AutoTextDefinition::TYPE_SEQUENCE)
|
300
|
+
# sequence_def.increment = 10
|
301
|
+
#
|
302
|
+
# @param [Integer] increment
|
303
|
+
#
|
304
|
+
# @raise [ArgumentError] if the {Layout::AutoTextDefinition}'s type is not
|
305
|
+
# +Layout::AutoTextDefinition::TYPE_SEQUENCE+.
|
306
|
+
#
|
307
|
+
# @version LayOut 2022.0
|
308
|
+
def increment=(increment)
|
309
|
+
end
|
310
|
+
|
218
311
|
# The {#mandatory?} method returns whether the {Layout::AutoTextDefinition} is
|
219
312
|
# mandatory or not.
|
220
313
|
#
|
@@ -229,6 +322,11 @@ class Layout::AutoTextDefinition
|
|
229
322
|
# [+Layout::AutoTextDefinition::TYPE_MODEL_COORDINATES+]
|
230
323
|
# [+Layout::AutoTextDefinition::TYPE_MODEL_DYNAMIC_COMPONENT_ATTRIBUTE+]
|
231
324
|
# [+Layout::AutoTextDefinition::TYPE_MODEL_CLASSIFIER_ATTRIBUTE+]
|
325
|
+
# [+Layout::AutoTextDefinition::TYPE_MODEL_SCENE_NAME+]
|
326
|
+
# [+Layout::AutoTextDefinition::TYPE_MODEL_SCENE_DESCRIPTION+]
|
327
|
+
# [+Layout::AutoTextDefinition::TYPE_MODEL_SCALE+]
|
328
|
+
# [+Layout::AutoTextDefinition::TYPE_MODEL_SECTION_NAME+]
|
329
|
+
# [+Layout::AutoTextDefinition::TYPE_MODEL_SECTION_SYMBOL+]
|
232
330
|
#
|
233
331
|
# @example
|
234
332
|
# doc = Layout::Document.open("C:/path/to/document.layout")
|
@@ -272,14 +370,18 @@ class Layout::AutoTextDefinition
|
|
272
370
|
#
|
273
371
|
# @raise [ArgumentError] if name is an empty string
|
274
372
|
#
|
373
|
+
# @raise [TypeError] if name is not a String or convertable to a String.
|
374
|
+
#
|
275
375
|
# @version LayOut 2018
|
276
376
|
def name=(name)
|
277
377
|
end
|
278
378
|
|
279
|
-
# The {#
|
280
|
-
# +Layout::AutoTextDefinition::TYPE_PAGE_NUMBER
|
379
|
+
# The {#number_style} method returns the numbering style for
|
380
|
+
# +Layout::AutoTextDefinition::TYPE_PAGE_NUMBER+,
|
381
|
+
# +Layout::AutoTextDefinition::TYPE_PAGE_COUNT+, and
|
382
|
+
# +Layout::AutoTextDefinition::TYPE_SEQUENCE+ {Layout::AutoTextDefinition}s.
|
281
383
|
#
|
282
|
-
# The
|
384
|
+
# The numbering style can be one of the following values:
|
283
385
|
# [+Layout::AutoTextDefinition::NUMBER_STYLE_ARABIC+]
|
284
386
|
# [+Layout::AutoTextDefinition::NUMBER_STYLE_ARABIC_PADDED+]
|
285
387
|
# [+Layout::AutoTextDefinition::NUMBER_STYLE_UC_ALPHA+]
|
@@ -289,8 +391,70 @@ class Layout::AutoTextDefinition
|
|
289
391
|
#
|
290
392
|
# @example
|
291
393
|
# doc = Layout::Document.open("C:/path/to/document.layout")
|
292
|
-
#
|
293
|
-
# number_style =
|
394
|
+
# sequence_def = doc.auto_text_definitions.add("Seq1", Layout::AutoTextDefinition::TYPE_SEQUENCE)
|
395
|
+
# number_style = sequence_def.number_style
|
396
|
+
#
|
397
|
+
# @raise [ArgumentError] if the {Layout::AutoTextDefinition}'s type is not
|
398
|
+
# +Layout::AutoTextDefinition::TYPE_PAGE_NUMBER+,
|
399
|
+
# +Layout::AutoTextDefinition::TYPE_PAGE_COUNT+, or
|
400
|
+
# +Layout::AutoTextDefinition::TYPE_SEQUENCE+.
|
401
|
+
#
|
402
|
+
# @return [Integer]
|
403
|
+
#
|
404
|
+
# @version LayOut 2022.0
|
405
|
+
def number_style
|
406
|
+
end
|
407
|
+
|
408
|
+
# The {#number_style=} method sets the numbering style for
|
409
|
+
# +Layout::AutoTextDefinition::TYPE_PAGE_NUMBER+,
|
410
|
+
# +Layout::AutoTextDefinition::TYPE_PAGE_COUNT+, and
|
411
|
+
# +Layout::AutoTextDefinition::TYPE_SEQUENCE+ {Layout::AutoTextDefinition}s.
|
412
|
+
#
|
413
|
+
# The numbering style can be one of the following values:
|
414
|
+
# [+Layout::AutoTextDefinition::NUMBER_STYLE_ARABIC+]
|
415
|
+
# [+Layout::AutoTextDefinition::NUMBER_STYLE_ARABIC_PADDED+]
|
416
|
+
# [+Layout::AutoTextDefinition::NUMBER_STYLE_UC_ALPHA+]
|
417
|
+
# [+Layout::AutoTextDefinition::NUMBER_STYLE_LC_ALPHA+]
|
418
|
+
# [+Layout::AutoTextDefinition::NUMBER_STYLE_UC_ROMAN+]
|
419
|
+
# [+Layout::AutoTextDefinition::NUMBER_STYLE_LC_ROMAN+]
|
420
|
+
#
|
421
|
+
# @example
|
422
|
+
# doc = Layout::Document.open("C:/path/to/document.layout")
|
423
|
+
# sequence_def = doc.auto_text_definitions.add("Seq1", Layout::AutoTextDefinition::TYPE_SEQUENCE)
|
424
|
+
# sequence_def.number_style = Layout::AutoTextDefinition::NUMBER_STYLE_UC_ROMAN
|
425
|
+
#
|
426
|
+
# @param [Integer] number_style
|
427
|
+
#
|
428
|
+
# @raise [ArgumentError] if the {Layout::AutoTextDefinition}'s type is not
|
429
|
+
# +Layout::AutoTextDefinition::TYPE_PAGE_NUMBER+,
|
430
|
+
# +Layout::AutoTextDefinition::TYPE_PAGE_COUNT+, or
|
431
|
+
# +Layout::AutoTextDefinition::TYPE_SEQUENCE+.
|
432
|
+
#
|
433
|
+
# @raise [ArgumentError] if number_style is not a valid page numbering style
|
434
|
+
#
|
435
|
+
# @version LayOut 2022.0
|
436
|
+
def number_style=(number_style)
|
437
|
+
end
|
438
|
+
|
439
|
+
# The {#page_number_style} method returns the numbering style for
|
440
|
+
# +Layout::AutoTextDefinition::TYPE_PAGE_NUMBER+ {Layout::AutoTextDefinition}s.
|
441
|
+
#
|
442
|
+
# The numbering style can be one of the following values:
|
443
|
+
# [+Layout::AutoTextDefinition::NUMBER_STYLE_ARABIC+]
|
444
|
+
# [+Layout::AutoTextDefinition::NUMBER_STYLE_ARABIC_PADDED+]
|
445
|
+
# [+Layout::AutoTextDefinition::NUMBER_STYLE_UC_ALPHA+]
|
446
|
+
# [+Layout::AutoTextDefinition::NUMBER_STYLE_LC_ALPHA+]
|
447
|
+
# [+Layout::AutoTextDefinition::NUMBER_STYLE_UC_ROMAN+]
|
448
|
+
# [+Layout::AutoTextDefinition::NUMBER_STYLE_LC_ROMAN+]
|
449
|
+
#
|
450
|
+
# @deprecated LayOut 2022.0 This method is deprecated in favor of the more generic {#number_style}
|
451
|
+
# method that also works on +Layout::AutoTextDefintion::TYPE_PAGE_COUNT+ and
|
452
|
+
# +Layout::AutoTextDefintion::TYPE_SEQUENCE+ {Layout::AutoTextDefinition}s.
|
453
|
+
#
|
454
|
+
# @example
|
455
|
+
# doc = Layout::Document.open("C:/path/to/document.layout")
|
456
|
+
# page_number_def = doc.auto_text_definitions.add("RomanPageNumbers",
|
457
|
+
# Layout::AutoTextDefinition::TYPE_PAGE_NUMBER) number_style = page_number_def.number_style
|
294
458
|
#
|
295
459
|
# @raise [ArgumentError] if the {Layout::AutoTextDefinition}'s type is not
|
296
460
|
# +Layout::AutoTextDefinition::TYPE_PAGE_NUMBER+.
|
@@ -301,10 +465,10 @@ class Layout::AutoTextDefinition
|
|
301
465
|
def page_number_style
|
302
466
|
end
|
303
467
|
|
304
|
-
# The {#page_number_style=} method sets the numbering style for
|
305
|
-
# +Layout::AutoTextDefinition::TYPE_PAGE_NUMBER+ {Layout::AutoTextDefinition}.
|
468
|
+
# The {#page_number_style=} method sets the numbering style for
|
469
|
+
# +Layout::AutoTextDefinition::TYPE_PAGE_NUMBER+ {Layout::AutoTextDefinition}s.
|
306
470
|
#
|
307
|
-
# The
|
471
|
+
# The numbering style can be one of the following values:
|
308
472
|
# [+Layout::AutoTextDefinition::NUMBER_STYLE_ARABIC+]
|
309
473
|
# [+Layout::AutoTextDefinition::NUMBER_STYLE_ARABIC_PADDED+]
|
310
474
|
# [+Layout::AutoTextDefinition::NUMBER_STYLE_UC_ALPHA+]
|
@@ -312,32 +476,97 @@ class Layout::AutoTextDefinition
|
|
312
476
|
# [+Layout::AutoTextDefinition::NUMBER_STYLE_UC_ROMAN+]
|
313
477
|
# [+Layout::AutoTextDefinition::NUMBER_STYLE_LC_ROMAN+]
|
314
478
|
#
|
479
|
+
# @deprecated LayOut 2022.0 This method is deprecated in favor of the more generic {#number_style=}
|
480
|
+
# method that also works on +Layout::AutoTextDefintion::TYPE_PAGE_COUNT+ and
|
481
|
+
# +Layout::AutoTextDefintion::TYPE_SEQUENCE+ {Layout::AutoTextDefinition}s.
|
482
|
+
#
|
315
483
|
# @example
|
316
484
|
# doc = Layout::Document.open("C:/path/to/document.layout")
|
317
|
-
#
|
318
|
-
#
|
485
|
+
# page_number_def = doc.auto_text_definitions.add("RomanPageNumbers",
|
486
|
+
# Layout::AutoTextDefinition::TYPE_PAGE_NUMBER)
|
487
|
+
# page_number_def.page_number_style = Layout::AutoTextDefinition::NUMBER_STYLE_UC_ROMAN
|
319
488
|
#
|
320
489
|
# @param [Integer] number_style
|
321
490
|
#
|
322
491
|
# @raise [ArgumentError] if the {Layout::AutoTextDefinition}'s type is not
|
323
492
|
# +Layout::AutoTextDefinition::TYPE_PAGE_NUMBER+.
|
324
493
|
#
|
325
|
-
# @raise [ArgumentError] if number_style is not a valid page numbering style
|
494
|
+
# @raise [ArgumentError] if +number_style+ is not a valid page numbering style
|
326
495
|
#
|
327
496
|
# @version LayOut 2018
|
328
497
|
def page_number_style=(number_style)
|
329
498
|
end
|
330
499
|
|
331
|
-
# The {#
|
332
|
-
# +Layout::AutoTextDefinition::
|
500
|
+
# The {#renumber} method iterates through all uses of the
|
501
|
+
# +Layout::AutoTextDefinition::TYPE_SEQUENCE+ {Layout::AutoTextDefinition} and eliminates gaps and
|
502
|
+
# duplicates in the sequence.
|
333
503
|
#
|
334
504
|
# @example
|
335
505
|
# doc = Layout::Document.open("C:/path/to/document.layout")
|
336
|
-
#
|
337
|
-
#
|
506
|
+
# sequence_def =
|
507
|
+
# doc.auto_text_definitions.add("Seq1", Layout::AutoTextDefinition::TYPE_SEQUENCE)
|
508
|
+
# sequence_def.renumber
|
338
509
|
#
|
339
510
|
# @raise [ArgumentError] if the {Layout::AutoTextDefinition}'s type is not
|
340
|
-
# +Layout::AutoTextDefinition::
|
511
|
+
# +Layout::AutoTextDefinition::TYPE_SEQUENCE+.
|
512
|
+
#
|
513
|
+
# @version LayOut 2022.0
|
514
|
+
def renumber
|
515
|
+
end
|
516
|
+
|
517
|
+
# The {#sequence_format} method returns the sequence format of a
|
518
|
+
# +Layout::AutoTextDefinition::TYPE_SEQUENCE+ {Layout::AutoTextDefinition}.
|
519
|
+
#
|
520
|
+
# @example
|
521
|
+
# doc = Layout::Document.open("C:/path/to/document.layout")
|
522
|
+
# sequence_def =
|
523
|
+
# doc.auto_text_definitions.add("Seq1", Layout::AutoTextDefinition::TYPE_SEQUENCE)
|
524
|
+
# # Default sequence format is ###, meaning entirely replace the string with the sequence number
|
525
|
+
# sequence = sequence_def.sequence
|
526
|
+
#
|
527
|
+
# @raise [ArgumentError] if the {Layout::AutoTextDefinition}'s type is not
|
528
|
+
# +Layout::AutoTextDefinition::TYPE_SEQUENCE+.
|
529
|
+
#
|
530
|
+
# @return [String]
|
531
|
+
#
|
532
|
+
# @version LayOut 2022.0
|
533
|
+
def sequence_format
|
534
|
+
end
|
535
|
+
|
536
|
+
# The {#sequence_format=} method sets the sequence format of a
|
537
|
+
# +Layout::AutoTextDefinition::TYPE_SEQUENCE+ {Layout::AutoTextDefinition}.
|
538
|
+
#
|
539
|
+
# @example
|
540
|
+
# doc = Layout::Document.open("C:/path/to/document.layout")
|
541
|
+
# sequence_def =
|
542
|
+
# doc.auto_text_definitions.add("Seq1", Layout::AutoTextDefinition::TYPE_SEQUENCE)
|
543
|
+
# sequence_def.sequence = "Figure ###"
|
544
|
+
#
|
545
|
+
# @param [String] sequence_format
|
546
|
+
#
|
547
|
+
# @raise [ArgumentError] if the {Layout::AutoTextDefinition}'s type is not
|
548
|
+
# +Layout::AutoTextDefinition::TYPE_SEQUENCE+.
|
549
|
+
#
|
550
|
+
# @raise [TypeError] if +sequence_format+ is not a String or convertable to a String.
|
551
|
+
#
|
552
|
+
# @version LayOut 2022.0
|
553
|
+
def sequence_format=(sequence_format)
|
554
|
+
end
|
555
|
+
|
556
|
+
# The {#start_index} method returns the start index for
|
557
|
+
# +Layout::AutoTextDefinition::TYPE_PAGE_NUMBER+,
|
558
|
+
# +Layout::AutoTextDefinition::TYPE_PAGE_COUNT+, and
|
559
|
+
# +Layout::AutoTextDefinition::TYPE_SEQUENCE+ {Layout::AutoTextDefinition}s.
|
560
|
+
#
|
561
|
+
# @example
|
562
|
+
# doc = Layout::Document.open("C:/path/to/document.layout")
|
563
|
+
# sequence_def = doc.auto_text_definitions.add("Seq1", Layout::AutoTextDefinition::TYPE_SEQUENCE)
|
564
|
+
# start_index = sequence_def.start_index
|
565
|
+
#
|
566
|
+
# @raise [ArgumentError] if the {Layout::AutoTextDefinition}'s type is not
|
567
|
+
# +Layout::AutoTextDefinition::TYPE_PAGE_NUMBER+,
|
568
|
+
# +Layout::AutoTextDefinition::TYPE_PAGE_COUNT+, or
|
569
|
+
# +Layout::AutoTextDefinition::TYPE_SEQUENCE+.
|
341
570
|
#
|
342
571
|
# @return [Integer]
|
343
572
|
#
|
@@ -345,23 +574,74 @@ class Layout::AutoTextDefinition
|
|
345
574
|
def start_index
|
346
575
|
end
|
347
576
|
|
348
|
-
# The {#start_index} method
|
349
|
-
# +Layout::AutoTextDefinition::TYPE_PAGE_NUMBER
|
577
|
+
# The {#start_index=} method sets the start index for
|
578
|
+
# +Layout::AutoTextDefinition::TYPE_PAGE_NUMBER+,
|
579
|
+
# +Layout::AutoTextDefinition::TYPE_PAGE_COUNT+, and
|
580
|
+
# +Layout::AutoTextDefinition::TYPE_SEQUENCE+ {Layout::AutoTextDefinition}s.
|
350
581
|
#
|
351
582
|
# @example
|
352
583
|
# doc = Layout::Document.open("C:/path/to/document.layout")
|
353
|
-
#
|
354
|
-
#
|
584
|
+
# sequence_def = doc.auto_text_definitions.add("Seq1", Layout::AutoTextDefinition::TYPE_SEQUENCE)
|
585
|
+
# sequence_def.start_index = 10
|
355
586
|
#
|
356
587
|
# @param [Integer] index
|
357
588
|
#
|
358
589
|
# @raise [ArgumentError] if the {Layout::AutoTextDefinition}'s type is not
|
359
|
-
# +Layout::AutoTextDefinition::TYPE_PAGE_NUMBER
|
590
|
+
# +Layout::AutoTextDefinition::TYPE_PAGE_NUMBER+,
|
591
|
+
# +Layout::AutoTextDefinition::TYPE_PAGE_COUNT+, or
|
592
|
+
# +Layout::AutoTextDefinition::TYPE_SEQUENCE+.
|
360
593
|
#
|
361
594
|
# @version LayOut 2018
|
362
595
|
def start_index=(index)
|
363
596
|
end
|
364
597
|
|
598
|
+
# The {#start_page} method returns the start page for
|
599
|
+
# +Layout::AutoTextDefinition::TYPE_PAGE_NUMBER+ and
|
600
|
+
# +Layout::AutoTextDefinition::TYPE_PAGE_COUNT+ {Layout::AutoTextDefinition}s.
|
601
|
+
#
|
602
|
+
# @example
|
603
|
+
# doc = Layout::Document.open("C:/path/to/document.layout")
|
604
|
+
# page_number_def =
|
605
|
+
# doc.auto_text_definitions.add("PageNumber", Layout::AutoTextDefinition::TYPE_PAGE_NUMBER)
|
606
|
+
# # Default start page is the first page of the document. However we continue to start at that
|
607
|
+
# # page even if that page is moved.
|
608
|
+
# page = page_number_def.start_page
|
609
|
+
# p page == doc.pages[0]
|
610
|
+
# doc.pages.add('new page')
|
611
|
+
# doc.pages.reorder(doc.pages[0], 1)
|
612
|
+
# p page == doc.pages[1]
|
613
|
+
#
|
614
|
+
# @raise [ArgumentError] if the {Layout::AutoTextDefinition}'s type is not
|
615
|
+
# +Layout::AutoTextDefinition::TYPE_PAGE_NUMBER+ or
|
616
|
+
# +Layout::AutoTextDefinition::TYPE_PAGE_COUNT+.
|
617
|
+
#
|
618
|
+
# @return [Layout::Page]
|
619
|
+
#
|
620
|
+
# @version LayOut 2022.0
|
621
|
+
def start_page
|
622
|
+
end
|
623
|
+
|
624
|
+
# The {#start_page=} method sets the start page for
|
625
|
+
# +Layout::AutoTextDefinition::TYPE_PAGE_NUMBER+ and
|
626
|
+
# +Layout::AutoTextDefinition::TYPE_PAGE_COUNT+ {Layout::AutoTextDefinition}s.
|
627
|
+
#
|
628
|
+
# @example
|
629
|
+
# doc = Layout::Document.open("C:/path/to/document.layout")
|
630
|
+
# page_number_def =
|
631
|
+
# doc.auto_text_definitions.add("PageNumber", Layout::AutoTextDefinition::TYPE_PAGE_NUMBER)
|
632
|
+
# # Start the PageCount auto-text on the new page
|
633
|
+
# page_number_def.start_page = doc.pages.add('new page')
|
634
|
+
#
|
635
|
+
# @param [Layout::Page] page
|
636
|
+
#
|
637
|
+
# @raise [ArgumentError] if the {Layout::AutoTextDefinition}'s type is not
|
638
|
+
# +Layout::AutoTextDefinition::TYPE_PAGE_NUMBER+ or
|
639
|
+
# +Layout::AutoTextDefinition::TYPE_PAGE_COUNT+.
|
640
|
+
#
|
641
|
+
# @version LayOut 2022.0
|
642
|
+
def start_page=(page)
|
643
|
+
end
|
644
|
+
|
365
645
|
# The {#tag} method returns the tag string of the {Layout::AutoTextDefinition}.
|
366
646
|
#
|
367
647
|
# @example
|
@@ -396,6 +676,13 @@ class Layout::AutoTextDefinition
|
|
396
676
|
# [+Layout::AutoTextDefinition::TYPE_MODEL_COORDINATES+]
|
397
677
|
# [+Layout::AutoTextDefinition::TYPE_MODEL_DYNAMIC_COMPONENT_ATTRIBUTE+]
|
398
678
|
# [+Layout::AutoTextDefinition::TYPE_MODEL_CLASSIFIER_ATTRIBUTE+]
|
679
|
+
# [+Layout::AutoTextDefinition::TYPE_MODEL_SCENE_NAME+]
|
680
|
+
# [+Layout::AutoTextDefinition::TYPE_MODEL_SCENE_DESCRIPTION+]
|
681
|
+
# [+Layout::AutoTextDefinition::TYPE_MODEL_SCALE+]
|
682
|
+
# [+Layout::AutoTextDefinition::TYPE_MODEL_SECTION_NAME+]
|
683
|
+
# [+Layout::AutoTextDefinition::TYPE_MODEL_SECTION_SYMBOL+]
|
684
|
+
# [+Layout::AutoTextDefinition::TYPE_PAGE_COUNT+]
|
685
|
+
# [+Layout::AutoTextDefinition::TYPE_SEQUENCE+]
|
399
686
|
#
|
400
687
|
# @example
|
401
688
|
# doc = Layout::Document.open("C:/path/to/document.layout")
|
@@ -1,15 +1,15 @@
|
|
1
|
-
# Copyright:: Copyright
|
1
|
+
# Copyright:: Copyright 2022 Trimble Inc.
|
2
2
|
# License:: The MIT License (MIT)
|
3
3
|
|
4
4
|
# The AutoTextDefinitions class is a container class for all
|
5
5
|
# {Layout::AutoTextDefinition}s in a {Layout::Document}.
|
6
6
|
#
|
7
7
|
# @example
|
8
|
-
# # Grab a handle to an existing LayOut document's auto
|
8
|
+
# # Grab a handle to an existing LayOut document's auto-text definitions.
|
9
9
|
# doc = Layout::Document.open("C:/path/to/document.layout")
|
10
10
|
# auto_texts = doc.auto_text_definitions
|
11
11
|
#
|
12
|
-
# # From here, we can add auto
|
12
|
+
# # From here, we can add auto-text definitions to or remove them from the
|
13
13
|
# # document.
|
14
14
|
# auto_texts.add("PageNum", Layout::AutoTextDefinition::TYPE_PAGE_NUM)
|
15
15
|
# auto_texts.remove("PageNum")
|
@@ -61,6 +61,8 @@ class Layout::AutoTextDefinitions
|
|
61
61
|
# [+Layout::AutoTextDefinition::TYPE_DATE_CREATED+]
|
62
62
|
# [+Layout::AutoTextDefinition::TYPE_DATE_MODIFIED+]
|
63
63
|
# [+Layout::AutoTextDefinition::TYPE_DATE_PUBLISHED+]
|
64
|
+
# [+Layout::AutoTextDefinition::TYPE_PAGE_COUNT+]
|
65
|
+
# [+Layout::AutoTextDefinition::TYPE_SEQUENCE+]
|
64
66
|
#
|
65
67
|
# @example
|
66
68
|
# doc = Layout::Document.open("C:/path/to/document.layout")
|
@@ -71,7 +73,7 @@ class Layout::AutoTextDefinitions
|
|
71
73
|
#
|
72
74
|
# @param [Integer] type
|
73
75
|
#
|
74
|
-
# @raise [ArgumentError] if type is not a valid auto
|
76
|
+
# @raise [ArgumentError] if type is not a valid auto-text type, or is mandatory.
|
75
77
|
#
|
76
78
|
# @return [Layout::AutoTextDefinition]
|
77
79
|
#
|
@@ -148,6 +150,8 @@ class Layout::AutoTextDefinitions
|
|
148
150
|
# [+Layout::AutoTextDefinition::TYPE_DATE_CREATED+]
|
149
151
|
# [+Layout::AutoTextDefinition::TYPE_DATE_MODIFIED+]
|
150
152
|
# [+Layout::AutoTextDefinition::TYPE_DATE_PUBLISHED+]
|
153
|
+
# [+Layout::AutoTextDefinition::TYPE_PAGE_COUNT+]
|
154
|
+
# [+Layout::AutoTextDefinition::TYPE_SEQUENCE+]
|
151
155
|
#
|
152
156
|
# @example
|
153
157
|
# doc = Layout::Document.open("C:/path/to/document.layout")
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright:: Copyright
|
1
|
+
# Copyright:: Copyright 2022 Trimble Inc.
|
2
2
|
# License:: The MIT License (MIT)
|
3
3
|
|
4
4
|
# This is the interface to a LayOut document. A {Layout::Document} is the 2D
|
@@ -47,6 +47,7 @@ class Layout::Document
|
|
47
47
|
VERSION_2019 = nil # Stub value.
|
48
48
|
VERSION_2020 = nil # Stub value.
|
49
49
|
VERSION_2021 = nil # Stub value.
|
50
|
+
VERSION_2022 = nil # Stub value.
|
50
51
|
VERSION_3 = nil # Stub value.
|
51
52
|
VERSION_CURRENT = nil # Stub value.
|
52
53
|
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright:: Copyright
|
1
|
+
# Copyright:: Copyright 2022 Trimble Inc.
|
2
2
|
# License:: The MIT License (MIT)
|
3
3
|
|
4
4
|
# A formatted text entity.
|
@@ -37,9 +37,11 @@ class Layout::FormattedText < Layout::Entity
|
|
37
37
|
# [+ANCHOR_TYPE_CENTER_CENTER+]
|
38
38
|
# [+ANCHOR_TYPE_BOTTOM_CENTER+]
|
39
39
|
#
|
40
|
+
# Layout::FormattedText::ANCHOR_TYPE_TOP_LEFT)
|
41
|
+
#
|
40
42
|
# @example
|
41
43
|
# anchor = Geom::Point2d.new(1, 1)
|
42
|
-
# text = Layout::FormattedText.new("C:/Test.txt", anchor,
|
44
|
+
# text = Layout::FormattedText.new("C:/Test.txt", anchor,
|
43
45
|
#
|
44
46
|
# @overload new_from_file(path, bounds)
|
45
47
|
#
|
@@ -130,17 +132,18 @@ class Layout::FormattedText < Layout::Entity
|
|
130
132
|
# The {#display_text} method returns the display text representation of the
|
131
133
|
# {Layout::FormattedText}.
|
132
134
|
#
|
135
|
+
# Layout::FormattedText::ANCHOR_TYPE_TOP_LEFT) doc.add_entity(text, doc.layers.first,
|
136
|
+
# doc.pages.first) text = text.display_text(doc.pages.first)
|
137
|
+
#
|
133
138
|
# @example
|
134
139
|
# anchor = Geom::Point2d.new(1, 1)
|
135
|
-
# text = Layout::FormattedText.new("<PageNumber>", anchor,
|
136
|
-
# doc.add_entity(text, doc.layers.first, doc.pages.first)
|
137
|
-
# text = text.display_text(doc.pages.first)
|
140
|
+
# text = Layout::FormattedText.new("<PageNumber>", anchor,
|
138
141
|
#
|
139
|
-
# @note Passing an invalid {Layout::Page} will prevent an auto
|
142
|
+
# @note Passing an invalid {Layout::Page} will prevent an auto-text tag from
|
140
143
|
# being substituted with its display representation.
|
141
144
|
#
|
142
145
|
# @param [Layout::Page] page
|
143
|
-
# The {Layout::Page} to use to convert an auto
|
146
|
+
# The {Layout::Page} to use to convert an auto-text
|
144
147
|
# tag to display text
|
145
148
|
#
|
146
149
|
# @raise [ArgumentError] if page is not in the same {Layout::Document} as
|
@@ -278,20 +281,20 @@ class Layout::FormattedText < Layout::Entity
|
|
278
281
|
# text = Layout::FormattedText.new("Test", anchor, Layout::FormattedText::ANCHOR_TYPE_TOP_LEFT)
|
279
282
|
# rtf_text = text.rtf
|
280
283
|
#
|
281
|
-
# @note Passing an invalid {Layout::Page} will prevent an auto
|
284
|
+
# @note Passing an invalid {Layout::Page} will prevent an auto-text tag from
|
282
285
|
# being substituted with its display representation.
|
283
286
|
#
|
284
287
|
# @overload rtf
|
285
288
|
#
|
286
289
|
# @return [String] The RTF text string. If the {Layout::FormattedText} is
|
287
|
-
# auto
|
290
|
+
# auto-text, this will be an auto-text tag.
|
288
291
|
#
|
289
292
|
# @overload rtf(page)
|
290
293
|
#
|
291
294
|
# @param [Layout::Page] page The {Layout::Page} to use to convert an auto
|
292
295
|
# text tag to display text
|
293
296
|
# @return [String] The RTF text string. If the {Layout::FormattedText} is
|
294
|
-
# auto
|
297
|
+
# auto-text, this will be the display text.
|
295
298
|
#
|
296
299
|
# @raise [ArgumentError] if page is not in the same {Layout::Document} as
|
297
300
|
# the {Layout::FormattedText}
|
@@ -303,10 +306,12 @@ class Layout::FormattedText < Layout::Entity
|
|
303
306
|
# The {#rtf=} method sets the raw RTF representation of the
|
304
307
|
# {Layout::FormattedText}.
|
305
308
|
#
|
309
|
+
# text.\par}"
|
310
|
+
#
|
306
311
|
# @example
|
307
312
|
# anchor = Geom::Point2d.new(1, 1)
|
308
313
|
# text = Layout::FormattedText.new("Test", anchor, Layout::FormattedText::ANCHOR_TYPE_TOP_LEFT)
|
309
|
-
# text.rtf = "{\rtf1\ansi{\fonttbl\f0\fswiss Helvetica;}\f0\pard This is some {\b bold}
|
314
|
+
# text.rtf = "{\rtf1\ansi{\fonttbl\f0\fswiss Helvetica;}\f0\pard This is some {\b bold}
|
310
315
|
#
|
311
316
|
# @param [String] rtf_text
|
312
317
|
#
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright:: Copyright
|
1
|
+
# Copyright:: Copyright 2022 Trimble Inc.
|
2
2
|
# License:: The MIT License (MIT)
|
3
3
|
|
4
4
|
# This is an interface to a label entity. A {Layout::Label} consists of a
|
@@ -173,7 +173,7 @@ class Layout::Label < Layout::Entity
|
|
173
173
|
# @overload entities(page)
|
174
174
|
#
|
175
175
|
# @param [Layout::Page] page The {Layout::Page} to use to convert an
|
176
|
-
# auto
|
176
|
+
# auto-text tag to display text
|
177
177
|
# @return [Layout::Entities]
|
178
178
|
#
|
179
179
|
# @raise [ArgumentError] if page does not belong to the same document as the
|