API Reference
Class
Prioritized
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, Int32 priority, Int32 minimumHeight = 1, Int32 minimumWidth = 20) #Wraps a widget.
Parameters
- child ConsoleMonster.Layout.IWidget
- The widget.
- priority System.Int32
- Higher shows first in reduced layouts.
- minimumHeight System.Int32 = 1
- The rows it needs to be useful (default 1).
- minimumWidth System.Int32 = 20
- The cells it needs to be useful (default 20).
Methods
public Size Measure(Constraints constraints, RenderContext context) #Returns:
SizeReturns the size the widget wants within the constraints.
Parameters
- constraints ConsoleMonster.Layout.Constraints
- The space offered.
- context ConsoleMonster.Canvas.RenderContext
- Profile, theme and glyphs.
Returns
The desired size, never larger than the constraints.
public Void Render(Region region, RenderContext context) #Returns:
VoidRenders 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
public virtual Boolean Equals(Object? obj) #Returns:
BooleanInherited from Object
Parameters
- obj Object?
Properties
public IReadOnlyList<IWidget> Children { get; } #The child widgets in layout order.