sketchup-api-stubs 0.7.6 → 0.7.7

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 +4 -4
  2. data/lib/sketchup-api-stubs/sketchup.rb +1 -1
  3. data/lib/sketchup-api-stubs/stubs/Geom/BoundingBox.rb +1 -1
  4. data/lib/sketchup-api-stubs/stubs/Geom/Bounds2d.rb +1 -1
  5. data/lib/sketchup-api-stubs/stubs/Geom/LatLong.rb +1 -1
  6. data/lib/sketchup-api-stubs/stubs/Geom/OrientedBounds2d.rb +1 -1
  7. data/lib/sketchup-api-stubs/stubs/Geom/Point2d.rb +1 -1
  8. data/lib/sketchup-api-stubs/stubs/Geom/Point3d.rb +1 -1
  9. data/lib/sketchup-api-stubs/stubs/Geom/PolygonMesh.rb +21 -10
  10. data/lib/sketchup-api-stubs/stubs/Geom/Transformation.rb +1 -1
  11. data/lib/sketchup-api-stubs/stubs/Geom/Transformation2d.rb +1 -1
  12. data/lib/sketchup-api-stubs/stubs/Geom/UTM.rb +1 -1
  13. data/lib/sketchup-api-stubs/stubs/Geom/Vector2d.rb +1 -1
  14. data/lib/sketchup-api-stubs/stubs/Geom/Vector3d.rb +1 -1
  15. data/lib/sketchup-api-stubs/stubs/Layout.rb +1 -1
  16. data/lib/sketchup-api-stubs/stubs/Layout/AngularDimension.rb +1 -1
  17. data/lib/sketchup-api-stubs/stubs/Layout/AutoTextDefinition.rb +1 -1
  18. data/lib/sketchup-api-stubs/stubs/Layout/AutoTextDefinitions.rb +1 -1
  19. data/lib/sketchup-api-stubs/stubs/Layout/ConnectionPoint.rb +1 -1
  20. data/lib/sketchup-api-stubs/stubs/Layout/Document.rb +1 -1
  21. data/lib/sketchup-api-stubs/stubs/Layout/Ellipse.rb +1 -1
  22. data/lib/sketchup-api-stubs/stubs/Layout/Entities.rb +1 -1
  23. data/lib/sketchup-api-stubs/stubs/Layout/Entity.rb +1 -1
  24. data/lib/sketchup-api-stubs/stubs/Layout/FormattedText.rb +1 -1
  25. data/lib/sketchup-api-stubs/stubs/Layout/Grid.rb +1 -1
  26. data/lib/sketchup-api-stubs/stubs/Layout/Group.rb +1 -1
  27. data/lib/sketchup-api-stubs/stubs/Layout/Image.rb +1 -1
  28. data/lib/sketchup-api-stubs/stubs/Layout/Label.rb +1 -1
  29. data/lib/sketchup-api-stubs/stubs/Layout/Layer.rb +1 -1
  30. data/lib/sketchup-api-stubs/stubs/Layout/LayerInstance.rb +1 -1
  31. data/lib/sketchup-api-stubs/stubs/Layout/Layers.rb +1 -1
  32. data/lib/sketchup-api-stubs/stubs/Layout/LinearDimension.rb +1 -1
  33. data/lib/sketchup-api-stubs/stubs/Layout/LockedEntityError.rb +1 -1
  34. data/lib/sketchup-api-stubs/stubs/Layout/LockedLayerError.rb +1 -1
  35. data/lib/sketchup-api-stubs/stubs/Layout/Page.rb +1 -1
  36. data/lib/sketchup-api-stubs/stubs/Layout/PageInfo.rb +1 -1
  37. data/lib/sketchup-api-stubs/stubs/Layout/Pages.rb +1 -1
  38. data/lib/sketchup-api-stubs/stubs/Layout/Path.rb +1 -1
  39. data/lib/sketchup-api-stubs/stubs/Layout/Rectangle.rb +1 -1
  40. data/lib/sketchup-api-stubs/stubs/Layout/SketchUpModel.rb +1 -1
  41. data/lib/sketchup-api-stubs/stubs/Layout/Style.rb +1 -1
  42. data/lib/sketchup-api-stubs/stubs/Layout/Table.rb +1 -1
  43. data/lib/sketchup-api-stubs/stubs/Layout/TableCell.rb +1 -1
  44. data/lib/sketchup-api-stubs/stubs/Layout/TableColumn.rb +1 -1
  45. data/lib/sketchup-api-stubs/stubs/Layout/TableRow.rb +1 -1
  46. data/lib/sketchup-api-stubs/stubs/Sketchup/Animation.rb +1 -1
  47. data/lib/sketchup-api-stubs/stubs/Sketchup/AppObserver.rb +1 -1
  48. data/lib/sketchup-api-stubs/stubs/Sketchup/ArcCurve.rb +1 -1
  49. data/lib/sketchup-api-stubs/stubs/Sketchup/AttributeDictionaries.rb +1 -1
  50. data/lib/sketchup-api-stubs/stubs/Sketchup/AttributeDictionary.rb +1 -1
  51. data/lib/sketchup-api-stubs/stubs/Sketchup/Axes.rb +1 -1
  52. data/lib/sketchup-api-stubs/stubs/Sketchup/Behavior.rb +1 -1
  53. data/lib/sketchup-api-stubs/stubs/Sketchup/Camera.rb +1 -1
  54. data/lib/sketchup-api-stubs/stubs/Sketchup/ClassificationSchema.rb +1 -1
  55. data/lib/sketchup-api-stubs/stubs/Sketchup/Classifications.rb +1 -1
  56. data/lib/sketchup-api-stubs/stubs/Sketchup/Color.rb +1 -1
  57. data/lib/sketchup-api-stubs/stubs/Sketchup/ComponentDefinition.rb +2 -2
  58. data/lib/sketchup-api-stubs/stubs/Sketchup/ComponentInstance.rb +35 -45
  59. data/lib/sketchup-api-stubs/stubs/Sketchup/Console.rb +1 -1
  60. data/lib/sketchup-api-stubs/stubs/Sketchup/ConstructionLine.rb +1 -1
  61. data/lib/sketchup-api-stubs/stubs/Sketchup/ConstructionPoint.rb +1 -1
  62. data/lib/sketchup-api-stubs/stubs/Sketchup/Curve.rb +1 -1
  63. data/lib/sketchup-api-stubs/stubs/Sketchup/DefinitionList.rb +76 -13
  64. data/lib/sketchup-api-stubs/stubs/Sketchup/DefinitionObserver.rb +1 -1
  65. data/lib/sketchup-api-stubs/stubs/Sketchup/DefinitionsObserver.rb +1 -1
  66. data/lib/sketchup-api-stubs/stubs/Sketchup/Dimension.rb +1 -1
  67. data/lib/sketchup-api-stubs/stubs/Sketchup/DimensionLinear.rb +1 -1
  68. data/lib/sketchup-api-stubs/stubs/Sketchup/DimensionObserver.rb +1 -1
  69. data/lib/sketchup-api-stubs/stubs/Sketchup/DimensionRadial.rb +1 -1
  70. data/lib/sketchup-api-stubs/stubs/Sketchup/Drawingelement.rb +1 -1
  71. data/lib/sketchup-api-stubs/stubs/Sketchup/Edge.rb +1 -1
  72. data/lib/sketchup-api-stubs/stubs/Sketchup/EdgeUse.rb +1 -1
  73. data/lib/sketchup-api-stubs/stubs/Sketchup/Entities.rb +1 -1
  74. data/lib/sketchup-api-stubs/stubs/Sketchup/EntitiesObserver.rb +1 -1
  75. data/lib/sketchup-api-stubs/stubs/Sketchup/Entity.rb +1 -1
  76. data/lib/sketchup-api-stubs/stubs/Sketchup/EntityObserver.rb +1 -1
  77. data/lib/sketchup-api-stubs/stubs/Sketchup/ExtensionsManager.rb +1 -1
  78. data/lib/sketchup-api-stubs/stubs/Sketchup/Face.rb +224 -58
  79. data/lib/sketchup-api-stubs/stubs/Sketchup/FrameChangeObserver.rb +1 -1
  80. data/lib/sketchup-api-stubs/stubs/Sketchup/Group.rb +52 -1
  81. data/lib/sketchup-api-stubs/stubs/Sketchup/Http.rb +1 -1
  82. data/lib/sketchup-api-stubs/stubs/Sketchup/Http/Request.rb +48 -41
  83. data/lib/sketchup-api-stubs/stubs/Sketchup/Http/Response.rb +7 -7
  84. data/lib/sketchup-api-stubs/stubs/Sketchup/Image.rb +52 -1
  85. data/lib/sketchup-api-stubs/stubs/Sketchup/ImageRep.rb +1 -1
  86. data/lib/sketchup-api-stubs/stubs/Sketchup/Importer.rb +1 -1
  87. data/lib/sketchup-api-stubs/stubs/Sketchup/InputPoint.rb +1 -1
  88. data/lib/sketchup-api-stubs/stubs/Sketchup/InstanceObserver.rb +1 -1
  89. data/lib/sketchup-api-stubs/stubs/Sketchup/InstancePath.rb +1 -1
  90. data/lib/sketchup-api-stubs/stubs/Sketchup/Layer.rb +1 -1
  91. data/lib/sketchup-api-stubs/stubs/Sketchup/LayerFolder.rb +3 -3
  92. data/lib/sketchup-api-stubs/stubs/Sketchup/Layers.rb +1 -1
  93. data/lib/sketchup-api-stubs/stubs/Sketchup/LayersObserver.rb +1 -1
  94. data/lib/sketchup-api-stubs/stubs/Sketchup/Licensing.rb +2 -2
  95. data/lib/sketchup-api-stubs/stubs/Sketchup/Licensing/ExtensionLicense.rb +1 -1
  96. data/lib/sketchup-api-stubs/stubs/Sketchup/LineStyle.rb +1 -1
  97. data/lib/sketchup-api-stubs/stubs/Sketchup/LineStyles.rb +1 -1
  98. data/lib/sketchup-api-stubs/stubs/Sketchup/Loop.rb +1 -1
  99. data/lib/sketchup-api-stubs/stubs/Sketchup/Material.rb +1 -1
  100. data/lib/sketchup-api-stubs/stubs/Sketchup/Materials.rb +2 -2
  101. data/lib/sketchup-api-stubs/stubs/Sketchup/MaterialsObserver.rb +1 -1
  102. data/lib/sketchup-api-stubs/stubs/Sketchup/Menu.rb +1 -1
  103. data/lib/sketchup-api-stubs/stubs/Sketchup/Model.rb +4 -1
  104. data/lib/sketchup-api-stubs/stubs/Sketchup/ModelObserver.rb +1 -1
  105. data/lib/sketchup-api-stubs/stubs/Sketchup/OptionsManager.rb +1 -1
  106. data/lib/sketchup-api-stubs/stubs/Sketchup/OptionsProvider.rb +1 -1
  107. data/lib/sketchup-api-stubs/stubs/Sketchup/OptionsProviderObserver.rb +1 -1
  108. data/lib/sketchup-api-stubs/stubs/Sketchup/Page.rb +1 -1
  109. data/lib/sketchup-api-stubs/stubs/Sketchup/Pages.rb +1 -1
  110. data/lib/sketchup-api-stubs/stubs/Sketchup/PagesObserver.rb +1 -1
  111. data/lib/sketchup-api-stubs/stubs/Sketchup/PickHelper.rb +1 -1
  112. data/lib/sketchup-api-stubs/stubs/Sketchup/RegionalSettings.rb +1 -1
  113. data/lib/sketchup-api-stubs/stubs/Sketchup/RenderingOptions.rb +1 -1
  114. data/lib/sketchup-api-stubs/stubs/Sketchup/RenderingOptionsObserver.rb +1 -1
  115. data/lib/sketchup-api-stubs/stubs/Sketchup/SectionPlane.rb +1 -1
  116. data/lib/sketchup-api-stubs/stubs/Sketchup/Selection.rb +1 -1
  117. data/lib/sketchup-api-stubs/stubs/Sketchup/SelectionObserver.rb +1 -1
  118. data/lib/sketchup-api-stubs/stubs/Sketchup/Set.rb +1 -1
  119. data/lib/sketchup-api-stubs/stubs/Sketchup/ShadowInfo.rb +1 -1
  120. data/lib/sketchup-api-stubs/stubs/Sketchup/ShadowInfoObserver.rb +1 -1
  121. data/lib/sketchup-api-stubs/stubs/Sketchup/Skp.rb +1 -1
  122. data/lib/sketchup-api-stubs/stubs/Sketchup/Style.rb +1 -1
  123. data/lib/sketchup-api-stubs/stubs/Sketchup/Styles.rb +1 -1
  124. data/lib/sketchup-api-stubs/stubs/Sketchup/Text.rb +1 -1
  125. data/lib/sketchup-api-stubs/stubs/Sketchup/Texture.rb +1 -1
  126. data/lib/sketchup-api-stubs/stubs/Sketchup/TextureWriter.rb +1 -1
  127. data/lib/sketchup-api-stubs/stubs/Sketchup/Tool.rb +1 -1
  128. data/lib/sketchup-api-stubs/stubs/Sketchup/Tools.rb +1 -1
  129. data/lib/sketchup-api-stubs/stubs/Sketchup/ToolsObserver.rb +1 -1
  130. data/lib/sketchup-api-stubs/stubs/Sketchup/UVHelper.rb +1 -1
  131. data/lib/sketchup-api-stubs/stubs/Sketchup/Vertex.rb +1 -1
  132. data/lib/sketchup-api-stubs/stubs/Sketchup/View.rb +1 -1
  133. data/lib/sketchup-api-stubs/stubs/Sketchup/ViewObserver.rb +1 -1
  134. data/lib/sketchup-api-stubs/stubs/UI/Command.rb +1 -1
  135. data/lib/sketchup-api-stubs/stubs/UI/HtmlDialog.rb +98 -7
  136. data/lib/sketchup-api-stubs/stubs/UI/Notification.rb +69 -55
  137. data/lib/sketchup-api-stubs/stubs/UI/Toolbar.rb +1 -1
  138. data/lib/sketchup-api-stubs/stubs/UI/WebDialog.rb +1 -1
  139. data/lib/sketchup-api-stubs/stubs/_top_level.rb +1 -1
  140. data/lib/sketchup-api-stubs/stubs/array.rb +1 -1
  141. data/lib/sketchup-api-stubs/stubs/geom.rb +1 -1
  142. data/lib/sketchup-api-stubs/stubs/languagehandler.rb +1 -1
  143. data/lib/sketchup-api-stubs/stubs/length.rb +1 -1
  144. data/lib/sketchup-api-stubs/stubs/numeric.rb +1 -1
  145. data/lib/sketchup-api-stubs/stubs/sketchup.rb +12 -1
  146. data/lib/sketchup-api-stubs/stubs/sketchupextension.rb +1 -1
  147. data/lib/sketchup-api-stubs/stubs/string.rb +1 -1
  148. data/lib/sketchup-api-stubs/stubs/ui.rb +8 -4
  149. metadata +3 -3
@@ -1,7 +1,7 @@
1
- # Copyright:: Copyright 2020 Trimble Inc.
1
+ # Copyright:: Copyright 2021 Trimble Inc.
2
2
  # License:: The MIT License (MIT)
3
3
 
4
- # UI::Notification objects allows you to show native notifications in the
4
+ # {UI::Notification} objects allows you to show native notifications in the
5
5
  # desktop. Notifications can have a message, icon and accept and/or dismiss
6
6
  # buttons with callback blocks.
7
7
  #
@@ -9,18 +9,18 @@
9
9
  # # For consistency, the accept (yes) and the dismiss (no) buttons
10
10
  # # are always displayed in the same order.
11
11
  # message = "A new version of pizza is available. Install now?"
12
- # notification = UI::Notification.new(sketchup_extension, message)
13
- # notification.on_accept("Pizza!") { puts "Pizza" }
14
- # notification.on_dismiss("No thanks") { puts "No pizza" }
15
- # notification.show
12
+ # @notification = UI::Notification.new(sketchup_extension, message)
13
+ # @notification.on_accept("Pizza!") { puts "Pizza" }
14
+ # @notification.on_dismiss("No thanks") { puts "No pizza" }
15
+ # @notification.show
16
16
  #
17
17
  # # The two options are however not treated differently by SketchUp and can
18
18
  # # also be used for questions with no strict yes/no answer.
19
19
  # message = "Pizza clashes with health. Select which one to keep."
20
- # notification = UI::Notification.new(sketchup_extension, message)
21
- # notification.on_accept("Pizza") { puts "Pizza" }
22
- # notification.on_dismiss("Health") { puts "Salad" }
23
- # notification.show
20
+ # @notification = UI::Notification.new(sketchup_extension, message)
21
+ # @notification.on_accept("Pizza") { puts "Pizza" }
22
+ # @notification.on_dismiss("Health") { puts "Salad" }
23
+ # @notification.show
24
24
  #
25
25
  # @version SketchUp 2017
26
26
  class UI::Notification
@@ -31,9 +31,10 @@ class UI::Notification
31
31
  # the file system path.
32
32
  #
33
33
  # @example
34
- # notification = UI::Notification.new(sketchup_extension, "Hello world", "/path/to/icon", "icon Tooltip")
35
- # puts "Icon Name: #{notification.icon_name}"
36
- # notification.show
34
+ # @notification = UI::Notification.new(sketchup_extension, "Hello world", "/path/to/icon",
35
+ # "Icon Tooltip")
36
+ # puts "Icon Name: #{@notification.icon_name}"
37
+ # @notification.show
37
38
  #
38
39
  # @return [String]
39
40
  #
@@ -45,9 +46,9 @@ class UI::Notification
45
46
  # has to be a local filesystem path.
46
47
  #
47
48
  # @example
48
- # notification = UI::Notification.new(sketchup_extension, "Hello world")
49
- # notification.icon_name = "/path/to/icon"
50
- # notification.show
49
+ # @notification = UI::Notification.new(sketchup_extension, "Hello world")
50
+ # @notification.icon_name = "/path/to/icon"
51
+ # @notification.show
51
52
  #
52
53
  # @param [String] icon_name
53
54
  # String providing the icon filesystem path.
@@ -62,9 +63,10 @@ class UI::Notification
62
63
  # the icon.
63
64
  #
64
65
  # @example
65
- # notification = UI::Notification.new(sketchup_extension, "Hello world", "/path/to/icon", "icon Tooltip")
66
- # puts "Tooltip: #{notification.icon_tooltip}"
67
- # notification.show
66
+ # @notification = UI::Notification.new(sketchup_extension, "Hello world", "/path/to/icon",
67
+ # "Icon Tooltip")
68
+ # puts "Tooltip: #{@notification.icon_tooltip}"
69
+ # @notification.show
68
70
  #
69
71
  # @return [String]
70
72
  #
@@ -76,9 +78,9 @@ class UI::Notification
76
78
  # icon.
77
79
  #
78
80
  # @example
79
- # notification = UI::Notification.new(sketchup_extension, "Hello world")
80
- # notification.icon_tooltip = "icon Tooltip"
81
- # notification.show
81
+ # @notification = UI::Notification.new(sketchup_extension, "Hello world")
82
+ # @notification.icon_tooltip = "icon Tooltip"
83
+ # @notification.show
82
84
  #
83
85
  # @param [String] icon_tooltip
84
86
  # String providing the new icon Tooltip.
@@ -89,42 +91,48 @@ class UI::Notification
89
91
  def icon_tooltip=(icon_tooltip)
90
92
  end
91
93
 
92
- # The new method is used to create a new {UI::Notification}.
93
- #
94
- # In order to insert line breaks into the message you need to use +\\r\\n+.
94
+ # Creates a new {UI::Notification} object.
95
95
  #
96
96
  # @bug Prior to SketchUp 2018 messages could only be 3 lines long on Windows
97
97
  # and 2 lines on Mac. Now the notification expands to fit its content.
98
98
  #
99
+ # @bug Prior to SketchUp 2021.1 SketchUp could crash if the {UI::Notification} object is garbaged
100
+ # collected while it has notifications displayed on the screen. This could happen if the
101
+ # {UI::Notification} object was assigned to a local variable. The local variable would go out of
102
+ # scope and the garbage collector might collect it before the callbacks are invoked.
103
+ #
99
104
  # @example
100
- # notification = UI::Notification.new(sketchup_extension, "Hello world", "/path/to/icon", "icon Tooltip")
101
- # notification.show
105
+ # @notification = UI::Notification.new(sketchup_extension, "Hello world", "/path/to/icon",
106
+ # "Icon Tooltip")
107
+ # @notification.show
108
+ #
109
+ # @note In order to insert line breaks into the message you need to use +\\r\\n+.
102
110
  #
103
111
  # @param [SketchupExtension] sketchup_extension
104
- # Required sketchup_extension
105
- # to identify the sender.
112
+ # {SketchupExtension} instance used to identify
113
+ # the source of the notification.
106
114
  #
107
115
  # @param [String] message
108
- # Optionally assign the message.
116
+ # Message to display.
109
117
  #
110
118
  # @param [String] icon_name
111
- # Optionally set a path to an image.
119
+ # Path to an icon to display along with the message.
112
120
  #
113
121
  # @param [String] icon_tooltip
114
- # Optionally set an image tooltip.
122
+ # Tooltip for the icon.
115
123
  #
116
124
  # @return [UI::Notification]
117
125
  #
118
126
  # @version SketchUp 2017
119
- def initialize(sketchup_extension, message, icon_name, icon_tooltip)
127
+ def initialize(sketchup_extension, message = nil, icon_name = nil, icon_tooltip = nil)
120
128
  end
121
129
 
122
130
  # Gets the message as string.
123
131
  #
124
132
  # @example
125
- # notification = UI::Notification.new(sketchup_extension)
126
- # puts "This is the current message: #{notification.message}"
127
- # notification.show
133
+ # @notification = UI::Notification.new(sketchup_extension)
134
+ # puts "This is the current message: #{@notification.message}"
135
+ # @notification.show
128
136
  #
129
137
  # @return [String]
130
138
  #
@@ -132,13 +140,16 @@ class UI::Notification
132
140
  def message
133
141
  end
134
142
 
135
- # Sets a new message. Notifications are meant for quick & brief messages.
136
- # Remember that they disappear automatically.
143
+ # Sets a new message. Notifications are meant for quick and brief messages.
144
+ # These message disappear automatically after a short while if they are not
145
+ # interacted with.
137
146
  #
138
147
  # @example
139
- # notification = UI::Notification.new(sketchup_extension)
140
- # notification.message = "Hello world"
141
- # notification.show
148
+ # @notification = UI::Notification.new(sketchup_extension)
149
+ # @notification.message = "Hello world"
150
+ # @notification.show
151
+ #
152
+ # @note In order to insert line breaks into the message you need to use +\\r\\n+.
142
153
  #
143
154
  # @param [String] message
144
155
  # String providing the new message.
@@ -156,11 +167,11 @@ class UI::Notification
156
167
  # displayed, even if only one had been implemented.
157
168
  #
158
169
  # @example
159
- # notification = UI::Notification.new(sketchup_extension, "Hello world")
160
- # notification.on_accept("Accept") do |notification, title|
170
+ # @notification = UI::Notification.new(sketchup_extension, "Hello world")
171
+ # @notification.on_accept("Accept") do |notification, title|
161
172
  # puts "The user pressed [#{title}] with message #{notification.message}"
162
173
  # end
163
- # notification.show
174
+ # @notification.show
164
175
  #
165
176
  # @param [String] title
166
177
  # Sets the title of the button.
@@ -181,11 +192,11 @@ class UI::Notification
181
192
  # Returns the accept's button title.
182
193
  #
183
194
  # @example
184
- # notification = UI::Notification.new(sketchup_extension, "Hello world")
185
- # notification.on_accept("Accept") do |notification, title|
195
+ # @notification = UI::Notification.new(sketchup_extension, "Hello world")
196
+ # @notification.on_accept("Accept") do |notification, title|
186
197
  # puts "The user pressed #{notification.on_accept_title}"
187
198
  # end
188
- # notification.show
199
+ # @notification.show
189
200
  #
190
201
  # @return [String]
191
202
  #
@@ -202,11 +213,11 @@ class UI::Notification
202
213
  # displayed, even if only one had been implemented.
203
214
  #
204
215
  # @example
205
- # notification = UI::Notification.new(sketchup_extension, "Hello world")
206
- # notification.on_dismiss("Close") do |notification, title|
216
+ # @notification = UI::Notification.new(sketchup_extension, "Hello world")
217
+ # @notification.on_dismiss("Close") do |notification, title|
207
218
  # puts "The user pressed [#{title}] with message #{notification.message}"
208
219
  # end
209
- # notification.show
220
+ # @notification.show
210
221
  #
211
222
  # @param [String] title
212
223
  # Sets the title of the button.
@@ -227,11 +238,11 @@ class UI::Notification
227
238
  # Returns the dismiss's button title.
228
239
  #
229
240
  # @example
230
- # notification = UI::Notification.new(sketchup_extension, "Hello world")
231
- # notification.on_dismiss("Close") do |notification, title|
241
+ # @notification = UI::Notification.new(sketchup_extension, "Hello world")
242
+ # @notification.on_dismiss("Close") do |notification, title|
232
243
  # puts "The user pressed #{notification.on_dismiss_title}"
233
244
  # end
234
- # notification.show
245
+ # @notification.show
235
246
  #
236
247
  # @return [String]
237
248
  #
@@ -242,9 +253,12 @@ class UI::Notification
242
253
  # Shows the notification. If not interacted with, the notification will
243
254
  # disappear without calling any callbacks.
244
255
  #
256
+ # @bug If assigned to a local variable SketchUp might crash prior to SketchUp 2021.1.
257
+ # See {#initialize} for more details.
258
+ #
245
259
  # @example
246
- # notification = UI::Notification.new(sketchup_extension, "Hello world")
247
- # notification.show
260
+ # @notification = UI::Notification.new(sketchup_extension, "Hello world")
261
+ # @notification.show
248
262
  #
249
263
  # @return [Boolean]
250
264
  #
@@ -1,4 +1,4 @@
1
- # Copyright:: Copyright 2020 Trimble Inc.
1
+ # Copyright:: Copyright 2021 Trimble Inc.
2
2
  # License:: The MIT License (MIT)
3
3
 
4
4
  # The Toolbar class contains methods to create and manipulate SketchUp
@@ -1,4 +1,4 @@
1
- # Copyright:: Copyright 2020 Trimble Inc.
1
+ # Copyright:: Copyright 2021 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
@@ -1,4 +1,4 @@
1
- # Copyright:: Copyright 2020 Trimble Inc.
1
+ # Copyright:: Copyright 2021 Trimble Inc.
2
2
  # License:: The MIT License (MIT)
3
3
 
4
4
 
@@ -1,4 +1,4 @@
1
- # Copyright:: Copyright 2020 Trimble Inc.
1
+ # Copyright:: Copyright 2021 Trimble Inc.
2
2
  # License:: The MIT License (MIT)
3
3
 
4
4
  # The SketchUp Array class adds additional methods to the standard Ruby Array
@@ -1,4 +1,4 @@
1
- # Copyright:: Copyright 2020 Trimble Inc.
1
+ # Copyright:: Copyright 2021 Trimble Inc.
2
2
  # License:: The MIT License (MIT)
3
3
 
4
4
  # The Geom module defines a number of Module methods that let you perform
@@ -1,4 +1,4 @@
1
- # Copyright:: Copyright 2020 Trimble Inc.
1
+ # Copyright:: Copyright 2021 Trimble Inc.
2
2
  # License:: The MIT License (MIT)
3
3
 
4
4
  # The LanguageHandler class contains methods used to help make SketchUp
@@ -1,4 +1,4 @@
1
- # Copyright:: Copyright 2020 Trimble Inc.
1
+ # Copyright:: Copyright 2021 Trimble Inc.
2
2
  # License:: The MIT License (MIT)
3
3
 
4
4
  # Because length units are used so often in SketchUp, a special class has been
@@ -1,4 +1,4 @@
1
- # Copyright:: Copyright 2020 Trimble Inc.
1
+ # Copyright:: Copyright 2021 Trimble Inc.
2
2
  # License:: The MIT License (MIT)
3
3
 
4
4
  # A number of methods have been added to the Ruby Numeric class to do units
@@ -1,4 +1,4 @@
1
- # Copyright:: Copyright 2020 Trimble Inc.
1
+ # Copyright:: Copyright 2021 Trimble Inc.
2
2
  # License:: The MIT License (MIT)
3
3
 
4
4
  # The Sketchup module contains a number of important utility methods for use in
@@ -291,6 +291,17 @@ module Sketchup
291
291
  def self.fix_shadow_strings?
292
292
  end
293
293
 
294
+ # The {.focus} method is used to focus the active model window.
295
+ #
296
+ # @example
297
+ # Sketchup.focus
298
+ #
299
+ # @see UI::HtmlDialog.bring_to_front
300
+ #
301
+ # @version SketchUp 2021.1
302
+ def self.focus
303
+ end
304
+
294
305
  # The format_angle method takes a number as an angle in radians and formats it
295
306
  # into degrees. For example, format_angle(Math::PI) will return 180.0.
296
307
  #
@@ -1,4 +1,4 @@
1
- # Copyright:: Copyright 2020 Trimble Inc.
1
+ # Copyright:: Copyright 2021 Trimble Inc.
2
2
  # License:: The MIT License (MIT)
3
3
 
4
4
  # The SketchupExtension class contains methods allowing you to create and
@@ -1,4 +1,4 @@
1
- # Copyright:: Copyright 2020 Trimble Inc.
1
+ # Copyright:: Copyright 2021 Trimble Inc.
2
2
  # License:: The MIT License (MIT)
3
3
 
4
4
  # The String class contains a method used to parse a string as a length value.
@@ -1,4 +1,4 @@
1
- # Copyright:: Copyright 2020 Trimble Inc.
1
+ # Copyright:: Copyright 2021 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
@@ -165,7 +165,7 @@ module UI
165
165
  # of SketchUp's menus.
166
166
  #
167
167
  # Valid menu names are: "File", "Edit", "View", "Camera", "Draw", "Tools",
168
- # "Window", "Extensions" and "Help".
168
+ # "Window", "Extensions", "Help" and "Developer".
169
169
  #
170
170
  # @example
171
171
  # tool_menu = UI.menu("Tools")
@@ -541,11 +541,15 @@ module UI
541
541
  end
542
542
 
543
543
  # The {.show_model_info} method is used to display the model info dialog for a
544
- # specific page. You can get the list of valid dialogs with
545
- # {UI.model_info_pages}.
544
+ # specific page. You can get the list of valid page names with {UI.model_info_pages}.
546
545
  #
547
546
  # [SketchUp 2014] <code>"Classifications"</code> page was added.
548
547
  #
548
+ # @bug Until SketchUp 2021.1 SketchUp on Mac didn't display the desired page in,
549
+ # but only selected it in the navigation.
550
+ #
551
+ # @bug Until SketchUp 2021.1 SketchUp on Mac didn't accept English page names on localized builds.
552
+ #
549
553
  # @example
550
554
  # UI.show_model_info('Credits')
551
555
  #
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sketchup-api-stubs
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.6
4
+ version: 0.7.7
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: 2020-11-18 00:00:00.000000000 Z
11
+ date: 2021-06-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -205,7 +205,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
205
205
  - !ruby/object:Gem::Version
206
206
  version: '0'
207
207
  requirements: []
208
- rubygems_version: 3.0.3
208
+ rubygems_version: 3.2.15
209
209
  signing_key:
210
210
  specification_version: 4
211
211
  summary: SketchUp Ruby API stubs.