RoleTable
ConsoleMonster.Widgets
A composition of RoleTable.Table with a dedicated marker column and whole-row roles.
Inheritance
- object
- RoleTable
Usage
Explore 5 API references to this type
This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.
Returned or exposed by 3
- Extension method RoleTable.Table
- Method RoleTable.AddRow
- Method RoleTableFluent.Table
Accepted by parameters 2
- Extension method RoleTable.Table
- Method RoleTableFluent.Table
Constructors
public RoleTable(IEnumerable<TableColumn> columns) #Creates a table, prepending a marker column without changing the supplied column definitions.
Parameters
- columns System.Collections.Generic.IEnumerable<ConsoleMonster.Widgets.TableColumn>
- The data columns; the first is the key unless another column explicitly is.
Methods
public RoleTable AddRow(TableRowRole? role, params TableCell[] cells) #Adds data cells after the marker column, retaining their raw values and original instances.
Parameters
- role ConsoleMonster.Widgets.TableRowRole?
- The row role, or null for an ordinary unmarked row.
- cells ConsoleMonster.Widgets.TableCell[]
- The data cells, excluding the marker column.
public Size Measure(Constraints constraints, RenderContext context) #Returns the size the widget wants within the constraints.
Parameters
- constraints ConsoleMonster.Layout.Constraints
- The space offered.
- context ConsoleMonster.Canvas.RenderContext
- Profile, theme and glyphs.
public void Render(Region region, RenderContext context) #Renders into a region. The region may be smaller or larger than the measured size.
Parameters
- region ConsoleMonster.Canvas.Region
- The target region.
- context ConsoleMonster.Canvas.RenderContext
- Profile, theme and glyphs.
Inherited Methods
Properties
public Table Table { get; } #The composed table, for ordinary border, header, card, grouping and summary options.
Extension Methods
public static RoleTable Table(RoleTable roleTable, Action<Table> configure) #Configures RoleTable.Table in place: The composed table, for ordinary border, header, card, grouping and summary options.
Parameters
- roleTable ConsoleMonster.Widgets.RoleTable
- The instance.
- configure System.Action<ConsoleMonster.Widgets.Table>
- Configures the value.