jitx/schematic-table¶
Package name: jitx/schematic-table
Summary¶
Data Types¶
TableCell¶
A table cell contains an entire AuthorTable
in one cell of a table.
Functions¶
Function | Description |
---|---|
TableCell (+ 1) | Construct a TableCell from a partially-annotated AuthorTable and |
AuthorTable¶
A table of data, rendered in the schematic author block.
Multis¶
Function | Description |
---|---|
rows | Extract the rows of an AuthorTable |
value | Extract the AuthorTable in a given TableCell . |
Functions¶
Function | Description |
---|---|
TableCell (+ 1) | Construct a TableCell from a partially-annotated AuthorTable and |
AuthorTable | Construct an AuthorTable from a tuple of rows. |
compile | Concretize an AuthorTable . Takes in a partially-annotated |
DataCell¶
A DataCell
contains a string literal.
Functions¶
Function | Description |
---|---|
DataCell (+ 1) | Construct a DataCell given a string value and an optional |
AuthorCell¶
One cell of an AuthorTable
.
Multis¶
Function | Description |
---|---|
cells | Extract the cells of an AuthorTable . |
width | Extract the width of a table cell. |
AuthorRow¶
A row of an AuthorTable
.
Multis¶
Function | Description |
---|---|
rows | Extract the rows of an AuthorTable |
cells | Extract the cells of an AuthorTable . |
height | Return the height of an AuthorRow . |
Functions¶
Function | Description |
---|---|
AuthorTable | Construct an AuthorTable from a tuple of rows. |
AuthorRow (+ 1) | Construct a row from an ordered tuple of cells. |
Definitions¶
TableCell¶
A table cell contains an entire AuthorTable
in one cell of a table.
public deftype TableCell<T> <: AuthorCell<T>
Multis¶
value¶
Extract the AuthorTable
in a given TableCell
.
public defmulti value<?T> (t:TableCell<?T>) -> AuthorTable<T>
- Type Argument
?T
- Returns
AuthorTable<T>
Functions¶
TableCell¶
Construct a TableCell
from a partially-annotated AuthorTable
and
public defn TableCell (value:AuthorTable<Double|False> -- width:Double|False = ?) -> TableCell<Double|False>
- Returns
TableCell<Double|False>
and optional width parameter.
As with DataCell
and AuthorRow
, width is expressed as a fraction of the overall
table width.
If width
is unspecified, the available width of the table will be split evenly
between all unspecified cells.
TableCell¶
Construct a TableCell
from an AuthorTable
and an optional width
parameter.
public defn TableCell (value:AuthorTable<Double|False>, width:Double|False) -> TableCell<Double|False>
- Returns
TableCell<Double|False>
AuthorTable¶
A table of data, rendered in the schematic author block.
public deftype AuthorTable<T>
A table is an ordered set of rows. Each row is an ordered set of cells. A cell can either contain a string literal or another table.
An AuthorTable
is parameterized by a type T
-- the type of
its size annotations. Upon creation, an AuthorTable
is only partly specified.
In a later stage, we fully compute the bounds of each cell.
Multis¶
rows¶
Extract the rows of an AuthorTable
public defmulti rows<?T> (t:AuthorTable<?T>) -> Tuple<AuthorRow>
- Type Argument
?T
- Returns
Tuple<AuthorRow>
value¶
Extract the AuthorTable
in a given TableCell
.
public defmulti value<?T> (t:TableCell<?T>) -> AuthorTable<T>
- Type Argument
?T
- Returns
AuthorTable<T>
Functions¶
TableCell¶
Construct a TableCell
from a partially-annotated AuthorTable
and
public defn TableCell (value:AuthorTable<Double|False> -- width:Double|False = ?) -> TableCell<Double|False>
- Returns
TableCell<Double|False>
and optional width parameter.
As with DataCell
and AuthorRow
, width is expressed as a fraction of the overall
table width.
If width
is unspecified, the available width of the table will be split evenly
between all unspecified cells.
TableCell¶
Construct a TableCell
from an AuthorTable
and an optional width
parameter.
public defn TableCell (value:AuthorTable<Double|False>, width:Double|False) -> TableCell<Double|False>
- Returns
TableCell<Double|False>
AuthorTable¶
Construct an AuthorTable
from a tuple of rows.
public defn AuthorTable (rows:Tuple<AuthorRow<Double|False>>) -> AuthorTable<Double|False>
- Returns
AuthorTable<Double|False>
Returns a partially annotated AuthorTable
-- the rows and cells
have size annotations of type Double|False
.
compile¶
Concretize an AuthorTable
. Takes in a partially-annotated
public defn compile (info:FileInfo|False, t:AuthorTable<Double|False>) -> AuthorTable<Double>
- Returns
AuthorTable<Double>
AuthorTable<Double|False>
and returns a fully-annotated
AuthorTable<Double>
.
Throws an exception if any of the provided height or width parameters are invalid:
All must be non-negative, and the total width or height of a given cell or row
must sum to 1.0.
DataCell¶
A DataCell
contains a string literal.
public deftype DataCell<T> <: AuthorCell<T>
Multis¶
value¶
Return the string literal contained in a DataCell
.
public defmulti value<?T> (d:DataCell<?T>) -> String
- Type Argument
?T
- Returns
String
Functions¶
DataCell¶
Construct a DataCell
given a string value and an optional
public defn DataCell (value:String -- width:Double|False = ?) -> DataCell<Double|False>
- Returns
DataCell<Double|False>
width parameter.
As with AuthorRow
, width
is expressed as a fraction of the overall
table width.
If width
is unspecified, the available width of the table will be split evenly
between all unspecified cells.
DataCell¶
Construct a DataCell
from a string literal and an optional width
parameter.
public defn DataCell (value:String, width:Double|False) -> DataCell<Double|False>
- Returns
DataCell<Double|False>
AuthorCell¶
One cell of an AuthorTable
.
public deftype AuthorCell<T>
Parameterized by the type of its width
field.
Multis¶
cells¶
Extract the cells of an AuthorTable
.
public defmulti cells<?T> (r:AuthorRow<?T>) -> Tuple<AuthorCell>
- Type Argument
?T
- Returns
Tuple<AuthorCell>
width¶
Extract the width of a table cell.
public defmulti width<?T> (c:AuthorCell<?T>) -> T
- Type Argument
?T
- Returns
T
This field is polymorphic.
Functions¶
AuthorRow¶
Construct a row from an ordered tuple of cells.
public defn AuthorRow (cells:Tuple<AuthorCell<Double|False>> -- height:Double|False = ?) -> AuthorRow<Double|False>
- Returns
AuthorRow<Double|False>
height
is an optional parameter -- as such, the returned row
has type parameter Double|False
.
height
is expressed as a percentage of the total table height:
AuthorRow([cell], height = 0.7)
will construct a row that is 70% the
height of the containing table.
If height
is unspecified, the available height of the table will be split evenly
between all unspecified rows.
AuthorRow¶
Construct a row from an ordered tuple of cells and an optional height
parameter.
public defn AuthorRow (cells:Tuple<AuthorCell<Double|False>>, height:Double|False) -> AuthorRow<Double|False>
- Returns
AuthorRow<Double|False>
AuthorRow¶
A row of an AuthorTable
.
public deftype AuthorRow<T>
Parameterized by the type of its size annotations.
Multis¶
rows¶
Extract the rows of an AuthorTable
public defmulti rows<?T> (t:AuthorTable<?T>) -> Tuple<AuthorRow>
- Type Argument
?T
- Returns
Tuple<AuthorRow>
cells¶
Extract the cells of an AuthorTable
.
public defmulti cells<?T> (r:AuthorRow<?T>) -> Tuple<AuthorCell>
- Type Argument
?T
- Returns
Tuple<AuthorCell>
height¶
Return the height of an AuthorRow
.
public defmulti height<?T> (r:AuthorRow<?T>) -> T
- Type Argument
?T
- Returns
T
This field is polymorphic.
Functions¶
AuthorTable¶
Construct an AuthorTable
from a tuple of rows.
public defn AuthorTable (rows:Tuple<AuthorRow<Double|False>>) -> AuthorTable<Double|False>
- Returns
AuthorTable<Double|False>
Returns a partially annotated AuthorTable
-- the rows and cells
have size annotations of type Double|False
.
AuthorRow¶
Construct a row from an ordered tuple of cells.
public defn AuthorRow (cells:Tuple<AuthorCell<Double|False>> -- height:Double|False = ?) -> AuthorRow<Double|False>
- Returns
AuthorRow<Double|False>
height
is an optional parameter -- as such, the returned row
has type parameter Double|False
.
height
is expressed as a percentage of the total table height:
AuthorRow([cell], height = 0.7)
will construct a row that is 70% the
height of the containing table.
If height
is unspecified, the available height of the table will be split evenly
between all unspecified rows.
AuthorRow¶
Construct a row from an ordered tuple of cells and an optional height
parameter.
public defn AuthorRow (cells:Tuple<AuthorCell<Double|False>>, height:Double|False) -> AuthorRow<Double|False>
- Returns
AuthorRow<Double|False>
Related Packages¶
Forwarded by package: jitx