Show / Hide Table of Contents

Class Border

Creates a 3D border around a surface.

Inheritance
object
ScreenObject
ScreenSurface
Border
Implements
IDisposable
IScreenSurfaceEditable
IScreenSurface
IScreenObject
IPositionable
IComponentHost
ISurface
ISurfaceSettable
ICellSurfaceResize
Inherited Members
ScreenSurface.MouseState_EnteredWithButtonDown
ScreenSurface.IsMouseOver
ScreenSurface.Resize(int, int, int, int, bool)
ScreenSurface.Resize(int, int, bool)
ScreenSurface.UpdateAbsolutePosition()
ScreenSurface.Render(TimeSpan)
ScreenSurface.Update(TimeSpan)
ScreenSurface.OnIsDirtyChanged()
ScreenSurface.OnFontChanged(IFont, Point)
ScreenSurface.OnSurfaceChanged(ICellSurface)
ScreenSurface.OnRendererChanged()
ScreenSurface.ToString()
ScreenSurface.CallOnHostUpdated()
ScreenSurface.Dispose(bool)
ScreenSurface.Dispose()
ScreenSurface.OnMouseEnter(MouseScreenObjectState)
ScreenSurface.OnMouseExit(MouseScreenObjectState)
ScreenSurface.OnMouseMove(MouseScreenObjectState)
ScreenSurface.OnMouseLeftClicked(MouseScreenObjectState)
ScreenSurface.OnRightMouseClicked(MouseScreenObjectState)
ScreenSurface.LostMouse(MouseScreenObjectState)
ScreenSurface.ProcessMouse(MouseScreenObjectState)
ScreenSurface.ForceRendererRefresh
ScreenSurface.DefaultRendererName
ScreenSurface.Renderer
ScreenSurface.QuietSurfaceHandling
ScreenSurface.Surface
ScreenSurface.IsDirty
ScreenSurface.Font
ScreenSurface.FontSize
ScreenSurface.Tint
ScreenSurface.AbsoluteArea
ScreenSurface.UsePixelPositioning
ScreenSurface.WidthPixels
ScreenSurface.HeightPixels
ScreenSurface.Width
ScreenSurface.Height
ScreenSurface.ViewWidth
ScreenSurface.ViewHeight
ScreenSurface.ViewPosition
ScreenSurface.MoveToFrontOnMouseClick
ScreenSurface.FocusOnMouseClick
ScreenSurface.MouseButtonClicked
ScreenSurface.MouseMove
ScreenSurface.MouseExit
ScreenSurface.MouseEnter
ScreenObject.ComponentsUpdate
ScreenObject.ComponentsRender
ScreenObject.ComponentsMouse
ScreenObject.ComponentsKeyboard
ScreenObject.ComponentsEmpty
ScreenObject.ProcessKeyboard(Keyboard)
ScreenObject.OnFocusLost()
ScreenObject.OnFocused()
ScreenObject.OnParentChanged(IScreenObject, IScreenObject)
ScreenObject.OnPositionChanging(Point, Point)
ScreenObject.OnPositionChanged(Point, Point)
ScreenObject.OnVisibleChanged()
ScreenObject.OnEnabledChanged()
ScreenObject.GetSadComponents<TComponent>()
ScreenObject.GetSadComponent<TComponent>()
ScreenObject.HasSadComponent<TComponent>(out TComponent)
ScreenObject.OnSadComponentAdded(IComponent)
ScreenObject.OnSadComponentRemoved(IComponent)
ScreenObject.SortComponents()
ScreenObject.Components_FilterAddItem(IComponent, List<IComponent>, List<IComponent>, List<IComponent>, List<IComponent>, List<IComponent>)
ScreenObject.Components_FilterRemoveItem(IComponent, List<IComponent>, List<IComponent>, List<IComponent>, List<IComponent>, List<IComponent>)
ScreenObject.Components_Sort(List<IComponent>, List<IComponent>, List<IComponent>, List<IComponent>, List<IComponent>)
ScreenObject.OnSerializingMethod(StreamingContext)
ScreenObject.SortOrder
ScreenObject.Children
ScreenObject.Parent
ScreenObject.Position
ScreenObject.AbsolutePosition
ScreenObject.IgnoreParentPosition
ScreenObject.IsVisible
ScreenObject.IsEnabled
ScreenObject.IsFocused
ScreenObject.FocusedMode
ScreenObject.IsExclusiveMouse
ScreenObject.UseKeyboard
ScreenObject.UseMouse
ScreenObject.SadComponents
ScreenObject.ParentChanged
ScreenObject.PositionChanged
ScreenObject.PositionChanging
ScreenObject.IsVisibleChanged
ScreenObject.IsEnabledChanged
ScreenObject.FocusLost
ScreenObject.Focused
object.GetType()
object.MemberwiseClone()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
Namespace: SadConsole.UI
Assembly: SadConsole.Extended.dll
Syntax
public class Border : ScreenSurface, IDisposable, IScreenSurfaceEditable, IScreenSurface, IScreenObject, IPositionable, IComponentHost, ISurface, ISurfaceSettable, ICellSurfaceResize

Constructors

Border(IScreenSurface, BorderParameters, IFont?)

Creates a border and adds it as a child object to contents.

Declaration
public Border(IScreenSurface contents, Border.BorderParameters parameters, IFont? font = null)
Parameters
Type Name Description
IScreenSurface contents

The object the border will be around.

Border.BorderParameters parameters

Border.BorderParameters to be used in creating the Border.

IFont font

Optional IFont for the border CellSurface.

Border(IScreenSurface, string)

Creates a border (with a shadow and a title) and adds it as a child object to contents.

Declaration
public Border(IScreenSurface contents, string title)
Parameters
Type Name Description
IScreenSurface contents

The object the border will be around.

string title

Title to display on the border.

Border(IScreenSurface, string, Color, Color)

Creates a border (with a shadow and a title) and adds it as a child object to contents.

Declaration
public Border(IScreenSurface contents, string title, Color textColor, Color borderColor)
Parameters
Type Name Description
IScreenSurface contents

The object the border will be around.

string title

Optional title to display on the border.

Color textColor

Title text foreground color.

Color borderColor

Border line foreground color and title text background color.

Border(Window)

Creates a border and adds it as a child object to the window.

Declaration
public Border(Window contents)
Parameters
Type Name Description
Window contents

The window the border will be around.

Methods

Create3DForSurface(IScreenSurface, string, Color?, Color?, Color?, Color?, Color?)

Creates a chunky 3d border using Connected3dBox glyphs.

Declaration
public static Border Create3DForSurface(IScreenSurface contents, string title, Color? titleForeground = null, Color? titleBackground = null, Color? borderBrightColor = null, Color? borderDarkColor = null, Color? borderBetweenColor = null)
Parameters
Type Name Description
IScreenSurface contents

The object the border will be around.

string title

Optional title to display on the border.

Color? titleForeground

Foreground color of the title. Defaults to a brighter version of the content's DefaultBackground.

Color? titleBackground

Background color of the title. Defaults to the content's DefaultForeground.

Color? borderBrightColor

The bright color of the 3D border. Defaults to AnsiWhiteBright.

Color? borderDarkColor

The dark color of the 3D border. Defaults to AnsiBlackBright.

Color? borderBetweenColor

The corner color of the 3D border. Defaults to the content's DefaultBackground.

Returns
Type Description
Border

The created border, attached to the content.

Remarks

For a nice looking border, set the content's DefaultForeground to AnsiWhite and the DefaultBackground to AnsiBlue, before calling this method.

CreateForSurface(IScreenSurface, string)

Helper method to add a border to a surface.

Declaration
public static void CreateForSurface(IScreenSurface contents, string title)
Parameters
Type Name Description
IScreenSurface contents

The object the border will be around.

string title

Optional title to display on the border.

CreateForWindow(Window)

Helper method to add a border to a window.

Declaration
public static void CreateForWindow(Window contents)
Parameters
Type Name Description
Window contents

The window the border will be around.

Implements

IDisposable
IScreenSurfaceEditable
IScreenSurface
IScreenObject
IPositionable
IComponentHost
ISurface
ISurfaceSettable
ICellSurfaceResize

Extension Methods

ExtendedLib_SurfaceExtensions.PrintFadingText(IScreenSurface, ColoredString, Point, TimeSpan, ICellEffect?)
ExtendedLib_SurfaceExtensions.PrintFadingText(IScreenSurface, string, Point, TimeSpan, ICellEffect?)
ExtensionsSystem.GetDebuggerDisplayValue(object)
In this article

Back to top

Back to top Generated by DocFX