LayOut C API
|
#include <LayOutAPI/common.h>
#include <LayOutAPI/geometry/geometry.h>
#include <LayOutAPI/model/defs.h>
Go to the source code of this file.
Enumerations | |
enum | LOTableCellRotation { LOTableCellRotation_0 = 0, LOTableCellRotation_90, LOTableCellRotation_180, LOTableCellRotation_270 } |
Defines the rotation angle for table cells. More... | |
Functions | |
LO_RESULT | LOTableCreate (LOTableRef *table, const LOAxisAlignedRect2D *bounds, size_t rows, size_t columns) |
Creates a table with a specified size, and a specified number of rows and columns. More... | |
LO_EXPORT LOTableRef | LOTableFromEntity (LOEntityRef entity) |
Gets a table from a given entity. More... | |
LO_EXPORT LOEntityRef | LOTableToEntity (LOTableRef table) |
Converts from a LOTableRef to a LOEntityRef. This is essentially an upcast operation. More... | |
LO_RESULT | LOTableGetExplodedEntities (LOTableRef table, LOEntityListRef entity_list) |
Creates the entities that represent the tabel in its exploded form and adds them to a LOEntityListRef. It is NOT necessary to explicitly release these entities, since LOEntityListRef itself adds a reference to the entities and will release them when they are removed from the list or when the list is released. More... | |
LO_RESULT | LOTableRelease (LOTableRef *table) |
Releases a table object. The object will be invalidated if releasing the last reference. More... | |
LO_RESULT | LOTableAddReference (LOTableRef table) |
Adds a reference to a table object. More... | |
LO_RESULT | LOTableGetDimensions (LOTableRef table, size_t *rows, size_t *columns) |
Gets the number of rows and columns in a table. More... | |
LO_RESULT | LOTableGetRowHeight (LOTableRef table, size_t index, double *height) |
Gets the height of a row, specified by index, in a table. More... | |
LO_RESULT | LOTableSetRowHeight (LOTableRef table, size_t index, double height) |
Sets the height of a row, specified by index, in a table. There is a minimum allowable row height specified by kMinimumRowHeight. More... | |
LO_RESULT | LOTableGetColumnWidth (LOTableRef table, size_t index, double *width) |
Gets the width of a column, specified by index, in a table. More... | |
LO_RESULT | LOTableSetColumnWidth (LOTableRef table, size_t index, double width) |
Sets the width of a column, specified by index, in a table. There is a minimum allowable column width specified by kMinimumColumnWidth. More... | |
LO_RESULT | LOTableInsertRow (LOTableRef table, size_t index) |
Inserts a row at the specified index. More... | |
LO_RESULT | LOTableRemoveRow (LOTableRef table, size_t index) |
Removes a row at the specified index. More... | |
LO_RESULT | LOTableInsertColumn (LOTableRef table, size_t index) |
Inserts a column at the specified index. More... | |
LO_RESULT | LOTableRemoveColumn (LOTableRef table, size_t index) |
Removes a column at the specified index. More... | |
LO_RESULT | LOTableCreateCellTextCopy (LOTableRef table, size_t row, size_t column, LOFormattedTextRef *text) |
Creates a copy of the formatted text entity for a table cell at the specified row and column. Currently, this will always succeed. However, future versions of LayOut may support other types of entities for table cells, so you should not assume that this will succeed. If the specified row and column is within a merged cell, then a copy of the merged cell's text entity will be created. More... | |
LO_RESULT | LOTableSetCellText (LOTableRef table, size_t row, size_t column, LOFormattedTextRef text) |
Sets the text entity of a table cell from a LOFormattedTextRef object. Only the text content and fill style settings will be kept. The bounds and other style settings are controlled by the table. If the specified row and column is within a merged cell, then the merged cell itself will be affected. More... | |
LO_RESULT | LOTableGetBorderStyle (LOTableRef table, LOStyleRef style) |
Gets the style of a table's border. More... | |
LO_RESULT | LOTableSetBorderStyle (LOTableRef table, LOStyleRef style) |
Sets the style of a table's border. Only the stroke style setting can be set via this method. Other style settings are controlled by the table. More... | |
LO_RESULT | LOTableGetRowEdgeStyle (LOTableRef table, size_t row, LOStyleRef style) |
Gets the style of a table's inner row edge. The specified row must be in the range of 0 to the number of rows minus two. More... | |
LO_RESULT | LOTableSetRowEdgeStyle (LOTableRef table, size_t row, LOStyleRef style) |
Sets the style of a table's inner row edge. The specified row must be in the range of 0 to the number of rows minus two. Only the stroke style setting can be set via this method. Other style settings are controlled by the table. More... | |
LO_RESULT | LOTableGetColumnEdgeStyle (LOTableRef table, size_t column, LOStyleRef style) |
Gets the style of a table's inner column edge. The specified column must be in the range of 0 to the number of columns minus two. More... | |
LO_RESULT | LOTableSetColumnEdgeStyle (LOTableRef table, size_t column, LOStyleRef style) |
Sets the style of a table's inner column edge. The specified column must be in the range of 0 to the number of rows minus two. Only the stroke style setting can be set via this method. Other style settings are controlled by the table. More... | |
LO_RESULT | LOTableGetCellSpan (LOTableRef table, size_t row, size_t column, size_t *row_span, size_t *column_span) |
Gets the row and column span of a table cell. If the values returned by both row_span and column_span are equal to 1, then it is a normal, non-merged cell. If either of these values are greater than 1, then it is a merged cell. If these values are both 0, then it is an unused cell that resides within the inner portion of another merged cell. More... | |
LO_RESULT | LOTableMergeCells (LOTableRef table, size_t start_row, size_t start_column, size_t end_row, size_t end_column) |
Merge a range of cells within a table. Only cells which are not already merged can be merged. More... | |
LO_RESULT | LOTableGetCellRotation (LOTableRef table, size_t row, size_t column, LOTableCellRotation *rotation) |
Gets the rotation of a table cell. More... | |
LO_RESULT | LOTableSetCellRotation (LOTableRef table, size_t row, size_t column, LOTableCellRotation rotation) |
Sets the rotation of a table cell. More... | |
enum LOTableCellRotation |
LO_RESULT LOTableAddReference | ( | LOTableRef | table | ) |
Adds a reference to a table object.
[in] | table | The table object. |
LO_RESULT LOTableCreate | ( | LOTableRef * | table, |
const LOAxisAlignedRect2D * | bounds, | ||
size_t | rows, | ||
size_t | columns | ||
) |
Creates a table with a specified size, and a specified number of rows and columns.
[out] | table | The table object. |
[in] | bounds | The starting dimensions of the table. |
[in] | rows | The number of rows. |
[in] | columns | The number of columns. |
LO_RESULT LOTableCreateCellTextCopy | ( | LOTableRef | table, |
size_t | row, | ||
size_t | column, | ||
LOFormattedTextRef * | text | ||
) |
Creates a copy of the formatted text entity for a table cell at the specified row and column. Currently, this will always succeed. However, future versions of LayOut may support other types of entities for table cells, so you should not assume that this will succeed. If the specified row and column is within a merged cell, then a copy of the merged cell's text entity will be created.
[in] | table | The table object. |
[in] | row | The cell's row. |
[in] | column | The cell's column. |
[out] | text | A copy of the cell's text entity. |
LO_EXPORT LOTableRef LOTableFromEntity | ( | LOEntityRef | entity | ) |
Gets a table from a given entity.
[in] | entity | The entity object. |
LO_RESULT LOTableGetBorderStyle | ( | LOTableRef | table, |
LOStyleRef | style | ||
) |
Gets the style of a table's border.
[in] | table | The table object. |
[out] | style | The style object. |
LO_RESULT LOTableGetCellRotation | ( | LOTableRef | table, |
size_t | row, | ||
size_t | column, | ||
LOTableCellRotation * | rotation | ||
) |
Gets the rotation of a table cell.
[in] | table | The table object. |
[in] | row | The cell's row. |
[in] | column | The cell's column. |
[out] | rotation | The cell's rotation. |
LO_RESULT LOTableGetCellSpan | ( | LOTableRef | table, |
size_t | row, | ||
size_t | column, | ||
size_t * | row_span, | ||
size_t * | column_span | ||
) |
Gets the row and column span of a table cell. If the values returned by both row_span and column_span are equal to 1, then it is a normal, non-merged cell. If either of these values are greater than 1, then it is a merged cell. If these values are both 0, then it is an unused cell that resides within the inner portion of another merged cell.
[in] | table | The table object. |
[in] | row | The row index. |
[in] | column | The column index. |
[out] | row_span | The number of rows that this cell spans. |
[out] | column_span | The number of columns that this cell spans. |
LO_RESULT LOTableGetColumnEdgeStyle | ( | LOTableRef | table, |
size_t | column, | ||
LOStyleRef | style | ||
) |
Gets the style of a table's inner column edge. The specified column must be in the range of 0 to the number of columns minus two.
[in] | table | The table object. |
[in] | column | The column whose edge style to get. |
[out] | style | The style object. |
LO_RESULT LOTableGetColumnWidth | ( | LOTableRef | table, |
size_t | index, | ||
double * | width | ||
) |
Gets the width of a column, specified by index, in a table.
[in] | table | The table object. |
[in] | index | The index of the row. |
[out] | width | The height of the row. |
LO_RESULT LOTableGetDimensions | ( | LOTableRef | table, |
size_t * | rows, | ||
size_t * | columns | ||
) |
Gets the number of rows and columns in a table.
[in] | table | The table object. |
[out] | rows | The number of rows. |
[out] | columns | The number of columns. |
LO_RESULT LOTableGetExplodedEntities | ( | LOTableRef | table, |
LOEntityListRef | entity_list | ||
) |
Creates the entities that represent the tabel in its exploded form and adds them to a LOEntityListRef. It is NOT necessary to explicitly release these entities, since LOEntityListRef itself adds a reference to the entities and will release them when they are removed from the list or when the list is released.
[in] | table | The table object. |
[in] | entity_list | The entity list object to add the new entities to. |
LO_RESULT LOTableGetRowEdgeStyle | ( | LOTableRef | table, |
size_t | row, | ||
LOStyleRef | style | ||
) |
Gets the style of a table's inner row edge. The specified row must be in the range of 0 to the number of rows minus two.
[in] | table | The table object. |
[in] | row | The row whose edge style to get. |
[out] | style | The style object. |
LO_RESULT LOTableGetRowHeight | ( | LOTableRef | table, |
size_t | index, | ||
double * | height | ||
) |
Gets the height of a row, specified by index, in a table.
[in] | table | The table object. |
[in] | index | The index of the row. |
[out] | height | The height of the row. |
LO_RESULT LOTableInsertColumn | ( | LOTableRef | table, |
size_t | index | ||
) |
Inserts a column at the specified index.
[in] | table | The table object. |
[in] | index | The index of the column to be inserted at. |
LO_RESULT LOTableInsertRow | ( | LOTableRef | table, |
size_t | index | ||
) |
Inserts a row at the specified index.
[in] | table | The table object. |
[in] | index | The index of the row to be inserted at. |
LO_RESULT LOTableMergeCells | ( | LOTableRef | table, |
size_t | start_row, | ||
size_t | start_column, | ||
size_t | end_row, | ||
size_t | end_column | ||
) |
Merge a range of cells within a table. Only cells which are not already merged can be merged.
[in] | table | The table object. |
[in] | start_row | The start row index. |
[in] | start_column | The start column index. |
[out] | end_row | The end row index. |
[out] | end_column | The end column index. |
LO_RESULT LOTableRelease | ( | LOTableRef * | table | ) |
Releases a table object. The object will be invalidated if releasing the last reference.
[in] | table | The table object. |
LO_RESULT LOTableRemoveColumn | ( | LOTableRef | table, |
size_t | index | ||
) |
Removes a column at the specified index.
[in] | table | The table object. |
[in] | index | The index of the column to be removed. |
LO_RESULT LOTableRemoveRow | ( | LOTableRef | table, |
size_t | index | ||
) |
Removes a row at the specified index.
[in] | table | The table object. |
[in] | index | The index of the row to be removed. |
LO_RESULT LOTableSetBorderStyle | ( | LOTableRef | table, |
LOStyleRef | style | ||
) |
Sets the style of a table's border. Only the stroke style setting can be set via this method. Other style settings are controlled by the table.
[in] | table | The table object. |
[in] | style | The style object. |
LO_RESULT LOTableSetCellRotation | ( | LOTableRef | table, |
size_t | row, | ||
size_t | column, | ||
LOTableCellRotation | rotation | ||
) |
Sets the rotation of a table cell.
[in] | table | The table object. |
[in] | row | The cell's row. |
[in] | column | The cell's column. |
[out] | rotation | The cell's rotation. |
LO_RESULT LOTableSetCellText | ( | LOTableRef | table, |
size_t | row, | ||
size_t | column, | ||
LOFormattedTextRef | text | ||
) |
Sets the text entity of a table cell from a LOFormattedTextRef object. Only the text content and fill style settings will be kept. The bounds and other style settings are controlled by the table. If the specified row and column is within a merged cell, then the merged cell itself will be affected.
[in] | table | The table object. |
[in] | row | The cell's row. |
[in] | column | The cell's column. |
[in] | text | The text object representing the table cell. |
LO_RESULT LOTableSetColumnEdgeStyle | ( | LOTableRef | table, |
size_t | column, | ||
LOStyleRef | style | ||
) |
Sets the style of a table's inner column edge. The specified column must be in the range of 0 to the number of rows minus two. Only the stroke style setting can be set via this method. Other style settings are controlled by the table.
[in] | table | The table object. |
[in] | column | The column whose edge style to set. |
[in] | style | The style object. |
LO_RESULT LOTableSetColumnWidth | ( | LOTableRef | table, |
size_t | index, | ||
double | width | ||
) |
Sets the width of a column, specified by index, in a table. There is a minimum allowable column width specified by kMinimumColumnWidth.
[in] | table | The table object. |
[in] | index | The index of the column. |
[out] | width | The width of the column. |
LO_RESULT LOTableSetRowEdgeStyle | ( | LOTableRef | table, |
size_t | row, | ||
LOStyleRef | style | ||
) |
Sets the style of a table's inner row edge. The specified row must be in the range of 0 to the number of rows minus two. Only the stroke style setting can be set via this method. Other style settings are controlled by the table.
[in] | table | The table object. |
[in] | row | The row whose edge style to set. |
[in] | style | The style object. |
LO_RESULT LOTableSetRowHeight | ( | LOTableRef | table, |
size_t | index, | ||
double | height | ||
) |
Sets the height of a row, specified by index, in a table. There is a minimum allowable row height specified by kMinimumRowHeight.
[in] | table | The table object. |
[in] | index | The index of the row. |
[out] | height | The height of the row. |
LO_EXPORT LOEntityRef LOTableToEntity | ( | LOTableRef | table | ) |
Converts from a LOTableRef to a LOEntityRef. This is essentially an upcast operation.
[in] | table | The table object. |