scriptup 2024.0.4 → 2024.0.6

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 (57) hide show
  1. checksums.yaml +4 -4
  2. data/ext/attribute_dictionaries.c +1 -1
  3. data/ext/color.c +3 -3
  4. data/ext/component_definition.c +2 -2
  5. data/ext/definition_list.c +1 -1
  6. data/ext/entity.c +4 -3
  7. data/ext/material.c +4 -7
  8. data/ext/utils.h +4 -4
  9. data/sketchup-sdk-win/binaries/layout/x64/LayOutAPI.dll +0 -0
  10. data/sketchup-sdk-win/binaries/layout/x64/LayOutAPI.lib +0 -0
  11. data/sketchup-sdk-win/binaries/layout/x64/LayOutControllers.dll +0 -0
  12. data/sketchup-sdk-win/binaries/layout/x64/LayOutModel.dll +0 -0
  13. data/sketchup-sdk-win/binaries/layout/x64/LayOutRTF.dll +0 -0
  14. data/sketchup-sdk-win/binaries/layout/x64/LayOutUtils.dll +0 -0
  15. data/sketchup-sdk-win/binaries/layout/x64/SketchUpCommonPreferences.dll +0 -0
  16. data/sketchup-sdk-win/binaries/layout/x64/SketchUpViewerAPI.dll +0 -0
  17. data/sketchup-sdk-win/binaries/layout/x64/SketchUpViewerAPI.lib +0 -0
  18. data/sketchup-sdk-win/binaries/layout/x64/pdflib.dll +0 -0
  19. data/sketchup-sdk-win/headers/LayOutAPI/application/application.h +117 -0
  20. data/sketchup-sdk-win/headers/LayOutAPI/common.h +22 -0
  21. data/sketchup-sdk-win/headers/LayOutAPI/geometry/geometry.h +78 -0
  22. data/sketchup-sdk-win/headers/LayOutAPI/initialize.h +36 -0
  23. data/sketchup-sdk-win/headers/LayOutAPI/layout.h +49 -0
  24. data/sketchup-sdk-win/headers/LayOutAPI/model/angulardimension.h +468 -0
  25. data/sketchup-sdk-win/headers/LayOutAPI/model/autotextdefinition.h +569 -0
  26. data/sketchup-sdk-win/headers/LayOutAPI/model/autotextdefinitionlist.h +79 -0
  27. data/sketchup-sdk-win/headers/LayOutAPI/model/connectionpoint.h +107 -0
  28. data/sketchup-sdk-win/headers/LayOutAPI/model/defs.h +42 -0
  29. data/sketchup-sdk-win/headers/LayOutAPI/model/dictionary.h +120 -0
  30. data/sketchup-sdk-win/headers/LayOutAPI/model/document.h +864 -0
  31. data/sketchup-sdk-win/headers/LayOutAPI/model/documentexportoptions.h +59 -0
  32. data/sketchup-sdk-win/headers/LayOutAPI/model/ellipse.h +78 -0
  33. data/sketchup-sdk-win/headers/LayOutAPI/model/entity.h +330 -0
  34. data/sketchup-sdk-win/headers/LayOutAPI/model/entityiterator.h +49 -0
  35. data/sketchup-sdk-win/headers/LayOutAPI/model/entitylist.h +114 -0
  36. data/sketchup-sdk-win/headers/LayOutAPI/model/formattedtext.h +397 -0
  37. data/sketchup-sdk-win/headers/LayOutAPI/model/grid.h +251 -0
  38. data/sketchup-sdk-win/headers/LayOutAPI/model/group.h +243 -0
  39. data/sketchup-sdk-win/headers/LayOutAPI/model/image.h +146 -0
  40. data/sketchup-sdk-win/headers/LayOutAPI/model/imagerep.h +109 -0
  41. data/sketchup-sdk-win/headers/LayOutAPI/model/label.h +332 -0
  42. data/sketchup-sdk-win/headers/LayOutAPI/model/layer.h +207 -0
  43. data/sketchup-sdk-win/headers/LayOutAPI/model/layerinstance.h +117 -0
  44. data/sketchup-sdk-win/headers/LayOutAPI/model/layerlist.h +69 -0
  45. data/sketchup-sdk-win/headers/LayOutAPI/model/lineardimension.h +456 -0
  46. data/sketchup-sdk-win/headers/LayOutAPI/model/page.h +261 -0
  47. data/sketchup-sdk-win/headers/LayOutAPI/model/pageinfo.h +372 -0
  48. data/sketchup-sdk-win/headers/LayOutAPI/model/pagelist.h +81 -0
  49. data/sketchup-sdk-win/headers/LayOutAPI/model/path.h +464 -0
  50. data/sketchup-sdk-win/headers/LayOutAPI/model/rectangle.h +240 -0
  51. data/sketchup-sdk-win/headers/LayOutAPI/model/referenceentity.h +120 -0
  52. data/sketchup-sdk-win/headers/LayOutAPI/model/sketchupmodel.h +624 -0
  53. data/sketchup-sdk-win/headers/LayOutAPI/model/skpfilereference.h +94 -0
  54. data/sketchup-sdk-win/headers/LayOutAPI/model/style.h +1080 -0
  55. data/sketchup-sdk-win/headers/LayOutAPI/model/table.h +470 -0
  56. data/sketchup-sdk-win/headers/LayOutAPI/model/typed_value.h +156 -0
  57. metadata +50 -2
@@ -0,0 +1,569 @@
1
+ // Copyright 2016-2022 Trimble Inc. All Rights Reserved.
2
+ // This file is intended for public distribution.
3
+
4
+ #ifndef LAYOUT_MODEL_AUTOTEXTDEFINITION_H_
5
+ #define LAYOUT_MODEL_AUTOTEXTDEFINITION_H_
6
+
7
+ #include <LayOutAPI/common.h>
8
+ #include <LayOutAPI/model/defs.h>
9
+
10
+ /**
11
+ @struct LOAutoTextDefinitionRef
12
+ @brief References an auto-text definition.
13
+ @since LayOut 2017, API 2.0
14
+ */
15
+
16
+ /**
17
+ @enum LOAutoTextDefinitionType
18
+ @brief Defines the different types of auto-text.
19
+ @since LayOut 2017, API 2.0
20
+ */
21
+ typedef enum {
22
+ LOAutoTextDefinitionType_File = 0,
23
+ LOAutoTextDefinitionType_PageName,
24
+ LOAutoTextDefinitionType_PageNumber,
25
+ LOAutoTextDefinitionType_CustomText,
26
+ LOAutoTextDefinitionType_DateCurrent,
27
+ LOAutoTextDefinitionType_DateCreated,
28
+ LOAutoTextDefinitionType_DateModified,
29
+ LOAutoTextDefinitionType_DatePublished,
30
+
31
+ // Mandatory types
32
+ LOAutoTextDefinitionType_ModelGroupName,
33
+ LOAutoTextDefinitionType_ModelComponentInstanceName,
34
+ LOAutoTextDefinitionType_ModelComponentDefinitionName,
35
+ LOAutoTextDefinitionType_ModelComponentDescription,
36
+ LOAutoTextDefinitionType_ModelVolume,
37
+ LOAutoTextDefinitionType_ModelFaceArea,
38
+ LOAutoTextDefinitionType_ModelEdgeLength,
39
+ LOAutoTextDefinitionType_ModelCoordinates,
40
+ LOAutoTextDefinitionType_ModelDynamicComponentAttribute,
41
+ LOAutoTextDefinitionType_ModelClassifierAttribute,
42
+ LOAutoTextDefinitionType_ModelComponentInstanceAttribute,
43
+ LOAutoTextDefinitionType_ModelComponentDefinitionAttribute,
44
+
45
+ // @since LayOut 2022.0, API 7.0
46
+ LOAutoTextDefinitionType_ModelSceneName,
47
+ LOAutoTextDefinitionType_ModelSceneDescription,
48
+ LOAutoTextDefinitionType_ModelScale,
49
+ LOAutoTextDefinitionType_ModelSectionName,
50
+ LOAutoTextDefinitionType_ModelSectionSymbol,
51
+ LOAutoTextDefinitionType_PageCount,
52
+ LOAutoTextDefinitionType_Sequence,
53
+ LOAutoTextDefinitionType_ModelRatio,
54
+
55
+ // Must be last to give us a count of the number of types.
56
+ LOAutoTextDefinitionType_Count
57
+ } LOAutoTextDefinitionType;
58
+
59
+ /**
60
+ @enum LOAutoTextDefinitionNumberingStyle
61
+ @brief An enumeration of the different styles of page numbers we support.
62
+ @since LayOut 2017, API 2.0
63
+ */
64
+ typedef enum {
65
+ LOAutoTextDefinitionNumberingStyle_Arabic = 0,
66
+ LOAutoTextDefinitionNumberingStyle_ArabicPadded,
67
+ LOAutoTextDefinitionNumberingStyle_UCAlpha,
68
+ LOAutoTextDefinitionNumberingStyle_LCAlpha,
69
+ LOAutoTextDefinitionNumberingStyle_UCRoman,
70
+ LOAutoTextDefinitionNumberingStyle_LCRoman,
71
+
72
+ // Must be last to give us a count of styles.
73
+ LOAutoTextDefinitionNumberingStyle_Count
74
+ } LOAutoTextDefinitionNumberingStyle;
75
+
76
+ /**
77
+ @enum LOAutoTextDefinitionSequenceType
78
+ @brief An enumeration of the different types of auto-text sequencing.
79
+ @since LayOut 2023.0, API 8.0
80
+ */
81
+ typedef enum {
82
+ LOAutoTextDefinitionSequenceType_PerDocument = 0,
83
+ LOAutoTextDefinitionSequenceType_PerPage,
84
+
85
+ // Must be last to give us a count of sequence types.
86
+ LOAutoTextDefinitionSequenceType_Count
87
+ } LOAutoTextDefinitionSequenceType;
88
+
89
+ #ifdef __cplusplus
90
+ extern "C" {
91
+ #endif // __cplusplus
92
+
93
+ /**
94
+ @brief Gets the type of the specified auto-text definition.
95
+ @since LayOut 2017, API 2.0
96
+ @param[in] autotext The auto-text definition object.
97
+ @param[out] type The auto-text definition type.
98
+ @return
99
+ - \ref SU_ERROR_NONE on success
100
+ - \ref SU_ERROR_INVALID_INPUT if autotext does not refer to a valid object
101
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if type is NULL
102
+ */
103
+ LO_RESULT LOAutoTextDefinitionGetType(
104
+ LOAutoTextDefinitionRef autotext, LOAutoTextDefinitionType* type);
105
+
106
+ /**
107
+ @brief Gets whether the specified auto-text definition is a mandatory definition.
108
+ Mandatory auto-text definitions may not be removed from a document, and
109
+ they may not be created through the API, but they may be modified.
110
+ @since LayOut 2018, API 3.0
111
+ @param[in] autotext The auto-text definition object.
112
+ @param[out] is_mandatory Whether it is a mandatory auto-text definition.
113
+ @return
114
+ - \ref SU_ERROR_NONE on success
115
+ - \ref SU_ERROR_INVALID_INPUT if autotext does not refer to a valid object
116
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if is_mandatory is NULL
117
+ */
118
+ LO_RESULT LOAutoTextDefinitionGetMandatory(LOAutoTextDefinitionRef autotext, bool* is_mandatory);
119
+
120
+ /**
121
+ @brief Returns the document that this auto-text definition belongs to.
122
+ @since LayOut 2018, API 3.0
123
+ @param[in] autotext The auto-text definition object.
124
+ @param[out] document The document object.
125
+ @return
126
+ - \ref SU_ERROR_NONE on success
127
+ - \ref SU_ERROR_INVALID_INPUT if autotext does not refer to a valid object
128
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if document is NULL
129
+ */
130
+ LO_RESULT LOAutoTextDefinitionGetDocument(
131
+ LOAutoTextDefinitionRef autotext, LODocumentRef* document);
132
+
133
+ /**
134
+ @brief Gets the name of the specified auto-text definition.
135
+ @since LayOut 2017, API 2.0
136
+ @param[in] autotext The auto-text definition object.
137
+ @param[out] name The auto-text definition name string.
138
+ @return
139
+ - \ref SU_ERROR_NONE on success
140
+ - \ref SU_ERROR_INVALID_INPUT if autotext does not refer to a valid object
141
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if name is NULL
142
+ */
143
+ LO_RESULT LOAutoTextDefinitionGetName(LOAutoTextDefinitionRef autotext, SUStringRef* name);
144
+
145
+ /**
146
+ @brief Sets the name of the specified auto-text definition.
147
+ @since LayOut 2017, API 2.0
148
+ @param[in] autotext The auto-text definition object.
149
+ @param[out] name The auto-text definition name string.
150
+ @return
151
+ - \ref SU_ERROR_NONE on success
152
+ - \ref SU_ERROR_INVALID_INPUT if autotext does not refer to a valid object
153
+ - \ref SU_ERROR_UNSUPPORTED if autotext is a mandatory definition
154
+ - \ref SU_ERROR_DUPLICATE if name is the name of an existing definition
155
+ - \ref SU_ERROR_UNSUPPORTED if name is an empty string
156
+ */
157
+ LO_RESULT LOAutoTextDefinitionSetName(LOAutoTextDefinitionRef autotext, const char* name);
158
+
159
+ /**
160
+ @brief Gets the tag string of the specified auto-text definition.
161
+ @since LayOut 2017, API 2.0
162
+ @param[in] autotext The auto-text definition object.
163
+ @param[out] tag The auto-text definition tag string.
164
+ @return
165
+ - \ref SU_ERROR_NONE on success
166
+ - \ref SU_ERROR_INVALID_INPUT if autotext does not refer to a valid object
167
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if tag is NULL
168
+ */
169
+ LO_RESULT LOAutoTextDefinitionGetTag(LOAutoTextDefinitionRef autotext, SUStringRef* tag);
170
+
171
+ /**
172
+ @brief Gets the index of the specified auto-text definition.
173
+ @since LayOut 2018, API 3.0
174
+ @param[in] autotext The auto-text definition object.
175
+ @param[out] index The index of the auto-text definition.
176
+ @return
177
+ - \ref SU_ERROR_NONE on success
178
+ - \ref SU_ERROR_INVALID_INPUT if autotext does not refer to a valid object
179
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if index is NULL
180
+ */
181
+ LO_RESULT LOAutoTextDefinitionGetIndex(LOAutoTextDefinitionRef autotext, size_t* index);
182
+
183
+ /**
184
+ @brief Gets the text string of the specified custom auto-text definition.
185
+ @since LayOut 2017, API 2.0
186
+ @param[in] autotext The auto-text definition object.
187
+ @param[out] custom_text The auto-text definition custom text string.
188
+ @return
189
+ - \ref SU_ERROR_NONE on success
190
+ - \ref SU_ERROR_INVALID_INPUT if autotext does not refer to a valid object
191
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if custom_text is NULL
192
+ - \ref SU_ERROR_UNSUPPORTED if autotext's type is not that of custom text
193
+ */
194
+ LO_RESULT LOAutoTextDefinitionGetCustomText(
195
+ LOAutoTextDefinitionRef autotext, SUStringRef* custom_text);
196
+
197
+ /**
198
+ @brief Sets the text string of the specified custom auto-text definition.
199
+ @since LayOut 2017, API 2.0
200
+ @param[in] autotext The auto-text definition object.
201
+ @param[in] custom_text The auto-text definition custom text string.
202
+ @return
203
+ - \ref SU_ERROR_NONE on success
204
+ - \ref SU_ERROR_INVALID_INPUT if autotext does not refer to a valid object
205
+ - \ref SU_ERROR_UNSUPPORTED if autotext's type is not that of custom text
206
+ */
207
+ LO_RESULT LOAutoTextDefinitionSetCustomText(
208
+ LOAutoTextDefinitionRef autotext, const char* custom_text);
209
+
210
+ /**
211
+ @brief Gets the date format string of the specified date auto-text definition.
212
+ @since LayOut 2017, API 2.0
213
+ @param[in] autotext The auto-text definition object.
214
+ @param[out] date_format The auto-text definition date format string.
215
+ @return
216
+ - \ref SU_ERROR_NONE on success
217
+ - \ref SU_ERROR_INVALID_INPUT if autotext does not refer to a valid object
218
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if date_format is NULL
219
+ - \ref SU_ERROR_UNSUPPORTED if autotext's type is not a date type
220
+ */
221
+ LO_RESULT LOAutoTextDefinitionGetDateFormat(
222
+ LOAutoTextDefinitionRef autotext, SUStringRef* date_format);
223
+
224
+ /**
225
+ @brief Sets the date format string of the specified date auto-text definition.
226
+ @since LayOut 2017, API 2.0
227
+ @param[in] autotext The auto-text definition object.
228
+ @param[in] date_format The auto-text definition date format string.
229
+ @return
230
+ - \ref SU_ERROR_NONE on success
231
+ - \ref SU_ERROR_INVALID_INPUT if autotext does not refer to a valid object
232
+ - \ref SU_ERROR_UNSUPPORTED if autotext's type is not a date type
233
+ */
234
+ LO_RESULT LOAutoTextDefinitionSetDateFormat(
235
+ LOAutoTextDefinitionRef autotext, const char* date_format);
236
+
237
+ /**
238
+ @brief Gets a boolean signifying if the full path is displayed for the specified
239
+ file auto-text definition.
240
+ @since LayOut 2017, API 2.0
241
+ @param[in] autotext The auto-text definition object.
242
+ @param[in] is_display_full_path Boolean signifying if the full path is being
243
+ displayed.
244
+ @return
245
+ - \ref SU_ERROR_NONE on success
246
+ - \ref SU_ERROR_INVALID_INPUT if autotext does not refer to a valid object
247
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if is_display_full_path is NULL
248
+ - \ref SU_ERROR_UNSUPPORTED if autotext's type is not a file type
249
+ */
250
+ LO_RESULT LOAutoTextDefinitionGetDisplayFullPath(
251
+ LOAutoTextDefinitionRef autotext, bool* is_display_full_path);
252
+
253
+ /**
254
+ @brief Sets whether the full path is displayed for the specified file auto-text
255
+ definition.
256
+ @since LayOut 2017, API 2.0
257
+ @param[in] autotext The auto-text definition object.
258
+ @param[in] is_display_full_path Boolean signifying if the full path is being
259
+ displayed.
260
+ @return
261
+ - \ref SU_ERROR_NONE on success
262
+ - \ref SU_ERROR_INVALID_INPUT if autotext does not refer to a valid object
263
+ - \ref SU_ERROR_UNSUPPORTED if autotext's type is not a file type
264
+ */
265
+ LO_RESULT LOAutoTextDefinitionSetDisplayFullPath(
266
+ LOAutoTextDefinitionRef autotext, bool is_display_full_path);
267
+
268
+ /**
269
+ @brief Gets a boolean signifying if the file extension is displayed for the
270
+ specified file auto-text definition.
271
+ @since LayOut 2017, API 2.0
272
+ @param[in] autotext The auto-text definition object.
273
+ @param[in] is_display_file_ext Boolean signifying if the full path is being
274
+ displayed.
275
+ @return
276
+ - \ref SU_ERROR_NONE on success
277
+ - \ref SU_ERROR_INVALID_INPUT if autotext does not refer to a valid object
278
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if is_display_file_ext is NULL
279
+ - \ref SU_ERROR_UNSUPPORTED if autotext's type is not a file type
280
+ */
281
+ LO_RESULT LOAutoTextDefinitionGetDisplayFileExtension(
282
+ LOAutoTextDefinitionRef autotext, bool* is_display_file_ext);
283
+
284
+ /**
285
+ @brief Sets whether the file extension is displayed for the specified file auto
286
+ text definition.
287
+ @since LayOut 2017, API 2.0
288
+ @param[in] autotext The auto-text definition object.
289
+ @param[in] is_display_file_ext Boolean signifying if the full path is being
290
+ displayed.
291
+ @return
292
+ - \ref SU_ERROR_NONE on success
293
+ - \ref SU_ERROR_INVALID_INPUT if autotext does not refer to a valid object
294
+ - \ref SU_ERROR_UNSUPPORTED if autotext's type is not a file type
295
+ */
296
+ LO_RESULT LOAutoTextDefinitionSetDisplayFileExtension(
297
+ LOAutoTextDefinitionRef autotext, bool is_display_file_ext);
298
+ /**
299
+ @brief Gets the numbering style of the specified page number auto-text definition.
300
+ @since LayOut 2017, API 2.0
301
+ @param[in] autotext The auto-text definition object.
302
+ @param[out] numbering_style The style of numbering.
303
+ @return
304
+ - \ref SU_ERROR_NONE on success
305
+ - \ref SU_ERROR_INVALID_INPUT if \p autotext does not refer to a valid object
306
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if \p numbering_style is NULL
307
+ - \ref SU_ERROR_UNSUPPORTED if \p autotext's type is not page number
308
+ */
309
+ SU_DEPRECATED_FUNCTION("LayOut API 7.0")
310
+ LO_RESULT LOAutoTextDefinitionGetPageNumberStyle(
311
+ LOAutoTextDefinitionRef autotext, LOAutoTextDefinitionNumberingStyle* numbering_style);
312
+
313
+ /**
314
+ @brief Sets the numbering style of the specified page number auto-text definition.
315
+ @since LayOut 2017, API 2.0
316
+ @param[in] autotext The auto-text definition object.
317
+ @param[out] numbering_style The style of numbering.
318
+ @return
319
+ - \ref SU_ERROR_NONE on success
320
+ - \ref SU_ERROR_INVALID_INPUT if \p autotext does not refer to a valid object
321
+ - \ref SU_ERROR_NULL_POINTER_INPUT if \p numbering_style is NULL
322
+ - \ref SU_ERROR_UNSUPPORTED if \p autotext's type is not page number
323
+ */
324
+ SU_DEPRECATED_FUNCTION("LayOut API 7.0")
325
+ LO_RESULT LOAutoTextDefinitionSetPageNumberStyle(
326
+ LOAutoTextDefinitionRef autotext, LOAutoTextDefinitionNumberingStyle numbering_style);
327
+
328
+ /**
329
+ @brief Gets the index at which the auto-text definition starts numbering.
330
+ @since LayOut 2017, API 2.0
331
+ @param[in] autotext The auto-text definition object.
332
+ @param[out] start_index The starting index.
333
+ @return
334
+ - \ref SU_ERROR_NONE on success
335
+ - \ref SU_ERROR_INVALID_INPUT if \p autotext does not refer to a valid object
336
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if \p start_index is NULL
337
+ - \ref SU_ERROR_UNSUPPORTED if \p autotext's type is not page number
338
+ */
339
+ SU_DEPRECATED_FUNCTION("LayOut API 7.0")
340
+ LO_RESULT LOAutoTextDefinitionGetPageNumberStartIndex(
341
+ LOAutoTextDefinitionRef autotext, int* start_index);
342
+
343
+ /**
344
+ @brief Sets the value at which to start counting.
345
+ @since LayOut 2017, API 2.0
346
+ @param[in] autotext The auto-text definition object.
347
+ @param[out] value The number at which to start counting.
348
+ @return
349
+ - \ref SU_ERROR_NONE on success
350
+ - \ref SU_ERROR_INVALID_INPUT if \p autotext does not refer to a valid object
351
+ - \ref SU_ERROR_NULL_POINTER_INPUT if \p value is NULL
352
+ - \ref SU_ERROR_UNSUPPORTED if autotext's type is not a page number
353
+ */
354
+ SU_DEPRECATED_FUNCTION("LayOut API 7.0")
355
+ LO_RESULT LOAutoTextDefinitionSetPageNumberStartIndex(LOAutoTextDefinitionRef autotext, int value);
356
+
357
+ /**
358
+ @brief Gets the page that the page number or page count auto-text definition starts numbering on.
359
+ @since LayOut 2022.0, API 7.0
360
+ @param[in] autotext The auto-text definition object.
361
+ @param[out] page The page object.
362
+ @return
363
+ - \ref SU_ERROR_NONE on success
364
+ - \ref SU_ERROR_INVALID_INPUT if \p autotext does not refer to a valid object
365
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if \p page is NULL
366
+ - \ref SU_ERROR_UNSUPPORTED if \p autotext's type is not page number, page count, or sequence
367
+ */
368
+ LO_RESULT LOAutoTextDefinitionGetStartPage(LOAutoTextDefinitionRef autotext, LOPageRef* page);
369
+
370
+ /**
371
+ @brief Sets the page that the page number or page count auto-text definition starts numbering on.
372
+ @since LayOut 2022.0, API 7.0
373
+ @param[in] autotext The auto-text definition object.
374
+ @param[in] page The page object.
375
+ @return
376
+ - \ref SU_ERROR_NONE on success
377
+ - \ref SU_ERROR_INVALID_INPUT if \p autotext does not refer to a valid object
378
+ - \ref SU_ERROR_INVALID_INPUT if \p page does not refer to a valid object
379
+ - \ref SU_ERROR_UNSUPPORTED if \p autotext's type is not page number or page count
380
+ */
381
+ LO_RESULT LOAutoTextDefinitionSetStartPage(LOAutoTextDefinitionRef autotext, LOPageRef page);
382
+
383
+ /**
384
+ @brief Gets the page the page count auto-text definition stops counting at. page may be returned as
385
+ SU_INVALID, which indicates that the auto-text uses the last page in the document.
386
+ @since LayOut 2022.0, API 7.0
387
+ @param[in] autotext The auto-text definition object.
388
+ @param[out] page The page object.
389
+ @return
390
+ - \ref SU_ERROR_NONE on success
391
+ - \ref SU_ERROR_INVALID_INPUT if \p autotext does not refer to a valid object
392
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if \p page is NULL
393
+ - \ref SU_ERROR_UNSUPPORTED if \p autotext's type is not page count
394
+ */
395
+ LO_RESULT LOAutoTextDefinitionGetEndPage(LOAutoTextDefinitionRef autotext, LOPageRef* page);
396
+
397
+ /**
398
+ @brief Sets the page the page count auto-text definition stops counting at. This page must be after
399
+ or the same as start page. If page is SU_INVALID, then the last page in the document will
400
+ be used.
401
+ @since LayOut 2022.0, API 7.0
402
+ @param[in] autotext The auto-text definition object.
403
+ @param[in] page The page object.
404
+ @return
405
+ - \ref SU_ERROR_NONE on success
406
+ - \ref SU_ERROR_INVALID_INPUT if \p autotext does not refer to a valid object
407
+ - \ref SU_ERROR_OUT_OF_RANGE if \p page is a page that comes after this definition's start page
408
+ - \ref SU_ERROR_UNSUPPORTED if \p autotext's type is not page count
409
+ */
410
+ LO_RESULT LOAutoTextDefinitionSetEndPage(LOAutoTextDefinitionRef autotext, LOPageRef page);
411
+
412
+ /**
413
+ @brief Gets the increment value of the specified sequence auto-text definition.
414
+ @since LayOut 2022.0, API 7.0
415
+ @param[in] autotext The auto-text definition object.
416
+ @param[out] increment The amount each sequence object increments by.
417
+ @return
418
+ - \ref SU_ERROR_NONE on success
419
+ - \ref SU_ERROR_INVALID_INPUT if \p autotext does not refer to a valid object
420
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if \p increment is NULL
421
+ - \ref SU_ERROR_UNSUPPORTED if \p autotext's type is not a sequence type
422
+ */
423
+ LO_RESULT LOAutoTextDefinitionGetIncrement(LOAutoTextDefinitionRef autotext, int* increment);
424
+
425
+ /**
426
+ @brief Sets the increment value of the specified sequence auto-text definition.
427
+ @since LayOut 2022.0, API 7.0
428
+ @param[in] autotext The auto-text definition object.
429
+ @param[in] increment The new amount each sequence object will increment by.
430
+ @return
431
+ - \ref SU_ERROR_NONE on success
432
+ - \ref SU_ERROR_INVALID_INPUT if \p autotext does not refer to a valid object
433
+ - \ref SU_ERROR_UNSUPPORTED if \p autotext's type is not a sequence type
434
+ */
435
+ LO_RESULT LOAutoTextDefinitionSetIncrement(LOAutoTextDefinitionRef autotext, int increment);
436
+
437
+ /**
438
+ @brief Gets the sequence format string of the specified date auto-text definition.
439
+ @since LayOut 2022.0, API 7.0
440
+ @param[in] autotext The auto-text definition object.
441
+ @param[out] sequence_format The auto-text definition sequence format string.
442
+ @return
443
+ - \ref SU_ERROR_NONE on success
444
+ - \ref SU_ERROR_INVALID_INPUT if \p autotext does not refer to a valid object
445
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if \p sequence_format is NULL
446
+ - \ref SU_ERROR_UNSUPPORTED if \p autotext's type is not a sequence type
447
+ */
448
+ LO_RESULT LOAutoTextDefinitionGetSequenceFormat(
449
+ LOAutoTextDefinitionRef autotext, SUStringRef* sequence_format);
450
+
451
+ /**
452
+ @brief Sets the format string of the specified sequence auto-text definition. If the string is
453
+ empty, the format string will be set to the default of ###.
454
+ @since LayOut 2022.0, API 7.0
455
+ @param[in] autotext The auto-text definition object.
456
+ @param[in] sequence_format The new format string for the sequence.
457
+ @return
458
+ - \ref SU_ERROR_NONE on success
459
+ - \ref SU_ERROR_INVALID_INPUT if \p autotext does not refer to a valid object
460
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if \p sequence_format is NULL
461
+ - \ref SU_ERROR_UNSUPPORTED if \p autotext's type is not a sequence type
462
+ */
463
+ LO_RESULT LOAutoTextDefinitionSetSequenceFormat(
464
+ LOAutoTextDefinitionRef autotext, const char* sequence_format);
465
+
466
+ /**
467
+ @brief Iterates through all uses of the auto-text definition and eliminates gaps and duplicates in
468
+ the sequence.
469
+ @since LayOut 2022.0, API 7.0
470
+ @param[in] autotext The auto-text definition object.
471
+ @return
472
+ - \ref SU_ERROR_NONE on success
473
+ - \ref SU_ERROR_INVALID_INPUT if \p autotext does not refer to a valid object
474
+ - \ref SU_ERROR_UNSUPPORTED if \p autotext's type is not a sequence type
475
+ */
476
+ LO_RESULT LOAutoTextDefinitionRenumberSequence(LOAutoTextDefinitionRef autotext);
477
+
478
+ /**
479
+ @brief Gets the numbering style of the specified page number, page count, or sequence auto-text
480
+ definition.
481
+ @since LayOut 2022.0, API 7.0
482
+ @note Use this method instead of the deprecated \p LOAutoTextDefinitionGetPageNumberStyle.
483
+ @param[in] autotext The auto-text definition object.
484
+ @param[out] numbering_style The style of numbering.
485
+ @return
486
+ - \ref SU_ERROR_NONE on success
487
+ - \ref SU_ERROR_INVALID_INPUT if \p autotext does not refer to a valid object
488
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if \p numbering_style is NULL
489
+ - \ref SU_ERROR_UNSUPPORTED if \p autotext's type is not page number, page count, or sequence
490
+ */
491
+ LO_RESULT LOAutoTextDefinitionGetNumberStyle(
492
+ LOAutoTextDefinitionRef autotext, LOAutoTextDefinitionNumberingStyle* numbering_style);
493
+
494
+ /**
495
+ @brief Sets the numbering style of the specified page number, page count, or sequence auto-text
496
+ definition.
497
+ @since LayOut 2022.0, API 7.0
498
+ @note Use this method instead of the deprecated \p LOAutoTextDefinitionSetPageNumberStyle.
499
+ @param[in] autotext The auto-text definition object.
500
+ @param[in] numbering_style The style of numbering.
501
+ @return
502
+ - \ref SU_ERROR_NONE on success
503
+ - \ref SU_ERROR_INVALID_INPUT if \p autotext does not refer to a valid object
504
+ - \ref SU_ERROR_UNSUPPORTED if \p autotext's type is not page number, page count, or sequence
505
+ - \ref SU_ERROR_OUT_OF_RANGE if \p numbering_style is not a valid numbering style
506
+ */
507
+ LO_RESULT LOAutoTextDefinitionSetNumberStyle(
508
+ LOAutoTextDefinitionRef autotext, LOAutoTextDefinitionNumberingStyle numbering_style);
509
+
510
+ /**
511
+ @brief Gets the index at which the auto-text definition starts numbering.
512
+ @since LayOut 2022.0, API 7.0
513
+ @note Use this method instead of the deprecated \p LOAutoTextDefinitionGetPageNumberStartIndex.
514
+ @param[in] autotext The auto-text definition object.
515
+ @param[out] start_index The starting index.
516
+ @return
517
+ - \ref SU_ERROR_NONE on success
518
+ - \ref SU_ERROR_INVALID_INPUT if \p autotext does not refer to a valid object
519
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if \p start_index is NULL
520
+ - \ref SU_ERROR_UNSUPPORTED if \p autotext's type is not page number, page count, or sequence
521
+ */
522
+ LO_RESULT LOAutoTextDefinitionGetStartIndex(LOAutoTextDefinitionRef autotext, int* start_index);
523
+
524
+ /**
525
+ @brief Sets the value at which to start counting.
526
+ @since LayOut 2022.0, API 7.0
527
+ @note Use this method instead of the deprecated \p LOAutoTextDefinitionGetPageNumberStartIndex.
528
+ @param[in] autotext The auto-text definition object.
529
+ @param[in] value The number at which to start counting.
530
+ @return
531
+ - \ref SU_ERROR_NONE on success
532
+ - \ref SU_ERROR_INVALID_INPUT if \p autotext does not refer to a valid object
533
+ - \ref SU_ERROR_UNSUPPORTED if autotext's type is not a page number, page count, or sequence type
534
+ */
535
+ LO_RESULT LOAutoTextDefinitionSetStartIndex(LOAutoTextDefinitionRef autotext, int value);
536
+
537
+ /**
538
+ @brief Gets the sequence type of the specified sequence auto-text definition.
539
+ @since LayOut 2023.0, API 8.0
540
+ @param[in] autotext The auto-text definition object.
541
+ @param[out] sequence_type The sequencing behavior of this definition.
542
+ @return
543
+ - \ref SU_ERROR_NONE on success
544
+ - \ref SU_ERROR_INVALID_INPUT if \p autotext does not refer to a valid object
545
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if \p sequence_type is NULL
546
+ - \ref SU_ERROR_UNSUPPORTED if \p autotext's type is not sequence
547
+ */
548
+ LO_RESULT LOAutoTextDefinitionGetSequenceType(
549
+ LOAutoTextDefinitionRef autotext, LOAutoTextDefinitionSequenceType* sequence_type);
550
+
551
+ /**
552
+ @brief Sets the sequence type of the specified sequence auto-text definition.
553
+ @since LayOut 2023.0, API 8.0
554
+ @param[in] autotext The auto-text definition object.
555
+ @param[in] sequence_type The sequencing behavior.
556
+ @return
557
+ - \ref SU_ERROR_NONE on success
558
+ - \ref SU_ERROR_INVALID_INPUT if \p autotext does not refer to a valid object
559
+ - \ref SU_ERROR_UNSUPPORTED if \p autotext's type is not sequence
560
+ - \ref SU_ERROR_OUT_OF_RANGE if \p sequence_type is not a valid sequence type
561
+ */
562
+ LO_RESULT LOAutoTextDefinitionSetSequenceType(
563
+ LOAutoTextDefinitionRef autotext, LOAutoTextDefinitionSequenceType sequence_type);
564
+
565
+ #ifdef __cplusplus
566
+ } // end extern "C"
567
+ #endif // __cplusplus
568
+
569
+ #endif // LAYOUT_MODEL_AUTOTEXTDEFINITION_H_
@@ -0,0 +1,79 @@
1
+ // Copyright 2017 Trimble Inc. All Rights Reserved.
2
+ // This file is intended for public distribution.
3
+
4
+ #ifndef LAYOUT_MODEL_AUTOTEXTDEFINITIONLIST_H_
5
+ #define LAYOUT_MODEL_AUTOTEXTDEFINITIONLIST_H_
6
+
7
+ #include <LayOutAPI/common.h>
8
+ #include <LayOutAPI/model/defs.h>
9
+
10
+ /**
11
+ @struct LOAutoTextDefinitionListRef
12
+ @brief References an ordered, indexable list of \ref LOAutoTextDefinitionRef
13
+ objects.
14
+ @since LayOut 2018, API 3.0
15
+ */
16
+
17
+ #ifdef __cplusplus
18
+ extern "C" {
19
+ #endif // __cplusplus
20
+
21
+ /**
22
+ @brief Creates a new empty auto-text definition list object.
23
+ @since LayOut 2018, API 3.0
24
+ @param[out] auto_text_list An empty auto-text definition list object.
25
+ @return
26
+ - \ref SU_ERROR_NONE on success
27
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if auto_text_list is NULL
28
+ - \ref SU_ERROR_OVERWRITE_VALID if *auto_text_list already refers to a valid
29
+ object
30
+ */
31
+ LO_RESULT LOAutoTextDefinitionListCreate(LOAutoTextDefinitionListRef* auto_text_list);
32
+
33
+ /**
34
+ @brief Releases an auto-text definition list object. *auto_text_list will be set
35
+ to invalid by this function.
36
+ @since LayOut 2018, API 3.0
37
+ @param[in] auto_text_list The auto-text definition list object.
38
+ @return
39
+ - \ref SU_ERROR_NONE on success
40
+ - \ref SU_ERROR_NULL_POINTER_INPUT if auto_text_list does not refer to a valid
41
+ object
42
+ - \ref SU_ERROR_INVALID_INPUT if *auto_text_list does not refer to a valid object
43
+ */
44
+ LO_RESULT LOAutoTextDefinitionListRelease(LOAutoTextDefinitionListRef* auto_text_list);
45
+
46
+ /**
47
+ @brief Gets the number of auto-text definitions in this list.
48
+ @since LayOut 2018, API 3.0
49
+ @param[in] auto_text_list The auto-text definition list object.
50
+ @param[out] num_auto_texts The number of auto-text definition objects in the list.
51
+ @return
52
+ - \ref SU_ERROR_NONE on success
53
+ - \ref SU_ERROR_INVALID_INPUT if auto_text_list does not refer to a valid object
54
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if num_auto_texts is NULL
55
+ */
56
+ LO_RESULT LOAutoTextDefinitionListGetNumberOfAutoTextDefinitions(
57
+ LOAutoTextDefinitionListRef auto_text_list, size_t* num_auto_texts);
58
+
59
+ /**
60
+ @brief Gets the auto-text definition at the specified index.
61
+ @since LayOut 2018, API 3.0
62
+ @param[in] auto_text_list The auto-text definition list object.
63
+ @param[in] index The index of the auto-text definition to get.
64
+ @param[out] auto_text The auto-text definition object at index in the list.
65
+ @return
66
+ - \ref SU_ERROR_NONE on success
67
+ - \ref SU_ERROR_INVALID_INPUT if auto_text_list does not refer to a valid object
68
+ - \ref SU_ERROR_OUT_OF_RANGE if index is out of range for this list
69
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if auto_text is NULL
70
+ - \ref SU_ERROR_OVERWRITE_VALID if *auto_text already refers to a valid object
71
+ */
72
+ LO_RESULT LOAutoTextDefinitionListGetAutoTextDefinitionAtIndex(
73
+ LOAutoTextDefinitionListRef auto_text_list, size_t index, LOAutoTextDefinitionRef* auto_text);
74
+
75
+ #ifdef __cplusplus
76
+ } // end extern "C"
77
+ #endif // __cplusplus
78
+
79
+ #endif // LAYOUT_MODEL_auto_text_list_H_