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

    Struct StyledText

    Describes a text with mixed in styles. Can be used by WriteText(StyledText, bool).

    Inherited Members
    object.Equals(object, object)
    object.GetType()
    object.ReferenceEquals(object, object)
    Namespace: Sharpie
    Assembly: sharpie.dll
    Syntax
    [PublicAPI]
    public readonly struct StyledText

    Constructors

    StyledText(string, Style)

    Creates a new styled text with the given text and style.

    Declaration
    public StyledText(string text, Style style)
    Parameters
    Type Name Description
    string text

    The text.

    Style style

    The text style.

    Exceptions
    Type Condition
    ArgumentNullException

    Thrown if text is null.

    Methods

    Equals(object?)

    Determines whether the specified object is equal to the current object.

    Declaration
    public override bool Equals(object? obj)
    Parameters
    Type Name Description
    object obj

    The object to compare with the current object.

    Returns
    Type Description
    bool

    true if the specified object is equal to the current object; otherwise, false.

    Overrides
    ValueType.Equals(object)

    GetHashCode()

    Serves as the default hash function.

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    int

    A hash code for the current object.

    Overrides
    ValueType.GetHashCode()

    Plus(StyledText)

    Combines this styled text with another styled text.

    Declaration
    public StyledText Plus(StyledText rhs)
    Parameters
    Type Name Description
    StyledText rhs

    The other styled text to combine with.

    Returns
    Type Description
    StyledText

    The combined styled text.

    Plus(string, Style)

    Combines this styled text with another styled text.

    Declaration
    public StyledText Plus(string text, Style style)
    Parameters
    Type Name Description
    string text

    The other text to combine with.

    Style style

    The style of the text to combine with.

    Returns
    Type Description
    StyledText

    The combined styled text.

    Exceptions
    Type Condition
    ArgumentNullException

    Thrown if text is null.

    ToString()

    Returns a string that represents the current object.

    Declaration
    public override string? ToString()
    Returns
    Type Description
    string

    A string that represents the current object.

    Overrides
    ValueType.ToString()

    Operators

    operator +(StyledText, StyledText)

    Combines two styled texts together.

    Declaration
    public static StyledText operator +(StyledText lhs, StyledText rhs)
    Parameters
    Type Name Description
    StyledText lhs

    The left hand side styled text to combine.

    StyledText rhs

    The left right side styled text to combine.

    Returns
    Type Description
    StyledText

    The combined styled text.

    operator ==(StyledText, StyledText)

    Checks if two styled texts are equal.

    Declaration
    public static bool operator ==(StyledText lhs, StyledText rhs)
    Parameters
    Type Name Description
    StyledText lhs

    The left hand side styled text.

    StyledText rhs

    The left right side styled ..

    Returns
    Type Description
    bool

    The result of the check.

    operator !=(StyledText, StyledText)

    Checks if two styled texts are not equal.

    Declaration
    public static bool operator !=(StyledText lhs, StyledText rhs)
    Parameters
    Type Name Description
    StyledText lhs

    The left hand side styled text.

    StyledText rhs

    The left right side styled ..

    Returns
    Type Description
    bool

    The result of the check.

    In this article
    Back to top Generated by DocFX