Table of Contents

Class Adornment

Namespace
Terminal.Gui
Assembly
Terminal.Gui.dll

Adornments are a special form of View that appear outside the Viewport: Margin, Border, and Padding. They are defined using the Thickness class, which specifies the thickness of the sides of a rectangle.

public class Adornment : View, IDisposable, ISupportInitializeNotification, ISupportInitialize, IDesignable
Inheritance
Adornment
Implements
Derived
Inherited Members

Constructors

Adornment()

Initializes a new instance of View.

Adornment(View)

Constructs a new adornment for the view specified by parent.

Properties

Diagnostics

Gets or sets whether the Adornment will draw diagnostic information. This is a bit-field of ViewDiagnosticFlags.

Parent

The Parent of this Adornment (the View this Adornment surrounds).

SuperView

Adornments cannot be used as sub-views (see Parent); setting this property will throw InvalidOperationException.

SuperViewRendersLineCanvas

Adornments only render to their Parent's or Parent's SuperView's LineCanvas, so setting this property throws an InvalidOperationException.

Thickness

Defines the rectangle that the Adornment will use to draw its content.

Viewport

Gets the rectangle that describes the area of the Adornment. The Location is always (0,0). The size is the size of the Frame.

Methods

Contains(in Point)

Indicates whether the specified Parent's SuperView-relative coordinates are within the Adornment's Thickness.

FrameToScreen()

Gets the Frame with a screen-relative location.

OnClearingViewport()

Called when the Thickness of the Adornment is to be cleared.

OnDrawingSubviews()

Called when the Subviews are to be drawn.

OnDrawingText()

Called when the Text of the View is to be drawn.

OnRenderingLineCanvas()

Does nothing for Adornment

OnThicknessChanged()

Called whenever the Thickness property changes.

ScreenToFrame(in Point)

Converts a screen-relative coordinate to a Frame-relative coordinate. Frame-relative means relative to the View's SuperView's Viewport.

Events

ThicknessChanged

Fired whenever the Thickness property changes.