Class AdornmentImpl
Lightweight base class for adornment settings. Holds Thickness and optional Parent reference. The full AdornmentView is created lazily via GetOrCreateView() only when needed.
public abstract class AdornmentImpl : IAdornment
- Inheritance
-
AdornmentImpl
- Implements
- Derived
- Inherited Members
Constructors
Properties
- Diagnostics
Gets or sets diagnostic flags. Stored locally and forwarded to the backing View when it exists.
- Parent
The View this adornment surrounds. Not on IAdornment — callers that need the parent already have the View reference they used to access this adornment. Set by Terminal.Gui.ViewBase.View.SetupAdornments and used for geometry math and GetOrCreateView() creation.
- Thickness
The thickness (space consumed by this adornment layer). Changing this triggers layout recalculation on the parent View.
- View
The IAdornmentView backing this adornment, cast to the adornment type for convenience. null until the adornment actually needs View-level functionality (rendering, SubViews, mouse, arrangement, shadow).
- ViewportSettings
Gets or sets the viewport settings flags on the backing View.
Methods
- Contains(in Point)
Indicates whether the specified SuperView-relative coordinates are within this adornment's Thickness. Works even when no View has been created.
- CreateView()
Factory method — subclasses return their specific AdornmentView subclass.
- FrameToScreen()
Returns the screen-relative rectangle for this adornment.
- GetFrame()
The calculated frame rectangle for this adornment layer, set by Terminal.Gui.ViewBase.View.SetAdornmentFrames. This is the single source of truth for adornment geometry.
- GetOrCreateView()
Returns the existing AdornmentView, creating it if not yet allocated. Calls BeginInit() and/or EndInit() on the new view to match the parent's current initialization state.
- OnThicknessChanged()
Called when Thickness changes. Override in subclasses to react; base is empty.
Events
- ThicknessChanged
Fired when Thickness changes.