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
Functions
pagelist.h File Reference
`#include <LayOutAPI/common.h>`
`#include <LayOutAPI/model/defs.h>`

Go to the source code of this file.

## Functions
LO_RESULT | LOPageListCreate (LOPageListRef *page_list)
| Creates a new empty page list object. More...
LO_RESULT | LOPageListRelease (LOPageListRef *page_list)
| Releases a page list object. *page_list will be set to invalid by this function. More...
LO_RESULT | LOPageListGetNumberOfPages (LOPageListRef page_list, size_t *num_pages)
| Gets the number of pages in this list. More...
LO_RESULT | LOPageListGetPageAtIndex (LOPageListRef page_list, size_t index, LOPageRef *page)
| Gets the page at the specified index. More...
LO_RESULT | LOPageListAddPage (LOPageListRef page_list, LOPageRef page)
| Adds a page at the end of the list. More...

## Function Documentation

LO_RESULT LOPageListAddPage | ( | LOPageListRef | page_list,
|  | LOPageRef | page
| ) |  |

Adds a page at the end of the list.

Parameters

  [in] | page_list | The page list object.
  [in] | page | The page object to add.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if page_list does not refer to a valid object
  - SU_ERROR_INVALID_INPUT if page does not refer to a valid object

LO_RESULT LOPageListCreate | ( | LOPageListRef * | page_list | ) |

Creates a new empty page list object.

Parameters

  [out] | page_list | An empty page list object.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_NULL_POINTER_OUTPUT if page_list is NULL
  - SU_ERROR_OVERWRITE_VALID if *page_list already refers to a valid object

LO_RESULT LOPageListGetNumberOfPages | ( | LOPageListRef | page_list,
|  | size_t * | num_pages
| ) |  |

Gets the number of pages in this list.

Parameters

  [in] | page_list | The page list object.
  [out] | num_pages | The number of page objects in the list.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if page_list does not refer to a valid object
  - SU_ERROR_NULL_POINTER_OUTPUT if num_pages is NULL

LO_RESULT LOPageListGetPageAtIndex | ( | LOPageListRef | page_list,
|  | size_t | index,
|  | LOPageRef * | page
| ) |  |

Gets the page at the specified index.

Parameters

  [in] | page_list | The page list object.
  [in] | index | The index of the page to get.
  [out] | page | The page object at index in the list.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if page_list does not refer to a valid object
  - SU_ERROR_OUT_OF_RANGE if index is out of range for this list
  - SU_ERROR_NULL_POINTER_OUTPUT if page is NULL
  - SU_ERROR_OVERWRITE_VALID if *page already refers to a valid object

LO_RESULT LOPageListRelease | ( | LOPageListRef * | page_list | ) |

Releases a page list object. *page_list will be set to invalid by this function.

Parameters

  [in] | page_list | The page list object.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_NULL_POINTER_INPUT if page_list does not refer to a valid object
  - SU_ERROR_INVALID_INPUT if *page_list does not refer to a valid object