![]() | InDesign SDK 20.5 |
#include <TableTypes.h>
Public Types | |
| typedef base_type | data_type |
Public Member Functions | |
| GridAddress () | |
| GridAddress (GridCoord inRow, GridCoord inCol) | |
| void | Set (GridCoord inRow, GridCoord inCol) |
| GridAddress | operator+ (const GridAddress &rhs) const |
| GridAddress | operator- (const GridAddress &rhs) const |
| GridAddress & | operator+= (const GridAddress &rhs) |
| GridAddress & | operator-= (const GridAddress &rhs) |
| bool16 | operator== (const GridAddress &rhs) const |
| bool16 | operator!= (const GridAddress &rhs) const |
| bool16 | operator< (const GridAddress &rhs) const |
| bool16 | operator<= (const GridAddress &rhs) const |
| bool16 | operator> (const GridAddress &rhs) const |
| bool16 | operator>= (const GridAddress &rhs) const |
| void | ReadWrite (IPMStream *stream) |
Public Attributes | |
| GridCoord | row |
| GridCoord | col |
Row and column of an element in the underlying grid of the table model. The underlying grid provides the co-ordinate system for tables.
A grid address is specified on the grid underlying a table. The units of the underlying grid are grid-elements; table-cells are composites of grid-elements, consisting of 1 (if they have a 'trivial' or unit GridSpan) or more grid-elements. The grid-address for a cell is specified in terms of the grid-address of its anchor or top-left.
If a single cell is split vertically, then this increases the resolution of the underlying grid in the horizontal direction. The grid-lines are not uniformly distributed, although it is a rectilinear grid for tables within InDesign 2.0.
To determine what row a particular cell in can become quite complex in a table with many split and merged cells; that is, tables with many non-trivial GridSpans. The notional algorithm to determine the GridAddress for a particular cell is straightforward;

| typedef base_type GridAddress::data_type |
Specifies that this is a plain data type for K2Vector and no specialised copy semantics are required.
| inline |
No-args constructor.
| inline |
Constructor.
| inRow | specifies row in which top-left of the cell is located |
| inCol | specifies the column in which top-left of the cell is located |
| inline |
Overload of not-equal operator.
| rhs | right hand operand. |
| inline |
Overload of addition operator.. Semantics: results is a new location with 'this' location offset by the location of the second.
| rhs | right hand operand. |
| inline |
Overload of operator addition assignment. Would have effect of offsetting the current GridAddress by specified argument.
| rhs | right hand operand. |
| inline |
Overload of sutraction operator. Semantics: would give a new location for 'this' object expressed relative to the rhs operand. Clearly, if the '<' operator returns false, then the resulting GridAddress from this '-' operation will be outside the real table.
| rhs | right hand operand. |
| inline |
Overload of operator subtraction assignment. Would have effect of re-expressing the current location in frame of reference determined by the rhs operand.
| rhs | right hand operand. |
| inline |
Overload of less than operator. Semantics: allows two GridAddresses to be compared to see which is nearer the top of the table, and then if they are in the same row, to see which is nearer to the left of the table.
| rhs | right hand operand. |
| inline |
Overload of less than or equal to operator.
| rhs | right hand operand. |
| inline |
Overload of equality relational operator. Semantics; this address identical with another iff the row and columns represented by each are identical.
| rhs | right hand operand. |
| inline |
Overload of operator greater than. Semantics; this grid-address is 'greater' than the rhs if it is in a row that is lower in the table than this address, or if in the same row, if it is to the right.
| rhs | right hand operand. |
| inline |
Overload of operator greater than or equal to operator. Semantics; this grid-address is gte rhs iff it is in a row below this or if in the same row, in a column that is the same or rightmost of the column represented in this address.
| rhs | right hand operand. |
| inline |
Used to persist the state of an object of this type.
| stream | refers to the stream to/from which the state is serialised or deserialised. |
| inline |
Mutator.
| inRow | specifies the new row. |
| inCol | specifies the new column. |
| GridCoord GridAddress::col |
Represents the column co-ordinate. Columns are zero-based and the column co-ordinate increases from the left hand edge rightwards.
| GridCoord GridAddress::row |
Represents the row co-ordinate. The rows are zero-based and the row co-ordinate increases from the top of the table downwards.