LayOut C API
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
formattedtext.h
Go to the documentation of this file.
1 // Copyright 2015 Trimble Navigation Ltd. All rights reserved.
2 // This file is intended for public distribution.
3 
4 #ifndef LAYOUT_MODEL_FORMATTED_TEXT_H_
5 #define LAYOUT_MODEL_FORMATTED_TEXT_H_
6 
7 #include <LayOutAPI/common.h>
9 #include <LayOutAPI/model/defs.h>
10 
16 #ifdef __cplusplus
17 extern "C" {
18 #endif // __cplusplus
19 
25 typedef enum {
27  0,
28 
30 
31 
32 
35 
42 typedef enum {
54 
72  LOFormattedTextRef* text, const LOPoint2D* anchor_point, LOFormattedTextAnchorType anchor_type,
73  const char* plain_text);
74 
90  LOFormattedTextRef* text, const LOAxisAlignedRect2D* bounds, const char* plain_text);
91 
111  LOFormattedTextRef* text, const LOPoint2D* anchor_point, LOFormattedTextAnchorType anchor_type,
112  const char* path);
113 
131  LOFormattedTextRef* text, const char* path, const LOAxisAlignedRect2D* bounds);
132 
141 
142 /*
143 @brief Releases a formatted text object. The object will be invalidated if
144  releasing the last reference.
145 @param[in] text The formatted text object.
146 @return
147 - \ref SU_ERROR_NONE on success
148 - \ref SU_ERROR_NULL_POINTER_INPUT if text is NULL
149 - \ref SU_ERROR_INVALID_INPUT if *text does not refer to a valid object
150 */
152 
163 
173 
194  LOFormattedTextRef text, SUStringRef* rtf_text, LOPageRef page_for_autotext);
195 
208 LO_RESULT LOFormattedTextSetRTF(LOFormattedTextRef text, const char* rtf_text);
209 
231  LOFormattedTextRef text, SUStringRef* display_text, LOPageRef page_for_autotext);
232 
243 
255 
268 LO_RESULT LOFormattedTextSetPlainText(LOFormattedTextRef text, const char* plain_text);
269 
286  LOFormattedTextRef text, const char* plain_text, LOStyleRef style);
287 
304  LOFormattedTextRef text, const char* plain_text, LOStyleRef style);
305 
321  LOFormattedTextRef text, size_t index, LOStyleRef style);
322 
344  LOFormattedTextRef text, size_t index, size_t length, LOStyleRef style);
345 
368  LOFormattedTextRef text, LOStyleRef style, size_t range_begin, size_t range_length);
369 
380 
393 
394 #ifdef __cplusplus
395 } // end extern "C"
396 #endif // __cplusplus
397 #endif // LAYOUT_MODEL_FORMATTED_TEXT_H_