LayOut C API
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
document.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_DOCUMENT_H_
5 #define LAYOUT_MODEL_DOCUMENT_H_
6 
7 #include <LayOutAPI/common.h>
8 #include <LayOutAPI/model/defs.h>
10 #include <time.h>
11 
22 typedef enum {
37 
39 
42 
47 typedef enum {
55 
58 
59 #ifdef __cplusplus
60 extern "C" {
61 #endif
62 
73 
86 LO_RESULT LODocumentCreateFromFile(LODocumentRef* document, const char* path);
87 
102 LO_RESULT LODocumentCreateFromTemplate(LODocumentRef* document, const char* path);
103 
116 
126 
141 LO_RESULT LODocumentSaveToFile(LODocumentRef document, const char* path, LODocumentVersion version);
142 
186  LODocumentRef document, const char* path, LODictionaryRef options_dict);
187 
188 
228  LODocumentRef document, const char* export_path, const char* base_name,
229  LOImageRepOutputFormat format, LODictionaryRef options_dict);
230 
245 
255 LO_RESULT LODocumentGetNumberOfLayers(LODocumentRef document, size_t* num_layers);
256 
272  LODocumentRef document, size_t index, LOLayerRef* layer_definition);
273 
286 LO_RESULT LODocumentGetLayers(LODocumentRef document, LOLayerListRef layer_definitions);
287 
298 LO_RESULT LODocumentGetActiveLayer(LODocumentRef document, LOLayerRef* layer_definition);
299 
313 LO_RESULT LODocumentSetActiveLayer(LODocumentRef document, LOLayerRef layer_definition);
314 
330  LODocumentRef document, LOLayerRef layer_definition, size_t new_index);
345 LO_RESULT LODocumentAddLayer(LODocumentRef document, bool shared, LOLayerRef* layer_definition);
346 
375  LODocumentRef document, LOLayerRef* layer_definition, bool delete_entities);
376 
388 
400 
410 LO_RESULT LODocumentGetNumberOfPages(LODocumentRef document, size_t* num_pages);
411 
424 LO_RESULT LODocumentGetPageAtIndex(LODocumentRef document, size_t index, LOPageRef* page);
425 
436 
449 
463 
476 
492 
506 LO_RESULT LODocumentReorderPage(LODocumentRef document, LOPageRef page, size_t new_index);
507 
530  LODocumentRef document, LOEntityRef entity, LOLayerRef layer_definition, LOPageRef page);
531 
552  LODocumentRef document, LOEntityRef entity, size_t layer_index, size_t page_index);
553 
567 
579 LO_RESULT LODocumentGetNumberOfSharedEntities(LODocumentRef document, size_t* num_shared_entities);
580 
596  LODocumentRef document, size_t index, LOEntityRef* entity);
597 
610 
620 LO_RESULT LODocumentGetObjectSnap(LODocumentRef document, bool* object_snap);
621 
630 LO_RESULT LODocumentSetObjectSnap(LODocumentRef document, bool object_snap);
631 
641 LO_RESULT LODocumentGetGridSnap(LODocumentRef document, bool* grid_snap);
642 
651 LO_RESULT LODocumentSetGridSnap(LODocumentRef document, bool grid_snap);
652 
662 LO_RESULT LODocumentGetTimeCreated(LODocumentRef document, time_t* time_created);
663 
673 LO_RESULT LODocumentGetTimeModified(LODocumentRef document, time_t* time_modified);
674 
684 LO_RESULT LODocumentGetTimePublished(LODocumentRef document, time_t* time_published);
685 
698 LO_RESULT LODocumentGetUnits(LODocumentRef document, LODocumentUnits* units, double* precision);
699 
716 LO_RESULT LODocumentSetUnits(LODocumentRef document, LODocumentUnits units, double precision);
717 
718 
730 
744  LODocumentRef document, size_t index, LOAutoTextDefinitionRef* autotext);
745 
760  LODocumentRef document, const char* name, LOAutoTextDefinitionRef* autotext);
761 
774  LODocumentRef document, LOAutoTextDefinitionListRef autotexts);
775 
792  LODocumentRef document, int type, const char* name, LOAutoTextDefinitionRef* autotext);
793 
810  LODocumentRef document, LOAutoTextDefinitionRef* autotext, bool convert_tags_to_normal_text);
811 
828 #ifdef __cplusplus
829 } // extern "C" {
830 #endif
831 
832 #endif // LAYOUT_MODEL_DOCUMENT_H_