Layout Class
Represents a renderable to divide a fixed height into rows or columns.
public sealed class Layout : Renderable, IRenderable, IRatioResolvable, IHasVisibility
- Namespace
- Spectre
.Console - Interfaces
-
- IRenderable
- IRatioResolvable
- IHasVisibility
- Base Types
Constructors
-
Layout
(IRenderable) -
Initializes a new instance of the
Layout
class. -
Layout
(string, IRenderable) -
Initializes a new instance of the
Layout
class. -
Layout
(string) -
Initializes a new instance of the
Layout
class.
Properties
- bool IsVisible
- Gets or sets a value indicating whether or not the layout should be visible or not.
- int MinimumSize
- Gets or sets the minimum width.
- string Name
- Gets or sets the name.
- int Ratio
- Gets or sets the ratio.
- int? Size
- Gets or sets the width.
- Layout this[string]
- Gets a child layout by it's name.
Methods
-
Layout GetLayout
(string) - Gets a child layout by it's name.
-
protected virtual Measurement Measure
(RenderOptions, int) - Measures the renderable object.
-
protected override IEnumerable<Segment> Render
(RenderOptions, int) - Renders the object.
-
Layout SplitColumns
(Layout[]) - Splits the layout into columns.
-
Layout SplitRows
(Layout[]) - Splits the layout into rows.
-
Layout Update
(IRenderable) -
Updates the containing
IRenderable
.
Extension Methods
-
IEnumerable<Segment> GetSegments
(IAnsiConsole) - Gets the segments for a renderable using the specified console.
-
T Invisible
<Layout> () - Marks the specified object as being invisible.
-
Layout MinimumSize
(int) - Sets the minimum width of the layout.
-
Layout Ratio
(int) - Sets the ratio of the layout.
-
Layout Size
(int) - Sets the size of the layout.
-
T Visible
<Layout> () - Marks the specified object as being visible.