Sharpie
Search Results for

    Show / Hide Table of Contents
    • Sharpie
      • Canvas
      • Canvas.CheckGlyphStyle
      • Canvas.FillStyle
      • Canvas.GlyphSize
      • Canvas.GradientGlyphStyle
      • Canvas.LineStyle
      • Canvas.Orientation
      • Canvas.ShadeGlyphStyle
      • Canvas.TriangleGlyphStyle
      • CaretMode
      • ClearStrategy
      • ColorManager
      • ColorMixture
      • ColorMode
      • ControlCharacter
      • CursesException
      • CursesInitializationException
      • CursesOperationException
      • CursesSynchronizationException
      • DelegateEvent
      • Event
      • EventPump
      • EventType
      • Key
      • KeyEvent
      • KeySequenceResolver
      • ModifierKey
      • MouseActionEvent
      • MouseButton
      • MouseButtonState
      • MouseMoveEvent
      • Pad
      • ReplaceStrategy
      • ResolveEscapeSequenceFunc
      • Screen
      • SoftLabelKeyAlignment
      • SoftLabelKeyManager
      • SoftLabelKeyMode
      • StandardColor
      • StartEvent
      • StopEvent
      • Style
      • StyledText
      • SubPad
      • SubWindow
      • Surface
      • Terminal
      • TerminalOptions
      • TerminalResizeEvent
      • TerminalSurface
      • VideoAttribute
      • Window
    • Sharpie.Abstractions
      • IAsciiFont
      • IColorManager
      • ICursesBackend
      • ICursesBackend.ripoffline_callback
      • IDrawSurface
      • IDrawable
      • IEventPump
      • IInterval
      • IPad
      • IScreen
      • ISoftLabelKeyManager
      • ISubPad
      • ISubWindow
      • ISurface
      • ITerminal
      • ITerminalSurface
      • IWindow
    • Sharpie.Backend
      • ComplexChar
      • CursesBackend
      • CursesBackendFlavor
      • CursesBackendType
      • CursesCharEvent
      • CursesEvent
      • CursesKeyEvent
      • CursesMouseEvent
      • CursesMouseState
      • CursesResizeEvent
      • NCursesKeyCode
      • PdCursesKeyCode
    • Sharpie.Font
      • AsciiFont
      • AsciiFontLayout
      • DosCp866AsciiFont
      • FigletFont

    Class Screen

    The main Curses screen class. Implements screen-related functionality. Only one instance of this class can be active at one time.

    Inheritance
    object
    Surface
    TerminalSurface
    Screen
    Implements
    IDisposable
    IScreen
    ITerminalSurface
    ISurface
    IDrawSurface
    Inherited Members
    TerminalSurface.Terminal
    TerminalSurface.ImmediateRefresh
    Surface.Dispose()
    Surface.Handle
    Surface.ManagedCaret
    Surface.Scrollable
    Surface.Disposed
    Surface.Style
    Surface.ColorMixture
    Surface.Background
    Surface.Size
    Surface.CaretLocation
    Surface.Dirty
    Surface.LineDirty(int)
    Surface.EnableAttributes(VideoAttribute)
    Surface.DisableAttributes(VideoAttribute)
    Surface.ScrollUp(int)
    Surface.ScrollDown(int)
    Surface.InsertEmptyLines(int)
    Surface.DeleteLines(int)
    Surface.ChangeTextStyle(int, Style)
    Surface.WriteText(StyledText, bool)
    Surface.WriteText(string, Style, bool)
    Surface.WriteText(string, bool)
    Surface.NextLine()
    Surface.DrawText(IAsciiFont, string, Style, bool, bool)
    Surface.DrawText(IAsciiFont, string, bool, bool)
    Surface.DrawVerticalLine(int, Rune, Style)
    Surface.DrawVerticalLine(int)
    Surface.DrawHorizontalLine(int, Rune, Style)
    Surface.DrawHorizontalLine(int)
    Surface.DrawBorder(Rune, Rune, Rune, Rune, Rune, Rune, Rune, Rune, Style)
    Surface.DrawBorder()
    Surface.RemoveText(int)
    Surface.GetText(int)
    Surface.Clear(ClearStrategy)
    Surface.Replace(ISurface, ReplaceStrategy)
    Surface.Replace(ISurface, Rectangle, Point, ReplaceStrategy)
    Surface.MarkDirty()
    Surface.IsPointWithin(Point)
    Surface.IsRectangleWithin(Rectangle)
    Surface.Draw(Point, Rectangle, IDrawable)
    Surface.Draw(Point, IDrawable)
    Surface.Destroy()
    Surface.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.ReferenceEquals(object, object)
    Namespace: Sharpie
    Assembly: sharpie.dll
    Syntax
    [PublicAPI]
    public sealed class Screen : TerminalSurface, IDisposable, IScreen, ITerminalSurface, ISurface, IDrawSurface

    Properties

    Pads

    Gets all child pads on this screen.

    Declaration
    public IEnumerable<IPad> Pads { get; }
    Property Value
    Type Description
    IEnumerable<IPad>
    Remarks

    This operation is not thread safe.

    Exceptions
    Type Condition
    ObjectDisposedException

    Screen is no longer usable.

    CursesSynchronizationException

    Thrown if this operation was expected to run on the main thread/context but wasn't.

    Windows

    Gets all child windows on this screen.

    Declaration
    public IEnumerable<Window> Windows { get; }
    Property Value
    Type Description
    IEnumerable<Window>
    Remarks

    This operation is not thread safe.

    Exceptions
    Type Condition
    ObjectDisposedException

    Screen is no longer usable.

    CursesSynchronizationException

    Thrown if this operation was expected to run on the main thread/context but wasn't.

    Methods

    Delete()

    Deletes the surface from the curses backend.

    Declaration
    protected override void Delete()
    Overrides
    Surface.Delete()

    MarkDirty(int, int)

    Marks a number of lines within the surface as Dirty.

    Declaration
    public override void MarkDirty(int y, int count)
    Parameters
    Type Name Description
    int y

    The line to start with.

    int count

    The count of lines to mark dirty.

    Overrides
    Surface.MarkDirty(int, int)
    Remarks

    This operation is not thread safe.

    Exceptions
    Type Condition
    ObjectDisposedException

    Surface is no longer usable.

    CursesSynchronizationException

    Thrown if this operation was expected to run on the main thread/context but wasn't.

    CursesOperationException

    A Curses error occured.

    Pad(Size)

    Creates a new pad.

    Declaration
    public IPad Pad(Size size)
    Parameters
    Type Name Description
    Size size

    The pad size.

    Returns
    Type Description
    IPad

    A new pad object.

    Remarks

    This operation is not thread safe.

    Exceptions
    Type Condition
    ObjectDisposedException

    Screen is no longer usable.

    ArgumentOutOfRangeException

    The size is invalid.

    CursesSynchronizationException

    Thrown if this operation was expected to run on the main thread/context but wasn't.

    CursesOperationException

    A Curses error occured.

    Refresh()

    Redraws all the dirty lines of the surface to the terminal. If AtomicRefresh() is active, all refreshes are batched together until the lock is released.

    Declaration
    public override void Refresh()
    Overrides
    TerminalSurface.Refresh()
    Remarks

    This operation is not thread safe.

    Exceptions
    Type Condition
    ObjectDisposedException

    Surface is no longer usable.

    CursesSynchronizationException

    Thrown if this operation was expected to run on the main thread/context but wasn't.

    CursesOperationException

    A Curses error occured.

    Refresh(int, int)

    Marks a number of lines within the surface as Dirty.

    Declaration
    public override void Refresh(int y, int count)
    Parameters
    Type Name Description
    int y

    The line to start with.

    int count

    The count of lines to mark dirty.

    Overrides
    TerminalSurface.Refresh(int, int)
    Remarks

    This operation is not thread safe.

    Exceptions
    Type Condition
    ObjectDisposedException

    Surface is no longer usable.

    CursesSynchronizationException

    Thrown if this operation was expected to run on the main thread/context but wasn't.

    CursesOperationException

    A Curses error occured.

    Window(Rectangle)

    Creates a new sub-window in the parent window.

    Declaration
    public IWindow Window(Rectangle area)
    Parameters
    Type Name Description
    Rectangle area

    The area of the window to put the sub-window in.

    Returns
    Type Description
    IWindow

    A new window object.

    Exceptions
    Type Condition
    ObjectDisposedException

    Screen is no longer usable.

    ArgumentOutOfRangeException

    The area is outside the bounds of the parent.

    CursesSynchronizationException

    Thrown if this operation was expected to run on the main thread/context but wasn't.

    CursesOperationException

    A Curses error occured.

    Implements

    IDisposable
    IScreen
    ITerminalSurface
    ISurface
    IDrawSurface
    In this article
    Back to top Generated by DocFX