sketchup-api-stubs 0.7.10 → 0.7.11

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 (159) hide show
  1. checksums.yaml +4 -4
  2. data/lib/sketchup-api-stubs/sketchup.rb +6 -0
  3. data/lib/sketchup-api-stubs/stubs/Array.rb +1 -1
  4. data/lib/sketchup-api-stubs/stubs/Geom/BoundingBox.rb +2 -2
  5. data/lib/sketchup-api-stubs/stubs/Geom/Bounds2d.rb +25 -15
  6. data/lib/sketchup-api-stubs/stubs/Geom/LatLong.rb +17 -32
  7. data/lib/sketchup-api-stubs/stubs/Geom/OrientedBounds2d.rb +1 -1
  8. data/lib/sketchup-api-stubs/stubs/Geom/Point2d.rb +62 -39
  9. data/lib/sketchup-api-stubs/stubs/Geom/Point3d.rb +136 -104
  10. data/lib/sketchup-api-stubs/stubs/Geom/PolygonMesh.rb +56 -30
  11. data/lib/sketchup-api-stubs/stubs/Geom/Transformation.rb +76 -52
  12. data/lib/sketchup-api-stubs/stubs/Geom/Transformation2d.rb +35 -31
  13. data/lib/sketchup-api-stubs/stubs/Geom/UTM.rb +8 -16
  14. data/lib/sketchup-api-stubs/stubs/Geom/Vector2d.rb +135 -110
  15. data/lib/sketchup-api-stubs/stubs/Geom/Vector3d.rb +207 -222
  16. data/lib/sketchup-api-stubs/stubs/Geom.rb +6 -6
  17. data/lib/sketchup-api-stubs/stubs/LanguageHandler.rb +1 -1
  18. data/lib/sketchup-api-stubs/stubs/Layout/AngularDimension.rb +1 -1
  19. data/lib/sketchup-api-stubs/stubs/Layout/AutoTextDefinition.rb +11 -7
  20. data/lib/sketchup-api-stubs/stubs/Layout/AutoTextDefinitions.rb +1 -1
  21. data/lib/sketchup-api-stubs/stubs/Layout/ConnectionPoint.rb +1 -1
  22. data/lib/sketchup-api-stubs/stubs/Layout/Dictionary.rb +234 -0
  23. data/lib/sketchup-api-stubs/stubs/Layout/Document.rb +124 -10
  24. data/lib/sketchup-api-stubs/stubs/Layout/Ellipse.rb +1 -1
  25. data/lib/sketchup-api-stubs/stubs/Layout/Entities.rb +1 -1
  26. data/lib/sketchup-api-stubs/stubs/Layout/Entity.rb +112 -4
  27. data/lib/sketchup-api-stubs/stubs/Layout/FormattedText.rb +1 -1
  28. data/lib/sketchup-api-stubs/stubs/Layout/Grid.rb +1 -1
  29. data/lib/sketchup-api-stubs/stubs/Layout/Group.rb +4 -4
  30. data/lib/sketchup-api-stubs/stubs/Layout/Image.rb +1 -1
  31. data/lib/sketchup-api-stubs/stubs/Layout/Label.rb +1 -1
  32. data/lib/sketchup-api-stubs/stubs/Layout/Layer.rb +1 -1
  33. data/lib/sketchup-api-stubs/stubs/Layout/LayerInstance.rb +1 -1
  34. data/lib/sketchup-api-stubs/stubs/Layout/Layers.rb +1 -1
  35. data/lib/sketchup-api-stubs/stubs/Layout/LinearDimension.rb +56 -9
  36. data/lib/sketchup-api-stubs/stubs/Layout/LockedEntityError.rb +1 -1
  37. data/lib/sketchup-api-stubs/stubs/Layout/LockedLayerError.rb +1 -1
  38. data/lib/sketchup-api-stubs/stubs/Layout/Page.rb +100 -1
  39. data/lib/sketchup-api-stubs/stubs/Layout/PageInfo.rb +13 -14
  40. data/lib/sketchup-api-stubs/stubs/Layout/Pages.rb +1 -1
  41. data/lib/sketchup-api-stubs/stubs/Layout/Path.rb +5 -3
  42. data/lib/sketchup-api-stubs/stubs/Layout/Rectangle.rb +1 -1
  43. data/lib/sketchup-api-stubs/stubs/Layout/ReferenceEntity.rb +1 -1
  44. data/lib/sketchup-api-stubs/stubs/Layout/SketchUpModel.rb +1 -1
  45. data/lib/sketchup-api-stubs/stubs/Layout/Style.rb +47 -1
  46. data/lib/sketchup-api-stubs/stubs/Layout/Table.rb +1 -1
  47. data/lib/sketchup-api-stubs/stubs/Layout/TableCell.rb +1 -1
  48. data/lib/sketchup-api-stubs/stubs/Layout/TableColumn.rb +1 -1
  49. data/lib/sketchup-api-stubs/stubs/Layout/TableRow.rb +1 -1
  50. data/lib/sketchup-api-stubs/stubs/Layout.rb +1 -1
  51. data/lib/sketchup-api-stubs/stubs/Length.rb +9 -1
  52. data/lib/sketchup-api-stubs/stubs/Numeric.rb +1 -1
  53. data/lib/sketchup-api-stubs/stubs/Sketchup/Animation.rb +65 -13
  54. data/lib/sketchup-api-stubs/stubs/Sketchup/AppObserver.rb +1 -1
  55. data/lib/sketchup-api-stubs/stubs/Sketchup/ArcCurve.rb +1 -1
  56. data/lib/sketchup-api-stubs/stubs/Sketchup/AttributeDictionaries.rb +2 -7
  57. data/lib/sketchup-api-stubs/stubs/Sketchup/AttributeDictionary.rb +16 -3
  58. data/lib/sketchup-api-stubs/stubs/Sketchup/Axes.rb +13 -13
  59. data/lib/sketchup-api-stubs/stubs/Sketchup/Behavior.rb +8 -14
  60. data/lib/sketchup-api-stubs/stubs/Sketchup/Camera.rb +10 -15
  61. data/lib/sketchup-api-stubs/stubs/Sketchup/ClassificationSchema.rb +1 -1
  62. data/lib/sketchup-api-stubs/stubs/Sketchup/Classifications.rb +2 -2
  63. data/lib/sketchup-api-stubs/stubs/Sketchup/Color.rb +1 -1
  64. data/lib/sketchup-api-stubs/stubs/Sketchup/ComponentDefinition.rb +28 -14
  65. data/lib/sketchup-api-stubs/stubs/Sketchup/ComponentInstance.rb +15 -8
  66. data/lib/sketchup-api-stubs/stubs/Sketchup/Console.rb +1 -1
  67. data/lib/sketchup-api-stubs/stubs/Sketchup/ConstructionLine.rb +7 -12
  68. data/lib/sketchup-api-stubs/stubs/Sketchup/ConstructionPoint.rb +1 -1
  69. data/lib/sketchup-api-stubs/stubs/Sketchup/Curve.rb +1 -1
  70. data/lib/sketchup-api-stubs/stubs/Sketchup/DefinitionList.rb +4 -10
  71. data/lib/sketchup-api-stubs/stubs/Sketchup/DefinitionObserver.rb +1 -1
  72. data/lib/sketchup-api-stubs/stubs/Sketchup/DefinitionsObserver.rb +1 -1
  73. data/lib/sketchup-api-stubs/stubs/Sketchup/Dimension.rb +17 -15
  74. data/lib/sketchup-api-stubs/stubs/Sketchup/DimensionLinear.rb +17 -17
  75. data/lib/sketchup-api-stubs/stubs/Sketchup/DimensionObserver.rb +1 -1
  76. data/lib/sketchup-api-stubs/stubs/Sketchup/DimensionRadial.rb +3 -3
  77. data/lib/sketchup-api-stubs/stubs/Sketchup/Drawingelement.rb +11 -14
  78. data/lib/sketchup-api-stubs/stubs/Sketchup/Edge.rb +2 -2
  79. data/lib/sketchup-api-stubs/stubs/Sketchup/EdgeUse.rb +10 -10
  80. data/lib/sketchup-api-stubs/stubs/Sketchup/Entities.rb +59 -19
  81. data/lib/sketchup-api-stubs/stubs/Sketchup/EntitiesBuilder.rb +1 -1
  82. data/lib/sketchup-api-stubs/stubs/Sketchup/EntitiesObserver.rb +1 -1
  83. data/lib/sketchup-api-stubs/stubs/Sketchup/Entity.rb +3 -3
  84. data/lib/sketchup-api-stubs/stubs/Sketchup/EntityObserver.rb +1 -1
  85. data/lib/sketchup-api-stubs/stubs/Sketchup/Environment.rb +406 -0
  86. data/lib/sketchup-api-stubs/stubs/Sketchup/Environments.rb +185 -0
  87. data/lib/sketchup-api-stubs/stubs/Sketchup/EnvironmentsObserver.rb +113 -0
  88. data/lib/sketchup-api-stubs/stubs/Sketchup/ExtensionsManager.rb +3 -6
  89. data/lib/sketchup-api-stubs/stubs/Sketchup/Face.rb +94 -25
  90. data/lib/sketchup-api-stubs/stubs/Sketchup/FrameChangeObserver.rb +2 -2
  91. data/lib/sketchup-api-stubs/stubs/Sketchup/Group.rb +16 -26
  92. data/lib/sketchup-api-stubs/stubs/Sketchup/Http/Request.rb +24 -17
  93. data/lib/sketchup-api-stubs/stubs/Sketchup/Http/Response.rb +11 -9
  94. data/lib/sketchup-api-stubs/stubs/Sketchup/Http.rb +1 -1
  95. data/lib/sketchup-api-stubs/stubs/Sketchup/Image.rb +4 -67
  96. data/lib/sketchup-api-stubs/stubs/Sketchup/ImageRep.rb +2 -2
  97. data/lib/sketchup-api-stubs/stubs/Sketchup/Importer.rb +2 -2
  98. data/lib/sketchup-api-stubs/stubs/Sketchup/InputPoint.rb +34 -8
  99. data/lib/sketchup-api-stubs/stubs/Sketchup/InstanceObserver.rb +1 -1
  100. data/lib/sketchup-api-stubs/stubs/Sketchup/InstancePath.rb +4 -3
  101. data/lib/sketchup-api-stubs/stubs/Sketchup/Layer.rb +14 -8
  102. data/lib/sketchup-api-stubs/stubs/Sketchup/LayerFolder.rb +3 -45
  103. data/lib/sketchup-api-stubs/stubs/Sketchup/Layers.rb +1 -19
  104. data/lib/sketchup-api-stubs/stubs/Sketchup/LayersObserver.rb +1 -9
  105. data/lib/sketchup-api-stubs/stubs/Sketchup/Licensing/ExtensionLicense.rb +1 -1
  106. data/lib/sketchup-api-stubs/stubs/Sketchup/Licensing.rb +10 -3
  107. data/lib/sketchup-api-stubs/stubs/Sketchup/LineStyle.rb +1 -1
  108. data/lib/sketchup-api-stubs/stubs/Sketchup/LineStyles.rb +1 -1
  109. data/lib/sketchup-api-stubs/stubs/Sketchup/LoadHandler.rb +70 -0
  110. data/lib/sketchup-api-stubs/stubs/Sketchup/Loop.rb +1 -1
  111. data/lib/sketchup-api-stubs/stubs/Sketchup/Material.rb +831 -130
  112. data/lib/sketchup-api-stubs/stubs/Sketchup/Materials.rb +35 -22
  113. data/lib/sketchup-api-stubs/stubs/Sketchup/MaterialsObserver.rb +1 -1
  114. data/lib/sketchup-api-stubs/stubs/Sketchup/Menu.rb +1 -1
  115. data/lib/sketchup-api-stubs/stubs/Sketchup/Model.rb +146 -88
  116. data/lib/sketchup-api-stubs/stubs/Sketchup/ModelObserver.rb +20 -5
  117. data/lib/sketchup-api-stubs/stubs/Sketchup/OptionsManager.rb +14 -11
  118. data/lib/sketchup-api-stubs/stubs/Sketchup/OptionsProvider.rb +1 -1
  119. data/lib/sketchup-api-stubs/stubs/Sketchup/OptionsProviderObserver.rb +1 -1
  120. data/lib/sketchup-api-stubs/stubs/Sketchup/Overlay.rb +17 -44
  121. data/lib/sketchup-api-stubs/stubs/Sketchup/OverlaysManager.rb +1 -13
  122. data/lib/sketchup-api-stubs/stubs/Sketchup/Page.rb +158 -16
  123. data/lib/sketchup-api-stubs/stubs/Sketchup/Pages.rb +48 -21
  124. data/lib/sketchup-api-stubs/stubs/Sketchup/PagesObserver.rb +1 -1
  125. data/lib/sketchup-api-stubs/stubs/Sketchup/PickHelper.rb +61 -40
  126. data/lib/sketchup-api-stubs/stubs/Sketchup/RegionalSettings.rb +1 -1
  127. data/lib/sketchup-api-stubs/stubs/Sketchup/RenderingOptions.rb +13 -1
  128. data/lib/sketchup-api-stubs/stubs/Sketchup/RenderingOptionsObserver.rb +1 -1
  129. data/lib/sketchup-api-stubs/stubs/Sketchup/SectionPlane.rb +1 -1
  130. data/lib/sketchup-api-stubs/stubs/Sketchup/Selection.rb +84 -91
  131. data/lib/sketchup-api-stubs/stubs/Sketchup/SelectionObserver.rb +1 -1
  132. data/lib/sketchup-api-stubs/stubs/Sketchup/Set.rb +1 -2
  133. data/lib/sketchup-api-stubs/stubs/Sketchup/ShadowInfo.rb +9 -5
  134. data/lib/sketchup-api-stubs/stubs/Sketchup/ShadowInfoObserver.rb +1 -1
  135. data/lib/sketchup-api-stubs/stubs/Sketchup/Skp.rb +1 -1
  136. data/lib/sketchup-api-stubs/stubs/Sketchup/Snap.rb +125 -0
  137. data/lib/sketchup-api-stubs/stubs/Sketchup/Style.rb +20 -1
  138. data/lib/sketchup-api-stubs/stubs/Sketchup/Styles.rb +59 -13
  139. data/lib/sketchup-api-stubs/stubs/Sketchup/Text.rb +29 -8
  140. data/lib/sketchup-api-stubs/stubs/Sketchup/Texture.rb +13 -31
  141. data/lib/sketchup-api-stubs/stubs/Sketchup/TextureWriter.rb +9 -9
  142. data/lib/sketchup-api-stubs/stubs/Sketchup/Tool.rb +229 -139
  143. data/lib/sketchup-api-stubs/stubs/Sketchup/Tools.rb +1 -1
  144. data/lib/sketchup-api-stubs/stubs/Sketchup/ToolsObserver.rb +1 -1
  145. data/lib/sketchup-api-stubs/stubs/Sketchup/UVHelper.rb +1 -1
  146. data/lib/sketchup-api-stubs/stubs/Sketchup/Vertex.rb +23 -22
  147. data/lib/sketchup-api-stubs/stubs/Sketchup/View.rb +336 -99
  148. data/lib/sketchup-api-stubs/stubs/Sketchup/ViewObserver.rb +34 -8
  149. data/lib/sketchup-api-stubs/stubs/Sketchup.rb +71 -36
  150. data/lib/sketchup-api-stubs/stubs/SketchupExtension.rb +11 -11
  151. data/lib/sketchup-api-stubs/stubs/String.rb +1 -1
  152. data/lib/sketchup-api-stubs/stubs/UI/Command.rb +21 -9
  153. data/lib/sketchup-api-stubs/stubs/UI/HtmlDialog.rb +80 -5
  154. data/lib/sketchup-api-stubs/stubs/UI/Notification.rb +14 -3
  155. data/lib/sketchup-api-stubs/stubs/UI/Toolbar.rb +20 -3
  156. data/lib/sketchup-api-stubs/stubs/UI/WebDialog.rb +9 -6
  157. data/lib/sketchup-api-stubs/stubs/UI.rb +77 -14
  158. data/lib/sketchup-api-stubs/stubs/_top_level.rb +7 -7
  159. metadata +10 -24
@@ -1,4 +1,4 @@
1
- # Copyright:: Copyright 2024 Trimble Inc.
1
+ # Copyright:: Copyright 2026 Trimble Inc.
2
2
  # License:: The MIT License (MIT)
3
3
 
4
4
  # An Overlay provides contextual model information directly in the viewport.
@@ -13,8 +13,6 @@
13
13
  # It is also not allowed to perform model changes from overlay events. Doing
14
14
  # so will result in a +RuntimeError+ being thrown.
15
15
  #
16
- # @api Overlays
17
- #
18
16
  # @example
19
17
  # class ExampleOverlay < Sketchup::Overlay
20
18
  #
@@ -64,8 +62,6 @@ class Sketchup::Overlay
64
62
 
65
63
  # This is a short user facing description of the overlay that will appear in the UI.
66
64
  #
67
- # @api Overlays
68
- #
69
65
  # @example
70
66
  # Sketchup.active_model.overlays.each { |overlay|
71
67
  # puts "#{overlay.name}: #{overlay.description}"
@@ -80,8 +76,6 @@ class Sketchup::Overlay
80
76
  # Sets a short user facing description of the overlay that will appear in the UI.
81
77
  # Set this before adding to the {Sketchup::OverlaysManager}.
82
78
  #
83
- # @api Overlays
84
- #
85
79
  # @example
86
80
  # Sketchup.active_model.overlays.each { |overlay|
87
81
  # puts "#{overlay.name}: #{overlay.description}"
@@ -96,8 +90,6 @@ class Sketchup::Overlay
96
90
  #
97
91
  # @abstract It is called whenever the view updates.
98
92
  #
99
- # @api Overlays
100
- #
101
93
  # @example
102
94
  # class ExampleOverlay < Sketchup::Overlay
103
95
  #
@@ -143,8 +135,6 @@ class Sketchup::Overlay
143
135
  def draw(view)
144
136
  end
145
137
 
146
- #
147
- # @api Overlays
148
138
  #
149
139
  # @note In most cases, extensions doesn't need to expose any new UI for
150
140
  # enabling them. This can be done from the Overlays panel. However, in some
@@ -160,8 +150,6 @@ class Sketchup::Overlay
160
150
  def enabled=(enabled)
161
151
  end
162
152
 
163
- #
164
- # @api Overlays
165
153
  #
166
154
  # @example
167
155
  # Sketchup.active_model.overlays.each { |overlay|
@@ -189,8 +177,6 @@ class Sketchup::Overlay
189
177
  # in 3D space doesn't appear clipped. If the overlay only draws in 2D this
190
178
  # isn't needed.
191
179
  #
192
- # @api Overlays
193
- #
194
180
  # @example
195
181
  # class ExampleOverlay < Sketchup::Overlay
196
182
  #
@@ -221,8 +207,6 @@ class Sketchup::Overlay
221
207
  def getExtents
222
208
  end
223
209
 
224
- #
225
- # @api Overlays
226
210
  #
227
211
  # @example
228
212
  # class ExampleOverlay < Sketchup::Overlay
@@ -256,8 +240,6 @@ class Sketchup::Overlay
256
240
 
257
241
  # This is a user facing display name that will appear in the UI.
258
242
  #
259
- # @api Overlays
260
- #
261
243
  # @example
262
244
  # Sketchup.active_model.overlays.each { |overlay|
263
245
  # puts "#{overlay.name} (#{overlay.overlay_id}) Enabled: #{overlay.enabled?}"
@@ -275,8 +257,6 @@ class Sketchup::Overlay
275
257
  # @abstract It can be used by implementing sub-classes to react to
276
258
  # mouse movement in the viewport.
277
259
  #
278
- # @api Overlays
279
- #
280
260
  # @example
281
261
  # class ExampleOverlay < Sketchup::Overlay
282
262
  #
@@ -315,8 +295,6 @@ class Sketchup::Overlay
315
295
  # @abstract It can be used by implementing sub-classes to react to
316
296
  # mouse movement in the viewport.
317
297
  #
318
- # @api Overlays
319
- #
320
298
  # @example
321
299
  # class ExampleOverlay < Sketchup::Overlay
322
300
  #
@@ -342,8 +320,6 @@ class Sketchup::Overlay
342
320
  # @abstract It can be used by implementing sub-classes to react to
343
321
  # mouse movement in the viewport.
344
322
  #
345
- # @api Overlays
346
- #
347
323
  # @example
348
324
  # class ExampleOverlay < Sketchup::Overlay
349
325
  #
@@ -360,24 +336,29 @@ class Sketchup::Overlay
360
336
  #
361
337
  # end
362
338
  #
363
- # @param [Integer] flags
364
- # A bit mask that tells the state of the modifier
365
- # keys and other mouse buttons at the time.
339
+ # @overload onMouseMove(flags, x, y, view)
366
340
  #
367
- # @param [Integer] x
368
- # The X coordinate on the screen where the event occurred.
341
+ # @note Signature for versions prior to SketchUp 2025.0
342
+ # @version SketchUp 2023.0
343
+ # @param [Integer] flags A bit mask that tells the state of the modifier
344
+ # keys and other mouse buttons at the time.
345
+ # @param [Integer] x Screen coordinate in physical pixels.
346
+ # @param [Integer] y Screen coordinate in physical pixels.
347
+ # @param [Sketchup::View] view
369
348
  #
370
- # @param [Integer] y
371
- # The Y coordinate on the screen where the event occurred.
349
+ # @overload onMouseMove(flags, x, y, view)
372
350
  #
373
- # @param [Sketchup::View] view
351
+ # @version SketchUp 2025.0
352
+ # @param [Integer] flags A bit mask that tells the state of the modifier
353
+ # keys and other mouse buttons at the time.
354
+ # @param [Float] x Screen coordinate in logical pixels.
355
+ # @param [Float] y Screen coordinate in logical pixels.
356
+ # @param [Sketchup::View] view
374
357
  #
375
358
  # @version SketchUp 2023.0
376
- def onMouseMove(flags, x, y, view)
359
+ def onMouseMove
377
360
  end
378
361
 
379
- #
380
- # @api Overlays
381
362
  #
382
363
  # @example Implementing
383
364
  # class ExampleOverlay < Sketchup::Overlay
@@ -402,8 +383,6 @@ class Sketchup::Overlay
402
383
  # Describes the source associated with the overlay. This is automatically inferred
403
384
  # when the overlay instance is initialized.
404
385
  #
405
- # @api Overlays
406
- #
407
386
  # @example
408
387
  # Sketchup.active_model.overlays.each { |overlay|
409
388
  # puts "#{overlay.name} (Extension: #{overlay.source})"
@@ -419,8 +398,6 @@ class Sketchup::Overlay
419
398
  # @abstract It can be used by implementing sub-classes to react when the overlay
420
399
  # becomes active, for instance when the user turns it on.
421
400
  #
422
- # @api Overlays
423
- #
424
401
  # @example
425
402
  # class ExampleOverlay < Sketchup::Overlay
426
403
  #
@@ -442,8 +419,6 @@ class Sketchup::Overlay
442
419
  # @abstract It can be used by implementing sub-classes to react when the overlay
443
420
  # becomes inactive, for instance when the user turns it off.
444
421
  #
445
- # @api Overlays
446
- #
447
422
  # @example
448
423
  # class ExampleOverlay < Sketchup::Overlay
449
424
  #
@@ -464,8 +439,6 @@ class Sketchup::Overlay
464
439
  # Indicates whether the overlay is valid. An overlay becomes invalid after
465
440
  # being removed from the model and cannot be reused.
466
441
  #
467
- # @api Overlays
468
- #
469
442
  # @example
470
443
  # class ExampleOverlay < Sketchup::Overlay
471
444
  # def initialize
@@ -1,4 +1,4 @@
1
- # Copyright:: Copyright 2024 Trimble Inc.
1
+ # Copyright:: Copyright 2026 Trimble Inc.
2
2
  # License:: The MIT License (MIT)
3
3
 
4
4
  # An overlay added to a model is invalidated once it's removed from the model.
@@ -10,8 +10,6 @@
10
10
  #
11
11
  # A model can not have multiple overlays with the same id.
12
12
  #
13
- # @api Overlays
14
- #
15
13
  # @example
16
14
  # Sketchup.active_model.overlays.each { |overlay|
17
15
  # puts "#{overlay.name} (#{overlay.overlay_id}) Enabled: #{overlay.enabled?}"
@@ -29,8 +27,6 @@ class Sketchup::OverlaysManager
29
27
 
30
28
  # Instance Methods
31
29
 
32
- #
33
- # @api Overlays
34
30
  #
35
31
  # @example
36
32
  # overlay = Sketchup.active_model.overlays[0]
@@ -42,8 +38,6 @@ class Sketchup::OverlaysManager
42
38
  end
43
39
  alias_method :at, :[]
44
40
 
45
- #
46
- # @api Overlays
47
41
  #
48
42
  # @example
49
43
  # class ExampleOverlay < Sketchup::Overlay
@@ -63,8 +57,6 @@ class Sketchup::OverlaysManager
63
57
  def add(service)
64
58
  end
65
59
 
66
- #
67
- # @api Overlays
68
60
  #
69
61
  # @example
70
62
  # Sketchup.active_model.overlays.each { |overlay|
@@ -79,8 +71,6 @@ class Sketchup::OverlaysManager
79
71
  def each
80
72
  end
81
73
 
82
- #
83
- # @api Overlays
84
74
  #
85
75
  # @example
86
76
  # class ExampleOverlay < Sketchup::Overlay
@@ -100,8 +90,6 @@ class Sketchup::OverlaysManager
100
90
  def remove(service)
101
91
  end
102
92
 
103
- #
104
- # @api Overlays
105
93
  #
106
94
  # @example
107
95
  # num_overlays = Sketchup.active_model.overlays.size
@@ -1,31 +1,71 @@
1
- # Copyright:: Copyright 2024 Trimble Inc.
1
+ # Copyright:: Copyright 2026 Trimble Inc.
2
2
  # License:: The MIT License (MIT)
3
3
 
4
- # The Page class contains methods to extract information and modify the
5
- # properties of an individual page.
4
+ # The Page class contains methods to extract information and modify the properties of
5
+ # an individual page.
6
6
  #
7
7
  # Note that inside the SketchUp user interface pages are called "Scenes".
8
8
  #
9
+ # Since SketchUp 2026.0, modifying the {Sketchup::Axes}, {Sketchup::Camera},
10
+ # {Sketchup::RenderingOptions}, and {Sketchup::ShadowInfo} properties of a page is an undoable
11
+ # operation and should be wrapped between {Sketchup::Model#start_operation} and
12
+ # {Sketchup::Model#commit_operation}.
13
+ # Example:
14
+ # model = Sketchup.active_model
15
+ # pages = model.pages
16
+ # origin = Geom::Point3d.new(10, 0, 0)
17
+ #
18
+ # model.start_operation("Set Page Properties")
19
+ # page = pages.add("My Page")
20
+ # page.axes.set(origin, Y_AXIS, X_AXIS, Z_AXIS)
21
+ # page.camera.fov = 56.78
22
+ # page.shadow_info["City"] = "Brasov, Romania"
23
+ # page.rendering_options["BackgroundColor"] = "Pink"
24
+ # model.commit_operation
25
+ #
9
26
  # @version SketchUp 6.0
10
27
  class Sketchup::Page < Sketchup::Entity
11
28
 
12
29
  # Instance Methods
13
30
 
31
+ # The {#active_section_planes} method is used to retrieve the active section
32
+ # plane for the {Sketchup::Page}.
33
+ #
34
+ # @example
35
+ # model = Sketchup.active_model
36
+ # pages = model.pages
37
+ # page = pages.add('My Page')
38
+ # page.active_section_planes
39
+ #
40
+ # @return [Array<Sketchup::SectionPlane>, nil] Returns +nil+ if the page does
41
+ # not use section planes.
42
+ #
43
+ # @version SketchUp 2026.0
44
+ def active_section_planes
45
+ end
46
+
14
47
  # The axes method returns the drawing axes for the page.
15
48
  #
49
+ # Since SketchUp 2026.0, modifying the axes of a scene is an undoable operation.
50
+ #
16
51
  # @example
17
- # page = Sketchup.active_model.pages.add("Example Page")
52
+ # model = Sketchup.active_model
53
+ # page = model.pages.add("Example Page")
18
54
  # xaxis = Geom::Vector3d.new(3, 5, 0)
19
55
  # yaxis = xaxis * Z_AXIS
20
56
  # page.axes.set([10,0,0], xaxis, yaxis, Z_AXIS)
57
+ # page.update(PAGE_USE_ALL)
58
+ # page.axes
21
59
  #
22
- # @return Axes - the axes for the page.
60
+ # @return [Sketchup::Axes]
23
61
  #
24
62
  # @version SketchUp 2016
25
63
  def axes
26
64
  end
27
65
 
28
- # The camera method retrieves the camera for a particular page.
66
+ # The {#camera} method retrieves the camera for a particular page.
67
+ #
68
+ # Since SketchUp 2026.0, modifying the camera properties of a scene is an undoable operation.
29
69
  #
30
70
  # @example
31
71
  # model = Sketchup.active_model
@@ -33,8 +73,7 @@ class Sketchup::Page < Sketchup::Entity
33
73
  # page = pages.add "My Page"
34
74
  # camera = page.camera
35
75
  #
36
- # @return camera - a Camera object if successful, nil if the page
37
- # does not save camera information
76
+ # @return [Sketchup::Camera]
38
77
  #
39
78
  # @version SketchUp 6.0
40
79
  def camera
@@ -114,6 +153,40 @@ class Sketchup::Page < Sketchup::Entity
114
153
  def description=(description)
115
154
  end
116
155
 
156
+ # The {#environment} method is used to retrieve the {Sketchup::Environment}
157
+ # for the scene.
158
+ #
159
+ # @example
160
+ # model = Sketchup.active_model
161
+ # pages = model.pages
162
+ # page = pages.add('My Page')
163
+ # page.environment
164
+ #
165
+ # @return [Sketchup::Environment]
166
+ #
167
+ # @version SketchUp 2025.0
168
+ def environment
169
+ end
170
+
171
+ # The {#environment=} method is used to set the {Sketchup::Environment}
172
+ # for the scene.
173
+ #
174
+ # @example
175
+ # model = Sketchup.active_model
176
+ # pages = model.pages
177
+ # page = pages.add('My Page')
178
+ # path = 'path/to/environment.hdr'
179
+ # environment = model.environments.add('My Environment', path)
180
+ # page.environment = environment
181
+ #
182
+ # @param [Sketchup::Environment] environment
183
+ #
184
+ # @return [Sketchup::Environment]
185
+ #
186
+ # @version SketchUp 2025.0
187
+ def environment=(environment)
188
+ end
189
+
117
190
  # The {#get_drawingelement_visibility} method is used to get the visibility
118
191
  # of a drawing element on a particular page.
119
192
  #
@@ -126,6 +199,19 @@ class Sketchup::Page < Sketchup::Entity
126
199
  # page = pages.add("My Page")
127
200
  # result = page.get_drawingelement_visibility(constpoint)
128
201
  #
202
+ # @example
203
+ # # SketchUp 2020.1 is required
204
+ # def element_visible_in_page?(element, page)
205
+ # case element
206
+ # when Sketchup::ComponentInstance, Sketchup::Group
207
+ # return unless page.use_hidden_objects?
208
+ # else
209
+ # return unless page.use_hidden_geometry?
210
+ # return unless element.parent == Sketchup.active_model
211
+ # end
212
+ # page.get_drawingelement_visibility(element)
213
+ # end
214
+ #
129
215
  # @param [Sketchup::Drawingelement] element
130
216
  #
131
217
  # @return [Boolean] - true if visible, false if not.
@@ -142,8 +228,8 @@ class Sketchup::Page < Sketchup::Entity
142
228
  # page = pages.add "My Page"
143
229
  # entities = page.hidden_entities
144
230
  #
145
- # @return entities - an Entities object containing hidden
146
- # entities on the page.
231
+ # @return [Array<Sketchup::Drawingelement>] an array of drawing elements that are
232
+ # *hidden* on the page.
147
233
  #
148
234
  # @version SketchUp 6.0
149
235
  def hidden_entities
@@ -248,7 +334,10 @@ class Sketchup::Page < Sketchup::Entity
248
334
  def name
249
335
  end
250
336
 
251
- # The name= method sets the name for a page's tab.
337
+ # The {#name=} method sets the name for a page's tab. If the name is already used by another page,
338
+ # a unique name is created.
339
+ #
340
+ # @bug Prior to SketchUp 2026.0 this method did not make the name unique.
252
341
  #
253
342
  # @example
254
343
  # model = Sketchup.active_model
@@ -268,13 +357,20 @@ class Sketchup::Page < Sketchup::Entity
268
357
  # The rendering_options method retrieves a RenderingOptions object for the
269
358
  # page.
270
359
  #
360
+ # Since SketchUp 2026.0, modifying rendering_options of a scene is an undoable operation.
361
+ #
271
362
  # @example
272
363
  # model = Sketchup.active_model
273
364
  # pages = model.pages
274
- # page = pages.add "My Page"
365
+ # page = pages.add("My Page")
275
366
  # renderingoptions = page.rendering_options
276
367
  #
277
- # @return renderingoptions - a RenderingOptions object
368
+ # @note Most rendering options of a scene are also present in {Sketchup::Style} and are governed by
369
+ # the selected style. Those options should not be changed from the scene.
370
+ # The ones not related to {Sketchup::Style} like fog (+DisplayFog+,
371
+ # +FogColor+) are safe to be changed from the scene.
372
+ #
373
+ # @return [Sketchup::RenderingOptions]
278
374
  #
279
375
  # @version SketchUp 6.0
280
376
  def rendering_options
@@ -331,7 +427,9 @@ class Sketchup::Page < Sketchup::Entity
331
427
  def set_visibility(arg1, arg2)
332
428
  end
333
429
 
334
- # The shadow_info method retrieves the ShadowInfo object for the page.
430
+ # The {#shadow_info} method retrieves the ShadowInfo object for the page.
431
+ #
432
+ # Since SketchUp 2026.0, modifying shadow_info of a scene is an undoable operation.
335
433
  #
336
434
  # @example
337
435
  # model = Sketchup.active_model
@@ -339,8 +437,11 @@ class Sketchup::Page < Sketchup::Entity
339
437
  # page = pages.add "My Page"
340
438
  # shadowinfo = page.shadow_info
341
439
  #
342
- # @return shadowinfo - a ShadowInfo object if successful, nil if
343
- # the page does not save shadow information
440
+ # @note While certain shadow settings, such as those available in the Shadows panel, can be
441
+ # controlled on a per-page basis, global settings like north
442
+ # angle, latitude, and longitude are managed at the model level and are not page-specific.
443
+ #
444
+ # @return [Sketchup::ShadowInfo]
344
445
  #
345
446
  # @version SketchUp 6.0
346
447
  def shadow_info
@@ -410,6 +511,7 @@ class Sketchup::Page < Sketchup::Entity
410
511
  # PAGE_USE_LAYER_VISIBILITY # Visible Layers
411
512
  # PAGE_USE_SECTION_PLANES # Active Section Planes
412
513
  # PAGE_USE_ALL # All possible scene properties
514
+ # PAGE_USE_ENVIRONMENT # Environment settings
413
515
  #
414
516
  # @example
415
517
  # model = Sketchup.active_model
@@ -503,6 +605,46 @@ class Sketchup::Page < Sketchup::Entity
503
605
  def use_camera?
504
606
  end
505
607
 
608
+ # The {#use_environment=} method is used to set if the {Sketchup::Environment}
609
+ # settings are used in the scene.
610
+ #
611
+ # @example
612
+ # model = Sketchup.active_model
613
+ # pages = model.pages
614
+ # page = pages.add('My Page')
615
+ # page.use_environment?
616
+ # # => true
617
+ # page.use_environment = false
618
+ # page.use_environment?
619
+ # # => false
620
+ #
621
+ # @param [Boolean] use_environment
622
+ #
623
+ # @return [Boolean]
624
+ #
625
+ # @version SketchUp 2025.0
626
+ def use_environment=(use_environment)
627
+ end
628
+
629
+ # The {#use_environment?} method is used to determine if the {Sketchup::Environment}
630
+ # settings are used in the scene.
631
+ #
632
+ # @example
633
+ # model = Sketchup.active_model
634
+ # pages = model.pages
635
+ # page = pages.add('My Page')
636
+ # page.use_environment?
637
+ # # => true
638
+ # page.use_environment = false
639
+ # page.use_environment?
640
+ # # => false
641
+ #
642
+ # @return [Boolean]
643
+ #
644
+ # @version SketchUp 2025.0
645
+ def use_environment?
646
+ end
647
+
506
648
  # The use_hidden= method sets the page's hidden property.
507
649
  #
508
650
  # @deprecated The functionality is replaced by {use_hidden_geometry=}
@@ -1,4 +1,4 @@
1
- # Copyright:: Copyright 2024 Trimble Inc.
1
+ # Copyright:: Copyright 2026 Trimble Inc.
2
2
  # License:: The MIT License (MIT)
3
3
 
4
4
  # The Pages class contains methods for manipulating a collection of Pages
@@ -17,16 +17,6 @@ class Sketchup::Pages < Sketchup::Entity
17
17
 
18
18
  include Enumerable
19
19
 
20
- # Constants
21
-
22
- ImageEmbedded = nil # Stub value.
23
- ImageEmbeddedAndLinked = nil # Stub value.
24
- ImageLinked = nil # Stub value.
25
-
26
- UnitsNormalizedX = nil # Stub value.
27
- UnitsNormalizedY = nil # Stub value.
28
- UnitsPixels = nil # Stub value.
29
-
30
20
  # Class Methods
31
21
 
32
22
  # The {.add_frame_change_observer} method is used to add a new frame change
@@ -82,11 +72,6 @@ class Sketchup::Pages < Sketchup::Entity
82
72
  # status = pages.add "Page 1"
83
73
  # status = pages.add "Page 2"
84
74
  # page = pages["Page 2"]
85
- # if (page)
86
- # UI.messagebox page
87
- # else
88
- # UI.messagebox "Failure"
89
- # end
90
75
  #
91
76
  # @param index_or_name
92
77
  # The index or the string name of the specific page.
@@ -103,6 +88,8 @@ class Sketchup::Pages < Sketchup::Entity
103
88
  # new Pages. If a name is given, then a new Page with that name is
104
89
  # added.
105
90
  #
91
+ # If the name is already used by another page, a unique name is created.
92
+ #
106
93
  # If the flags parameter is given, it controls which properties are saved with
107
94
  # the Page. See the {Page#update} method for a description of the flags that
108
95
  # can be set.
@@ -110,16 +97,13 @@ class Sketchup::Pages < Sketchup::Entity
110
97
  # If index is given, it specifies the position in the page list that the new
111
98
  # page is added. Otherwise the new page is added to the end.
112
99
  #
100
+ # @bug Prior to SketchUp 2026.0 this method didn't make the name unique.
101
+ #
113
102
  # @example
114
103
  # model = Sketchup.active_model
115
104
  # pages = model.pages
116
105
  # status = pages.add "Page 1"
117
106
  # status = pages.add "Page 2"
118
- # if (status)
119
- # UI.messagebox status
120
- # else
121
- # UI.messagebox "Failure"
122
- # end
123
107
  #
124
108
  # @param [String] name
125
109
  # The name of the specific page.
@@ -270,6 +254,31 @@ class Sketchup::Pages < Sketchup::Entity
270
254
  def remove_observer(observer)
271
255
  end
272
256
 
257
+ # The {#reorder} method is used to reorder an existing {Sketchup::Page} object inside collection.
258
+ #
259
+ # +new_index+ specifies the new position of the page. It should be a value
260
+ # between +0+ and the max index of the {Sketchup::Pages} collection.
261
+ # Negative indices can be used to specify an index from the end of the list.
262
+ #
263
+ # @example
264
+ # model = Sketchup.active_model
265
+ # pages = model.pages
266
+ # pages.reorder(model.pages[0], 2)
267
+ #
268
+ # @param [Sketchup::Page] page
269
+ # The page to be reordered.
270
+ #
271
+ # @param [Integer] new_index
272
+ # Index of where to replace the page.
273
+ #
274
+ # @raise [IndexError] if the given +new_index+ is out of range.
275
+ #
276
+ # @return nil
277
+ #
278
+ # @version SketchUp 2025.0
279
+ def reorder(page, new_index)
280
+ end
281
+
273
282
  # The selected_page method is used to retrieve the currently selected page.
274
283
  #
275
284
  # @example
@@ -358,4 +367,22 @@ class Sketchup::Pages < Sketchup::Entity
358
367
  def slideshow_time
359
368
  end
360
369
 
370
+ # The {#unique_name} method is used to generate a unique name for the page based on a base_name
371
+ # string. For example, a base name of "Joe" might return "Joe 2" if "Joe" already exists.
372
+ #
373
+ # @example
374
+ # model = Sketchup.active_model
375
+ # pages = model.pages
376
+ # page = pages.add('Joe')
377
+ # page.unique_name('Joe')
378
+ #
379
+ # @param [String] base_name
380
+ # The base name to use for the unique name.
381
+ #
382
+ # @return [String] The unique name.
383
+ #
384
+ # @version SketchUp 2026.0
385
+ def unique_name(base_name)
386
+ end
387
+
361
388
  end
@@ -1,4 +1,4 @@
1
- # Copyright:: Copyright 2024 Trimble Inc.
1
+ # Copyright:: Copyright 2026 Trimble Inc.
2
2
  # License:: The MIT License (MIT)
3
3
 
4
4
  # This observer interface is implemented to react to pages events.