sketchup-api-stubs 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (107) hide show
  1. checksums.yaml +7 -0
  2. data/SketchUp/Geom/BoundingBox.rb +335 -0
  3. data/SketchUp/Geom/LatLong.rb +123 -0
  4. data/SketchUp/Geom/Point3d.rb +643 -0
  5. data/SketchUp/Geom/PolygonMesh.rb +478 -0
  6. data/SketchUp/Geom/Transformation.rb +476 -0
  7. data/SketchUp/Geom/UTM.rb +135 -0
  8. data/SketchUp/Geom/Vector3d.rb +684 -0
  9. data/SketchUp/Sketchup/Animation.rb +137 -0
  10. data/SketchUp/Sketchup/AppObserver.rb +157 -0
  11. data/SketchUp/Sketchup/ArcCurve.rb +209 -0
  12. data/SketchUp/Sketchup/AttributeDictionaries.rb +146 -0
  13. data/SketchUp/Sketchup/AttributeDictionary.rb +280 -0
  14. data/SketchUp/Sketchup/Axes.rb +149 -0
  15. data/SketchUp/Sketchup/Behavior.rb +338 -0
  16. data/SketchUp/Sketchup/Camera.rb +594 -0
  17. data/SketchUp/Sketchup/ClassificationSchema.rb +63 -0
  18. data/SketchUp/Sketchup/Classifications.rb +118 -0
  19. data/SketchUp/Sketchup/Color.rb +291 -0
  20. data/SketchUp/Sketchup/ComponentDefinition.rb +562 -0
  21. data/SketchUp/Sketchup/ComponentInstance.rb +597 -0
  22. data/SketchUp/Sketchup/Console.rb +78 -0
  23. data/SketchUp/Sketchup/ConstructionLine.rb +257 -0
  24. data/SketchUp/Sketchup/ConstructionPoint.rb +32 -0
  25. data/SketchUp/Sketchup/Curve.rb +196 -0
  26. data/SketchUp/Sketchup/DefinitionList.rb +312 -0
  27. data/SketchUp/Sketchup/DefinitionObserver.rb +73 -0
  28. data/SketchUp/Sketchup/DefinitionsObserver.rb +102 -0
  29. data/SketchUp/Sketchup/Dimension.rb +167 -0
  30. data/SketchUp/Sketchup/DimensionLinear.rb +232 -0
  31. data/SketchUp/Sketchup/DimensionObserver.rb +38 -0
  32. data/SketchUp/Sketchup/DimensionRadial.rb +87 -0
  33. data/SketchUp/Sketchup/Drawingelement.rb +400 -0
  34. data/SketchUp/Sketchup/Edge.rb +517 -0
  35. data/SketchUp/Sketchup/EdgeUse.rb +213 -0
  36. data/SketchUp/Sketchup/Entities.rb +1011 -0
  37. data/SketchUp/Sketchup/EntitiesObserver.rb +125 -0
  38. data/SketchUp/Sketchup/Entity.rb +522 -0
  39. data/SketchUp/Sketchup/EntityObserver.rb +59 -0
  40. data/SketchUp/Sketchup/ExtensionsManager.rb +129 -0
  41. data/SketchUp/Sketchup/Face.rb +737 -0
  42. data/SketchUp/Sketchup/FrameChangeObserver.rb +104 -0
  43. data/SketchUp/Sketchup/Group.rb +705 -0
  44. data/SketchUp/Sketchup/Http.rb +27 -0
  45. data/SketchUp/Sketchup/Http/Request.rb +285 -0
  46. data/SketchUp/Sketchup/Http/Response.rb +62 -0
  47. data/SketchUp/Sketchup/Image.rb +393 -0
  48. data/SketchUp/Sketchup/Importer.rb +192 -0
  49. data/SketchUp/Sketchup/InputPoint.rb +393 -0
  50. data/SketchUp/Sketchup/InstanceObserver.rb +82 -0
  51. data/SketchUp/Sketchup/InstancePath.rb +297 -0
  52. data/SketchUp/Sketchup/Layer.rb +240 -0
  53. data/SketchUp/Sketchup/Layers.rb +235 -0
  54. data/SketchUp/Sketchup/LayersObserver.rb +136 -0
  55. data/SketchUp/Sketchup/Licensing.rb +47 -0
  56. data/SketchUp/Sketchup/Licensing/ExtensionLicense.rb +88 -0
  57. data/SketchUp/Sketchup/Loop.rb +141 -0
  58. data/SketchUp/Sketchup/Material.rb +384 -0
  59. data/SketchUp/Sketchup/Materials.rb +283 -0
  60. data/SketchUp/Sketchup/MaterialsObserver.rb +141 -0
  61. data/SketchUp/Sketchup/Menu.rb +97 -0
  62. data/SketchUp/Sketchup/Model.rb +1459 -0
  63. data/SketchUp/Sketchup/ModelObserver.rb +356 -0
  64. data/SketchUp/Sketchup/OptionsManager.rb +135 -0
  65. data/SketchUp/Sketchup/OptionsProvider.rb +277 -0
  66. data/SketchUp/Sketchup/OptionsProviderObserver.rb +58 -0
  67. data/SketchUp/Sketchup/Page.rb +636 -0
  68. data/SketchUp/Sketchup/Pages.rb +349 -0
  69. data/SketchUp/Sketchup/PagesObserver.rb +76 -0
  70. data/SketchUp/Sketchup/PickHelper.rb +457 -0
  71. data/SketchUp/Sketchup/RegionalSettings.rb +43 -0
  72. data/SketchUp/Sketchup/RenderingOptions.rb +337 -0
  73. data/SketchUp/Sketchup/RenderingOptionsObserver.rb +44 -0
  74. data/SketchUp/Sketchup/SectionPlane.rb +88 -0
  75. data/SketchUp/Sketchup/Selection.rb +470 -0
  76. data/SketchUp/Sketchup/SelectionObserver.rb +115 -0
  77. data/SketchUp/Sketchup/Set.rb +253 -0
  78. data/SketchUp/Sketchup/ShadowInfo.rb +257 -0
  79. data/SketchUp/Sketchup/ShadowInfoObserver.rb +57 -0
  80. data/SketchUp/Sketchup/Style.rb +77 -0
  81. data/SketchUp/Sketchup/Styles.rb +204 -0
  82. data/SketchUp/Sketchup/Text.rb +241 -0
  83. data/SketchUp/Sketchup/Texture.rb +211 -0
  84. data/SketchUp/Sketchup/TextureWriter.rb +237 -0
  85. data/SketchUp/Sketchup/Tool.rb +808 -0
  86. data/SketchUp/Sketchup/Tools.rb +120 -0
  87. data/SketchUp/Sketchup/ToolsObserver.rb +154 -0
  88. data/SketchUp/Sketchup/UVHelper.rb +61 -0
  89. data/SketchUp/Sketchup/Vertex.rb +143 -0
  90. data/SketchUp/Sketchup/View.rb +965 -0
  91. data/SketchUp/Sketchup/ViewObserver.rb +40 -0
  92. data/SketchUp/UI/Command.rb +307 -0
  93. data/SketchUp/UI/HtmlDialog.rb +346 -0
  94. data/SketchUp/UI/Notification.rb +229 -0
  95. data/SketchUp/UI/Toolbar.rb +243 -0
  96. data/SketchUp/UI/WebDialog.rb +623 -0
  97. data/SketchUp/_top_level.rb +193 -0
  98. data/SketchUp/array.rb +593 -0
  99. data/SketchUp/geom.rb +231 -0
  100. data/SketchUp/languagehandler.rb +92 -0
  101. data/SketchUp/length.rb +210 -0
  102. data/SketchUp/numeric.rb +249 -0
  103. data/SketchUp/sketchup.rb +1290 -0
  104. data/SketchUp/sketchupextension.rb +355 -0
  105. data/SketchUp/string.rb +24 -0
  106. data/SketchUp/ui.rb +637 -0
  107. metadata +176 -0
@@ -0,0 +1,63 @@
1
+ # Copyright:: Copyright 2017 Trimble Inc.
2
+ # License:: The MIT License (MIT)
3
+
4
+ # The ClassificationSchema class represent schemas loaded in the model.
5
+ #
6
+ # @version SketchUp 2015
7
+ class Sketchup::ClassificationSchema
8
+
9
+ # Includes
10
+
11
+ include Comparable
12
+
13
+ # Instance Methods
14
+
15
+ # The <=> method is used to compare two ClassificationSchema objects for
16
+ # sorting. The comparison is done based on the schema name.
17
+ #
18
+ # @example
19
+ # schema1 = Sketchup.active_model.classifications["IFC 2x3"]
20
+ # schema2 = Sketchup.active_model.classifications["gbXML"]
21
+ # # Returns -1
22
+ # result = schema1 <=> schema2
23
+ # # Returns an array of sorted schemas.
24
+ # schemas = Sketchup.active_model.classifications.to_a.sort
25
+ #
26
+ # @param schema2
27
+ # The second schema in the comparison.
28
+ #
29
+ # @return Integer - -1 if schema1 is less then schema2. 1 if
30
+ # schema1 is greater than schema2, 0 if the schemas
31
+ # are equal.
32
+ #
33
+ # @version SketchUp 2015
34
+ def <=>(schema2)
35
+ end
36
+
37
+ # The name method returns the name of the schema.
38
+ #
39
+ # @example
40
+ # Sketchup.active_model.classifications.each { |schema|
41
+ # puts schema.name
42
+ # }
43
+ #
44
+ # @return String - containing the schema name.
45
+ #
46
+ # @version SketchUp 2015
47
+ def name
48
+ end
49
+
50
+ # The namespace method returns the namespace of the schema.
51
+ #
52
+ # @example
53
+ # Sketchup.active_model.classifications.each { |schema|
54
+ # puts schema.namespace
55
+ # }
56
+ #
57
+ # @return String - containing the schema namespace.
58
+ #
59
+ # @version SketchUp 2015
60
+ def namespace
61
+ end
62
+
63
+ end
@@ -0,0 +1,118 @@
1
+ # Copyright:: Copyright 2017 Trimble Inc.
2
+ # License:: The MIT License (MIT)
3
+
4
+ # The Classifications class is a container/manager for all classifications in
5
+ # a model.
6
+ #
7
+ # @version SketchUp 2015
8
+ class Sketchup::Classifications
9
+
10
+ # Includes
11
+
12
+ include Enumerable
13
+
14
+ # Instance Methods
15
+
16
+ # The [] method is used to get a classification schema by name or index.
17
+ #
18
+ # @example
19
+ # # Get schema by name:
20
+ # schema = Sketchup.active_model.classifications["IFC 2x3"]
21
+ #
22
+ # # Get schema by index:
23
+ # schema = Sketchup.active_model.classifications[1]
24
+ #
25
+ # @param index_or_name
26
+ # The index or name of the ClassificationSchema object.
27
+ #
28
+ # @return schema - a ClassificationSchema object if
29
+ # successful, otherwise nil.
30
+ #
31
+ # @version SketchUp 2015
32
+ def [](index_or_name)
33
+ end
34
+
35
+ # The each method is used to iterate through loaded classification schemas.
36
+ #
37
+ # @example
38
+ # Sketchup.active_model.classifications.each { |schema|
39
+ # puts schema.name
40
+ # }
41
+ #
42
+ # @return nil
43
+ #
44
+ # @version SketchUp 2015
45
+ #
46
+ # @yield [schema] A variable that will hold each ClassificationSchema
47
+ # object as they are found.
48
+ def each
49
+ end
50
+
51
+ # The keys method is used to get a list of keys in the Classifications class,
52
+ # which are the same as the names of the schemas.
53
+ #
54
+ # @example
55
+ # schema_names = Sketchup.active_model.classifications.keys
56
+ #
57
+ # @return keys - Array of string keys
58
+ #
59
+ # @version SketchUp 2015
60
+ def keys
61
+ end
62
+
63
+ # The length method returns the number of loaded classification schemas.
64
+ #
65
+ # @example
66
+ # Sketchup.active_model.classifications.size
67
+ #
68
+ # @return integer - number of ClassificationSchema object
69
+ #
70
+ # @version SketchUp 2015
71
+ def length
72
+ end
73
+
74
+ # The load_schema method is used to load a classification schema into a
75
+ # model.
76
+ #
77
+ # @example
78
+ # c = Sketchup.active_model.classifications
79
+ # file = Sketchup.find_support_file('IFC 4.skc', 'Classifications')
80
+ # status = c.load_schema(file) if !file.nil?
81
+ #
82
+ # @param file
83
+ # Full path to the schema file
84
+ #
85
+ # @return True if successful.
86
+ #
87
+ # @version SketchUp 2015
88
+ def load_schema(file)
89
+ end
90
+
91
+ # The length method returns the number of loaded classification schemas.
92
+ #
93
+ # @example
94
+ # Sketchup.active_model.classifications.size
95
+ #
96
+ # @return integer - number of ClassificationSchema object
97
+ #
98
+ # @version SketchUp 2015
99
+ def size
100
+ end
101
+
102
+ # The unload_schema method is used to unload a classification schema that was
103
+ # previously loaded into a model.
104
+ #
105
+ # @example
106
+ # c = Sketchup.active_model.classifications
107
+ # status = c.unload_schema('IFC 2x3')
108
+ #
109
+ # @param schema_name
110
+ # Name of the schema to unload
111
+ #
112
+ # @return True if successful.
113
+ #
114
+ # @version SketchUp 2015
115
+ def unload_schema(schema_name)
116
+ end
117
+
118
+ end
@@ -0,0 +1,291 @@
1
+ # Copyright:: Copyright 2017 Trimble Inc.
2
+ # License:: The MIT License (MIT)
3
+
4
+ # The Color class is used to create and manipulate colors within SketchUp
5
+ # models.
6
+ #
7
+ # For methods that accept a Color object, such as the
8
+ # face.material method, you can pass in an actual Color object, or an object
9
+ # that can be converted to a Color. For example:
10
+ #
11
+ # SketchUp ships with several built in colors in the Materials Browser.
12
+ # These colors are listed in the following table.
13
+ #
14
+ # {include:file:assets/colors.html}
15
+ #
16
+ # @example
17
+ # face.material = Sketchup::Color.new(255, 0, 0)
18
+ # face.material = 255
19
+ # face.material = 0xff
20
+ # face.material = "red"
21
+ # face.material = "#ff0000"
22
+ # face.material = [1.0, 0.0, 0.0]
23
+ # face.material = [255, 0, 0]
24
+ #
25
+ # @version SketchUp 6.0
26
+ class Sketchup::Color
27
+
28
+ # Class Methods
29
+
30
+ # The names method is used to retrieve an array of all color names recognized
31
+ # by SketchUp.
32
+ #
33
+ # In general, whenever a method wants a color, you can pass in a String with
34
+ # one of these names.
35
+ #
36
+ # @example
37
+ # array = Sketchup::Color.names
38
+ #
39
+ # @return names - an array of all SketchUp color names if
40
+ # successful
41
+ #
42
+ # @version SketchUp 6.0
43
+ def self.names
44
+ end
45
+
46
+ # Instance Methods
47
+
48
+ # The alpha method is used to retrieve the opacity of the color. A value of 0
49
+ # is transparent, 255 is opaque.
50
+ #
51
+ # @example
52
+ # color = Sketchup::Color.new "OldLace"
53
+ # alpha = color.alpha
54
+ #
55
+ # @return alpha - the opacity of the color if successful
56
+ #
57
+ # @version SketchUp 6.0
58
+ def alpha
59
+ end
60
+
61
+ # The alpha= method is used to set the opacity of the color. A value of 0 is
62
+ # transparent, 255 is opaque.
63
+ #
64
+ # @example
65
+ # color = Sketchup::Color.new "AliceBlue"
66
+ # alpha = color.alpha = 255
67
+ #
68
+ # @param alpha
69
+ # The new opacity value.
70
+ #
71
+ # @return alpha - the newly set opacity value if successful
72
+ #
73
+ # @version SketchUp 8.0 M1
74
+ def alpha=(alpha)
75
+ end
76
+
77
+ # The blend method is used to blend two colors.
78
+ #
79
+ # The blended color will be the result of taking (1 - weight) * color1 +
80
+ # weight * color2. If weight = 0, you will get color2. If weight = 1 you will
81
+ # get color1.
82
+ #
83
+ # @example
84
+ # color1 = Sketchup::Color.new "OldLace"
85
+ # color2 = Sketchup::Color.new "AliceBlue"
86
+ # color3 = color1.blend color2, 0.5
87
+ #
88
+ # @param color2
89
+ # The second color to be blended (with this color).
90
+ #
91
+ # @param weight
92
+ # A Float between 0.0 and 1.0
93
+ #
94
+ # @return color3 - the newly blended Color object if successful
95
+ #
96
+ # @version SketchUp 6.0
97
+ def blend(color2, weight)
98
+ end
99
+
100
+ # The blue method is used to retrieve the blue value of a color. Colors are
101
+ # comprised of red, green, and blue values.
102
+ #
103
+ # Value range is 0 to 255.
104
+ #
105
+ # @example
106
+ # color = Sketchup::Color.new "AliceBlue"
107
+ # setting = color.blue
108
+ #
109
+ # @return blue - the blue value for the color if successful
110
+ #
111
+ # @version SketchUp 6.0
112
+ def blue
113
+ end
114
+
115
+ # The blue= method is used to set the blue value of a color. Colors are
116
+ # comprised of red, green, and blue values.
117
+ #
118
+ # Value range is 0 to 255.
119
+ #
120
+ # @example
121
+ # color = Sketchup::Color.new "AliceBlue"
122
+ # setting = color.blue = 200
123
+ # if (setting)
124
+ # UI.messagebox setting
125
+ # else
126
+ # UI.messagebox "Failure"
127
+ # end
128
+ #
129
+ # @param blue
130
+ # The blue value for the color.
131
+ #
132
+ # @return blue - the new blue value for the color if successful
133
+ #
134
+ # @version SketchUp 6.0
135
+ def blue=(blue)
136
+ end
137
+
138
+ # The green method is used to retrieve the green value of a color. Colors are
139
+ # comprised of red, green, and blue values.
140
+ #
141
+ # Value range is 0 to 255.
142
+ #
143
+ # @example
144
+ # color = Sketchup::Color.new "AliceBlue"
145
+ # setting = color.green
146
+ # if (setting)
147
+ # UI.messagebox setting
148
+ # else
149
+ # UI.messagebox "Failure"
150
+ # end
151
+ #
152
+ # @return green - the green value for the color if successful
153
+ #
154
+ # @version SketchUp 6.0
155
+ def green
156
+ end
157
+
158
+ # The green= method is used to set the green component of a RGB Color.
159
+ #
160
+ # Value range is 0 to 255.
161
+ #
162
+ # @example
163
+ # color = Sketchup::Color.new "AliceBlue"
164
+ # setting = color.green = 200
165
+ # if (setting)
166
+ # UI.messagebox setting
167
+ # else
168
+ # UI.messagebox "Failure"
169
+ # end
170
+ #
171
+ # @param green
172
+ # The green value for the color.
173
+ #
174
+ # @return green - the new green value for the color if successful
175
+ #
176
+ # @version SketchUp 6.0
177
+ def green=(green)
178
+ end
179
+
180
+ # The new method is used to create a new Color object.
181
+ #
182
+ # @example
183
+ # color_from_name = Sketchup::Color.new "OldLace"
184
+ # color_from_rgb = Sketchup::Color.new(0, 128, 255)
185
+ # color_from_rgba = Sketchup::Color.new(0, 128, 255, 128)
186
+ #
187
+ # # You can then assign colors to the material of DrawingElements.
188
+ # # Note that this creates a new Material object, and the alpha value
189
+ # # of the color does NOT get applied to the new Material. You must
190
+ # # manually set the alpha to get transparent materials.
191
+ # face.material = color_from_rgba
192
+ # face.material.alpha = 0.5
193
+ #
194
+ # @overload initialize(red, green, blue)
195
+ #
196
+ # @param [Integer] red A red value between 0 and 255.
197
+ # @param [Integer] green A green value between 0 and 255.
198
+ # @param [Integer] blue A blue value between 0 and 255.
199
+ # @return [Sketchup::Color]
200
+ #
201
+ # @overload initialize(name)
202
+ #
203
+ # @param [String] name A string name of a color that currently exists in
204
+ # SketchUp. See the table at the start of this class description for more
205
+ # info.
206
+ # @return [Sketchup::Color]
207
+ #
208
+ # @version SketchUp 6.0
209
+ def initialize(*args)
210
+ end
211
+
212
+ # The red method is used to retrieve the red component of a RGB Color.
213
+ #
214
+ # Value range is 0 to 255.
215
+ #
216
+ # @example
217
+ # color = Sketchup::Color.new "AliceBlue"
218
+ # setting = color.red
219
+ # if (setting)
220
+ # UI.messagebox setting
221
+ # else
222
+ # UI.messagebox "Failure"
223
+ # end
224
+ #
225
+ # @return red - the red value for the color if successful
226
+ #
227
+ # @version SketchUp 6.0
228
+ def red
229
+ end
230
+
231
+ # The red= method is used to set the red component of a RGB Color.
232
+ #
233
+ # Value range is 0 to 255.
234
+ #
235
+ # @example
236
+ # color = Sketchup::Color.new "AliceBlue"
237
+ # setting = color.red=200
238
+ #
239
+ # @param red
240
+ # The red value for the color.
241
+ #
242
+ # @return red - the new red value for the color if successful
243
+ #
244
+ # @version SketchUp 6.0
245
+ def red=(red)
246
+ end
247
+
248
+ # The to_a method is used to convert a Color object to an Array object. The
249
+ # returned array will contain 4 integer values (RGBA) between 0 and 255.
250
+ #
251
+ # @example
252
+ # color = Sketchup::Color.new "AliceBlue"
253
+ # color_array = color.to_a
254
+ # if (color_array)
255
+ # UI.messagebox color_array.to_s
256
+ # else
257
+ # UI.messagebox "Failure"
258
+ # end
259
+ #
260
+ # @return array - an Array object if successful
261
+ #
262
+ # @version SketchUp 6.0
263
+ def to_a
264
+ end
265
+
266
+ # The to_i method is used to convert a Color object to an 32 bit integer.
267
+ #
268
+ # @example
269
+ # color = Sketchup::Color.new "AliceBlue"
270
+ # integer = color.to_i
271
+ #
272
+ # @return integer - a 32 bit integer if successful
273
+ #
274
+ # @version SketchUp 6.0
275
+ def to_i
276
+ end
277
+
278
+ # Returns a string representation of a Color object, in the form
279
+ # of "Color(255, 255, 255, 255)".
280
+ #
281
+ # @example
282
+ # color = Sketchup::Color.new "OldLace"
283
+ # color.to_s
284
+ #
285
+ # @return string - a String name for the Color.
286
+ #
287
+ # @version SketchUp 6.0
288
+ def to_s
289
+ end
290
+
291
+ end