LayOut C API
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Functions
entitylist.h File Reference
#include <LayOutAPI/common.h>
#include <LayOutAPI/model/defs.h>

Go to the source code of this file.

Functions

LO_RESULT LOEntityListCreate (LOEntityListRef *entity_list)
 Creates a new entity list object. More...
 
LO_RESULT LOEntityListRelease (LOEntityListRef *entity_list)
 Releases an entity list object. *entity_list will be set to invalid by this function. More...
 
LO_RESULT LOEntityListAddEntity (LOEntityListRef entity_list, LOEntityRef entity)
 Adds an entity to an entity list object. More...
 
LO_RESULT LOEntityListGetNumberOfEntities (LOEntityListRef entity_list, size_t *num_entities)
 Gets the number of entities in an entity list object. More...
 
LO_RESULT LOEntityListGetEntityAtIndex (LOEntityListRef entity_list, size_t index, LOEntityRef *entity)
 Gets the entity at the specified index in an entity list object. More...
 
LO_RESULT LOEntityListMoveToLayer (LOEntityListRef entity_list, LOLayerRef layer, LOPageListRef pages)
 Moves a list of entities to the given layer. More...
 

Function Documentation

LO_RESULT LOEntityListAddEntity ( LOEntityListRef  entity_list,
LOEntityRef  entity 
)

Adds an entity to an entity list object.

Parameters
[in]entity_listThe entity list object.
[in]entityThe entity object.
Returns
LO_RESULT LOEntityListCreate ( LOEntityListRef entity_list)

Creates a new entity list object.

Parameters
[out]entity_listThe entity list object.
Returns
LO_RESULT LOEntityListGetEntityAtIndex ( LOEntityListRef  entity_list,
size_t  index,
LOEntityRef entity 
)

Gets the entity at the specified index in an entity list object.

Parameters
[in]entity_listThe entity list object.
[in]indexThe index of the entity to get.
[out]entityThe entity object.
Returns
LO_RESULT LOEntityListGetNumberOfEntities ( LOEntityListRef  entity_list,
size_t *  num_entities 
)

Gets the number of entities in an entity list object.

Parameters
[in]entity_listThe entity list object.
[out]num_entitiesThe number of entities in this list.
Returns
LO_RESULT LOEntityListMoveToLayer ( LOEntityListRef  entity_list,
LOLayerRef  layer,
LOPageListRef  pages 
)

Moves a list of entities to the given layer.

If the layer is non-shared and any entity is on a shared layer, pages must be valid and populated with the pages to move the entities to. In all other cases, pages may be an invalid object. The entities must belong to the same document as the layer and pages.

Bug:
In LayOut versions prior to LayOut 2024.0 this method would fail to move entities from non-shared layers.
Parameters
[in]entity_listThe entity list object.
[in]layerThe layer definition object.
[in]pagesThe page list object.
Returns
LO_RESULT LOEntityListRelease ( LOEntityListRef entity_list)

Releases an entity list object. *entity_list will be set to invalid by this function.

Returns