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.
- checksums.yaml +4 -4
- data/lib/sketchup-api-stubs/sketchup.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Geom/BoundingBox.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Geom/Bounds2d.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Geom/LatLong.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Geom/OrientedBounds2d.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Geom/Point2d.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Geom/Point3d.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Geom/PolygonMesh.rb +21 -10
- data/lib/sketchup-api-stubs/stubs/Geom/Transformation.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Geom/Transformation2d.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Geom/UTM.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Geom/Vector2d.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Geom/Vector3d.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/AngularDimension.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/AutoTextDefinition.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/AutoTextDefinitions.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/ConnectionPoint.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/Document.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/Ellipse.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/Entities.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/Entity.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/FormattedText.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/Grid.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/Group.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/Image.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/Label.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/Layer.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/LayerInstance.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/Layers.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/LinearDimension.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/LockedEntityError.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/LockedLayerError.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/Page.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/PageInfo.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/Pages.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/Path.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/Rectangle.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/SketchUpModel.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/Style.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/Table.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/TableCell.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/TableColumn.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/TableRow.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Animation.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/AppObserver.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/ArcCurve.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/AttributeDictionaries.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/AttributeDictionary.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Axes.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Behavior.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Camera.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/ClassificationSchema.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Classifications.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Color.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/ComponentDefinition.rb +2 -2
- data/lib/sketchup-api-stubs/stubs/Sketchup/ComponentInstance.rb +35 -45
- data/lib/sketchup-api-stubs/stubs/Sketchup/Console.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/ConstructionLine.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/ConstructionPoint.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Curve.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/DefinitionList.rb +76 -13
- data/lib/sketchup-api-stubs/stubs/Sketchup/DefinitionObserver.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/DefinitionsObserver.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Dimension.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/DimensionLinear.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/DimensionObserver.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/DimensionRadial.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Drawingelement.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Edge.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/EdgeUse.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Entities.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/EntitiesObserver.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Entity.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/EntityObserver.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/ExtensionsManager.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Face.rb +224 -58
- data/lib/sketchup-api-stubs/stubs/Sketchup/FrameChangeObserver.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Group.rb +52 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Http.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Http/Request.rb +48 -41
- data/lib/sketchup-api-stubs/stubs/Sketchup/Http/Response.rb +7 -7
- data/lib/sketchup-api-stubs/stubs/Sketchup/Image.rb +52 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/ImageRep.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Importer.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/InputPoint.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/InstanceObserver.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/InstancePath.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Layer.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/LayerFolder.rb +3 -3
- data/lib/sketchup-api-stubs/stubs/Sketchup/Layers.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/LayersObserver.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Licensing.rb +2 -2
- data/lib/sketchup-api-stubs/stubs/Sketchup/Licensing/ExtensionLicense.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/LineStyle.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/LineStyles.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Loop.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Material.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Materials.rb +2 -2
- data/lib/sketchup-api-stubs/stubs/Sketchup/MaterialsObserver.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Menu.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Model.rb +4 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/ModelObserver.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/OptionsManager.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/OptionsProvider.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/OptionsProviderObserver.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Page.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Pages.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/PagesObserver.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/PickHelper.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/RegionalSettings.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/RenderingOptions.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/RenderingOptionsObserver.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/SectionPlane.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Selection.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/SelectionObserver.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Set.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/ShadowInfo.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/ShadowInfoObserver.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Skp.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Style.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Styles.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Text.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Texture.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/TextureWriter.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Tool.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Tools.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/ToolsObserver.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/UVHelper.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Vertex.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/View.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/ViewObserver.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/UI/Command.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/UI/HtmlDialog.rb +98 -7
- data/lib/sketchup-api-stubs/stubs/UI/Notification.rb +69 -55
- data/lib/sketchup-api-stubs/stubs/UI/Toolbar.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/UI/WebDialog.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/_top_level.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/array.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/geom.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/languagehandler.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/length.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/numeric.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/sketchup.rb +12 -1
- data/lib/sketchup-api-stubs/stubs/sketchupextension.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/string.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/ui.rb +8 -4
- metadata +3 -3
@@ -1,7 +1,7 @@
|
|
1
|
-
# Copyright:: Copyright
|
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",
|
35
|
-
#
|
36
|
-
# notification.
|
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",
|
66
|
-
#
|
67
|
-
# notification.
|
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
|
-
#
|
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",
|
101
|
-
#
|
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
|
-
#
|
105
|
-
#
|
112
|
+
# {SketchupExtension} instance used to identify
|
113
|
+
# the source of the notification.
|
106
114
|
#
|
107
115
|
# @param [String] message
|
108
|
-
#
|
116
|
+
# Message to display.
|
109
117
|
#
|
110
118
|
# @param [String] icon_name
|
111
|
-
#
|
119
|
+
# Path to an icon to display along with the message.
|
112
120
|
#
|
113
121
|
# @param [String] icon_tooltip
|
114
|
-
#
|
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
|
136
|
-
#
|
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
|
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
|
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 "
|
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
|
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.
|
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:
|
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.
|
208
|
+
rubygems_version: 3.2.15
|
209
209
|
signing_key:
|
210
210
|
specification_version: 4
|
211
211
|
summary: SketchUp Ruby API stubs.
|