Objects
objects/ table/ style
#include "dxfio/objects/table/style.hpp"In DxfIO::Objects::Table
struct Border
One border of a cell. Its groups depend on the border; each member gives them in the order top, inside horizontal, bottom, left, inside vertical, right.
| Field | Type and default | Meaning |
|---|---|---|
Lineweight | int{Lineweights::Byblock} | The lineweight in hundredths of a millimeter, or -1 ByLayer, -2 ByBlock, -3 the default. Group 274 to 279 by border. |
Visible | bool{true} | Whether the border is drawn. Group 284 to 289 by border. |
Color | int | The AutoCAD Color Index of the border. Group 64 to 69 by border. |
struct Cell
How the cells of one kind of row are drawn: their text, fill and borders.
| Field | Type and default | Meaning |
|---|---|---|
Style | std::string | The name of the text style. Group 7. |
Height | double{Table::Height} | The height of the text. Group 140. |
Alignment | int{1} | Where text stands in the cell: 1 to 3 top left to top right, 4 to 6 middle, 7 to 9 bottom. Group 170. |
Color | int | The AutoCAD Color Index of the text. Group 62. |
Fill | int{Colors::White} | The AutoCAD Color Index of the background. Group 63. |
Filled | bool | Whether the background is filled. Group 283. |
Type | int{General} | The type of the cell's data, such as 512 for general. Group 90, from R2007. |
Unit | int | The unit of the cell's data. Group 91, from R2007. |
Format | std::string | The format of the cell's data. Group 1, from R2007. |
Top | Border | The top border. |
Middle | Border | The horizontal borders between rows. |
Bottom | Border | The bottom border. |
Left | Border | The left border. |
Center | Border | The vertical borders between columns. |
Right | Border | The right border. |
struct TableStyleTABLESTYLE
A TABLESTYLE: how a table draws its title, header and data rows, named by its entry in the table style dictionary.
| Field | Type and default | Meaning |
|---|---|---|
Base | DxfIO::Base | The handle, owner, reactors and extended data. |
Revision | int | A version number, 0 as AutoCAD writes it. Group 280, the first, from R2010. |
Description | std::string | The style's description; AutoCAD writes its name here. Group 3. |
Flow | int | Which way the table grows: 0 down, 1 up. Group 70. |
Flags | int | Flags, 0 in what AutoCAD writes. Group 71. |
Horizontal | double{Table::Margin} | The margin left and right of text in a cell. Group 40. |
Vertical | double{Table::Margin} | The margin above and below text in a cell. Group 41. |
Untitled | bool | Whether the title row is left out. Group 280. |
Headless | bool | Whether the header row is left out. Group 281. |
Cells | std::vector<Table::Cell> | The cell styles of the data, title and header rows, in that order. |
Constants
General | int = 512 | A cell data type: general, any value. |
Height | double = 4.5 | The text height of a new cell style. |
Margin | double = 1.5 | The cell margins of a new table style. |