Class
Prioritized
ConsoleMonster.Layout
Declares a widget's priority and minimum size for reduced layouts. It renders its child unchanged; when a dashboard is too small for its full layout it shows the highest-priority Prioritized widgets that fit, in order.
Inheritance
- object
- Prioritized
Constructors
public Prioritized(IWidget child, int priority, int minimumHeight = 1, int minimumWidth = 20) #Wraps a widget.
Parameters
- child ConsoleMonster.Layout.IWidget
- The widget.
- priority int
- Higher shows first in reduced layouts.
- minimumHeight int = 1
- The rows it needs to be useful (default 1).
- minimumWidth int = 20
- The cells it needs to be useful (default 20).
Methods
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 IReadOnlyList<IWidget> Children { get; } #The child widgets in layout order.