Search Results for

    Show / Hide Table of Contents

    Class StatusBar

    A status bar is a View that snaps to the bottom of a Toplevel displaying set of StatusItems. The StatusBar should be context sensitive. This means, if the main menu and an open text editor are visible, the items probably shown will be ~F1~ Help ~F2~ Save ~F3~ Load. While a dialog to ask a file to load is executed, the remaining commands will probably be ~F1~ Help. So for each context must be a new instance of a statusbar.
    Inheritance
    System.Object
    Responder
    View
    StatusBar
    Implements
    System.IDisposable
    System.ComponentModel.ISupportInitializeNotification
    System.ComponentModel.ISupportInitialize
    Inherited Members
    View.GetMinWidthHeight(Size)
    View.SetMinWidthHeight()
    View.UpdateTextFormatterText()
    View.ProcessResizeView()
    View.SetNeedsDisplay()
    View.ClearLayoutNeeded()
    View.SetNeedsDisplay(Rect)
    View.SetChildNeedsDisplay()
    View.Add(View)
    View.Add(View[])
    View.RemoveAll()
    View.Remove(View)
    View.BringSubviewToFront(View)
    View.SendSubviewToBack(View)
    View.SendSubviewBackwards(View)
    View.BringSubviewForward(View)
    View.Clear()
    View.Clear(Rect)
    View.ScreenToView(Int32, Int32)
    View.ClipToBounds()
    View.SetClip(Rect)
    View.DrawFrame(Rect, Int32, Boolean)
    View.DrawHotString(ustring, Attribute, Attribute)
    View.DrawHotString(ustring, Boolean, ColorScheme)
    View.Move(Int32, Int32, Boolean)
    View.PositionCursor()
    View.OnAdded(View)
    View.OnRemoved(View)
    View.OnLeave(View)
    View.AddRune(Int32, Int32, Rune)
    View.ClearNeedsDisplay()
    View.OnDrawContent(Rect)
    View.OnDrawContentComplete(Rect)
    View.SetFocus()
    View.ProcessKey(KeyEvent)
    View.InvokeKeybindings(KeyEvent)
    View.AddKeyBinding(Key, Command)
    View.ReplaceKeyBinding(Key, Key)
    View.ContainsKeyBinding(Key)
    View.ClearKeybindings()
    View.ClearKeybinding(Key)
    View.ClearKeybinding(Command)
    View.AddCommand(Command, Func<Nullable<Boolean>>)
    View.GetSupportedCommands()
    View.GetKeyFromCommand(Command)
    View.ProcessColdKey(KeyEvent)
    View.OnKeyDown(KeyEvent)
    View.OnKeyUp(KeyEvent)
    View.EnsureFocus()
    View.FocusFirst()
    View.FocusLast()
    View.FocusPrev()
    View.FocusNext()
    View.LayoutSubviews()
    View.ToString()
    View.GetAutoSize()
    View.GetHotKeySpecifierLength(Boolean)
    View.GetTextFormatterBoundsSize()
    View.GetBoundsTextFormatterSize()
    View.OnMouseEnter(MouseEvent)
    View.OnMouseLeave(MouseEvent)
    View.OnMouseEvent(MouseEvent)
    View.OnMouseClick(View.MouseEventArgs)
    View.OnCanFocusChanged()
    View.OnEnabledChanged()
    View.OnVisibleChanged()
    View.BeginInit()
    View.EndInit()
    View.SetWidth(Int32, Int32)
    View.SetHeight(Int32, Int32)
    View.GetCurrentWidth(Int32)
    View.GetCurrentHeight(Int32)
    View.GetNormalColor()
    View.GetTopSuperView()
    View.HotKey
    View.HotKeySpecifier
    View.Shortcut
    View.ShortcutTag
    View.ShortcutAction
    View.Data
    View.Driver
    View.Subviews
    View.TabIndexes
    View.TabIndex
    View.TabStop
    View.CanFocus
    View.Id
    View.IsCurrentTop
    View.WantMousePositionReports
    View.WantContinuousButtonPressed
    View.Frame
    View.LayoutStyle
    View.Bounds
    View.X
    View.Y
    View.Width
    View.Height
    View.ForceValidatePosDim
    View.TextFormatter
    View.SuperView
    View.HasFocus
    View.Focused
    View.MostFocused
    View.ColorScheme
    View.Text
    View.AutoSize
    View.PreserveTrailingSpaces
    View.TextAlignment
    View.VerticalTextAlignment
    View.TextDirection
    View.IsInitialized
    View.IsAdded
    View.Enabled
    View.Visible
    View.Border
    View.Added
    View.Removed
    View.Enter
    View.Leave
    View.MouseEnter
    View.MouseLeave
    View.MouseClick
    View.CanFocusChanged
    View.EnabledChanged
    View.VisibleChanged
    View.HotKeyChanged
    View.DrawContent
    View.DrawContentComplete
    View.KeyPress
    View.KeyDown
    View.KeyUp
    View.LayoutStarted
    View.LayoutComplete
    View.Initialized
    Responder.Dispose()
    Namespace: Terminal.Gui
    Assembly: Terminal.Gui.dll
    Syntax
    public class StatusBar : View

    Constructors

    StatusBar()

    Initializes a new instance of the StatusBar class.
    Declaration
    public StatusBar()

    StatusBar(StatusItem[])

    Initializes a new instance of the StatusBar class with the specified set of StatusItems. The StatusBar will be drawn on the lowest line of the terminal or SuperView (if not null).
    Declaration
    public StatusBar(StatusItem[] items)
    Parameters
    Type Name Description
    StatusItem[] items A list of statusbar items.

    Properties

    Items

    The items that compose the StatusBar
    Declaration
    public StatusItem[] Items { get; set; }
    Property Value
    Type Description
    StatusItem[]

    ShortcutDelimiter

    Used for change the shortcut delimiter separator.
    Declaration
    public static ustring ShortcutDelimiter { get; set; }
    Property Value
    Type Description
    NStack.ustring

    Methods

    AddItemAt(Int32, StatusItem)

    Inserts a StatusItem in the specified index of Items.
    Declaration
    public void AddItemAt(int index, StatusItem item)
    Parameters
    Type Name Description
    System.Int32 index The zero-based index at which item should be inserted.
    StatusItem item The item to insert.

    Dispose(Boolean)

    Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
    Declaration
    protected override void Dispose(bool disposing)
    Parameters
    Type Name Description
    System.Boolean disposing
    Overrides
    View.Dispose(Boolean)

    MouseEvent(MouseEvent)

    Method invoked when a mouse event is generated
    Declaration
    public override bool MouseEvent(MouseEvent me)
    Parameters
    Type Name Description
    MouseEvent me
    Returns
    Type Description
    System.Boolean true, if the event was handled, false otherwise.
    Overrides
    Responder.MouseEvent(MouseEvent)

    OnEnter(View)

    Method invoked when a view gets focus.
    Declaration
    public override bool OnEnter(View view)
    Parameters
    Type Name Description
    View view The view that is losing focus.
    Returns
    Type Description
    System.Boolean true, if the event was handled, false otherwise.
    Overrides
    View.OnEnter(View)

    ProcessHotKey(KeyEvent)

    This method can be overwritten by view that want to provide accelerator functionality (Alt-key for example).
    Declaration
    public override bool ProcessHotKey(KeyEvent kb)
    Parameters
    Type Name Description
    KeyEvent kb
    Returns
    Type Description
    System.Boolean
    Overrides
    View.ProcessHotKey(KeyEvent)

    Redraw(Rect)

    Redraws this view and its subviews; only redraws the views that have been flagged for a re-display.
    Declaration
    public override void Redraw(Rect bounds)
    Parameters
    Type Name Description
    Rect bounds The bounds (view-relative region) to redraw.
    Overrides
    View.Redraw(Rect)

    RemoveItem(Int32)

    Removes a StatusItem at specified index of Items.
    Declaration
    public StatusItem RemoveItem(int index)
    Parameters
    Type Name Description
    System.Int32 index The zero-based index of the item to remove.
    Returns
    Type Description
    StatusItem The StatusItem removed.

    Implements

    System.IDisposable
    System.ComponentModel.ISupportInitializeNotification
    System.ComponentModel.ISupportInitialize
    In This Article
    Back to top Generated by DocFX