sketchup-api-stubs 0.7.3 → 0.7.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (149) hide show
  1. checksums.yaml +5 -5
  2. data/.yardopts +9 -9
  3. data/lib/sketchup-api-stubs.rb +1 -1
  4. data/lib/sketchup-api-stubs/sketchup.rb +145 -145
  5. data/lib/sketchup-api-stubs/stubs/Geom/BoundingBox.rb +318 -318
  6. data/lib/sketchup-api-stubs/stubs/Geom/Bounds2d.rb +172 -172
  7. data/lib/sketchup-api-stubs/stubs/Geom/LatLong.rb +126 -126
  8. data/lib/sketchup-api-stubs/stubs/Geom/OrientedBounds2d.rb +102 -102
  9. data/lib/sketchup-api-stubs/stubs/Geom/Point2d.rb +400 -400
  10. data/lib/sketchup-api-stubs/stubs/Geom/Point3d.rb +661 -661
  11. data/lib/sketchup-api-stubs/stubs/Geom/PolygonMesh.rb +492 -492
  12. data/lib/sketchup-api-stubs/stubs/Geom/Transformation.rb +478 -478
  13. data/lib/sketchup-api-stubs/stubs/Geom/Transformation2d.rb +263 -263
  14. data/lib/sketchup-api-stubs/stubs/Geom/UTM.rb +141 -141
  15. data/lib/sketchup-api-stubs/stubs/Geom/Vector2d.rb +522 -522
  16. data/lib/sketchup-api-stubs/stubs/Geom/Vector3d.rb +691 -691
  17. data/lib/sketchup-api-stubs/stubs/Layout.rb +25 -25
  18. data/lib/sketchup-api-stubs/stubs/Layout/AngularDimension.rb +573 -573
  19. data/lib/sketchup-api-stubs/stubs/Layout/AutoTextDefinition.rb +411 -411
  20. data/lib/sketchup-api-stubs/stubs/Layout/AutoTextDefinitions.rb +174 -186
  21. data/lib/sketchup-api-stubs/stubs/Layout/ConnectionPoint.rb +70 -70
  22. data/lib/sketchup-api-stubs/stubs/Layout/Document.rb +514 -514
  23. data/lib/sketchup-api-stubs/stubs/Layout/Ellipse.rb +29 -29
  24. data/lib/sketchup-api-stubs/stubs/Layout/Entities.rb +143 -155
  25. data/lib/sketchup-api-stubs/stubs/Layout/Entity.rb +353 -353
  26. data/lib/sketchup-api-stubs/stubs/Layout/FormattedText.rb +349 -349
  27. data/lib/sketchup-api-stubs/stubs/Layout/Grid.rb +311 -311
  28. data/lib/sketchup-api-stubs/stubs/Layout/Group.rb +261 -261
  29. data/lib/sketchup-api-stubs/stubs/Layout/Image.rb +91 -91
  30. data/lib/sketchup-api-stubs/stubs/Layout/Label.rb +371 -371
  31. data/lib/sketchup-api-stubs/stubs/Layout/Layer.rb +218 -218
  32. data/lib/sketchup-api-stubs/stubs/Layout/LayerInstance.rb +128 -128
  33. data/lib/sketchup-api-stubs/stubs/Layout/Layers.rb +220 -232
  34. data/lib/sketchup-api-stubs/stubs/Layout/LinearDimension.rb +567 -567
  35. data/lib/sketchup-api-stubs/stubs/Layout/LockedEntityError.rb +10 -10
  36. data/lib/sketchup-api-stubs/stubs/Layout/LockedLayerError.rb +11 -11
  37. data/lib/sketchup-api-stubs/stubs/Layout/Page.rb +183 -183
  38. data/lib/sketchup-api-stubs/stubs/Layout/PageInfo.rb +387 -387
  39. data/lib/sketchup-api-stubs/stubs/Layout/Pages.rb +204 -216
  40. data/lib/sketchup-api-stubs/stubs/Layout/Path.rb +344 -344
  41. data/lib/sketchup-api-stubs/stubs/Layout/Rectangle.rb +174 -174
  42. data/lib/sketchup-api-stubs/stubs/Layout/SketchUpModel.rb +694 -694
  43. data/lib/sketchup-api-stubs/stubs/Layout/Style.rb +1519 -1519
  44. data/lib/sketchup-api-stubs/stubs/Layout/Table.rb +290 -290
  45. data/lib/sketchup-api-stubs/stubs/Layout/TableCell.rb +149 -149
  46. data/lib/sketchup-api-stubs/stubs/Layout/TableColumn.rb +139 -139
  47. data/lib/sketchup-api-stubs/stubs/Layout/TableRow.rb +135 -135
  48. data/lib/sketchup-api-stubs/stubs/Sketchup/Animation.rb +140 -140
  49. data/lib/sketchup-api-stubs/stubs/Sketchup/AppObserver.rb +157 -157
  50. data/lib/sketchup-api-stubs/stubs/Sketchup/ArcCurve.rb +209 -209
  51. data/lib/sketchup-api-stubs/stubs/Sketchup/AttributeDictionaries.rb +152 -152
  52. data/lib/sketchup-api-stubs/stubs/Sketchup/AttributeDictionary.rb +281 -281
  53. data/lib/sketchup-api-stubs/stubs/Sketchup/Axes.rb +149 -149
  54. data/lib/sketchup-api-stubs/stubs/Sketchup/Behavior.rb +328 -328
  55. data/lib/sketchup-api-stubs/stubs/Sketchup/Camera.rb +577 -577
  56. data/lib/sketchup-api-stubs/stubs/Sketchup/ClassificationSchema.rb +63 -63
  57. data/lib/sketchup-api-stubs/stubs/Sketchup/Classifications.rb +122 -122
  58. data/lib/sketchup-api-stubs/stubs/Sketchup/Color.rb +281 -281
  59. data/lib/sketchup-api-stubs/stubs/Sketchup/ComponentDefinition.rb +562 -562
  60. data/lib/sketchup-api-stubs/stubs/Sketchup/ComponentInstance.rb +593 -593
  61. data/lib/sketchup-api-stubs/stubs/Sketchup/Console.rb +76 -76
  62. data/lib/sketchup-api-stubs/stubs/Sketchup/ConstructionLine.rb +257 -257
  63. data/lib/sketchup-api-stubs/stubs/Sketchup/ConstructionPoint.rb +32 -32
  64. data/lib/sketchup-api-stubs/stubs/Sketchup/Curve.rb +194 -194
  65. data/lib/sketchup-api-stubs/stubs/Sketchup/DefinitionList.rb +329 -329
  66. data/lib/sketchup-api-stubs/stubs/Sketchup/DefinitionObserver.rb +72 -72
  67. data/lib/sketchup-api-stubs/stubs/Sketchup/DefinitionsObserver.rb +102 -102
  68. data/lib/sketchup-api-stubs/stubs/Sketchup/Dimension.rb +165 -165
  69. data/lib/sketchup-api-stubs/stubs/Sketchup/DimensionLinear.rb +312 -312
  70. data/lib/sketchup-api-stubs/stubs/Sketchup/DimensionObserver.rb +38 -38
  71. data/lib/sketchup-api-stubs/stubs/Sketchup/DimensionRadial.rb +87 -87
  72. data/lib/sketchup-api-stubs/stubs/Sketchup/Drawingelement.rb +390 -390
  73. data/lib/sketchup-api-stubs/stubs/Sketchup/Edge.rb +508 -508
  74. data/lib/sketchup-api-stubs/stubs/Sketchup/EdgeUse.rb +211 -211
  75. data/lib/sketchup-api-stubs/stubs/Sketchup/Entities.rb +1119 -1119
  76. data/lib/sketchup-api-stubs/stubs/Sketchup/EntitiesObserver.rb +125 -125
  77. data/lib/sketchup-api-stubs/stubs/Sketchup/Entity.rb +544 -544
  78. data/lib/sketchup-api-stubs/stubs/Sketchup/EntityObserver.rb +59 -59
  79. data/lib/sketchup-api-stubs/stubs/Sketchup/ExtensionsManager.rb +125 -125
  80. data/lib/sketchup-api-stubs/stubs/Sketchup/Face.rb +750 -750
  81. data/lib/sketchup-api-stubs/stubs/Sketchup/FrameChangeObserver.rb +104 -104
  82. data/lib/sketchup-api-stubs/stubs/Sketchup/Group.rb +697 -697
  83. data/lib/sketchup-api-stubs/stubs/Sketchup/Http.rb +27 -27
  84. data/lib/sketchup-api-stubs/stubs/Sketchup/Http/Request.rb +285 -285
  85. data/lib/sketchup-api-stubs/stubs/Sketchup/Http/Response.rb +62 -62
  86. data/lib/sketchup-api-stubs/stubs/Sketchup/Image.rb +409 -409
  87. data/lib/sketchup-api-stubs/stubs/Sketchup/ImageRep.rb +226 -226
  88. data/lib/sketchup-api-stubs/stubs/Sketchup/Importer.rb +190 -190
  89. data/lib/sketchup-api-stubs/stubs/Sketchup/InputPoint.rb +393 -393
  90. data/lib/sketchup-api-stubs/stubs/Sketchup/InstanceObserver.rb +82 -82
  91. data/lib/sketchup-api-stubs/stubs/Sketchup/InstancePath.rb +303 -303
  92. data/lib/sketchup-api-stubs/stubs/Sketchup/Layer.rb +285 -280
  93. data/lib/sketchup-api-stubs/stubs/Sketchup/Layers.rb +244 -231
  94. data/lib/sketchup-api-stubs/stubs/Sketchup/LayersObserver.rb +136 -136
  95. data/lib/sketchup-api-stubs/stubs/Sketchup/Licensing.rb +48 -48
  96. data/lib/sketchup-api-stubs/stubs/Sketchup/Licensing/ExtensionLicense.rb +86 -86
  97. data/lib/sketchup-api-stubs/stubs/Sketchup/LineStyle.rb +24 -24
  98. data/lib/sketchup-api-stubs/stubs/Sketchup/LineStyles.rb +112 -123
  99. data/lib/sketchup-api-stubs/stubs/Sketchup/Loop.rb +137 -137
  100. data/lib/sketchup-api-stubs/stubs/Sketchup/Material.rb +416 -416
  101. data/lib/sketchup-api-stubs/stubs/Sketchup/Materials.rb +311 -311
  102. data/lib/sketchup-api-stubs/stubs/Sketchup/MaterialsObserver.rb +141 -141
  103. data/lib/sketchup-api-stubs/stubs/Sketchup/Menu.rb +95 -95
  104. data/lib/sketchup-api-stubs/stubs/Sketchup/Model.rb +1638 -1601
  105. data/lib/sketchup-api-stubs/stubs/Sketchup/ModelObserver.rb +356 -356
  106. data/lib/sketchup-api-stubs/stubs/Sketchup/OptionsManager.rb +132 -132
  107. data/lib/sketchup-api-stubs/stubs/Sketchup/OptionsProvider.rb +284 -284
  108. data/lib/sketchup-api-stubs/stubs/Sketchup/OptionsProviderObserver.rb +58 -58
  109. data/lib/sketchup-api-stubs/stubs/Sketchup/Page.rb +770 -770
  110. data/lib/sketchup-api-stubs/stubs/Sketchup/Pages.rb +353 -353
  111. data/lib/sketchup-api-stubs/stubs/Sketchup/PagesObserver.rb +76 -76
  112. data/lib/sketchup-api-stubs/stubs/Sketchup/PickHelper.rb +456 -456
  113. data/lib/sketchup-api-stubs/stubs/Sketchup/RegionalSettings.rb +43 -43
  114. data/lib/sketchup-api-stubs/stubs/Sketchup/RenderingOptions.rb +364 -364
  115. data/lib/sketchup-api-stubs/stubs/Sketchup/RenderingOptionsObserver.rb +44 -44
  116. data/lib/sketchup-api-stubs/stubs/Sketchup/SectionPlane.rb +150 -150
  117. data/lib/sketchup-api-stubs/stubs/Sketchup/Selection.rb +454 -454
  118. data/lib/sketchup-api-stubs/stubs/Sketchup/SelectionObserver.rb +115 -115
  119. data/lib/sketchup-api-stubs/stubs/Sketchup/Set.rb +212 -212
  120. data/lib/sketchup-api-stubs/stubs/Sketchup/ShadowInfo.rb +257 -257
  121. data/lib/sketchup-api-stubs/stubs/Sketchup/ShadowInfoObserver.rb +57 -57
  122. data/lib/sketchup-api-stubs/stubs/Sketchup/Style.rb +69 -69
  123. data/lib/sketchup-api-stubs/stubs/Sketchup/Styles.rb +211 -211
  124. data/lib/sketchup-api-stubs/stubs/Sketchup/Text.rb +262 -262
  125. data/lib/sketchup-api-stubs/stubs/Sketchup/Texture.rb +225 -225
  126. data/lib/sketchup-api-stubs/stubs/Sketchup/TextureWriter.rb +237 -237
  127. data/lib/sketchup-api-stubs/stubs/Sketchup/Tool.rb +829 -829
  128. data/lib/sketchup-api-stubs/stubs/Sketchup/Tools.rb +132 -132
  129. data/lib/sketchup-api-stubs/stubs/Sketchup/ToolsObserver.rb +154 -154
  130. data/lib/sketchup-api-stubs/stubs/Sketchup/UVHelper.rb +61 -61
  131. data/lib/sketchup-api-stubs/stubs/Sketchup/Vertex.rb +142 -142
  132. data/lib/sketchup-api-stubs/stubs/Sketchup/View.rb +1301 -1301
  133. data/lib/sketchup-api-stubs/stubs/Sketchup/ViewObserver.rb +43 -43
  134. data/lib/sketchup-api-stubs/stubs/UI/Command.rb +310 -310
  135. data/lib/sketchup-api-stubs/stubs/UI/HtmlDialog.rb +356 -356
  136. data/lib/sketchup-api-stubs/stubs/UI/Notification.rb +229 -229
  137. data/lib/sketchup-api-stubs/stubs/UI/Toolbar.rb +240 -240
  138. data/lib/sketchup-api-stubs/stubs/UI/WebDialog.rb +633 -633
  139. data/lib/sketchup-api-stubs/stubs/_top_level.rb +311 -311
  140. data/lib/sketchup-api-stubs/stubs/array.rb +741 -741
  141. data/lib/sketchup-api-stubs/stubs/geom.rb +348 -348
  142. data/lib/sketchup-api-stubs/stubs/languagehandler.rb +92 -92
  143. data/lib/sketchup-api-stubs/stubs/length.rb +278 -278
  144. data/lib/sketchup-api-stubs/stubs/numeric.rb +249 -249
  145. data/lib/sketchup-api-stubs/stubs/sketchup.rb +1310 -1310
  146. data/lib/sketchup-api-stubs/stubs/sketchupextension.rb +353 -353
  147. data/lib/sketchup-api-stubs/stubs/string.rb +24 -24
  148. data/lib/sketchup-api-stubs/stubs/ui.rb +667 -667
  149. metadata +3 -4
@@ -1,514 +1,514 @@
1
- # Copyright:: Copyright 2020 Trimble Inc.
2
- # License:: The MIT License (MIT)
3
-
4
- # This is the interface to a LayOut document. A {Layout::Document} is the 2D
5
- # drawing that the user is working with, and it serves as the "entry point" for
6
- # most Ruby API interactions. The {Layout::Document.open} method gives you a
7
- # handle to a {Layout::Document}, and from there you can use the
8
- # document-level methods to start getting information and making changes.
9
- #
10
- # @example
11
- # # Grab a handle to an existing LayOut document.
12
- # doc = Layout::Document.open("C:/path/to/document.layout")
13
- #
14
- # # Grab other handles to commonly used collections inside the model.
15
- # layers = doc.layers
16
- # pages = doc.pages
17
- # entities = doc.shared_entities
18
- #
19
- # # Now that we have our handles, we can start pulling objects and making
20
- # # method calls that are useful.
21
- # first_entity = entities[0]
22
- #
23
- # number_pages = pages.count
24
- #
25
- # @version LayOut 2018
26
- class Layout::Document
27
-
28
- # Constants
29
-
30
- DECIMAL_CENTIMETERS = nil # Stub value.
31
- DECIMAL_FEET = nil # Stub value.
32
- DECIMAL_INCHES = nil # Stub value.
33
- DECIMAL_METERS = nil # Stub value.
34
- DECIMAL_MILLIMETERS = nil # Stub value.
35
- DECIMAL_POINTS = nil # Stub value.
36
-
37
- FRACTIONAL_INCHES = nil # Stub value.
38
-
39
- VERSION_1 = nil # Stub value.
40
- VERSION_2 = nil # Stub value.
41
- VERSION_2013 = nil # Stub value.
42
- VERSION_2014 = nil # Stub value.
43
- VERSION_2015 = nil # Stub value.
44
- VERSION_2016 = nil # Stub value.
45
- VERSION_2017 = nil # Stub value.
46
- VERSION_2018 = nil # Stub value.
47
- VERSION_2019 = nil # Stub value.
48
- VERSION_2020 = nil # Stub value.
49
- VERSION_3 = nil # Stub value.
50
- VERSION_CURRENT = nil # Stub value.
51
-
52
- # Class Methods
53
-
54
- # The {.open} method creates a new {Layout::Document} by loading an existing
55
- # .layout file.
56
- #
57
- # @example
58
- # filename = File.join(ENV['Home'], 'Desktop', 'template.layout')
59
- # doc = Layout::Document.open(filename)
60
- #
61
- # @param [String] path
62
- # The path to the .layout file on disk.
63
- #
64
- # @raise [ArgumentError] if the file does not exist
65
- #
66
- # @return [Layout::Document] The {Layout::Document} created from the .layout
67
- # file.
68
- #
69
- # @version LayOut 2018
70
- def self.open(path)
71
- end
72
-
73
- # Instance Methods
74
-
75
- # The {#==} method checks to see if the two {Layout::Document}s are equal.
76
- # This checks whether the Ruby Objects are pointing to the same internal
77
- # object.
78
- #
79
- # @example
80
- # doc = Layout::Document.open("C:/path/to/document.layout")
81
- # document = doc.pages.first.document
82
- # doc == document
83
- #
84
- # @param [Layout::Document] other
85
- #
86
- # @return [Boolean]
87
- #
88
- # @version LayOut 2018
89
- def ==(other)
90
- end
91
-
92
- # The {#add_entity} method adds an {Layout::Entity} to the {Layout::Document}
93
- # and places it on the given {Layout::Layer} and {Layout::Page}. If layer is a
94
- # shared {Layout::Layer} then page may be ommitted. The {Layout::Entity} must
95
- # not already belong to a {Layout::Document}. If the {Layout::Entity} is a
96
- # {Layout::Group}, then the {Layout::Group} along with all of its children will
97
- # be added to the {Layout::Document}.
98
- #
99
- # @example
100
- # doc = Layout::Document.open("C:/path/to/document.layout")
101
- # rect = Layout::Rectangle.new([[1, 1], [2, 2]])
102
- # all_layers = doc.layers
103
- # all_pages = doc.pages
104
- # doc.add_entity(rect, all_layers.first, all_pages.first)
105
- #
106
- # @overload add_entity(entity, layer, page)
107
- #
108
- # @param [Layout::Entity] entity The {Layout::Entity} to be added
109
- # @param [Layout::Layer] layer The {Layout::Layer} to add the
110
- # {Layout::Entity} to
111
- # @param [Layout::Page] page The {Layout::Page} to add the {Layout::Entity}
112
- # to
113
- #
114
- # @overload add_entity(entity, layer)
115
- #
116
- # @param [Layout::Entity] entity The {Layout::Entity} to be added
117
- # @param [Layout::Layer] layer The shared {Layout::Layer} to add the
118
- # {Layout::Entity} to
119
- #
120
- # @raise [ArgumentError] if no {Layout::Page} is passed in and layer is
121
- # non-shared
122
- #
123
- # @raise [ArgumentError] if page does not belong to the {Layout::Document}
124
- #
125
- # @raise [ArgumentError] if layer does not belong to the {Layout::Document}
126
- #
127
- # @raise [ArgumentError] if entity already belongs to a {Layout::Document}
128
- #
129
- # @version LayOut 2018
130
- def add_entity(*args)
131
- end
132
-
133
- # The {#auto_text_definitions} method returns an array of
134
- # {Layout::AutoTextDefinition}'s in the {Layout::Document}.
135
- #
136
- # @example
137
- # doc = Layout::Document.open("C:/path/to/document.layout")
138
- # defs = doc.auto_text_definitions
139
- #
140
- # @return [Layout::AutoTextDefinitions]
141
- #
142
- # @version LayOut 2018
143
- def auto_text_definitions
144
- end
145
-
146
- # The {#export} method exports the {Layout::Document} to a given file format.
147
- # It knows which format to export based on the file extension you place on the
148
- # file name. For example, a filename of "thing.pdf" will export a PDF file,
149
- # whereas "thing.png" will export a set of PNG images.
150
- #
151
- # For LayOut version 2020.1, valid extensions include .pdf, .jpg, and .png.
152
- #
153
- # @example PDF Export Examples
154
- # doc = Layout::Document.open("c:/path/to/document.layout")
155
- #
156
- # # Export pdf file on a PC, with default settings.
157
- # status = doc.export("c:/my_export.pdf")
158
- #
159
- # # Export pages one through three at high quality, compressing jpeg images
160
- # # at 0.75 compression quality (valid range is 0.0 - 1.0). Note that the
161
- # # first page of a {Layout::Document} is index 0.
162
- # options = { start_page: 1,
163
- # end_page: 3,
164
- # output_resolution: Layout::PageInfo::RESOLUTION_HIGH,
165
- # compress_images: TRUE,
166
- # compress_quality: 0.75 }
167
- #
168
- # status = doc.export("c:/my_export.pdf", options)
169
- #
170
- # @example Image Set Export Examples
171
- # doc = Layout::Document.open("c:/path/to/document.layout")
172
- #
173
- # # Export png files on macOS, with default settings.
174
- # status = doc.export('/Users/username/Desktop/pngs/page.png')
175
- #
176
- # # Export pages one through three at 300 dpi as JPGs.
177
- # options = { start_page: 1,
178
- # end_page: 3,
179
- # dpi: 300 }
180
- # status = doc.export('c:/page.jpg', options)
181
- #
182
- # @param [String] file_path
183
- # The file or image set to create. The directory
184
- # path must already exist. The path must include the file extension.
185
- #
186
- # @param [Hash, nil] options
187
- # An optional hash of settings for the export.
188
- #
189
- # @raise [TypeError] if an options value is the wrong type
190
- #
191
- # @raise [RangeError] if an options value is out of range
192
- #
193
- # @raise [ArgumentError] if the full file path does not exist
194
- #
195
- # @raise [ArgumentError] if the specified file type is missing or not supported
196
- #
197
- # @version LayOut 2020.1
198
- def export(file_path, options = nil)
199
- end
200
-
201
- # The {#grid} method returns the {Layout::Grid} for a {Layout::Document}.
202
- #
203
- # @example
204
- # doc = Layout::Document.open("C:/path/to/document.layout")
205
- # grid = doc.grid
206
- #
207
- # @return [Layout::Grid]
208
- #
209
- # @version LayOut 2018
210
- def grid
211
- end
212
-
213
- # The {#grid_snap_enabled=} method sets whether or not grid snap is enabled in
214
- # the {Layout::Document}.
215
- #
216
- # @example
217
- # doc = Layout::Document.open("C:/path/to/document.layout")
218
- # doc.grid_snap_enabled = true
219
- #
220
- # @param [Boolean] enabled
221
- # +true+ for enabled +false+ for disabled
222
- #
223
- # @version LayOut 2018
224
- def grid_snap_enabled=(enabled)
225
- end
226
-
227
- # The {#grid_snap_enabled?} method returns whether or not grid snap is enabled
228
- # in the {Layout::Document}.
229
- #
230
- # @example
231
- # doc = Layout::Document.open("C:/path/to/document.layout")
232
- # enabled = doc.grid_snap_enabled?
233
- #
234
- # @return [Boolean]
235
- #
236
- # @version LayOut 2018
237
- def grid_snap_enabled?
238
- end
239
-
240
- # The {#initialize} method creates a new {Layout::Document}. Passing a path to
241
- # an existing {Layout::Document} will use that file as a template. The new
242
- # {Layout::Document} won't have a path until it is saved for the first time.
243
- #
244
- # @example
245
- # doc = Layout::Document.new
246
- # doc2 = Layout::Document.new("/path/to/template.layout")
247
- #
248
- # @overload initialize
249
- #
250
- # @return [Layout::Document] an empty {Layout::Document} with one
251
- # {Layout::Layer} and one {Layout::Page}
252
- #
253
- # @overload initialize(template_path)
254
- #
255
- # @param [String] template_path The path to the {Layout::Document} to use as
256
- # a template
257
- # @return [Layout::Document] an unsaved {Layout::Document} based on the
258
- # template
259
- #
260
- # @raise [RuntimeError] if there was an error reading the template file
261
- #
262
- # @raise [ArgumentError] if the template file could not be found
263
- #
264
- # @version LayOut 2018
265
- def initialize(*args)
266
- end
267
-
268
- # The {#layers} method returns the {Layout::Layers} of the {Layout::Document}.
269
- #
270
- # @example
271
- # doc = Layout::Document.open("C:/path/to/document.layout")
272
- # layers = doc.layers
273
- #
274
- # @return [Layout::Layers]
275
- #
276
- # @version LayOut 2018
277
- def layers
278
- end
279
-
280
- # The {#object_snap_enabled=} method enables or disables inference in the
281
- # {Layout::Document}.
282
- #
283
- # @example
284
- # doc = Layout::Document.open("C:/path/to/document.layout")
285
- # doc.object_snap_enabled = false
286
- #
287
- # @param [Boolean] enabled
288
- # +true+ for enabled +false+ for disabled
289
- #
290
- # @version LayOut 2018
291
- def object_snap_enabled=(enabled)
292
- end
293
-
294
- # The {#object_snap_enabled?} method returns whether or not inference is
295
- # enabled in the {Layout::Document}.
296
- #
297
- # @example
298
- # doc = Layout::Document.open("C:/path/to/document.layout")
299
- # enabled = doc.object_snap_enabled?
300
- #
301
- # @return [Boolean]
302
- #
303
- # @version LayOut 2018
304
- def object_snap_enabled?
305
- end
306
-
307
- # The {#page_info} method returns a reference to the {Layout::PageInfo}
308
- # settings of the {Layout::Document}.
309
- #
310
- # @example
311
- # doc = Layout::Document.open("C:/path/to/document.layout")
312
- # page_info = doc.page_info
313
- #
314
- # @return [Layout::PageInfo]
315
- #
316
- # @version LayOut 2018
317
- def page_info
318
- end
319
-
320
- # The {#pages} method returns the {Layout::Pages} of the {Layout::Document}.
321
- #
322
- #
323
- # @example:
324
- # doc = Layout::Document.open("C:/path/to/document.layout")
325
- # doc_pages = doc.pages
326
- #
327
- # @return [Layout::Pages] The {Layout::Pages} for the {Layout::Document}.
328
- #
329
- # @version LayOut 2018
330
- def pages
331
- end
332
-
333
- # The {#path} method returns the full path of the {Layout::Document} file. An
334
- # empty string is returned for a new {Layout::Document} (one which has not
335
- # been saved and opened).
336
- #
337
- # @example
338
- # doc = Layout::Document.open("C:/path/to/document.layout")
339
- # path = doc.path
340
- #
341
- # @return [String]
342
- #
343
- # @version LayOut 2018
344
- def path
345
- end
346
-
347
- # The {#precision} method returns the precision for the {Layout::Document}.
348
- #
349
- # @example
350
- # doc = Layout::Document.open("C:/path/to/document.layout")
351
- # precision = doc.precision
352
- #
353
- # @return [Float] the number specifying the precision for the
354
- # {Layout::Document}
355
- #
356
- # @version LayOut 2018
357
- def precision
358
- end
359
-
360
- # The {#precision=} method sets the precision for the {Layout::Document}.
361
- #
362
- # @example
363
- # doc = Layout::Document.open("C:/path/to/document.layout")
364
- # doc.precision = 0.0001
365
- #
366
- # @note LayOut only allows for a finite set of precision values for each units
367
- # setting, so it will set the precision to the closest valid setting for the
368
- # specified units. See the "Units" section of LayOut's "Document Setup"
369
- # dialog for a reference of the available precisions for each units setting.
370
- #
371
- # @param [Float] precision
372
- # The double specifying the precision for the
373
- # {Layout::Document}
374
- #
375
- # @version LayOut 2018
376
- def precision=(precision)
377
- end
378
-
379
- # The {#remove_entity} method removes an {Layout::Entity} from the
380
- # {Layout::Document}. If entity is a {Layout::Group}, then the {Layout::Group}
381
- # and all of its children will be removed from the {Layout::Document}.
382
- #
383
- # @example
384
- # doc = Layout::Document.open("C:/path/to/document.layout")
385
- # shared_entities = doc.shared_entities
386
- # # Remove the first entity in the document
387
- # doc.remove_entity(shared_entities.first)
388
- #
389
- # @param [Layout::Entity] entity
390
- # The {Layout::Entity} to be removed
391
- #
392
- # @raise [ArgumentError] if entity does not belong to the {Layout::Document}
393
- #
394
- # @version LayOut 2018
395
- def remove_entity(entity)
396
- end
397
-
398
- # The {#save} method saves the {Layout::Document} to a file at the given path.
399
- # Passing an empty path string will save the {Layout::Document} at its current
400
- # path.
401
- #
402
- # @example
403
- # doc = Layout::Document.open("C:/path/to/document.layout")
404
- # # Save the model using the current Layout format
405
- # filename = File.join(ENV['Home'], 'Desktop', 'mydoc.layout')
406
- # status = doc.save(filename)
407
- # # Save the document to the current file using the current LayOut format
408
- # status = doc.save
409
- # # Save the document to the current file in LayOut 3 format
410
- # status = doc.save(Layout::Document::VERSION_3)
411
- # # Save the document in LayOut 2013 format
412
- # filename = File.join(ENV['Home'], 'Desktop', 'mydoc_v2013.layout')
413
- # status = doc.save(filename, Layout::Document::VERSION_2013)
414
- #
415
- # @overload save
416
- #
417
- # @raise [ArgumentError] if the {Layout::Document} hasn't been saved with a
418
- # path yet
419
- #
420
- # @overload save(path, version = Layout::Document::VERSION_CURRENT)
421
- #
422
- # @param [String] path The path to the .layout file on disk.
423
- # @param [Integer] version LayOut file format to save.
424
- #
425
- # @raise [ArgumentError] if version is not a valid version
426
- #
427
- # @raise [ArgumentError] if saving failed. This may be due to the LayOut file
428
- # being open in the LayOut application
429
- #
430
- # @version LayOut 2018
431
- def save(*args)
432
- end
433
-
434
- # The {#shared_entities} method returns the {Layout::Entities}
435
- # that exist on shared {Layout::Layer}s in the {Layout::Document}.
436
- #
437
- # @example
438
- # doc = Layout::Document.open("C:/path/to/document.layout")
439
- # entities = doc.shared_entities
440
- #
441
- # @return [Layout::Entities]
442
- #
443
- # @version LayOut 2018
444
- def shared_entities
445
- end
446
-
447
- # The {#time_created} method returns the time when the {Layout::Document} was
448
- # created.
449
- #
450
- # @example
451
- # doc = Layout::Document.open("C:/path/to/document.layout")
452
- # created_time = doc.time_created
453
- #
454
- # @return [Time] time when the {Layout::Document} was created
455
- #
456
- # @version LayOut 2018
457
- def time_created
458
- end
459
-
460
- # The {#time_modified} method returns the last time the {Layout::Document} was
461
- # modified.
462
- #
463
- # @example
464
- # doc = Layout::Document.open("C:/path/to/document.layout")
465
- # mod_time = doc.time_modified
466
- #
467
- # @return [Time] time when the {Layout::Document} was last modified
468
- #
469
- # @version LayOut 2018
470
- def time_modified
471
- end
472
-
473
- # The {#time_published} method returns the time when the {Layout::Document} was
474
- # published.
475
- #
476
- # @example
477
- # doc = Layout::Document.open("C:/path/to/document.layout")
478
- # pub_time = doc.time_published
479
- #
480
- # @return [Time] time when the {Layout::Document} was published
481
- #
482
- # @version LayOut 2018
483
- def time_published
484
- end
485
-
486
- # The {#units} method returns the units for the {Layout::Document}.
487
- #
488
- # @example
489
- # doc = Layout::Document.open("C:/path/to/document.layout")
490
- # units = doc.units
491
- #
492
- # @return [Integer] The unit format of the {Layout::Document}
493
- #
494
- # @version LayOut 2018
495
- def units
496
- end
497
-
498
- # The {#units=} method sets the units for the {Layout::Document}.
499
- #
500
- # @example
501
- # doc = Layout::Document.open("C:/path/to/document.layout")
502
- # units_format = LAYOUT::DOCUMENT::DECIMAL_MILLIMETERS
503
- # doc.units = units_format
504
- #
505
- # @param [Integer] units_format
506
- # The format of the units in the {Layout::Document}
507
- #
508
- # @raise [ArgumentError] if units format is not a valid format
509
- #
510
- # @version LayOut 2018
511
- def units=(units_format)
512
- end
513
-
514
- end
1
+ # Copyright:: Copyright 2020 Trimble Inc.
2
+ # License:: The MIT License (MIT)
3
+
4
+ # This is the interface to a LayOut document. A {Layout::Document} is the 2D
5
+ # drawing that the user is working with, and it serves as the "entry point" for
6
+ # most Ruby API interactions. The {Layout::Document.open} method gives you a
7
+ # handle to a {Layout::Document}, and from there you can use the
8
+ # document-level methods to start getting information and making changes.
9
+ #
10
+ # @example
11
+ # # Grab a handle to an existing LayOut document.
12
+ # doc = Layout::Document.open("C:/path/to/document.layout")
13
+ #
14
+ # # Grab other handles to commonly used collections inside the model.
15
+ # layers = doc.layers
16
+ # pages = doc.pages
17
+ # entities = doc.shared_entities
18
+ #
19
+ # # Now that we have our handles, we can start pulling objects and making
20
+ # # method calls that are useful.
21
+ # first_entity = entities[0]
22
+ #
23
+ # number_pages = pages.count
24
+ #
25
+ # @version LayOut 2018
26
+ class Layout::Document
27
+
28
+ # Constants
29
+
30
+ DECIMAL_CENTIMETERS = nil # Stub value.
31
+ DECIMAL_FEET = nil # Stub value.
32
+ DECIMAL_INCHES = nil # Stub value.
33
+ DECIMAL_METERS = nil # Stub value.
34
+ DECIMAL_MILLIMETERS = nil # Stub value.
35
+ DECIMAL_POINTS = nil # Stub value.
36
+
37
+ FRACTIONAL_INCHES = nil # Stub value.
38
+
39
+ VERSION_1 = nil # Stub value.
40
+ VERSION_2 = nil # Stub value.
41
+ VERSION_2013 = nil # Stub value.
42
+ VERSION_2014 = nil # Stub value.
43
+ VERSION_2015 = nil # Stub value.
44
+ VERSION_2016 = nil # Stub value.
45
+ VERSION_2017 = nil # Stub value.
46
+ VERSION_2018 = nil # Stub value.
47
+ VERSION_2019 = nil # Stub value.
48
+ VERSION_2020 = nil # Stub value.
49
+ VERSION_3 = nil # Stub value.
50
+ VERSION_CURRENT = nil # Stub value.
51
+
52
+ # Class Methods
53
+
54
+ # The {.open} method creates a new {Layout::Document} by loading an existing
55
+ # .layout file.
56
+ #
57
+ # @example
58
+ # filename = File.join(ENV['Home'], 'Desktop', 'template.layout')
59
+ # doc = Layout::Document.open(filename)
60
+ #
61
+ # @param [String] path
62
+ # The path to the .layout file on disk.
63
+ #
64
+ # @raise [ArgumentError] if the file does not exist
65
+ #
66
+ # @return [Layout::Document] The {Layout::Document} created from the .layout
67
+ # file.
68
+ #
69
+ # @version LayOut 2018
70
+ def self.open(path)
71
+ end
72
+
73
+ # Instance Methods
74
+
75
+ # The {#==} method checks to see if the two {Layout::Document}s are equal.
76
+ # This checks whether the Ruby Objects are pointing to the same internal
77
+ # object.
78
+ #
79
+ # @example
80
+ # doc = Layout::Document.open("C:/path/to/document.layout")
81
+ # document = doc.pages.first.document
82
+ # doc == document
83
+ #
84
+ # @param [Layout::Document] other
85
+ #
86
+ # @return [Boolean]
87
+ #
88
+ # @version LayOut 2018
89
+ def ==(other)
90
+ end
91
+
92
+ # The {#add_entity} method adds an {Layout::Entity} to the {Layout::Document}
93
+ # and places it on the given {Layout::Layer} and {Layout::Page}. If layer is a
94
+ # shared {Layout::Layer} then page may be ommitted. The {Layout::Entity} must
95
+ # not already belong to a {Layout::Document}. If the {Layout::Entity} is a
96
+ # {Layout::Group}, then the {Layout::Group} along with all of its children will
97
+ # be added to the {Layout::Document}.
98
+ #
99
+ # @example
100
+ # doc = Layout::Document.open("C:/path/to/document.layout")
101
+ # rect = Layout::Rectangle.new([[1, 1], [2, 2]])
102
+ # all_layers = doc.layers
103
+ # all_pages = doc.pages
104
+ # doc.add_entity(rect, all_layers.first, all_pages.first)
105
+ #
106
+ # @overload add_entity(entity, layer, page)
107
+ #
108
+ # @param [Layout::Entity] entity The {Layout::Entity} to be added
109
+ # @param [Layout::Layer] layer The {Layout::Layer} to add the
110
+ # {Layout::Entity} to
111
+ # @param [Layout::Page] page The {Layout::Page} to add the {Layout::Entity}
112
+ # to
113
+ #
114
+ # @overload add_entity(entity, layer)
115
+ #
116
+ # @param [Layout::Entity] entity The {Layout::Entity} to be added
117
+ # @param [Layout::Layer] layer The shared {Layout::Layer} to add the
118
+ # {Layout::Entity} to
119
+ #
120
+ # @raise [ArgumentError] if no {Layout::Page} is passed in and layer is
121
+ # non-shared
122
+ #
123
+ # @raise [ArgumentError] if page does not belong to the {Layout::Document}
124
+ #
125
+ # @raise [ArgumentError] if layer does not belong to the {Layout::Document}
126
+ #
127
+ # @raise [ArgumentError] if entity already belongs to a {Layout::Document}
128
+ #
129
+ # @version LayOut 2018
130
+ def add_entity(*args)
131
+ end
132
+
133
+ # The {#auto_text_definitions} method returns an array of
134
+ # {Layout::AutoTextDefinition}'s in the {Layout::Document}.
135
+ #
136
+ # @example
137
+ # doc = Layout::Document.open("C:/path/to/document.layout")
138
+ # defs = doc.auto_text_definitions
139
+ #
140
+ # @return [Layout::AutoTextDefinitions]
141
+ #
142
+ # @version LayOut 2018
143
+ def auto_text_definitions
144
+ end
145
+
146
+ # The {#export} method exports the {Layout::Document} to a given file format.
147
+ # It knows which format to export based on the file extension you place on the
148
+ # file name. For example, a filename of "thing.pdf" will export a PDF file,
149
+ # whereas "thing.png" will export a set of PNG images.
150
+ #
151
+ # For LayOut version 2020.1, valid extensions include .pdf, .jpg, and .png.
152
+ #
153
+ # @example PDF Export Examples
154
+ # doc = Layout::Document.open("c:/path/to/document.layout")
155
+ #
156
+ # # Export pdf file on a PC, with default settings.
157
+ # status = doc.export("c:/my_export.pdf")
158
+ #
159
+ # # Export pages one through three at high quality, compressing jpeg images
160
+ # # at 0.75 compression quality (valid range is 0.0 - 1.0). Note that the
161
+ # # first page of a {Layout::Document} is index 0.
162
+ # options = { start_page: 1,
163
+ # end_page: 3,
164
+ # output_resolution: Layout::PageInfo::RESOLUTION_HIGH,
165
+ # compress_images: TRUE,
166
+ # compress_quality: 0.75 }
167
+ #
168
+ # status = doc.export("c:/my_export.pdf", options)
169
+ #
170
+ # @example Image Set Export Examples
171
+ # doc = Layout::Document.open("c:/path/to/document.layout")
172
+ #
173
+ # # Export png files on macOS, with default settings.
174
+ # status = doc.export('/Users/username/Desktop/pngs/page.png')
175
+ #
176
+ # # Export pages one through three at 300 dpi as JPGs.
177
+ # options = { start_page: 1,
178
+ # end_page: 3,
179
+ # dpi: 300 }
180
+ # status = doc.export('c:/page.jpg', options)
181
+ #
182
+ # @param [String] file_path
183
+ # The file or image set to create. The directory
184
+ # path must already exist. The path must include the file extension.
185
+ #
186
+ # @param [Hash, nil] options
187
+ # An optional hash of settings for the export.
188
+ #
189
+ # @raise [TypeError] if an options value is the wrong type
190
+ #
191
+ # @raise [RangeError] if an options value is out of range
192
+ #
193
+ # @raise [ArgumentError] if the full file path does not exist
194
+ #
195
+ # @raise [ArgumentError] if the specified file type is missing or not supported
196
+ #
197
+ # @version LayOut 2020.1
198
+ def export(file_path, options = nil)
199
+ end
200
+
201
+ # The {#grid} method returns the {Layout::Grid} for a {Layout::Document}.
202
+ #
203
+ # @example
204
+ # doc = Layout::Document.open("C:/path/to/document.layout")
205
+ # grid = doc.grid
206
+ #
207
+ # @return [Layout::Grid]
208
+ #
209
+ # @version LayOut 2018
210
+ def grid
211
+ end
212
+
213
+ # The {#grid_snap_enabled=} method sets whether or not grid snap is enabled in
214
+ # the {Layout::Document}.
215
+ #
216
+ # @example
217
+ # doc = Layout::Document.open("C:/path/to/document.layout")
218
+ # doc.grid_snap_enabled = true
219
+ #
220
+ # @param [Boolean] enabled
221
+ # +true+ for enabled +false+ for disabled
222
+ #
223
+ # @version LayOut 2018
224
+ def grid_snap_enabled=(enabled)
225
+ end
226
+
227
+ # The {#grid_snap_enabled?} method returns whether or not grid snap is enabled
228
+ # in the {Layout::Document}.
229
+ #
230
+ # @example
231
+ # doc = Layout::Document.open("C:/path/to/document.layout")
232
+ # enabled = doc.grid_snap_enabled?
233
+ #
234
+ # @return [Boolean]
235
+ #
236
+ # @version LayOut 2018
237
+ def grid_snap_enabled?
238
+ end
239
+
240
+ # The {#initialize} method creates a new {Layout::Document}. Passing a path to
241
+ # an existing {Layout::Document} will use that file as a template. The new
242
+ # {Layout::Document} won't have a path until it is saved for the first time.
243
+ #
244
+ # @example
245
+ # doc = Layout::Document.new
246
+ # doc2 = Layout::Document.new("/path/to/template.layout")
247
+ #
248
+ # @overload initialize
249
+ #
250
+ # @return [Layout::Document] an empty {Layout::Document} with one
251
+ # {Layout::Layer} and one {Layout::Page}
252
+ #
253
+ # @overload initialize(template_path)
254
+ #
255
+ # @param [String] template_path The path to the {Layout::Document} to use as
256
+ # a template
257
+ # @return [Layout::Document] an unsaved {Layout::Document} based on the
258
+ # template
259
+ #
260
+ # @raise [RuntimeError] if there was an error reading the template file
261
+ #
262
+ # @raise [ArgumentError] if the template file could not be found
263
+ #
264
+ # @version LayOut 2018
265
+ def initialize(*args)
266
+ end
267
+
268
+ # The {#layers} method returns the {Layout::Layers} of the {Layout::Document}.
269
+ #
270
+ # @example
271
+ # doc = Layout::Document.open("C:/path/to/document.layout")
272
+ # layers = doc.layers
273
+ #
274
+ # @return [Layout::Layers]
275
+ #
276
+ # @version LayOut 2018
277
+ def layers
278
+ end
279
+
280
+ # The {#object_snap_enabled=} method enables or disables inference in the
281
+ # {Layout::Document}.
282
+ #
283
+ # @example
284
+ # doc = Layout::Document.open("C:/path/to/document.layout")
285
+ # doc.object_snap_enabled = false
286
+ #
287
+ # @param [Boolean] enabled
288
+ # +true+ for enabled +false+ for disabled
289
+ #
290
+ # @version LayOut 2018
291
+ def object_snap_enabled=(enabled)
292
+ end
293
+
294
+ # The {#object_snap_enabled?} method returns whether or not inference is
295
+ # enabled in the {Layout::Document}.
296
+ #
297
+ # @example
298
+ # doc = Layout::Document.open("C:/path/to/document.layout")
299
+ # enabled = doc.object_snap_enabled?
300
+ #
301
+ # @return [Boolean]
302
+ #
303
+ # @version LayOut 2018
304
+ def object_snap_enabled?
305
+ end
306
+
307
+ # The {#page_info} method returns a reference to the {Layout::PageInfo}
308
+ # settings of the {Layout::Document}.
309
+ #
310
+ # @example
311
+ # doc = Layout::Document.open("C:/path/to/document.layout")
312
+ # page_info = doc.page_info
313
+ #
314
+ # @return [Layout::PageInfo]
315
+ #
316
+ # @version LayOut 2018
317
+ def page_info
318
+ end
319
+
320
+ # The {#pages} method returns the {Layout::Pages} of the {Layout::Document}.
321
+ #
322
+ #
323
+ # @example:
324
+ # doc = Layout::Document.open("C:/path/to/document.layout")
325
+ # doc_pages = doc.pages
326
+ #
327
+ # @return [Layout::Pages] The {Layout::Pages} for the {Layout::Document}.
328
+ #
329
+ # @version LayOut 2018
330
+ def pages
331
+ end
332
+
333
+ # The {#path} method returns the full path of the {Layout::Document} file. An
334
+ # empty string is returned for a new {Layout::Document} (one which has not
335
+ # been saved and opened).
336
+ #
337
+ # @example
338
+ # doc = Layout::Document.open("C:/path/to/document.layout")
339
+ # path = doc.path
340
+ #
341
+ # @return [String]
342
+ #
343
+ # @version LayOut 2018
344
+ def path
345
+ end
346
+
347
+ # The {#precision} method returns the precision for the {Layout::Document}.
348
+ #
349
+ # @example
350
+ # doc = Layout::Document.open("C:/path/to/document.layout")
351
+ # precision = doc.precision
352
+ #
353
+ # @return [Float] the number specifying the precision for the
354
+ # {Layout::Document}
355
+ #
356
+ # @version LayOut 2018
357
+ def precision
358
+ end
359
+
360
+ # The {#precision=} method sets the precision for the {Layout::Document}.
361
+ #
362
+ # @example
363
+ # doc = Layout::Document.open("C:/path/to/document.layout")
364
+ # doc.precision = 0.0001
365
+ #
366
+ # @note LayOut only allows for a finite set of precision values for each units
367
+ # setting, so it will set the precision to the closest valid setting for the
368
+ # specified units. See the "Units" section of LayOut's "Document Setup"
369
+ # dialog for a reference of the available precisions for each units setting.
370
+ #
371
+ # @param [Float] precision
372
+ # The double specifying the precision for the
373
+ # {Layout::Document}
374
+ #
375
+ # @version LayOut 2018
376
+ def precision=(precision)
377
+ end
378
+
379
+ # The {#remove_entity} method removes an {Layout::Entity} from the
380
+ # {Layout::Document}. If entity is a {Layout::Group}, then the {Layout::Group}
381
+ # and all of its children will be removed from the {Layout::Document}.
382
+ #
383
+ # @example
384
+ # doc = Layout::Document.open("C:/path/to/document.layout")
385
+ # shared_entities = doc.shared_entities
386
+ # # Remove the first entity in the document
387
+ # doc.remove_entity(shared_entities.first)
388
+ #
389
+ # @param [Layout::Entity] entity
390
+ # The {Layout::Entity} to be removed
391
+ #
392
+ # @raise [ArgumentError] if entity does not belong to the {Layout::Document}
393
+ #
394
+ # @version LayOut 2018
395
+ def remove_entity(entity)
396
+ end
397
+
398
+ # The {#save} method saves the {Layout::Document} to a file at the given path.
399
+ # Passing an empty path string will save the {Layout::Document} at its current
400
+ # path.
401
+ #
402
+ # @example
403
+ # doc = Layout::Document.open("C:/path/to/document.layout")
404
+ # # Save the model using the current Layout format
405
+ # filename = File.join(ENV['Home'], 'Desktop', 'mydoc.layout')
406
+ # status = doc.save(filename)
407
+ # # Save the document to the current file using the current LayOut format
408
+ # status = doc.save
409
+ # # Save the document to the current file in LayOut 3 format
410
+ # status = doc.save(Layout::Document::VERSION_3)
411
+ # # Save the document in LayOut 2013 format
412
+ # filename = File.join(ENV['Home'], 'Desktop', 'mydoc_v2013.layout')
413
+ # status = doc.save(filename, Layout::Document::VERSION_2013)
414
+ #
415
+ # @overload save
416
+ #
417
+ # @raise [ArgumentError] if the {Layout::Document} hasn't been saved with a
418
+ # path yet
419
+ #
420
+ # @overload save(path, version = Layout::Document::VERSION_CURRENT)
421
+ #
422
+ # @param [String] path The path to the .layout file on disk.
423
+ # @param [Integer] version LayOut file format to save.
424
+ #
425
+ # @raise [ArgumentError] if version is not a valid version
426
+ #
427
+ # @raise [ArgumentError] if saving failed. This may be due to the LayOut file
428
+ # being open in the LayOut application
429
+ #
430
+ # @version LayOut 2018
431
+ def save(*args)
432
+ end
433
+
434
+ # The {#shared_entities} method returns the {Layout::Entities}
435
+ # that exist on shared {Layout::Layer}s in the {Layout::Document}.
436
+ #
437
+ # @example
438
+ # doc = Layout::Document.open("C:/path/to/document.layout")
439
+ # entities = doc.shared_entities
440
+ #
441
+ # @return [Layout::Entities]
442
+ #
443
+ # @version LayOut 2018
444
+ def shared_entities
445
+ end
446
+
447
+ # The {#time_created} method returns the time when the {Layout::Document} was
448
+ # created.
449
+ #
450
+ # @example
451
+ # doc = Layout::Document.open("C:/path/to/document.layout")
452
+ # created_time = doc.time_created
453
+ #
454
+ # @return [Time] time when the {Layout::Document} was created
455
+ #
456
+ # @version LayOut 2018
457
+ def time_created
458
+ end
459
+
460
+ # The {#time_modified} method returns the last time the {Layout::Document} was
461
+ # modified.
462
+ #
463
+ # @example
464
+ # doc = Layout::Document.open("C:/path/to/document.layout")
465
+ # mod_time = doc.time_modified
466
+ #
467
+ # @return [Time] time when the {Layout::Document} was last modified
468
+ #
469
+ # @version LayOut 2018
470
+ def time_modified
471
+ end
472
+
473
+ # The {#time_published} method returns the time when the {Layout::Document} was
474
+ # published.
475
+ #
476
+ # @example
477
+ # doc = Layout::Document.open("C:/path/to/document.layout")
478
+ # pub_time = doc.time_published
479
+ #
480
+ # @return [Time] time when the {Layout::Document} was published
481
+ #
482
+ # @version LayOut 2018
483
+ def time_published
484
+ end
485
+
486
+ # The {#units} method returns the units for the {Layout::Document}.
487
+ #
488
+ # @example
489
+ # doc = Layout::Document.open("C:/path/to/document.layout")
490
+ # units = doc.units
491
+ #
492
+ # @return [Integer] The unit format of the {Layout::Document}
493
+ #
494
+ # @version LayOut 2018
495
+ def units
496
+ end
497
+
498
+ # The {#units=} method sets the units for the {Layout::Document}.
499
+ #
500
+ # @example
501
+ # doc = Layout::Document.open("C:/path/to/document.layout")
502
+ # units_format = LAYOUT::DOCUMENT::DECIMAL_MILLIMETERS
503
+ # doc.units = units_format
504
+ #
505
+ # @param [Integer] units_format
506
+ # The format of the units in the {Layout::Document}
507
+ #
508
+ # @raise [ArgumentError] if units format is not a valid format
509
+ #
510
+ # @version LayOut 2018
511
+ def units=(units_format)
512
+ end
513
+
514
+ end