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
  # The Toolbar class contains methods to create and manipulate SketchUp
@@ -113,12 +113,29 @@ class UI::Toolbar
113
113
  # The get_last_state method is used to determine if the toolbar was hidden or
114
114
  # visible in the previous session of SketchUp.
115
115
  #
116
- # Valid states are 1 for visible, 0 for hidden, -1 for before never shown.
116
+ # Valid states are {TB_VISIBLE} (1) for visible, {TB_HIDDEN} (0) for hidden,
117
+ # {TB_NEVER_SHOWN} (-1) for before never shown.
117
118
  #
118
119
  # @example
119
120
  # state = toolbar.get_last_state
121
+ # case state
122
+ # when TB_VISIBLE
123
+ # puts "Toolbar was visible in the last session."
124
+ # when TB_HIDDEN
125
+ # puts "Toolbar was hidden in the last session."
126
+ # when TB_NEVER_SHOWN
127
+ # puts "Toolbar was never shown in the last session."
128
+ # else
129
+ # puts "Unknown toolbar state: #{state}"
130
+ # end
120
131
  #
121
- # @return [Boolean] the last state of the toolbar (see comments)
132
+ # @return [Integer] the last state of the toolbar (see constants above)
133
+ #
134
+ # @see TB_VISIBLE
135
+ #
136
+ # @see TB_HIDDEN
137
+ #
138
+ # @see TB_NEVER_SHOWN
122
139
  #
123
140
  # @version SketchUp 6.0
124
141
  def get_last_state
@@ -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 Ruby WebDialog class allows you to create and interact with DHTML dialog
@@ -9,7 +9,7 @@
9
9
  # than inside a dialog in SketchUp.
10
10
  #
11
11
  # See this blog post for a detailed, step-by-step example:
12
- # http://sketchupapi.blogspot.com/2008/02/sharing-data-between-sketchup-ruby-and.html
12
+ # https://sketchupapi.blogspot.com/2008/02/sharing-data-between-sketchup-ruby-and.html
13
13
  #
14
14
  # Under Windows the IE render mode is different in webdialogs than from what
15
15
  # you see in the normal browser. It will by default pick an older render mode
@@ -29,7 +29,7 @@
29
29
  # would like to direct the user to install that extension.
30
30
  #
31
31
  # For example, to launch an extension's page whose URL is:
32
- # http://extensions.sketchup.com/en/content/advanced-camera-tools
32
+ # https://extensions.sketchup.com/en/content/advanced-camera-tools
33
33
  # The link would be:
34
34
  #
35
35
  # @deprecated Please use {UI::HtmlDialog} that was introduced in
@@ -180,7 +180,7 @@ class UI::WebDialog
180
180
  # @example
181
181
  # dlg = UI::WebDialog.new("Show sketchup.com", true,
182
182
  # "ShowSketchupDotCom", 739, 641, 150, 150, true);
183
- # dlg.set_url "http://www.sketchup.com"
183
+ # dlg.set_url "https://www.sketchup.com"
184
184
  # dlg.show
185
185
  #
186
186
  # @note Since SU2017 the position and size of the dialog is DPI aware - it will
@@ -385,7 +385,7 @@ class UI::WebDialog
385
385
  # method.
386
386
  #
387
387
  # @example
388
- # data = dialog.post_url("http://www.mydomain.com/formchecker.cgi",data)
388
+ # data = dialog.post_url("https://www.mydomain.com/formchecker.cgi",data)
389
389
  #
390
390
  # @param [String] url
391
391
  # The url to send the data.
@@ -482,6 +482,9 @@ class UI::WebDialog
482
482
  # @example
483
483
  # dialog.set_on_close{ UI.messagebox("Closing the webDialog") }
484
484
  #
485
+ # @note {UI::WebDialog#close} method should not be called from the {UI::WebDialog#set_on_close}
486
+ # callback. That would make it trigger itself recursively.
487
+ #
485
488
  # @return [nil]
486
489
  #
487
490
  # @version SketchUp 6.0
@@ -535,7 +538,7 @@ class UI::WebDialog
535
538
  # specific URL. This method allows you to load web sites in a webdialog.
536
539
  #
537
540
  # @example
538
- # dialog.set_url "http://www.sketchup.com"
541
+ # dialog.set_url "https://www.sketchup.com"
539
542
  #
540
543
  # @param [String] url
541
544
  # The URL for a specific web site.
@@ -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 UI module contains a number of methods for creating simple UI elements
@@ -56,11 +56,12 @@ module UI
56
56
  # the specified location. This must be called from within a custom
57
57
  # tool. See the {Sketchup::Tool} documentation for a complete example.
58
58
  #
59
- # The size of the cursor images should be 32x32 pixels.
59
+ # The size of the cursor images should be 32x32 pixels. Any size different
60
+ # from that will be scaled using the shrink-to-fit policy.
60
61
  #
61
- # The coordinates for the cursor's hotspot is based from it's top left corner.
62
+ # The coordinates for the cursor's hotspot are based from it's top left corner, starting at (0, 0).
62
63
  # For example, a value of (hot_x, hot_y) = (5, 10) would identify the hotpoint
63
- # of the cursor at 6 pixels from the left edge of your cursor image and 11
64
+ # of the cursor at 5 pixels from the left edge of your cursor image and 10
64
65
  # pixels from the top edge of your cursor image.
65
66
  #
66
67
  # @bug On macOS raster cursors are always displayed at 24x24.
@@ -94,12 +95,15 @@ module UI
94
95
  # File path to an image.
95
96
  #
96
97
  # @param [Integer] hot_x
97
- # An x coordinate that is the "hotpoint" for the cursor
98
- # computed from the left edge of your cursor image.
98
+ # The x-coordinate of the "hotpoint" of the cursor, computed from the left edge of your cursor
99
+ # image.
99
100
  #
100
101
  # @param [Integer] hot_y
101
- # A y coordinate that is the "hotpoint" for the cursor
102
- # computed from the top edge of the of your cursor image.
102
+ # The y-coordinate of the "hotpoint" of the cursor, computed from the top edge of your cursor
103
+ # image.
104
+ #
105
+ # @raise [RangeError] if @param hot_x or @param hot_y are negative or larger than the max value of
106
+ # an Integer.
103
107
  #
104
108
  # @return [Integer] Id associated with the cursor.
105
109
  # Use this with {UI.set_cursor} in {Sketchup::Tool#onSetCursor}.
@@ -144,6 +148,10 @@ module UI
144
148
  # list = ["", "", "Male|Female"]
145
149
  # input = UI.inputbox(prompts, defaults, list, "Tell me about yourself.")
146
150
  #
151
+ # @note The method intelligently handles various types for default values and lists, automatically
152
+ # attempting to convert provided inputs to match the type of the default value. This ensures
153
+ # consistency in data types throughout the operation.
154
+ #
147
155
  # @overload inputbox(prompts, defaults, title)
148
156
  #
149
157
  # @param [Array<String>] prompts
@@ -252,7 +260,7 @@ module UI
252
260
  # @example
253
261
  # result = UI.messagebox('Do you like cheese?', MB_YESNO)
254
262
  # if result == IDYES
255
- # UI.messagebox('SketchUp likes cheese too!')
263
+ # puts 'SketchUp likes cheese too!'
256
264
  # end
257
265
  #
258
266
  # @param [String] message
@@ -291,8 +299,16 @@ module UI
291
299
  # not perform URL encoding and the API user is expected to provide a valid
292
300
  # URL.
293
301
  #
294
- # @example
295
- # status = UI.openURL("http://www.sketchup.com")
302
+ # @example Open plain(non-encoded) URL
303
+ # status = UI.openURL("https://www.sketchup.com")
304
+ #
305
+ # @example Open encoded URL
306
+ # status = UI.openURL("https://example.com/api?query=test&test=test")
307
+ #
308
+ # @example Open a local URL
309
+ # # To open a local file one must add file:/// in front of the path of the file to make it an
310
+ # # URL.
311
+ # status = UI.openURL("file:///path/to/the/file/file.skp")
296
312
  #
297
313
  # @param [String] url
298
314
  #
@@ -450,7 +466,20 @@ module UI
450
466
  # Returns the scaling factor SketchUp uses on high DPI monitors. Useful for
451
467
  # things like {Sketchup::View#draw2d}.
452
468
  #
453
- # @example
469
+ # @example Per Monitor DPI
470
+ # # Scale a set of points representing 2d screen points to account for high
471
+ # # DPI monitors.
472
+ # points2d = [
473
+ # Geom::Point3d.new(0, 0, 0),
474
+ # Geom::Point3d.new(8, 0, 0),
475
+ # Geom::Point3d.new(8, 4, 0),
476
+ # Geom::Point3d.new(0, 4, 0),
477
+ # ]
478
+ # scale = UI.scale_factor(Sketchup.active_model.active_view)
479
+ # tr = Geom::Transformation.scaling(UI.scale_factor)
480
+ # points2d.each { |point| point.transform!(tr) }
481
+ #
482
+ # @example Deprecated legacy API
454
483
  # # Scale a set of points representing 2d screen points to account for high
455
484
  # # DPI monitors.
456
485
  # points2d = [
@@ -460,15 +489,28 @@ module UI
460
489
  # Geom::Point3d.new(0, 4, 0)
461
490
  # ]
462
491
  # tr = Geom::Transformation.scaling(UI.scale_factor)
463
- # points2d.each { |point| point.transform!(tr)
492
+ # points2d.each { |point| point.transform!(tr) }
464
493
  #
465
494
  # @note SU2017M0 will automatically scale up line width and text size, but will
466
495
  # not scale up the points provided to {Sketchup::View#draw2d}.
467
496
  #
497
+ # @overload scale_factor
498
+ #
499
+ # @version SketchUp 2017
500
+ # @deprecated Use the overload that takes a {Sketchup::View} instead.
501
+ # This returns a scale factor determined when SketchUp starts from the
502
+ # monitor it started on. It does not change for the duration of the
503
+ # application session.
504
+ #
505
+ # @overload scale_factor(view)
506
+ #
507
+ # @version SketchUp 2025.0
508
+ # @param [Sketchup::View] view
509
+ #
468
510
  # @return [Float]
469
511
  #
470
512
  # @version SketchUp 2017
471
- def self.scale_factor
513
+ def self.scale_factor(*args)
472
514
  end
473
515
 
474
516
  # The {.select_directory} method is used to display the OS dialog for selecting
@@ -579,6 +621,27 @@ module UI
579
621
  def self.show_extension_manager
580
622
  end
581
623
 
624
+ # Show the Extension Warehouse dialog inside SketchUp. If an extension UUID is provided
625
+ # the dialog navigates directly to that extension's page. If no UUID is provided it opens
626
+ # the Extension Warehouse home page.
627
+ #
628
+ # @example
629
+ # # Open EW home
630
+ # UI.show_extension_warehouse
631
+ #
632
+ # @example
633
+ # # Open a specific extension by UUID (taken from the EW URL)
634
+ # UI.show_extension_warehouse("a97d22f8-5968-4f43-bcf9-4f322fa7a8cb")
635
+ #
636
+ # @param [String, nil] extension_id
637
+ # Optional Extension Warehouse UUID. If nil or omitted the EW home page is shown.
638
+ #
639
+ # @return [nil]
640
+ #
641
+ # @version SketchUp 2026.1
642
+ def self.show_extension_warehouse(extension_id = nil)
643
+ end
644
+
582
645
  # The {.show_inspector} method is used to display the inspector with the given
583
646
  # name. You can get the list of valid inspectors with UI.inspector_names.
584
647
  #
@@ -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
 
@@ -146,6 +146,7 @@
146
146
  PAGE_NO_CAMERA = nil # Stub value.
147
147
  PAGE_USE_ALL = nil # Stub value.
148
148
  PAGE_USE_CAMERA = nil # Stub value.
149
+ PAGE_USE_ENVIRONMENT = nil # Stub value.
149
150
  PAGE_USE_HIDDEN = nil # Stub value.
150
151
  PAGE_USE_HIDDEN_GEOMETRY = nil # Stub value.
151
152
  PAGE_USE_HIDDEN_OBJECTS = nil # Stub value.
@@ -178,24 +179,23 @@
178
179
  TextVerticalAlignCapHeight = nil # Stub value.
179
180
  TextVerticalAlignCenter = nil # Stub value.
180
181
 
182
+ VK_ALT = nil # Stub value.
183
+ VK_COMMAND = nil # Stub value.
184
+ VK_CONTROL = nil # Stub value.
181
185
  VK_DELETE = nil # Stub value.
182
186
  VK_DOWN = nil # Stub value.
183
187
  VK_END = nil # Stub value.
184
188
  VK_HOME = nil # Stub value.
185
189
  VK_INSERT = nil # Stub value.
186
190
  VK_LEFT = nil # Stub value.
191
+ VK_MENU = nil # Stub value.
187
192
  VK_NEXT = nil # Stub value.
188
193
  VK_PRIOR = nil # Stub value.
189
194
  VK_RIGHT = nil # Stub value.
195
+ VK_SHIFT = nil # Stub value.
190
196
  VK_SPACE = nil # Stub value.
191
197
  VK_UP = nil # Stub value.
192
198
 
193
- VK_ALT = nil # Stub value.
194
- VK_COMMAND = nil # Stub value.
195
- VK_CONTROL = nil # Stub value.
196
- VK_MENU = nil # Stub value.
197
- VK_SHIFT = nil # Stub value.
198
-
199
199
  X_AXIS_2D = nil # Stub value.
200
200
  Y_AXIS_2D = nil # Stub value.
201
201
 
metadata CHANGED
@@ -1,35 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sketchup-api-stubs
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.10
4
+ version: 0.7.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Trimble Inc, SketchUp Team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-04-04 00:00:00.000000000 Z
12
- dependencies:
13
- - !ruby/object:Gem::Dependency
14
- name: bundler
15
- requirement: !ruby/object:Gem::Requirement
16
- requirements:
17
- - - ">="
18
- - !ruby/object:Gem::Version
19
- version: 1.15.0
20
- - - "<"
21
- - !ruby/object:Gem::Version
22
- version: '3.0'
23
- type: :development
24
- prerelease: false
25
- version_requirements: !ruby/object:Gem::Requirement
26
- requirements:
27
- - - ">="
28
- - !ruby/object:Gem::Version
29
- version: 1.15.0
30
- - - "<"
31
- - !ruby/object:Gem::Version
32
- version: '3.0'
11
+ date: 2026-02-05 00:00:00.000000000 Z
12
+ dependencies: []
33
13
  description: Stubs for the SketchUp Ruby API intended to assist IDEs.
34
14
  email:
35
15
  executables: []
@@ -59,6 +39,7 @@ files:
59
39
  - lib/sketchup-api-stubs/stubs/Layout/AutoTextDefinition.rb
60
40
  - lib/sketchup-api-stubs/stubs/Layout/AutoTextDefinitions.rb
61
41
  - lib/sketchup-api-stubs/stubs/Layout/ConnectionPoint.rb
42
+ - lib/sketchup-api-stubs/stubs/Layout/Dictionary.rb
62
43
  - lib/sketchup-api-stubs/stubs/Layout/Document.rb
63
44
  - lib/sketchup-api-stubs/stubs/Layout/Ellipse.rb
64
45
  - lib/sketchup-api-stubs/stubs/Layout/Entities.rb
@@ -121,6 +102,9 @@ files:
121
102
  - lib/sketchup-api-stubs/stubs/Sketchup/EntitiesObserver.rb
122
103
  - lib/sketchup-api-stubs/stubs/Sketchup/Entity.rb
123
104
  - lib/sketchup-api-stubs/stubs/Sketchup/EntityObserver.rb
105
+ - lib/sketchup-api-stubs/stubs/Sketchup/Environment.rb
106
+ - lib/sketchup-api-stubs/stubs/Sketchup/Environments.rb
107
+ - lib/sketchup-api-stubs/stubs/Sketchup/EnvironmentsObserver.rb
124
108
  - lib/sketchup-api-stubs/stubs/Sketchup/ExtensionsManager.rb
125
109
  - lib/sketchup-api-stubs/stubs/Sketchup/Face.rb
126
110
  - lib/sketchup-api-stubs/stubs/Sketchup/FrameChangeObserver.rb
@@ -142,6 +126,7 @@ files:
142
126
  - lib/sketchup-api-stubs/stubs/Sketchup/Licensing/ExtensionLicense.rb
143
127
  - lib/sketchup-api-stubs/stubs/Sketchup/LineStyle.rb
144
128
  - lib/sketchup-api-stubs/stubs/Sketchup/LineStyles.rb
129
+ - lib/sketchup-api-stubs/stubs/Sketchup/LoadHandler.rb
145
130
  - lib/sketchup-api-stubs/stubs/Sketchup/Loop.rb
146
131
  - lib/sketchup-api-stubs/stubs/Sketchup/Material.rb
147
132
  - lib/sketchup-api-stubs/stubs/Sketchup/Materials.rb
@@ -168,6 +153,7 @@ files:
168
153
  - lib/sketchup-api-stubs/stubs/Sketchup/ShadowInfo.rb
169
154
  - lib/sketchup-api-stubs/stubs/Sketchup/ShadowInfoObserver.rb
170
155
  - lib/sketchup-api-stubs/stubs/Sketchup/Skp.rb
156
+ - lib/sketchup-api-stubs/stubs/Sketchup/Snap.rb
171
157
  - lib/sketchup-api-stubs/stubs/Sketchup/Style.rb
172
158
  - lib/sketchup-api-stubs/stubs/Sketchup/Styles.rb
173
159
  - lib/sketchup-api-stubs/stubs/Sketchup/Text.rb
@@ -209,7 +195,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
209
195
  - !ruby/object:Gem::Version
210
196
  version: '0'
211
197
  requirements: []
212
- rubygems_version: 3.1.6
198
+ rubygems_version: 3.4.19
213
199
  signing_key:
214
200
  specification_version: 4
215
201
  summary: SketchUp Ruby API stubs.