LayOut C API

- Main Page
- Related Pages
- Data Structures
- Files

- File List
- Globals

All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
length_formatter.h
Go to the documentation of this file.
1 // Copyright 2017 Trimble Inc. All Rights Reserved.
2
7 #ifndef SKETCHUP_LENGTH_FORMATTER_H_
8 #define SKETCHUP_LENGTH_FORMATTER_H_
9
10 #include <SketchUpAPI/defs.h>
11
12 #ifdef __cplusplus
13 extern "C" {
14 #endif
15
35 enum SULengthFormatType {
36 SU_LFORMAT_DECIMAL,
37 SU_LFORMAT_ARCHITECTURAL,
38 SU_LFORMAT_ENGINEERING,
39 SU_LFORMAT_FRACTIONAL
40 };
41
50 enum SULengthUnitType {
51 SU_LUNIT_INCHES,
52 SU_LUNIT_FEET,
53 SU_LUNIT_MILLIMETER,
54 SU_LUNIT_CENTIMETER,
55 SU_LUNIT_METER,
56 SU_LUNIT_YARD
57 };
58
67 enum SUAreaUnitType {
68 SU_AUNIT_SQUARE_INCHES,
69 SU_AUNIT_SQUARE_FEET,
70 SU_AUNIT_SQUARE_MILLIMETER,
71 SU_AUNIT_SQUARE_CENTIMETER,
72 SU_AUNIT_SQUARE_METER,
73 SU_AUNIT_SQUARE_YARD
74 };
75
86 enum SUVolumeUnitType {
87 SU_VUNIT_CUBIC_INCHES,
88 SU_VUNIT_CUBIC_FEET,
89 SU_VUNIT_CUBIC_MILLIMETER,
90 SU_VUNIT_CUBIC_CENTIMETER,
91 SU_VUNIT_CUBIC_METER,
92 SU_VUNIT_CUBIC_YARD,
93 SU_VUNIT_LITER,
94 SU_VUNIT_US_GALLON
95 };
96
107 SU_RESULT SULengthFormatterCreate(SULengthFormatterRef* formatter);
108
119 SU_RESULT SULengthFormatterRelease(SULengthFormatterRef* formatter);
120
132 SU_RESULT SULengthFormatterGetPrecision(SULengthFormatterRef formatter, size_t* precision);
133
144 SU_RESULT SULengthFormatterSetPrecision(SULengthFormatterRef formatter, size_t precision);
145
157 SU_RESULT SULengthFormatterGetAreaPrecision(SULengthFormatterRef formatter, size_t* precision);
158
169 SU_RESULT SULengthFormatterSetAreaPrecision(SULengthFormatterRef formatter, size_t precision);
170
182 SU_RESULT SULengthFormatterGetVolumePrecision(SULengthFormatterRef formatter, size_t* precision);
183
194 SU_RESULT SULengthFormatterSetVolumePrecision(SULengthFormatterRef formatter, size_t precision);
195
207 SU_RESULT SULengthFormatterGetFormat(
208 SULengthFormatterRef formatter, enum SULengthFormatType* format);
209
221 SU_RESULT SULengthFormatterSetFormat(
222 SULengthFormatterRef formatter, enum SULengthFormatType format);
223
235 SU_RESULT SULengthFormatterGetUnits(SULengthFormatterRef formatter, enum SULengthUnitType* units);
236
248 SU_RESULT SULengthFormatterGetAreaUnits(SULengthFormatterRef formatter, enum SUAreaUnitType* units);
249
261 SU_RESULT SULengthFormatterGetVolumeUnits(
262 SULengthFormatterRef formatter, enum SUVolumeUnitType* units);
263
275 SU_RESULT SULengthFormatterSetUnits(SULengthFormatterRef formatter, enum SULengthUnitType units);
276
288 SU_RESULT SULengthFormatterSetAreaUnits(SULengthFormatterRef formatter, enum SUAreaUnitType units);
289
301 SU_RESULT SULengthFormatterSetVolumeUnits(
302 SULengthFormatterRef formatter, enum SUVolumeUnitType units);
303
315 SU_RESULT SULengthFormatterGetSuppressUnits(SULengthFormatterRef formatter, bool* suppress);
316
327 SU_RESULT SULengthFormatterSetSuppressUnits(SULengthFormatterRef formatter, bool suppress);
328
344 SU_RESULT SULengthFormatterGetLengthString(
345 SULengthFormatterRef formatter, double length, bool strip, SUStringRef* string);
346
360 SU_RESULT SULengthFormatterGetAreaString(
361 SULengthFormatterRef formatter, double area, SUStringRef* string);
362
376 SU_RESULT SULengthFormatterGetVolumeString(
377 SULengthFormatterRef formatter, double volume, SUStringRef* string);
378
392 SU_RESULT SULengthFormatterParseString(
393 SULengthFormatterRef formatter, SUStringRef string, double* value);
394
405 SU_RESULT SULengthFormatterSetForceInchDisplay(SULengthFormatterRef formatter, bool force_inch);
406
418 SU_RESULT SULengthFormatterGetForceInchDisplay(SULengthFormatterRef formatter, bool* force_inch);
419
420 #ifdef __cplusplus
421 } // extern "C"
422 #endif
423
424 #endif // SKETCHUP_LENGTH_FORMATTER_H_