diff --git a/docs/api/Terminal.Gui/Terminal.Gui.Button.html b/docs/api/Terminal.Gui/Terminal.Gui.Button.html index 46df0f6d0..ea7a773b8 100644 --- a/docs/api/Terminal.Gui/Terminal.Gui.Button.html +++ b/docs/api/Terminal.Gui/Terminal.Gui.Button.html @@ -121,6 +121,9 @@ Button is a View that provides
View.Id
+
+ View.IsCurrentTop +
View.WantMousePositionReports
diff --git a/docs/api/Terminal.Gui/Terminal.Gui.CheckBox.html b/docs/api/Terminal.Gui/Terminal.Gui.CheckBox.html index c4672e8a2..17d33f06e 100644 --- a/docs/api/Terminal.Gui/Terminal.Gui.CheckBox.html +++ b/docs/api/Terminal.Gui/Terminal.Gui.CheckBox.html @@ -121,6 +121,9 @@ The CheckBox View.Id +
+ View.IsCurrentTop +
View.WantMousePositionReports
diff --git a/docs/api/Terminal.Gui/Terminal.Gui.ComboBox.html b/docs/api/Terminal.Gui/Terminal.Gui.ComboBox.html index a3cb4869f..a50e0a20b 100644 --- a/docs/api/Terminal.Gui/Terminal.Gui.ComboBox.html +++ b/docs/api/Terminal.Gui/Terminal.Gui.ComboBox.html @@ -121,6 +121,9 @@ ComboBox control
View.Id
+
+ View.IsCurrentTop +
View.WantMousePositionReports
diff --git a/docs/api/Terminal.Gui/Terminal.Gui.DateField.html b/docs/api/Terminal.Gui/Terminal.Gui.DateField.html index a79ca0b2c..58e0a0ecb 100644 --- a/docs/api/Terminal.Gui/Terminal.Gui.DateField.html +++ b/docs/api/Terminal.Gui/Terminal.Gui.DateField.html @@ -176,6 +176,9 @@ Date editing View
View.Id
+
+ View.IsCurrentTop +
View.WantMousePositionReports
diff --git a/docs/api/Terminal.Gui/Terminal.Gui.Dialog.html b/docs/api/Terminal.Gui/Terminal.Gui.Dialog.html index d53723745..d322fb7af 100644 --- a/docs/api/Terminal.Gui/Terminal.Gui.Dialog.html +++ b/docs/api/Terminal.Gui/Terminal.Gui.Dialog.html @@ -170,6 +170,9 @@ or more Button. It defaults
View.Id
+
+ View.IsCurrentTop +
View.WantMousePositionReports
diff --git a/docs/api/Terminal.Gui/Terminal.Gui.FileDialog.html b/docs/api/Terminal.Gui/Terminal.Gui.FileDialog.html index 2a6f30a05..f1219fae4 100644 --- a/docs/api/Terminal.Gui/Terminal.Gui.FileDialog.html +++ b/docs/api/Terminal.Gui/Terminal.Gui.FileDialog.html @@ -177,6 +177,9 @@ Base class for the OpenDialo
View.Id
+
+ View.IsCurrentTop +
View.WantMousePositionReports
diff --git a/docs/api/Terminal.Gui/Terminal.Gui.FrameView.html b/docs/api/Terminal.Gui/Terminal.Gui.FrameView.html index cb544db0d..b8f072226 100644 --- a/docs/api/Terminal.Gui/Terminal.Gui.FrameView.html +++ b/docs/api/Terminal.Gui/Terminal.Gui.FrameView.html @@ -122,6 +122,9 @@ a GroupBox in Windows.
View.Id
+
+ View.IsCurrentTop +
View.WantMousePositionReports
diff --git a/docs/api/Terminal.Gui/Terminal.Gui.HexView.html b/docs/api/Terminal.Gui/Terminal.Gui.HexView.html index 5b602f9fd..c3a18048a 100644 --- a/docs/api/Terminal.Gui/Terminal.Gui.HexView.html +++ b/docs/api/Terminal.Gui/Terminal.Gui.HexView.html @@ -121,6 +121,9 @@ An hex viewer and editor View
View.Id
+
+ View.IsCurrentTop +
View.WantMousePositionReports
diff --git a/docs/api/Terminal.Gui/Terminal.Gui.Label.html b/docs/api/Terminal.Gui/Terminal.Gui.Label.html index e279bb2f5..4da8d7d34 100644 --- a/docs/api/Terminal.Gui/Terminal.Gui.Label.html +++ b/docs/api/Terminal.Gui/Terminal.Gui.Label.html @@ -121,6 +121,9 @@ The Label View displays a stri
View.Id
+
+ View.IsCurrentTop +
View.WantMousePositionReports
diff --git a/docs/api/Terminal.Gui/Terminal.Gui.ListView.html b/docs/api/Terminal.Gui/Terminal.Gui.ListView.html index 983d8bd0f..9271626ae 100644 --- a/docs/api/Terminal.Gui/Terminal.Gui.ListView.html +++ b/docs/api/Terminal.Gui/Terminal.Gui.ListView.html @@ -121,6 +121,9 @@ ListView View renders a scroll
View.Id
+
+ View.IsCurrentTop +
View.WantMousePositionReports
diff --git a/docs/api/Terminal.Gui/Terminal.Gui.MenuBar.html b/docs/api/Terminal.Gui/Terminal.Gui.MenuBar.html index c1efccbbc..3973cc168 100644 --- a/docs/api/Terminal.Gui/Terminal.Gui.MenuBar.html +++ b/docs/api/Terminal.Gui/Terminal.Gui.MenuBar.html @@ -121,6 +121,9 @@ The MenuBar provides a menu for Terminal.Gui applications.
View.Id
+
+ View.IsCurrentTop +
View.WantMousePositionReports
@@ -352,6 +355,33 @@ Initializes a new instance of the +

IsMenuOpen

+
+True if the menu is open; otherwise false. +
+
+
Declaration
+
+
public bool IsMenuOpen { get; protected set; }
+
+
Property Value
+ + + + + + + + + + + + + +
TypeDescription
System.Boolean
+ +

LastFocused

@@ -379,33 +409,6 @@ Get the lasted focused view before open the menu. - -

MenuOpen

-
-True of the menu is open; otherwise false. -
-
-
Declaration
-
-
public bool MenuOpen { get; set; }
-
-
Property Value
- - - - - - - - - - - - - -
TypeDescription
System.Boolean
- -

Menus

@@ -462,6 +465,18 @@ Used for change the navigation key style. + +

CloseMenu()

+
+Closes the current Menu programatically, if open. +
+
+
Declaration
+
+
public void CloseMenu()
+
+ +

MouseEvent(MouseEvent)

@@ -594,6 +609,18 @@ Used for change the navigation key style.
View.OnKeyUp(KeyEvent)
+ +

OpenMenu()

+
+Opens the current Menu programatically. +
+
+
Declaration
+
+
public void OpenMenu()
+
+ +

PositionCursor()

diff --git a/docs/api/Terminal.Gui/Terminal.Gui.OpenDialog.html b/docs/api/Terminal.Gui/Terminal.Gui.OpenDialog.html index 62cb6f8e3..fc1945266 100644 --- a/docs/api/Terminal.Gui/Terminal.Gui.OpenDialog.html +++ b/docs/api/Terminal.Gui/Terminal.Gui.OpenDialog.html @@ -209,6 +209,9 @@ The OpenDialogprovides a
View.Id
+
+ View.IsCurrentTop +
View.WantMousePositionReports
diff --git a/docs/api/Terminal.Gui/Terminal.Gui.ProgressBar.html b/docs/api/Terminal.Gui/Terminal.Gui.ProgressBar.html index 730346d4d..7a47485c0 100644 --- a/docs/api/Terminal.Gui/Terminal.Gui.ProgressBar.html +++ b/docs/api/Terminal.Gui/Terminal.Gui.ProgressBar.html @@ -121,6 +121,9 @@ A Progress Bar view that can indicate progress of an activity visually.
View.Id
+
+ View.IsCurrentTop +
View.WantMousePositionReports
diff --git a/docs/api/Terminal.Gui/Terminal.Gui.RadioGroup.html b/docs/api/Terminal.Gui/Terminal.Gui.RadioGroup.html index 8c3c9fd13..7cf435a8c 100644 --- a/docs/api/Terminal.Gui/Terminal.Gui.RadioGroup.html +++ b/docs/api/Terminal.Gui/Terminal.Gui.RadioGroup.html @@ -121,6 +121,9 @@
View.Id
+
+ View.IsCurrentTop +
View.WantMousePositionReports
diff --git a/docs/api/Terminal.Gui/Terminal.Gui.SaveDialog.html b/docs/api/Terminal.Gui/Terminal.Gui.SaveDialog.html index 7a7a7b4b5..0977a4155 100644 --- a/docs/api/Terminal.Gui/Terminal.Gui.SaveDialog.html +++ b/docs/api/Terminal.Gui/Terminal.Gui.SaveDialog.html @@ -210,6 +210,9 @@ save.
View.Id
+
+ View.IsCurrentTop +
View.WantMousePositionReports
diff --git a/docs/api/Terminal.Gui/Terminal.Gui.ScrollBarView.html b/docs/api/Terminal.Gui/Terminal.Gui.ScrollBarView.html index b58b01849..ca49353ac 100644 --- a/docs/api/Terminal.Gui/Terminal.Gui.ScrollBarView.html +++ b/docs/api/Terminal.Gui/Terminal.Gui.ScrollBarView.html @@ -121,6 +121,9 @@ ScrollBarViews are views that display a 1-character scrollbar, either horizontal
View.Id
+
+ View.IsCurrentTop +
View.WantMousePositionReports
diff --git a/docs/api/Terminal.Gui/Terminal.Gui.ScrollView.html b/docs/api/Terminal.Gui/Terminal.Gui.ScrollView.html index ee4ed2753..198164811 100644 --- a/docs/api/Terminal.Gui/Terminal.Gui.ScrollView.html +++ b/docs/api/Terminal.Gui/Terminal.Gui.ScrollView.html @@ -121,6 +121,9 @@ Scrollviews are views that present a window into a virtual space where children
View.Id
+
+ View.IsCurrentTop +
View.WantMousePositionReports
diff --git a/docs/api/Terminal.Gui/Terminal.Gui.StatusBar.html b/docs/api/Terminal.Gui/Terminal.Gui.StatusBar.html index c5f953a91..a899feb14 100644 --- a/docs/api/Terminal.Gui/Terminal.Gui.StatusBar.html +++ b/docs/api/Terminal.Gui/Terminal.Gui.StatusBar.html @@ -124,6 +124,9 @@ So for each context must be a new instance of a statusbar.
View.Id
+
+ View.IsCurrentTop +
View.WantMousePositionReports
diff --git a/docs/api/Terminal.Gui/Terminal.Gui.TextField.html b/docs/api/Terminal.Gui/Terminal.Gui.TextField.html index 64f041f81..63d855bc2 100644 --- a/docs/api/Terminal.Gui/Terminal.Gui.TextField.html +++ b/docs/api/Terminal.Gui/Terminal.Gui.TextField.html @@ -123,6 +123,9 @@ Single-line text entry View
View.Id
+
+ View.IsCurrentTop +
View.WantMousePositionReports
diff --git a/docs/api/Terminal.Gui/Terminal.Gui.TextView.html b/docs/api/Terminal.Gui/Terminal.Gui.TextView.html index ee99b7c11..edd599d7c 100644 --- a/docs/api/Terminal.Gui/Terminal.Gui.TextView.html +++ b/docs/api/Terminal.Gui/Terminal.Gui.TextView.html @@ -121,6 +121,9 @@ Multi-line text editing View
View.Id
+
+ View.IsCurrentTop +
View.WantMousePositionReports
diff --git a/docs/api/Terminal.Gui/Terminal.Gui.TimeField.html b/docs/api/Terminal.Gui/Terminal.Gui.TimeField.html index b373dde66..33199045f 100644 --- a/docs/api/Terminal.Gui/Terminal.Gui.TimeField.html +++ b/docs/api/Terminal.Gui/Terminal.Gui.TimeField.html @@ -176,6 +176,9 @@ Time editing View
View.Id
+
+ View.IsCurrentTop +
View.WantMousePositionReports
diff --git a/docs/api/Terminal.Gui/Terminal.Gui.Toplevel.html b/docs/api/Terminal.Gui/Terminal.Gui.Toplevel.html index 46f87f3f4..7efa40561 100644 --- a/docs/api/Terminal.Gui/Terminal.Gui.Toplevel.html +++ b/docs/api/Terminal.Gui/Terminal.Gui.Toplevel.html @@ -122,6 +122,9 @@ Toplevel views can be modally executed.
View.Id
+
+ View.IsCurrentTop +
View.WantMousePositionReports
diff --git a/docs/api/Terminal.Gui/Terminal.Gui.View.html b/docs/api/Terminal.Gui/Terminal.Gui.View.html index e67114809..24c447d5a 100644 --- a/docs/api/Terminal.Gui/Terminal.Gui.View.html +++ b/docs/api/Terminal.Gui/Terminal.Gui.View.html @@ -488,6 +488,33 @@ Gets or sets an identifier for the view; + +

IsCurrentTop

+
+Returns a value indicating if this View is currently on Top (Active) +
+
+
Declaration
+
+
public bool IsCurrentTop { get; }
+
+
Property Value
+ + + + + + + + + + + + + +
TypeDescription
System.Boolean
+ +

LayoutStyle

diff --git a/docs/api/Terminal.Gui/Terminal.Gui.Window.html b/docs/api/Terminal.Gui/Terminal.Gui.Window.html index 19602cb2e..33fe302ee 100644 --- a/docs/api/Terminal.Gui/Terminal.Gui.Window.html +++ b/docs/api/Terminal.Gui/Terminal.Gui.Window.html @@ -150,6 +150,9 @@ A Toplevel View.Id
+
+ View.IsCurrentTop +
View.WantMousePositionReports
diff --git a/docs/articles/index.html b/docs/articles/index.html new file mode 100644 index 000000000..577d06309 --- /dev/null +++ b/docs/articles/index.html @@ -0,0 +1,115 @@ + + + + + + + + Conceptual Documentation + + + + + + + + + + + + + + + +
+
+ + + + +
+
+ +
+
+
+

+
+
    +
    +
    + + + +
    + + + + + + diff --git a/docs/articles/keyboard.html b/docs/articles/keyboard.html new file mode 100644 index 000000000..174faeddc --- /dev/null +++ b/docs/articles/keyboard.html @@ -0,0 +1,137 @@ + + + + + + + + Keyboard Event Processing + + + + + + + + + + + + + + + +
    +
    + + + + +
    +
    + +
    +
    +
    +

    +
    +
      +
      +
      + + + +
      + + + + + + diff --git a/docs/articles/mainloop.html b/docs/articles/mainloop.html new file mode 100644 index 000000000..67da5ae8b --- /dev/null +++ b/docs/articles/mainloop.html @@ -0,0 +1,220 @@ + + + + + + + + Event Processing and the Application Main Loop + + + + + + + + + + + + + + + +
      +
      + + + + +
      +
      + +
      +
      +
      +

      +
      +
        +
        +
        + + + +
        + + + + + + diff --git a/docs/articles/overview.html b/docs/articles/overview.html new file mode 100644 index 000000000..04333c53c --- /dev/null +++ b/docs/articles/overview.html @@ -0,0 +1,436 @@ + + + + + + + + Terminal.Gui API Overview + + + + + + + + + + + + + + + +
        +
        + + + + +
        +
        + +
        +
        +
        +

        +
        +
          +
          +
          + + + +
          + + + + + + diff --git a/docs/articles/views.html b/docs/articles/views.html new file mode 100644 index 000000000..50b577ac4 --- /dev/null +++ b/docs/articles/views.html @@ -0,0 +1,117 @@ + + + + + + + + Views + + + + + + + + + + + + + + + +
          +
          + + + + +
          +
          + +
          +
          +
          +

          +
          +
            +
            +
            + + + +
            + + + + + + diff --git a/docs/index.json b/docs/index.json index c3abc5d20..2ad0c050f 100644 --- a/docs/index.json +++ b/docs/index.json @@ -47,12 +47,12 @@ "api/Terminal.Gui/Terminal.Gui.Button.html": { "href": "api/Terminal.Gui/Terminal.Gui.Button.html", "title": "Class Button", - "keywords": "Class Button Button is a View that provides an item that invokes an System.Action when activated by the user. Inheritance System.Object Responder View Button Implements System.Collections.IEnumerable Inherited Members View.Enter View.Leave View.MouseEnter View.MouseLeave View.Driver View.Subviews View.Id View.WantMousePositionReports View.WantContinuousButtonPressed View.Frame View.GetEnumerator() View.LayoutStyle View.Bounds View.X View.Y View.Width View.Height View.SuperView View.SetNeedsDisplay() View.SetNeedsDisplay(Rect) View.ChildNeedsDisplay() 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) View.HasFocus View.OnEnter() View.OnLeave() View.Focused View.MostFocused View.ColorScheme View.AddRune(Int32, Int32, Rune) View.ClearNeedsDisplay() View.SetFocus(View) View.KeyPress View.KeyDown View.OnKeyDown(KeyEvent) View.KeyUp View.OnKeyUp(KeyEvent) View.EnsureFocus() View.FocusFirst() View.FocusLast() View.FocusPrev() View.FocusNext() View.LayoutSubviews() View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) Responder.CanFocus System.Object.Equals(System.Object) System.Object.Equals(System.Object, System.Object) System.Object.GetHashCode() System.Object.GetType() System.Object.MemberwiseClone() System.Object.ReferenceEquals(System.Object, System.Object) Namespace : Terminal.Gui Assembly : Terminal.Gui.dll Syntax public class Button : View, IEnumerable Remarks Provides a button showing text invokes an System.Action when clicked on with a mouse or when the user presses SPACE, ENTER, or hotkey. The hotkey is specified by the first uppercase letter in the button. When the button is configured as the default ( IsDefault ) and the user presses the ENTER key, if no other View processes the KeyEvent , the Button 's System.Action will be invoked. Constructors Button(ustring, Boolean) Initializes a new instance of Button based on the given text at position 0,0 Declaration public Button(ustring text, bool is_default = false) Parameters Type Name Description NStack.ustring text The button's text System.Boolean is_default If set, this makes the button the default button in the current view. IsDefault Remarks The size of the Button is computed based on the text length. Button(Int32, Int32, ustring) Initializes a new instance of Button at the given coordinates, based on the given text Declaration public Button(int x, int y, ustring text) Parameters Type Name Description System.Int32 x X position where the button will be shown. System.Int32 y Y position where the button will be shown. NStack.ustring text The button's text Remarks The size of the Button is computed based on the text length. Button(Int32, Int32, ustring, Boolean) Initializes a new instance of Button at the given coordinates, based on the given text, and with the specified IsDefault value Declaration public Button(int x, int y, ustring text, bool is_default) Parameters Type Name Description System.Int32 x X position where the button will be shown. System.Int32 y Y position where the button will be shown. NStack.ustring text The button's text System.Boolean is_default If set, this makes the button the default button in the current view, which means that if the user presses return on a view that does not handle return, it will be treated as if he had clicked on the button Remarks If the value for is_default is true, a special decoration is used, and the enter key on a dialog would implicitly activate this button. Fields Clicked Clicked System.Action , raised when the button is clicked. Declaration public Action Clicked Field Value Type Description System.Action Remarks Client code can hook up to this event, it is raised when the button is activated either with the mouse or the keyboard. Properties IsDefault Gets or sets whether the Button is the default action to activate in a dialog. Declaration public bool IsDefault { get; set; } Property Value Type Description System.Boolean true if is default; otherwise, false . Text The text displayed by this Button . Declaration public ustring Text { get; set; } Property Value Type Description NStack.ustring Methods MouseEvent(MouseEvent) Declaration public override bool MouseEvent(MouseEvent me) Parameters Type Name Description MouseEvent me Returns Type Description System.Boolean Overrides Responder.MouseEvent(MouseEvent) PositionCursor() Declaration public override void PositionCursor() Overrides View.PositionCursor() ProcessColdKey(KeyEvent) Declaration public override bool ProcessColdKey(KeyEvent kb) Parameters Type Name Description KeyEvent kb Returns Type Description System.Boolean Overrides View.ProcessColdKey(KeyEvent) ProcessHotKey(KeyEvent) Declaration public override bool ProcessHotKey(KeyEvent kb) Parameters Type Name Description KeyEvent kb Returns Type Description System.Boolean Overrides View.ProcessHotKey(KeyEvent) ProcessKey(KeyEvent) Declaration public override bool ProcessKey(KeyEvent kb) Parameters Type Name Description KeyEvent kb Returns Type Description System.Boolean Overrides View.ProcessKey(KeyEvent) Redraw(Rect) Declaration public override void Redraw(Rect region) Parameters Type Name Description Rect region Overrides View.Redraw(Rect) Implements System.Collections.IEnumerable" + "keywords": "Class Button Button is a View that provides an item that invokes an System.Action when activated by the user. Inheritance System.Object Responder View Button Implements System.Collections.IEnumerable Inherited Members View.Enter View.Leave View.MouseEnter View.MouseLeave View.Driver View.Subviews View.Id View.IsCurrentTop View.WantMousePositionReports View.WantContinuousButtonPressed View.Frame View.GetEnumerator() View.LayoutStyle View.Bounds View.X View.Y View.Width View.Height View.SuperView View.SetNeedsDisplay() View.SetNeedsDisplay(Rect) View.ChildNeedsDisplay() 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) View.HasFocus View.OnEnter() View.OnLeave() View.Focused View.MostFocused View.ColorScheme View.AddRune(Int32, Int32, Rune) View.ClearNeedsDisplay() View.SetFocus(View) View.KeyPress View.KeyDown View.OnKeyDown(KeyEvent) View.KeyUp View.OnKeyUp(KeyEvent) View.EnsureFocus() View.FocusFirst() View.FocusLast() View.FocusPrev() View.FocusNext() View.LayoutSubviews() View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) Responder.CanFocus System.Object.Equals(System.Object) System.Object.Equals(System.Object, System.Object) System.Object.GetHashCode() System.Object.GetType() System.Object.MemberwiseClone() System.Object.ReferenceEquals(System.Object, System.Object) Namespace : Terminal.Gui Assembly : Terminal.Gui.dll Syntax public class Button : View, IEnumerable Remarks Provides a button showing text invokes an System.Action when clicked on with a mouse or when the user presses SPACE, ENTER, or hotkey. The hotkey is specified by the first uppercase letter in the button. When the button is configured as the default ( IsDefault ) and the user presses the ENTER key, if no other View processes the KeyEvent , the Button 's System.Action will be invoked. Constructors Button(ustring, Boolean) Initializes a new instance of Button based on the given text at position 0,0 Declaration public Button(ustring text, bool is_default = false) Parameters Type Name Description NStack.ustring text The button's text System.Boolean is_default If set, this makes the button the default button in the current view. IsDefault Remarks The size of the Button is computed based on the text length. Button(Int32, Int32, ustring) Initializes a new instance of Button at the given coordinates, based on the given text Declaration public Button(int x, int y, ustring text) Parameters Type Name Description System.Int32 x X position where the button will be shown. System.Int32 y Y position where the button will be shown. NStack.ustring text The button's text Remarks The size of the Button is computed based on the text length. Button(Int32, Int32, ustring, Boolean) Initializes a new instance of Button at the given coordinates, based on the given text, and with the specified IsDefault value Declaration public Button(int x, int y, ustring text, bool is_default) Parameters Type Name Description System.Int32 x X position where the button will be shown. System.Int32 y Y position where the button will be shown. NStack.ustring text The button's text System.Boolean is_default If set, this makes the button the default button in the current view, which means that if the user presses return on a view that does not handle return, it will be treated as if he had clicked on the button Remarks If the value for is_default is true, a special decoration is used, and the enter key on a dialog would implicitly activate this button. Fields Clicked Clicked System.Action , raised when the button is clicked. Declaration public Action Clicked Field Value Type Description System.Action Remarks Client code can hook up to this event, it is raised when the button is activated either with the mouse or the keyboard. Properties IsDefault Gets or sets whether the Button is the default action to activate in a dialog. Declaration public bool IsDefault { get; set; } Property Value Type Description System.Boolean true if is default; otherwise, false . Text The text displayed by this Button . Declaration public ustring Text { get; set; } Property Value Type Description NStack.ustring Methods MouseEvent(MouseEvent) Declaration public override bool MouseEvent(MouseEvent me) Parameters Type Name Description MouseEvent me Returns Type Description System.Boolean Overrides Responder.MouseEvent(MouseEvent) PositionCursor() Declaration public override void PositionCursor() Overrides View.PositionCursor() ProcessColdKey(KeyEvent) Declaration public override bool ProcessColdKey(KeyEvent kb) Parameters Type Name Description KeyEvent kb Returns Type Description System.Boolean Overrides View.ProcessColdKey(KeyEvent) ProcessHotKey(KeyEvent) Declaration public override bool ProcessHotKey(KeyEvent kb) Parameters Type Name Description KeyEvent kb Returns Type Description System.Boolean Overrides View.ProcessHotKey(KeyEvent) ProcessKey(KeyEvent) Declaration public override bool ProcessKey(KeyEvent kb) Parameters Type Name Description KeyEvent kb Returns Type Description System.Boolean Overrides View.ProcessKey(KeyEvent) Redraw(Rect) Declaration public override void Redraw(Rect region) Parameters Type Name Description Rect region Overrides View.Redraw(Rect) Implements System.Collections.IEnumerable" }, "api/Terminal.Gui/Terminal.Gui.CheckBox.html": { "href": "api/Terminal.Gui/Terminal.Gui.CheckBox.html", "title": "Class CheckBox", - "keywords": "Class CheckBox The CheckBox View shows an on/off toggle that the user can set Inheritance System.Object Responder View CheckBox Implements System.Collections.IEnumerable Inherited Members View.Enter View.Leave View.MouseEnter View.MouseLeave View.Driver View.Subviews View.Id View.WantMousePositionReports View.WantContinuousButtonPressed View.Frame View.GetEnumerator() View.LayoutStyle View.Bounds View.X View.Y View.Width View.Height View.SuperView View.SetNeedsDisplay() View.SetNeedsDisplay(Rect) View.ChildNeedsDisplay() 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) View.HasFocus View.OnEnter() View.OnLeave() View.Focused View.MostFocused View.ColorScheme View.AddRune(Int32, Int32, Rune) View.ClearNeedsDisplay() View.SetFocus(View) View.KeyPress View.ProcessHotKey(KeyEvent) View.ProcessColdKey(KeyEvent) View.KeyDown View.OnKeyDown(KeyEvent) View.KeyUp View.OnKeyUp(KeyEvent) View.EnsureFocus() View.FocusFirst() View.FocusLast() View.FocusPrev() View.FocusNext() View.LayoutSubviews() View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) Responder.CanFocus System.Object.Equals(System.Object) System.Object.Equals(System.Object, System.Object) System.Object.GetHashCode() System.Object.GetType() System.Object.MemberwiseClone() System.Object.ReferenceEquals(System.Object, System.Object) Namespace : Terminal.Gui Assembly : Terminal.Gui.dll Syntax public class CheckBox : View, IEnumerable Constructors CheckBox(ustring, Boolean) Initializes a new instance of CheckBox based on the given text, uses Computed layout and sets the height and width. Declaration public CheckBox(ustring s, bool is_checked = false) Parameters Type Name Description NStack.ustring s S. System.Boolean is_checked If set to true is checked. CheckBox(Int32, Int32, ustring) Initializes a new instance of CheckBox based on the given text at the given position and a state. Declaration public CheckBox(int x, int y, ustring s) Parameters Type Name Description System.Int32 x System.Int32 y NStack.ustring s Remarks The size of CheckBox is computed based on the text length. This CheckBox is not toggled. CheckBox(Int32, Int32, ustring, Boolean) Initializes a new instance of CheckBox based on the given text at the given position and a state. Declaration public CheckBox(int x, int y, ustring s, bool is_checked) Parameters Type Name Description System.Int32 x System.Int32 y NStack.ustring s System.Boolean is_checked Remarks The size of CheckBox is computed based on the text length. Properties Checked The state of the CheckBox Declaration public bool Checked { get; set; } Property Value Type Description System.Boolean Text The text displayed by this CheckBox Declaration public ustring Text { get; set; } Property Value Type Description NStack.ustring Methods MouseEvent(MouseEvent) Declaration public override bool MouseEvent(MouseEvent me) Parameters Type Name Description MouseEvent me Returns Type Description System.Boolean Overrides Responder.MouseEvent(MouseEvent) PositionCursor() Declaration public override void PositionCursor() Overrides View.PositionCursor() ProcessKey(KeyEvent) Declaration public override bool ProcessKey(KeyEvent kb) Parameters Type Name Description KeyEvent kb Returns Type Description System.Boolean Overrides View.ProcessKey(KeyEvent) Redraw(Rect) Declaration public override void Redraw(Rect region) Parameters Type Name Description Rect region Overrides View.Redraw(Rect) Events Toggled Toggled event, raised when the CheckBox is toggled. Declaration public event EventHandler Toggled Event Type Type Description System.EventHandler Remarks Client code can hook up to this event, it is raised when the CheckBox is activated either with the mouse or the keyboard. Implements System.Collections.IEnumerable" + "keywords": "Class CheckBox The CheckBox View shows an on/off toggle that the user can set Inheritance System.Object Responder View CheckBox Implements System.Collections.IEnumerable Inherited Members View.Enter View.Leave View.MouseEnter View.MouseLeave View.Driver View.Subviews View.Id View.IsCurrentTop View.WantMousePositionReports View.WantContinuousButtonPressed View.Frame View.GetEnumerator() View.LayoutStyle View.Bounds View.X View.Y View.Width View.Height View.SuperView View.SetNeedsDisplay() View.SetNeedsDisplay(Rect) View.ChildNeedsDisplay() 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) View.HasFocus View.OnEnter() View.OnLeave() View.Focused View.MostFocused View.ColorScheme View.AddRune(Int32, Int32, Rune) View.ClearNeedsDisplay() View.SetFocus(View) View.KeyPress View.ProcessHotKey(KeyEvent) View.ProcessColdKey(KeyEvent) View.KeyDown View.OnKeyDown(KeyEvent) View.KeyUp View.OnKeyUp(KeyEvent) View.EnsureFocus() View.FocusFirst() View.FocusLast() View.FocusPrev() View.FocusNext() View.LayoutSubviews() View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) Responder.CanFocus System.Object.Equals(System.Object) System.Object.Equals(System.Object, System.Object) System.Object.GetHashCode() System.Object.GetType() System.Object.MemberwiseClone() System.Object.ReferenceEquals(System.Object, System.Object) Namespace : Terminal.Gui Assembly : Terminal.Gui.dll Syntax public class CheckBox : View, IEnumerable Constructors CheckBox(ustring, Boolean) Initializes a new instance of CheckBox based on the given text, uses Computed layout and sets the height and width. Declaration public CheckBox(ustring s, bool is_checked = false) Parameters Type Name Description NStack.ustring s S. System.Boolean is_checked If set to true is checked. CheckBox(Int32, Int32, ustring) Initializes a new instance of CheckBox based on the given text at the given position and a state. Declaration public CheckBox(int x, int y, ustring s) Parameters Type Name Description System.Int32 x System.Int32 y NStack.ustring s Remarks The size of CheckBox is computed based on the text length. This CheckBox is not toggled. CheckBox(Int32, Int32, ustring, Boolean) Initializes a new instance of CheckBox based on the given text at the given position and a state. Declaration public CheckBox(int x, int y, ustring s, bool is_checked) Parameters Type Name Description System.Int32 x System.Int32 y NStack.ustring s System.Boolean is_checked Remarks The size of CheckBox is computed based on the text length. Properties Checked The state of the CheckBox Declaration public bool Checked { get; set; } Property Value Type Description System.Boolean Text The text displayed by this CheckBox Declaration public ustring Text { get; set; } Property Value Type Description NStack.ustring Methods MouseEvent(MouseEvent) Declaration public override bool MouseEvent(MouseEvent me) Parameters Type Name Description MouseEvent me Returns Type Description System.Boolean Overrides Responder.MouseEvent(MouseEvent) PositionCursor() Declaration public override void PositionCursor() Overrides View.PositionCursor() ProcessKey(KeyEvent) Declaration public override bool ProcessKey(KeyEvent kb) Parameters Type Name Description KeyEvent kb Returns Type Description System.Boolean Overrides View.ProcessKey(KeyEvent) Redraw(Rect) Declaration public override void Redraw(Rect region) Parameters Type Name Description Rect region Overrides View.Redraw(Rect) Events Toggled Toggled event, raised when the CheckBox is toggled. Declaration public event EventHandler Toggled Event Type Type Description System.EventHandler Remarks Client code can hook up to this event, it is raised when the CheckBox is activated either with the mouse or the keyboard. Implements System.Collections.IEnumerable" }, "api/Terminal.Gui/Terminal.Gui.Clipboard.html": { "href": "api/Terminal.Gui/Terminal.Gui.Clipboard.html", @@ -77,7 +77,7 @@ "api/Terminal.Gui/Terminal.Gui.ComboBox.html": { "href": "api/Terminal.Gui/Terminal.Gui.ComboBox.html", "title": "Class ComboBox", - "keywords": "Class ComboBox ComboBox control Inheritance System.Object Responder View ComboBox Implements System.Collections.IEnumerable Inherited Members View.Enter View.Leave View.MouseEnter View.MouseLeave View.Driver View.Subviews View.Id View.WantMousePositionReports View.WantContinuousButtonPressed View.Frame View.GetEnumerator() View.LayoutStyle View.Bounds View.X View.Y View.Width View.Height View.SuperView View.SetNeedsDisplay() View.SetNeedsDisplay(Rect) View.ChildNeedsDisplay() 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) View.PositionCursor() View.HasFocus View.OnLeave() View.Focused View.MostFocused View.ColorScheme View.AddRune(Int32, Int32, Rune) View.ClearNeedsDisplay() View.Redraw(Rect) View.SetFocus(View) View.KeyPress View.ProcessHotKey(KeyEvent) View.ProcessColdKey(KeyEvent) View.KeyDown View.OnKeyDown(KeyEvent) View.KeyUp View.OnKeyUp(KeyEvent) View.EnsureFocus() View.FocusFirst() View.FocusLast() View.FocusPrev() View.FocusNext() View.LayoutSubviews() View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) Responder.CanFocus Responder.MouseEvent(MouseEvent) System.Object.Equals(System.Object) System.Object.Equals(System.Object, System.Object) System.Object.GetHashCode() System.Object.GetType() System.Object.MemberwiseClone() System.Object.ReferenceEquals(System.Object, System.Object) Namespace : Terminal.Gui Assembly : Terminal.Gui.dll Syntax public class ComboBox : View, IEnumerable Constructors ComboBox(Int32, Int32, Int32, Int32, IList) Public constructor Declaration public ComboBox(int x, int y, int w, int h, IList source) Parameters Type Name Description System.Int32 x The x coordinate System.Int32 y The y coordinate System.Int32 w The width System.Int32 h The height System.Collections.Generic.IList < System.String > source Auto completetion source Properties Text The currenlty selected list item Declaration public ustring Text { get; set; } Property Value Type Description NStack.ustring Methods OnEnter() Declaration public override bool OnEnter() Returns Type Description System.Boolean Overrides View.OnEnter() ProcessKey(KeyEvent) Declaration public override bool ProcessKey(KeyEvent e) Parameters Type Name Description KeyEvent e Returns Type Description System.Boolean Overrides View.ProcessKey(KeyEvent) Events Changed Changed event, raised when the selection has been confirmed. Declaration public event EventHandler Changed Event Type Type Description System.EventHandler < NStack.ustring > Remarks Client code can hook up to this event, it is raised when the selection has been confirmed. Implements System.Collections.IEnumerable" + "keywords": "Class ComboBox ComboBox control Inheritance System.Object Responder View ComboBox Implements System.Collections.IEnumerable Inherited Members View.Enter View.Leave View.MouseEnter View.MouseLeave View.Driver View.Subviews View.Id View.IsCurrentTop View.WantMousePositionReports View.WantContinuousButtonPressed View.Frame View.GetEnumerator() View.LayoutStyle View.Bounds View.X View.Y View.Width View.Height View.SuperView View.SetNeedsDisplay() View.SetNeedsDisplay(Rect) View.ChildNeedsDisplay() 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) View.PositionCursor() View.HasFocus View.OnLeave() View.Focused View.MostFocused View.ColorScheme View.AddRune(Int32, Int32, Rune) View.ClearNeedsDisplay() View.Redraw(Rect) View.SetFocus(View) View.KeyPress View.ProcessHotKey(KeyEvent) View.ProcessColdKey(KeyEvent) View.KeyDown View.OnKeyDown(KeyEvent) View.KeyUp View.OnKeyUp(KeyEvent) View.EnsureFocus() View.FocusFirst() View.FocusLast() View.FocusPrev() View.FocusNext() View.LayoutSubviews() View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) Responder.CanFocus Responder.MouseEvent(MouseEvent) System.Object.Equals(System.Object) System.Object.Equals(System.Object, System.Object) System.Object.GetHashCode() System.Object.GetType() System.Object.MemberwiseClone() System.Object.ReferenceEquals(System.Object, System.Object) Namespace : Terminal.Gui Assembly : Terminal.Gui.dll Syntax public class ComboBox : View, IEnumerable Constructors ComboBox(Int32, Int32, Int32, Int32, IList) Public constructor Declaration public ComboBox(int x, int y, int w, int h, IList source) Parameters Type Name Description System.Int32 x The x coordinate System.Int32 y The y coordinate System.Int32 w The width System.Int32 h The height System.Collections.Generic.IList < System.String > source Auto completetion source Properties Text The currenlty selected list item Declaration public ustring Text { get; set; } Property Value Type Description NStack.ustring Methods OnEnter() Declaration public override bool OnEnter() Returns Type Description System.Boolean Overrides View.OnEnter() ProcessKey(KeyEvent) Declaration public override bool ProcessKey(KeyEvent e) Parameters Type Name Description KeyEvent e Returns Type Description System.Boolean Overrides View.ProcessKey(KeyEvent) Events Changed Changed event, raised when the selection has been confirmed. Declaration public event EventHandler Changed Event Type Type Description System.EventHandler < NStack.ustring > Remarks Client code can hook up to this event, it is raised when the selection has been confirmed. Implements System.Collections.IEnumerable" }, "api/Terminal.Gui/Terminal.Gui.ConsoleDriver.html": { "href": "api/Terminal.Gui/Terminal.Gui.ConsoleDriver.html", @@ -92,12 +92,12 @@ "api/Terminal.Gui/Terminal.Gui.DateField.html": { "href": "api/Terminal.Gui/Terminal.Gui.DateField.html", "title": "Class DateField", - "keywords": "Class DateField Date editing View Inheritance System.Object Responder View TextField DateField Implements System.Collections.IEnumerable Inherited Members TextField.Used TextField.ReadOnly TextField.Changed TextField.OnLeave() TextField.Frame TextField.Text TextField.Secret TextField.CursorPosition TextField.PositionCursor() TextField.Redraw(Rect) TextField.CanFocus TextField.SelectedStart TextField.SelectedLength TextField.SelectedText TextField.ClearAllSelection() TextField.Copy() TextField.Cut() TextField.Paste() View.Enter View.Leave View.MouseEnter View.MouseLeave View.Driver View.Subviews View.Id View.WantMousePositionReports View.WantContinuousButtonPressed View.GetEnumerator() View.LayoutStyle View.Bounds View.X View.Y View.Width View.Height View.SuperView View.SetNeedsDisplay() View.SetNeedsDisplay(Rect) View.ChildNeedsDisplay() 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) View.HasFocus View.OnEnter() View.Focused View.MostFocused View.ColorScheme View.AddRune(Int32, Int32, Rune) View.ClearNeedsDisplay() View.SetFocus(View) View.KeyPress View.ProcessHotKey(KeyEvent) View.ProcessColdKey(KeyEvent) View.KeyDown View.OnKeyDown(KeyEvent) View.KeyUp View.OnKeyUp(KeyEvent) View.EnsureFocus() View.FocusFirst() View.FocusLast() View.FocusPrev() View.FocusNext() View.LayoutSubviews() View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) System.Object.Equals(System.Object) System.Object.Equals(System.Object, System.Object) System.Object.GetHashCode() System.Object.GetType() System.Object.MemberwiseClone() System.Object.ReferenceEquals(System.Object, System.Object) Namespace : Terminal.Gui Assembly : Terminal.Gui.dll Syntax public class DateField : TextField, IEnumerable Remarks The DateField View provides date editing functionality with mouse support. Constructors DateField(DateTime) Initializes a new instance of DateField Declaration public DateField(DateTime date) Parameters Type Name Description System.DateTime date DateField(Int32, Int32, DateTime, Boolean) Initializes a new instance of DateField at an absolute position and fixed size. Declaration public DateField(int x, int y, DateTime date, bool isShort = false) Parameters Type Name Description System.Int32 x The x coordinate. System.Int32 y The y coordinate. System.DateTime date Initial date contents. System.Boolean isShort If true, shows only two digits for the year. Properties Date Gets or sets the date of the DateField . Declaration public DateTime Date { get; set; } Property Value Type Description System.DateTime Remarks IsShortFormat Get or set the data format for the widget. Declaration public bool IsShortFormat { get; set; } Property Value Type Description System.Boolean Methods MouseEvent(MouseEvent) Declaration public override bool MouseEvent(MouseEvent ev) Parameters Type Name Description MouseEvent ev Returns Type Description System.Boolean Overrides TextField.MouseEvent(MouseEvent) ProcessKey(KeyEvent) Declaration public override bool ProcessKey(KeyEvent kb) Parameters Type Name Description KeyEvent kb Returns Type Description System.Boolean Overrides TextField.ProcessKey(KeyEvent) Implements System.Collections.IEnumerable" + "keywords": "Class DateField Date editing View Inheritance System.Object Responder View TextField DateField Implements System.Collections.IEnumerable Inherited Members TextField.Used TextField.ReadOnly TextField.Changed TextField.OnLeave() TextField.Frame TextField.Text TextField.Secret TextField.CursorPosition TextField.PositionCursor() TextField.Redraw(Rect) TextField.CanFocus TextField.SelectedStart TextField.SelectedLength TextField.SelectedText TextField.ClearAllSelection() TextField.Copy() TextField.Cut() TextField.Paste() View.Enter View.Leave View.MouseEnter View.MouseLeave View.Driver View.Subviews View.Id View.IsCurrentTop View.WantMousePositionReports View.WantContinuousButtonPressed View.GetEnumerator() View.LayoutStyle View.Bounds View.X View.Y View.Width View.Height View.SuperView View.SetNeedsDisplay() View.SetNeedsDisplay(Rect) View.ChildNeedsDisplay() 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) View.HasFocus View.OnEnter() View.Focused View.MostFocused View.ColorScheme View.AddRune(Int32, Int32, Rune) View.ClearNeedsDisplay() View.SetFocus(View) View.KeyPress View.ProcessHotKey(KeyEvent) View.ProcessColdKey(KeyEvent) View.KeyDown View.OnKeyDown(KeyEvent) View.KeyUp View.OnKeyUp(KeyEvent) View.EnsureFocus() View.FocusFirst() View.FocusLast() View.FocusPrev() View.FocusNext() View.LayoutSubviews() View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) System.Object.Equals(System.Object) System.Object.Equals(System.Object, System.Object) System.Object.GetHashCode() System.Object.GetType() System.Object.MemberwiseClone() System.Object.ReferenceEquals(System.Object, System.Object) Namespace : Terminal.Gui Assembly : Terminal.Gui.dll Syntax public class DateField : TextField, IEnumerable Remarks The DateField View provides date editing functionality with mouse support. Constructors DateField(DateTime) Initializes a new instance of DateField Declaration public DateField(DateTime date) Parameters Type Name Description System.DateTime date DateField(Int32, Int32, DateTime, Boolean) Initializes a new instance of DateField at an absolute position and fixed size. Declaration public DateField(int x, int y, DateTime date, bool isShort = false) Parameters Type Name Description System.Int32 x The x coordinate. System.Int32 y The y coordinate. System.DateTime date Initial date contents. System.Boolean isShort If true, shows only two digits for the year. Properties Date Gets or sets the date of the DateField . Declaration public DateTime Date { get; set; } Property Value Type Description System.DateTime Remarks IsShortFormat Get or set the data format for the widget. Declaration public bool IsShortFormat { get; set; } Property Value Type Description System.Boolean Methods MouseEvent(MouseEvent) Declaration public override bool MouseEvent(MouseEvent ev) Parameters Type Name Description MouseEvent ev Returns Type Description System.Boolean Overrides TextField.MouseEvent(MouseEvent) ProcessKey(KeyEvent) Declaration public override bool ProcessKey(KeyEvent kb) Parameters Type Name Description KeyEvent kb Returns Type Description System.Boolean Overrides TextField.ProcessKey(KeyEvent) Implements System.Collections.IEnumerable" }, "api/Terminal.Gui/Terminal.Gui.Dialog.html": { "href": "api/Terminal.Gui/Terminal.Gui.Dialog.html", "title": "Class Dialog", - "keywords": "Class Dialog The Dialog View is a Window that by default is centered and contains one or more Button . It defaults to the Dialog color scheme and has a 1 cell padding around the edges. Inheritance System.Object Responder View Toplevel Window Dialog FileDialog Implements System.Collections.IEnumerable Inherited Members Window.Title Window.GetEnumerator() Window.Add(View) Window.Remove(View) Window.RemoveAll() Window.Redraw(Rect) Window.MouseEvent(MouseEvent) Toplevel.Running Toplevel.Ready Toplevel.Create() Toplevel.CanFocus Toplevel.Modal Toplevel.MenuBar Toplevel.StatusBar Toplevel.WillPresent() View.Enter View.Leave View.MouseEnter View.MouseLeave View.Driver View.Subviews View.Id View.WantMousePositionReports View.WantContinuousButtonPressed View.Frame View.LayoutStyle View.Bounds View.X View.Y View.Width View.Height View.SuperView View.SetNeedsDisplay() View.SetNeedsDisplay(Rect) View.ChildNeedsDisplay() View.Add(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) View.PositionCursor() View.HasFocus View.OnEnter() View.OnLeave() View.Focused View.MostFocused View.ColorScheme View.AddRune(Int32, Int32, Rune) View.ClearNeedsDisplay() View.SetFocus(View) View.KeyPress View.ProcessHotKey(KeyEvent) View.ProcessColdKey(KeyEvent) View.KeyDown View.OnKeyDown(KeyEvent) View.KeyUp View.OnKeyUp(KeyEvent) View.EnsureFocus() View.FocusFirst() View.FocusLast() View.FocusPrev() View.FocusNext() View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) System.Object.Equals(System.Object) System.Object.Equals(System.Object, System.Object) System.Object.GetHashCode() System.Object.GetType() System.Object.MemberwiseClone() System.Object.ReferenceEquals(System.Object, System.Object) Namespace : Terminal.Gui Assembly : Terminal.Gui.dll Syntax public class Dialog : Window, IEnumerable Remarks To run the Dialog modally, create the Dialog , and pass it to Run() . This will execute the dialog until it terminates via the [ESC] or [CTRL-Q] key, or when one of the views or buttons added to the dialog calls RequestStop() . Constructors Dialog(ustring, Int32, Int32, Button[]) Initializes a new instance of the Dialog class with an optional set of Button s to display Declaration public Dialog(ustring title, int width, int height, params Button[] buttons) Parameters Type Name Description NStack.ustring title Title for the dialog. System.Int32 width Width for the dialog. System.Int32 height Height for the dialog. Button [] buttons Optional buttons to lay out at the bottom of the dialog. Methods AddButton(Button) Adds a Button to the Dialog , its layout will be controled by the Dialog Declaration public void AddButton(Button button) Parameters Type Name Description Button button Button to add. LayoutSubviews() Declaration public override void LayoutSubviews() Overrides View.LayoutSubviews() ProcessKey(KeyEvent) Declaration public override bool ProcessKey(KeyEvent kb) Parameters Type Name Description KeyEvent kb Returns Type Description System.Boolean Overrides Toplevel.ProcessKey(KeyEvent) Implements System.Collections.IEnumerable" + "keywords": "Class Dialog The Dialog View is a Window that by default is centered and contains one or more Button . It defaults to the Dialog color scheme and has a 1 cell padding around the edges. Inheritance System.Object Responder View Toplevel Window Dialog FileDialog Implements System.Collections.IEnumerable Inherited Members Window.Title Window.GetEnumerator() Window.Add(View) Window.Remove(View) Window.RemoveAll() Window.Redraw(Rect) Window.MouseEvent(MouseEvent) Toplevel.Running Toplevel.Ready Toplevel.Create() Toplevel.CanFocus Toplevel.Modal Toplevel.MenuBar Toplevel.StatusBar Toplevel.WillPresent() View.Enter View.Leave View.MouseEnter View.MouseLeave View.Driver View.Subviews View.Id View.IsCurrentTop View.WantMousePositionReports View.WantContinuousButtonPressed View.Frame View.LayoutStyle View.Bounds View.X View.Y View.Width View.Height View.SuperView View.SetNeedsDisplay() View.SetNeedsDisplay(Rect) View.ChildNeedsDisplay() View.Add(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) View.PositionCursor() View.HasFocus View.OnEnter() View.OnLeave() View.Focused View.MostFocused View.ColorScheme View.AddRune(Int32, Int32, Rune) View.ClearNeedsDisplay() View.SetFocus(View) View.KeyPress View.ProcessHotKey(KeyEvent) View.ProcessColdKey(KeyEvent) View.KeyDown View.OnKeyDown(KeyEvent) View.KeyUp View.OnKeyUp(KeyEvent) View.EnsureFocus() View.FocusFirst() View.FocusLast() View.FocusPrev() View.FocusNext() View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) System.Object.Equals(System.Object) System.Object.Equals(System.Object, System.Object) System.Object.GetHashCode() System.Object.GetType() System.Object.MemberwiseClone() System.Object.ReferenceEquals(System.Object, System.Object) Namespace : Terminal.Gui Assembly : Terminal.Gui.dll Syntax public class Dialog : Window, IEnumerable Remarks To run the Dialog modally, create the Dialog , and pass it to Run() . This will execute the dialog until it terminates via the [ESC] or [CTRL-Q] key, or when one of the views or buttons added to the dialog calls RequestStop() . Constructors Dialog(ustring, Int32, Int32, Button[]) Initializes a new instance of the Dialog class with an optional set of Button s to display Declaration public Dialog(ustring title, int width, int height, params Button[] buttons) Parameters Type Name Description NStack.ustring title Title for the dialog. System.Int32 width Width for the dialog. System.Int32 height Height for the dialog. Button [] buttons Optional buttons to lay out at the bottom of the dialog. Methods AddButton(Button) Adds a Button to the Dialog , its layout will be controled by the Dialog Declaration public void AddButton(Button button) Parameters Type Name Description Button button Button to add. LayoutSubviews() Declaration public override void LayoutSubviews() Overrides View.LayoutSubviews() ProcessKey(KeyEvent) Declaration public override bool ProcessKey(KeyEvent kb) Parameters Type Name Description KeyEvent kb Returns Type Description System.Boolean Overrides Toplevel.ProcessKey(KeyEvent) Implements System.Collections.IEnumerable" }, "api/Terminal.Gui/Terminal.Gui.Dim.html": { "href": "api/Terminal.Gui/Terminal.Gui.Dim.html", @@ -107,17 +107,17 @@ "api/Terminal.Gui/Terminal.Gui.FileDialog.html": { "href": "api/Terminal.Gui/Terminal.Gui.FileDialog.html", "title": "Class FileDialog", - "keywords": "Class FileDialog Base class for the OpenDialog and the SaveDialog Inheritance System.Object Responder View Toplevel Window Dialog FileDialog OpenDialog SaveDialog Implements System.Collections.IEnumerable Inherited Members Dialog.AddButton(Button) Dialog.LayoutSubviews() Dialog.ProcessKey(KeyEvent) Window.Title Window.GetEnumerator() Window.Add(View) Window.Remove(View) Window.RemoveAll() Window.Redraw(Rect) Window.MouseEvent(MouseEvent) Toplevel.Running Toplevel.Ready Toplevel.Create() Toplevel.CanFocus Toplevel.Modal Toplevel.MenuBar Toplevel.StatusBar View.Enter View.Leave View.MouseEnter View.MouseLeave View.Driver View.Subviews View.Id View.WantMousePositionReports View.WantContinuousButtonPressed View.Frame View.LayoutStyle View.Bounds View.X View.Y View.Width View.Height View.SuperView View.SetNeedsDisplay() View.SetNeedsDisplay(Rect) View.ChildNeedsDisplay() View.Add(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) View.PositionCursor() View.HasFocus View.OnEnter() View.OnLeave() View.Focused View.MostFocused View.ColorScheme View.AddRune(Int32, Int32, Rune) View.ClearNeedsDisplay() View.SetFocus(View) View.KeyPress View.ProcessHotKey(KeyEvent) View.ProcessColdKey(KeyEvent) View.KeyDown View.OnKeyDown(KeyEvent) View.KeyUp View.OnKeyUp(KeyEvent) View.EnsureFocus() View.FocusFirst() View.FocusLast() View.FocusPrev() View.FocusNext() View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) System.Object.Equals(System.Object) System.Object.Equals(System.Object, System.Object) System.Object.GetHashCode() System.Object.GetType() System.Object.MemberwiseClone() System.Object.ReferenceEquals(System.Object, System.Object) Namespace : Terminal.Gui Assembly : Terminal.Gui.dll Syntax public class FileDialog : Dialog, IEnumerable Constructors FileDialog(ustring, ustring, ustring, ustring) Initializes a new instance of FileDialog Declaration public FileDialog(ustring title, ustring prompt, ustring nameFieldLabel, ustring message) Parameters Type Name Description NStack.ustring title The title. NStack.ustring prompt The prompt. NStack.ustring nameFieldLabel The name field label. NStack.ustring message The message. Properties AllowedFileTypes The array of filename extensions allowed, or null if all file extensions are allowed. Declaration public string[] AllowedFileTypes { get; set; } Property Value Type Description System.String [] The allowed file types. AllowsOtherFileTypes Gets or sets a value indicating whether this FileDialog allows the file to be saved with a different extension Declaration public bool AllowsOtherFileTypes { get; set; } Property Value Type Description System.Boolean true if allows other file types; otherwise, false . Canceled Check if the dialog was or not canceled. Declaration public bool Canceled { get; } Property Value Type Description System.Boolean CanCreateDirectories Gets or sets a value indicating whether this FileDialog can create directories. Declaration public bool CanCreateDirectories { get; set; } Property Value Type Description System.Boolean true if can create directories; otherwise, false . DirectoryPath Gets or sets the directory path for this panel Declaration public ustring DirectoryPath { get; set; } Property Value Type Description NStack.ustring The directory path. FilePath The File path that is currently shown on the panel Declaration public ustring FilePath { get; set; } Property Value Type Description NStack.ustring The absolute file path for the file path entered. IsExtensionHidden Gets or sets a value indicating whether this FileDialog is extension hidden. Declaration public bool IsExtensionHidden { get; set; } Property Value Type Description System.Boolean true if is extension hidden; otherwise, false . Message Gets or sets the message displayed to the user, defaults to nothing Declaration public ustring Message { get; set; } Property Value Type Description NStack.ustring The message. NameFieldLabel Gets or sets the name field label. Declaration public ustring NameFieldLabel { get; set; } Property Value Type Description NStack.ustring The name field label. Prompt Gets or sets the prompt label for the Button displayed to the user Declaration public ustring Prompt { get; set; } Property Value Type Description NStack.ustring The prompt. Methods WillPresent() Declaration public override void WillPresent() Overrides Toplevel.WillPresent() Implements System.Collections.IEnumerable" + "keywords": "Class FileDialog Base class for the OpenDialog and the SaveDialog Inheritance System.Object Responder View Toplevel Window Dialog FileDialog OpenDialog SaveDialog Implements System.Collections.IEnumerable Inherited Members Dialog.AddButton(Button) Dialog.LayoutSubviews() Dialog.ProcessKey(KeyEvent) Window.Title Window.GetEnumerator() Window.Add(View) Window.Remove(View) Window.RemoveAll() Window.Redraw(Rect) Window.MouseEvent(MouseEvent) Toplevel.Running Toplevel.Ready Toplevel.Create() Toplevel.CanFocus Toplevel.Modal Toplevel.MenuBar Toplevel.StatusBar View.Enter View.Leave View.MouseEnter View.MouseLeave View.Driver View.Subviews View.Id View.IsCurrentTop View.WantMousePositionReports View.WantContinuousButtonPressed View.Frame View.LayoutStyle View.Bounds View.X View.Y View.Width View.Height View.SuperView View.SetNeedsDisplay() View.SetNeedsDisplay(Rect) View.ChildNeedsDisplay() View.Add(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) View.PositionCursor() View.HasFocus View.OnEnter() View.OnLeave() View.Focused View.MostFocused View.ColorScheme View.AddRune(Int32, Int32, Rune) View.ClearNeedsDisplay() View.SetFocus(View) View.KeyPress View.ProcessHotKey(KeyEvent) View.ProcessColdKey(KeyEvent) View.KeyDown View.OnKeyDown(KeyEvent) View.KeyUp View.OnKeyUp(KeyEvent) View.EnsureFocus() View.FocusFirst() View.FocusLast() View.FocusPrev() View.FocusNext() View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) System.Object.Equals(System.Object) System.Object.Equals(System.Object, System.Object) System.Object.GetHashCode() System.Object.GetType() System.Object.MemberwiseClone() System.Object.ReferenceEquals(System.Object, System.Object) Namespace : Terminal.Gui Assembly : Terminal.Gui.dll Syntax public class FileDialog : Dialog, IEnumerable Constructors FileDialog(ustring, ustring, ustring, ustring) Initializes a new instance of FileDialog Declaration public FileDialog(ustring title, ustring prompt, ustring nameFieldLabel, ustring message) Parameters Type Name Description NStack.ustring title The title. NStack.ustring prompt The prompt. NStack.ustring nameFieldLabel The name field label. NStack.ustring message The message. Properties AllowedFileTypes The array of filename extensions allowed, or null if all file extensions are allowed. Declaration public string[] AllowedFileTypes { get; set; } Property Value Type Description System.String [] The allowed file types. AllowsOtherFileTypes Gets or sets a value indicating whether this FileDialog allows the file to be saved with a different extension Declaration public bool AllowsOtherFileTypes { get; set; } Property Value Type Description System.Boolean true if allows other file types; otherwise, false . Canceled Check if the dialog was or not canceled. Declaration public bool Canceled { get; } Property Value Type Description System.Boolean CanCreateDirectories Gets or sets a value indicating whether this FileDialog can create directories. Declaration public bool CanCreateDirectories { get; set; } Property Value Type Description System.Boolean true if can create directories; otherwise, false . DirectoryPath Gets or sets the directory path for this panel Declaration public ustring DirectoryPath { get; set; } Property Value Type Description NStack.ustring The directory path. FilePath The File path that is currently shown on the panel Declaration public ustring FilePath { get; set; } Property Value Type Description NStack.ustring The absolute file path for the file path entered. IsExtensionHidden Gets or sets a value indicating whether this FileDialog is extension hidden. Declaration public bool IsExtensionHidden { get; set; } Property Value Type Description System.Boolean true if is extension hidden; otherwise, false . Message Gets or sets the message displayed to the user, defaults to nothing Declaration public ustring Message { get; set; } Property Value Type Description NStack.ustring The message. NameFieldLabel Gets or sets the name field label. Declaration public ustring NameFieldLabel { get; set; } Property Value Type Description NStack.ustring The name field label. Prompt Gets or sets the prompt label for the Button displayed to the user Declaration public ustring Prompt { get; set; } Property Value Type Description NStack.ustring The prompt. Methods WillPresent() Declaration public override void WillPresent() Overrides Toplevel.WillPresent() Implements System.Collections.IEnumerable" }, "api/Terminal.Gui/Terminal.Gui.FrameView.html": { "href": "api/Terminal.Gui/Terminal.Gui.FrameView.html", "title": "Class FrameView", - "keywords": "Class FrameView The FrameView is a container frame that draws a frame around the contents. It is similar to a GroupBox in Windows. Inheritance System.Object Responder View FrameView Implements System.Collections.IEnumerable Inherited Members View.Enter View.Leave View.MouseEnter View.MouseLeave View.Driver View.Subviews View.Id View.WantMousePositionReports View.WantContinuousButtonPressed View.Frame View.GetEnumerator() View.LayoutStyle View.Bounds View.X View.Y View.Width View.Height View.SuperView View.SetNeedsDisplay() View.SetNeedsDisplay(Rect) View.ChildNeedsDisplay() View.Add(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) View.PositionCursor() View.HasFocus View.OnEnter() View.OnLeave() View.Focused View.MostFocused View.ColorScheme View.AddRune(Int32, Int32, Rune) View.ClearNeedsDisplay() View.SetFocus(View) View.KeyPress View.ProcessKey(KeyEvent) View.ProcessHotKey(KeyEvent) View.ProcessColdKey(KeyEvent) View.KeyDown View.OnKeyDown(KeyEvent) View.KeyUp View.OnKeyUp(KeyEvent) View.EnsureFocus() View.FocusFirst() View.FocusLast() View.FocusPrev() View.FocusNext() View.LayoutSubviews() View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) Responder.CanFocus Responder.MouseEvent(MouseEvent) System.Object.Equals(System.Object) System.Object.Equals(System.Object, System.Object) System.Object.GetHashCode() System.Object.GetType() System.Object.MemberwiseClone() System.Object.ReferenceEquals(System.Object, System.Object) Namespace : Terminal.Gui Assembly : Terminal.Gui.dll Syntax public class FrameView : View, IEnumerable Constructors FrameView(ustring) Initializes a new instance of the FrameView class with a title and the result is suitable to have its X, Y, Width and Height properties computed. Declaration public FrameView(ustring title) Parameters Type Name Description NStack.ustring title Title. FrameView(Rect, ustring) Initializes a new instance of the FrameView class with an absolute position and a title. Declaration public FrameView(Rect frame, ustring title) Parameters Type Name Description Rect frame Frame. NStack.ustring title Title. FrameView(Rect, ustring, View[]) Initializes a new instance of the FrameView class with an absolute position, a title and View s. Declaration public FrameView(Rect frame, ustring title, View[] views) Parameters Type Name Description Rect frame Frame. NStack.ustring title Title. View [] views Views. Properties Title The title to be displayed for this FrameView . Declaration public ustring Title { get; set; } Property Value Type Description NStack.ustring The title. Methods Add(View) Add the specified View to this container. Declaration public override void Add(View view) Parameters Type Name Description View view View to add to this container Overrides View.Add(View) Redraw(Rect) Declaration public override void Redraw(Rect bounds) Parameters Type Name Description Rect bounds Overrides View.Redraw(Rect) Remove(View) Removes a View from this container. Declaration public override void Remove(View view) Parameters Type Name Description View view Overrides View.Remove(View) Remarks RemoveAll() Removes all View s from this container. Declaration public override void RemoveAll() Overrides View.RemoveAll() Remarks Implements System.Collections.IEnumerable" + "keywords": "Class FrameView The FrameView is a container frame that draws a frame around the contents. It is similar to a GroupBox in Windows. Inheritance System.Object Responder View FrameView Implements System.Collections.IEnumerable Inherited Members View.Enter View.Leave View.MouseEnter View.MouseLeave View.Driver View.Subviews View.Id View.IsCurrentTop View.WantMousePositionReports View.WantContinuousButtonPressed View.Frame View.GetEnumerator() View.LayoutStyle View.Bounds View.X View.Y View.Width View.Height View.SuperView View.SetNeedsDisplay() View.SetNeedsDisplay(Rect) View.ChildNeedsDisplay() View.Add(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) View.PositionCursor() View.HasFocus View.OnEnter() View.OnLeave() View.Focused View.MostFocused View.ColorScheme View.AddRune(Int32, Int32, Rune) View.ClearNeedsDisplay() View.SetFocus(View) View.KeyPress View.ProcessKey(KeyEvent) View.ProcessHotKey(KeyEvent) View.ProcessColdKey(KeyEvent) View.KeyDown View.OnKeyDown(KeyEvent) View.KeyUp View.OnKeyUp(KeyEvent) View.EnsureFocus() View.FocusFirst() View.FocusLast() View.FocusPrev() View.FocusNext() View.LayoutSubviews() View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) Responder.CanFocus Responder.MouseEvent(MouseEvent) System.Object.Equals(System.Object) System.Object.Equals(System.Object, System.Object) System.Object.GetHashCode() System.Object.GetType() System.Object.MemberwiseClone() System.Object.ReferenceEquals(System.Object, System.Object) Namespace : Terminal.Gui Assembly : Terminal.Gui.dll Syntax public class FrameView : View, IEnumerable Constructors FrameView(ustring) Initializes a new instance of the FrameView class with a title and the result is suitable to have its X, Y, Width and Height properties computed. Declaration public FrameView(ustring title) Parameters Type Name Description NStack.ustring title Title. FrameView(Rect, ustring) Initializes a new instance of the FrameView class with an absolute position and a title. Declaration public FrameView(Rect frame, ustring title) Parameters Type Name Description Rect frame Frame. NStack.ustring title Title. FrameView(Rect, ustring, View[]) Initializes a new instance of the FrameView class with an absolute position, a title and View s. Declaration public FrameView(Rect frame, ustring title, View[] views) Parameters Type Name Description Rect frame Frame. NStack.ustring title Title. View [] views Views. Properties Title The title to be displayed for this FrameView . Declaration public ustring Title { get; set; } Property Value Type Description NStack.ustring The title. Methods Add(View) Add the specified View to this container. Declaration public override void Add(View view) Parameters Type Name Description View view View to add to this container Overrides View.Add(View) Redraw(Rect) Declaration public override void Redraw(Rect bounds) Parameters Type Name Description Rect bounds Overrides View.Redraw(Rect) Remove(View) Removes a View from this container. Declaration public override void Remove(View view) Parameters Type Name Description View view Overrides View.Remove(View) Remarks RemoveAll() Removes all View s from this container. Declaration public override void RemoveAll() Overrides View.RemoveAll() Remarks Implements System.Collections.IEnumerable" }, "api/Terminal.Gui/Terminal.Gui.HexView.html": { "href": "api/Terminal.Gui/Terminal.Gui.HexView.html", "title": "Class HexView", - "keywords": "Class HexView An hex viewer and editor View over a System.IO.Stream Inheritance System.Object Responder View HexView Implements System.Collections.IEnumerable Inherited Members View.Enter View.Leave View.MouseEnter View.MouseLeave View.Driver View.Subviews View.Id View.WantMousePositionReports View.WantContinuousButtonPressed View.GetEnumerator() View.LayoutStyle View.Bounds View.X View.Y View.Width View.Height View.SuperView View.SetNeedsDisplay() View.SetNeedsDisplay(Rect) View.ChildNeedsDisplay() 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) View.HasFocus View.OnEnter() View.OnLeave() View.Focused View.MostFocused View.ColorScheme View.AddRune(Int32, Int32, Rune) View.ClearNeedsDisplay() View.SetFocus(View) View.KeyPress View.ProcessHotKey(KeyEvent) View.ProcessColdKey(KeyEvent) View.KeyDown View.OnKeyDown(KeyEvent) View.KeyUp View.OnKeyUp(KeyEvent) View.EnsureFocus() View.FocusFirst() View.FocusLast() View.FocusPrev() View.FocusNext() View.LayoutSubviews() View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) Responder.CanFocus Responder.MouseEvent(MouseEvent) System.Object.Equals(System.Object) System.Object.Equals(System.Object, System.Object) System.Object.GetHashCode() System.Object.GetType() System.Object.MemberwiseClone() System.Object.ReferenceEquals(System.Object, System.Object) Namespace : Terminal.Gui Assembly : Terminal.Gui.dll Syntax public class HexView : View, IEnumerable Remarks HexView provides a hex editor on top of a seekable System.IO.Stream with the left side showing an hex dump of the values in the System.IO.Stream and the right side showing the contents (filterd to non-control sequence ASCII characters). Users can switch from one side to the other by using the tab key. To enable editing, set AllowEdits to true. When AllowEdits is true the user can make changes to the hexadecimal values of the System.IO.Stream . Any changes are tracked in the Edits property (a System.Collections.Generic.SortedDictionary`2 ) indicating the position where the changes were made and the new values. A convenience method, ApplyEdits() will apply the edits to the System.IO.Stream . Control the first byte shown by setting the DisplayStart property to an offset in the stream. Constructors HexView(Stream) Initialzies a HexView Declaration public HexView(Stream source) Parameters Type Name Description System.IO.Stream source The System.IO.Stream to view and edit as hex, this System.IO.Stream must support seeking, or an exception will be thrown. Properties AllowEdits Gets or sets whether this HexView allow editing of the System.IO.Stream of the underlying System.IO.Stream . Declaration public bool AllowEdits { get; set; } Property Value Type Description System.Boolean true if allow edits; otherwise, false . DisplayStart Sets or gets the offset into the System.IO.Stream that will displayed at the top of the HexView Declaration public long DisplayStart { get; set; } Property Value Type Description System.Int64 The display start. Edits Gets a System.Collections.Generic.SortedDictionary`2 describing the edits done to the HexView . Each Key indicates an offset where an edit was made and the Value is the changed byte. Declaration public IReadOnlyDictionary Edits { get; } Property Value Type Description System.Collections.Generic.IReadOnlyDictionary < System.Int64 , System.Byte > The edits. Frame Declaration public override Rect Frame { get; set; } Property Value Type Description Rect Overrides View.Frame Source Sets or gets the System.IO.Stream the HexView is operating on; the stream must support seeking ( System.IO.Stream.CanSeek == true). Declaration public Stream Source { get; set; } Property Value Type Description System.IO.Stream The source. Methods ApplyEdits() This method applies andy edits made to the System.IO.Stream and resets the contents of the Edits property Declaration public void ApplyEdits() PositionCursor() Declaration public override void PositionCursor() Overrides View.PositionCursor() ProcessKey(KeyEvent) Declaration public override bool ProcessKey(KeyEvent keyEvent) Parameters Type Name Description KeyEvent keyEvent Returns Type Description System.Boolean Overrides View.ProcessKey(KeyEvent) Redraw(Rect) Declaration public override void Redraw(Rect region) Parameters Type Name Description Rect region Overrides View.Redraw(Rect) Implements System.Collections.IEnumerable" + "keywords": "Class HexView An hex viewer and editor View over a System.IO.Stream Inheritance System.Object Responder View HexView Implements System.Collections.IEnumerable Inherited Members View.Enter View.Leave View.MouseEnter View.MouseLeave View.Driver View.Subviews View.Id View.IsCurrentTop View.WantMousePositionReports View.WantContinuousButtonPressed View.GetEnumerator() View.LayoutStyle View.Bounds View.X View.Y View.Width View.Height View.SuperView View.SetNeedsDisplay() View.SetNeedsDisplay(Rect) View.ChildNeedsDisplay() 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) View.HasFocus View.OnEnter() View.OnLeave() View.Focused View.MostFocused View.ColorScheme View.AddRune(Int32, Int32, Rune) View.ClearNeedsDisplay() View.SetFocus(View) View.KeyPress View.ProcessHotKey(KeyEvent) View.ProcessColdKey(KeyEvent) View.KeyDown View.OnKeyDown(KeyEvent) View.KeyUp View.OnKeyUp(KeyEvent) View.EnsureFocus() View.FocusFirst() View.FocusLast() View.FocusPrev() View.FocusNext() View.LayoutSubviews() View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) Responder.CanFocus Responder.MouseEvent(MouseEvent) System.Object.Equals(System.Object) System.Object.Equals(System.Object, System.Object) System.Object.GetHashCode() System.Object.GetType() System.Object.MemberwiseClone() System.Object.ReferenceEquals(System.Object, System.Object) Namespace : Terminal.Gui Assembly : Terminal.Gui.dll Syntax public class HexView : View, IEnumerable Remarks HexView provides a hex editor on top of a seekable System.IO.Stream with the left side showing an hex dump of the values in the System.IO.Stream and the right side showing the contents (filterd to non-control sequence ASCII characters). Users can switch from one side to the other by using the tab key. To enable editing, set AllowEdits to true. When AllowEdits is true the user can make changes to the hexadecimal values of the System.IO.Stream . Any changes are tracked in the Edits property (a System.Collections.Generic.SortedDictionary`2 ) indicating the position where the changes were made and the new values. A convenience method, ApplyEdits() will apply the edits to the System.IO.Stream . Control the first byte shown by setting the DisplayStart property to an offset in the stream. Constructors HexView(Stream) Initialzies a HexView Declaration public HexView(Stream source) Parameters Type Name Description System.IO.Stream source The System.IO.Stream to view and edit as hex, this System.IO.Stream must support seeking, or an exception will be thrown. Properties AllowEdits Gets or sets whether this HexView allow editing of the System.IO.Stream of the underlying System.IO.Stream . Declaration public bool AllowEdits { get; set; } Property Value Type Description System.Boolean true if allow edits; otherwise, false . DisplayStart Sets or gets the offset into the System.IO.Stream that will displayed at the top of the HexView Declaration public long DisplayStart { get; set; } Property Value Type Description System.Int64 The display start. Edits Gets a System.Collections.Generic.SortedDictionary`2 describing the edits done to the HexView . Each Key indicates an offset where an edit was made and the Value is the changed byte. Declaration public IReadOnlyDictionary Edits { get; } Property Value Type Description System.Collections.Generic.IReadOnlyDictionary < System.Int64 , System.Byte > The edits. Frame Declaration public override Rect Frame { get; set; } Property Value Type Description Rect Overrides View.Frame Source Sets or gets the System.IO.Stream the HexView is operating on; the stream must support seeking ( System.IO.Stream.CanSeek == true). Declaration public Stream Source { get; set; } Property Value Type Description System.IO.Stream The source. Methods ApplyEdits() This method applies andy edits made to the System.IO.Stream and resets the contents of the Edits property Declaration public void ApplyEdits() PositionCursor() Declaration public override void PositionCursor() Overrides View.PositionCursor() ProcessKey(KeyEvent) Declaration public override bool ProcessKey(KeyEvent keyEvent) Parameters Type Name Description KeyEvent keyEvent Returns Type Description System.Boolean Overrides View.ProcessKey(KeyEvent) Redraw(Rect) Declaration public override void Redraw(Rect region) Parameters Type Name Description Rect region Overrides View.Redraw(Rect) Implements System.Collections.IEnumerable" }, "api/Terminal.Gui/Terminal.Gui.html": { "href": "api/Terminal.Gui/Terminal.Gui.html", @@ -142,7 +142,7 @@ "api/Terminal.Gui/Terminal.Gui.Label.html": { "href": "api/Terminal.Gui/Terminal.Gui.Label.html", "title": "Class Label", - "keywords": "Class Label The Label View displays a string at a given position and supports multiple lines separted by newline characters. Inheritance System.Object Responder View Label Implements System.Collections.IEnumerable Inherited Members View.Enter View.Leave View.MouseEnter View.MouseLeave View.Driver View.Subviews View.Id View.WantMousePositionReports View.WantContinuousButtonPressed View.Frame View.GetEnumerator() View.LayoutStyle View.Bounds View.X View.Y View.Width View.Height View.SuperView View.SetNeedsDisplay() View.SetNeedsDisplay(Rect) View.ChildNeedsDisplay() 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) View.PositionCursor() View.HasFocus View.OnEnter() View.OnLeave() View.Focused View.MostFocused View.ColorScheme View.AddRune(Int32, Int32, Rune) View.ClearNeedsDisplay() View.SetFocus(View) View.KeyPress View.ProcessKey(KeyEvent) View.ProcessHotKey(KeyEvent) View.ProcessColdKey(KeyEvent) View.KeyDown View.OnKeyDown(KeyEvent) View.KeyUp View.OnKeyUp(KeyEvent) View.EnsureFocus() View.FocusFirst() View.FocusLast() View.FocusPrev() View.FocusNext() View.LayoutSubviews() View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) Responder.CanFocus Responder.MouseEvent(MouseEvent) System.Object.Equals(System.Object) System.Object.Equals(System.Object, System.Object) System.Object.GetHashCode() System.Object.GetType() System.Object.MemberwiseClone() System.Object.ReferenceEquals(System.Object, System.Object) Namespace : Terminal.Gui Assembly : Terminal.Gui.dll Syntax public class Label : View, IEnumerable Constructors Label(ustring) Initializes a new instance of Label and configures the default Width and Height based on the text, the result is suitable for Computed layout. Declaration public Label(ustring text) Parameters Type Name Description NStack.ustring text Text. Label(Int32, Int32, ustring) Initializes a new instance of Label at the given coordinate with the given string, computes the bounding box based on the size of the string, assumes that the string contains newlines for multiple lines, no special breaking rules are used. Declaration public Label(int x, int y, ustring text) Parameters Type Name Description System.Int32 x System.Int32 y NStack.ustring text Label(Rect, ustring) Initializes a new instance of Label at the given coordinate with the given string and uses the specified frame for the string. Declaration public Label(Rect rect, ustring text) Parameters Type Name Description Rect rect NStack.ustring text Properties Text The text displayed by the Label . Declaration public virtual ustring Text { get; set; } Property Value Type Description NStack.ustring TextAlignment Controls the text-alignemtn property of the label, changing it will redisplay the Label . Declaration public TextAlignment TextAlignment { get; set; } Property Value Type Description TextAlignment The text alignment. TextColor The color used for the Label . Declaration public Attribute TextColor { get; set; } Property Value Type Description Attribute Methods MaxWidth(ustring, Int32) Computes the the max width of a line or multilines needed to render by the Label control Declaration public static int MaxWidth(ustring text, int width) Parameters Type Name Description NStack.ustring text Text, may contain newlines. System.Int32 width The width for the text. Returns Type Description System.Int32 Max width of lines. MeasureLines(ustring, Int32) Computes the number of lines needed to render the specified text by the Label view Declaration public static int MeasureLines(ustring text, int width) Parameters Type Name Description NStack.ustring text Text, may contain newlines. System.Int32 width The width for the text. Returns Type Description System.Int32 Number of lines. Redraw(Rect) Declaration public override void Redraw(Rect region) Parameters Type Name Description Rect region Overrides View.Redraw(Rect) Implements System.Collections.IEnumerable" + "keywords": "Class Label The Label View displays a string at a given position and supports multiple lines separted by newline characters. Inheritance System.Object Responder View Label Implements System.Collections.IEnumerable Inherited Members View.Enter View.Leave View.MouseEnter View.MouseLeave View.Driver View.Subviews View.Id View.IsCurrentTop View.WantMousePositionReports View.WantContinuousButtonPressed View.Frame View.GetEnumerator() View.LayoutStyle View.Bounds View.X View.Y View.Width View.Height View.SuperView View.SetNeedsDisplay() View.SetNeedsDisplay(Rect) View.ChildNeedsDisplay() 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) View.PositionCursor() View.HasFocus View.OnEnter() View.OnLeave() View.Focused View.MostFocused View.ColorScheme View.AddRune(Int32, Int32, Rune) View.ClearNeedsDisplay() View.SetFocus(View) View.KeyPress View.ProcessKey(KeyEvent) View.ProcessHotKey(KeyEvent) View.ProcessColdKey(KeyEvent) View.KeyDown View.OnKeyDown(KeyEvent) View.KeyUp View.OnKeyUp(KeyEvent) View.EnsureFocus() View.FocusFirst() View.FocusLast() View.FocusPrev() View.FocusNext() View.LayoutSubviews() View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) Responder.CanFocus Responder.MouseEvent(MouseEvent) System.Object.Equals(System.Object) System.Object.Equals(System.Object, System.Object) System.Object.GetHashCode() System.Object.GetType() System.Object.MemberwiseClone() System.Object.ReferenceEquals(System.Object, System.Object) Namespace : Terminal.Gui Assembly : Terminal.Gui.dll Syntax public class Label : View, IEnumerable Constructors Label(ustring) Initializes a new instance of Label and configures the default Width and Height based on the text, the result is suitable for Computed layout. Declaration public Label(ustring text) Parameters Type Name Description NStack.ustring text Text. Label(Int32, Int32, ustring) Initializes a new instance of Label at the given coordinate with the given string, computes the bounding box based on the size of the string, assumes that the string contains newlines for multiple lines, no special breaking rules are used. Declaration public Label(int x, int y, ustring text) Parameters Type Name Description System.Int32 x System.Int32 y NStack.ustring text Label(Rect, ustring) Initializes a new instance of Label at the given coordinate with the given string and uses the specified frame for the string. Declaration public Label(Rect rect, ustring text) Parameters Type Name Description Rect rect NStack.ustring text Properties Text The text displayed by the Label . Declaration public virtual ustring Text { get; set; } Property Value Type Description NStack.ustring TextAlignment Controls the text-alignemtn property of the label, changing it will redisplay the Label . Declaration public TextAlignment TextAlignment { get; set; } Property Value Type Description TextAlignment The text alignment. TextColor The color used for the Label . Declaration public Attribute TextColor { get; set; } Property Value Type Description Attribute Methods MaxWidth(ustring, Int32) Computes the the max width of a line or multilines needed to render by the Label control Declaration public static int MaxWidth(ustring text, int width) Parameters Type Name Description NStack.ustring text Text, may contain newlines. System.Int32 width The width for the text. Returns Type Description System.Int32 Max width of lines. MeasureLines(ustring, Int32) Computes the number of lines needed to render the specified text by the Label view Declaration public static int MeasureLines(ustring text, int width) Parameters Type Name Description NStack.ustring text Text, may contain newlines. System.Int32 width The width for the text. Returns Type Description System.Int32 Number of lines. Redraw(Rect) Declaration public override void Redraw(Rect region) Parameters Type Name Description Rect region Overrides View.Redraw(Rect) Implements System.Collections.IEnumerable" }, "api/Terminal.Gui/Terminal.Gui.LayoutStyle.html": { "href": "api/Terminal.Gui/Terminal.Gui.LayoutStyle.html", @@ -152,7 +152,7 @@ "api/Terminal.Gui/Terminal.Gui.ListView.html": { "href": "api/Terminal.Gui/Terminal.Gui.ListView.html", "title": "Class ListView", - "keywords": "Class ListView ListView View renders a scrollable list of data where each item can be activated to perform an action. Inheritance System.Object Responder View ListView Implements System.Collections.IEnumerable Inherited Members View.Enter View.Leave View.MouseEnter View.MouseLeave View.Driver View.Subviews View.Id View.WantMousePositionReports View.WantContinuousButtonPressed View.Frame View.GetEnumerator() View.LayoutStyle View.Bounds View.X View.Y View.Width View.Height View.SuperView View.SetNeedsDisplay() View.SetNeedsDisplay(Rect) View.ChildNeedsDisplay() 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) View.HasFocus View.OnEnter() View.OnLeave() View.Focused View.MostFocused View.ColorScheme View.AddRune(Int32, Int32, Rune) View.ClearNeedsDisplay() View.SetFocus(View) View.KeyPress View.ProcessHotKey(KeyEvent) View.ProcessColdKey(KeyEvent) View.KeyDown View.OnKeyDown(KeyEvent) View.KeyUp View.OnKeyUp(KeyEvent) View.EnsureFocus() View.FocusFirst() View.FocusLast() View.FocusPrev() View.FocusNext() View.LayoutSubviews() View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) Responder.CanFocus System.Object.Equals(System.Object) System.Object.Equals(System.Object, System.Object) System.Object.GetHashCode() System.Object.GetType() System.Object.MemberwiseClone() System.Object.ReferenceEquals(System.Object, System.Object) Namespace : Terminal.Gui Assembly : Terminal.Gui.dll Syntax public class ListView : View, IEnumerable Remarks The ListView displays lists of data and allows the user to scroll through the data. Items in the can be activated firing an event (with the ENTER key or a mouse double-click). If the AllowsMarking property is true, elements of the list can be marked by the user. By default ListView uses System.Object.ToString() to render the items of any System.Collections.IList object (e.g. arrays, System.Collections.Generic.List , and other collections). Alternatively, an object that implements the IListDataSource interface can be provided giving full control of what is rendered. ListView can display any object that implements the System.Collections.IList interface. System.String values are converted into NStack.ustring values before rendering, and other values are converted into System.String by calling System.Object.ToString() and then converting to NStack.ustring . To change the contents of the ListView, set the Source property (when providing custom rendering via IListDataSource ) or call SetSource(IList) an System.Collections.IList is being used. When AllowsMarking is set to true the rendering will prefix the rendered items with [x] or [ ] and bind the SPACE key to toggle the selection. To implement a different marking style set AllowsMarking to false and implement custom rendering. Constructors ListView() Initializes a new instance of ListView . Set the Source property to display something. Declaration public ListView() ListView(IList) Initializes a new instance of ListView that will display the contents of the object implementing the System.Collections.IList interface, with relative positioning. Declaration public ListView(IList source) Parameters Type Name Description System.Collections.IList source An System.Collections.IList data source, if the elements are strings or ustrings, the string is rendered, otherwise the ToString() method is invoked on the result. ListView(IListDataSource) Initializes a new instance of ListView that will display the provided data source, using relative positioning. Declaration public ListView(IListDataSource source) Parameters Type Name Description IListDataSource source IListDataSource object that provides a mechanism to render the data. The number of elements on the collection should not change, if you must change, set the \"Source\" property to reset the internal settings of the ListView. ListView(Rect, IList) Initializes a new instance of ListView that will display the contents of the object implementing the System.Collections.IList interface with an absolute position. Declaration public ListView(Rect rect, IList source) Parameters Type Name Description Rect rect Frame for the listview. System.Collections.IList source An IList data source, if the elements of the IList are strings or ustrings, the string is rendered, otherwise the ToString() method is invoked on the result. ListView(Rect, IListDataSource) Initializes a new instance of ListView with the provided data source and an absolute position Declaration public ListView(Rect rect, IListDataSource source) Parameters Type Name Description Rect rect Frame for the listview. IListDataSource source IListDataSource object that provides a mechanism to render the data. The number of elements on the collection should not change, if you must change, set the \"Source\" property to reset the internal settings of the ListView. Properties AllowsMarking Gets or sets whether this ListView allows items to be marked. Declaration public bool AllowsMarking { get; set; } Property Value Type Description System.Boolean true if allows marking elements of the list; otherwise, false . Remarks If set to true, ListView will render items marked items with \"[x]\", and unmarked items with \"[ ]\" spaces. SPACE key will toggle marking. AllowsMultipleSelection If set to true allows more than one item to be selected. If false only allow one item selected. Declaration public bool AllowsMultipleSelection { get; set; } Property Value Type Description System.Boolean SelectedItem Gets or sets the index of the currently selected item. Declaration public int SelectedItem { get; set; } Property Value Type Description System.Int32 The selected item. Source Gets or sets the IListDataSource backing this ListView , enabling custom rendering. Declaration public IListDataSource Source { get; set; } Property Value Type Description IListDataSource The source. Remarks Use SetSource(IList) to set a new System.Collections.IList source. TopItem Gets or sets the item that is displayed at the top of the ListView . Declaration public int TopItem { get; set; } Property Value Type Description System.Int32 The top item. Methods AllowsAll() Prevents marking if it's not allowed mark and if it's not allows multiple selection. Declaration public virtual bool AllowsAll() Returns Type Description System.Boolean MarkUnmarkRow() Marks an unmarked row. Declaration public virtual bool MarkUnmarkRow() Returns Type Description System.Boolean MouseEvent(MouseEvent) Declaration public override bool MouseEvent(MouseEvent me) Parameters Type Name Description MouseEvent me Returns Type Description System.Boolean Overrides Responder.MouseEvent(MouseEvent) MoveDown() Moves the selected item index to the next row. Declaration public virtual bool MoveDown() Returns Type Description System.Boolean MovePageDown() Moves the selected item index to the previous page. Declaration public virtual bool MovePageDown() Returns Type Description System.Boolean MovePageUp() Moves the selected item index to the next page. Declaration public virtual bool MovePageUp() Returns Type Description System.Boolean MoveUp() Moves the selected item index to the previous row. Declaration public virtual bool MoveUp() Returns Type Description System.Boolean OnOpenSelectedItem() Invokes the OnOpenSelectedItem event if it is defined. Declaration public virtual bool OnOpenSelectedItem() Returns Type Description System.Boolean OnSelectedChanged() Invokes the SelectedChanged event if it is defined. Declaration public virtual bool OnSelectedChanged() Returns Type Description System.Boolean PositionCursor() Declaration public override void PositionCursor() Overrides View.PositionCursor() ProcessKey(KeyEvent) Declaration public override bool ProcessKey(KeyEvent kb) Parameters Type Name Description KeyEvent kb Returns Type Description System.Boolean Overrides View.ProcessKey(KeyEvent) Redraw(Rect) Declaration public override void Redraw(Rect region) Parameters Type Name Description Rect region Overrides View.Redraw(Rect) SetSource(IList) Sets the source of the ListView to an System.Collections.IList . Declaration public void SetSource(IList source) Parameters Type Name Description System.Collections.IList source Remarks Use the Source property to set a new IListDataSource source and use custome rendering. SetSourceAsync(IList) Sets the source to an System.Collections.IList value asynchronously. Declaration public Task SetSourceAsync(IList source) Parameters Type Name Description System.Collections.IList source Returns Type Description System.Threading.Tasks.Task An item implementing the IList interface. Remarks Use the Source property to set a new IListDataSource source and use custome rendering. Events OpenSelectedItem This event is raised when the user Double Clicks on an item or presses ENTER to open the selected item. Declaration public event EventHandler OpenSelectedItem Event Type Type Description System.EventHandler < ListViewItemEventArgs > SelectedChanged This event is raised when the selected item in the ListView has changed. Declaration public event EventHandler SelectedChanged Event Type Type Description System.EventHandler < ListViewItemEventArgs > Implements System.Collections.IEnumerable" + "keywords": "Class ListView ListView View renders a scrollable list of data where each item can be activated to perform an action. Inheritance System.Object Responder View ListView Implements System.Collections.IEnumerable Inherited Members View.Enter View.Leave View.MouseEnter View.MouseLeave View.Driver View.Subviews View.Id View.IsCurrentTop View.WantMousePositionReports View.WantContinuousButtonPressed View.Frame View.GetEnumerator() View.LayoutStyle View.Bounds View.X View.Y View.Width View.Height View.SuperView View.SetNeedsDisplay() View.SetNeedsDisplay(Rect) View.ChildNeedsDisplay() 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) View.HasFocus View.OnEnter() View.OnLeave() View.Focused View.MostFocused View.ColorScheme View.AddRune(Int32, Int32, Rune) View.ClearNeedsDisplay() View.SetFocus(View) View.KeyPress View.ProcessHotKey(KeyEvent) View.ProcessColdKey(KeyEvent) View.KeyDown View.OnKeyDown(KeyEvent) View.KeyUp View.OnKeyUp(KeyEvent) View.EnsureFocus() View.FocusFirst() View.FocusLast() View.FocusPrev() View.FocusNext() View.LayoutSubviews() View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) Responder.CanFocus System.Object.Equals(System.Object) System.Object.Equals(System.Object, System.Object) System.Object.GetHashCode() System.Object.GetType() System.Object.MemberwiseClone() System.Object.ReferenceEquals(System.Object, System.Object) Namespace : Terminal.Gui Assembly : Terminal.Gui.dll Syntax public class ListView : View, IEnumerable Remarks The ListView displays lists of data and allows the user to scroll through the data. Items in the can be activated firing an event (with the ENTER key or a mouse double-click). If the AllowsMarking property is true, elements of the list can be marked by the user. By default ListView uses System.Object.ToString() to render the items of any System.Collections.IList object (e.g. arrays, System.Collections.Generic.List , and other collections). Alternatively, an object that implements the IListDataSource interface can be provided giving full control of what is rendered. ListView can display any object that implements the System.Collections.IList interface. System.String values are converted into NStack.ustring values before rendering, and other values are converted into System.String by calling System.Object.ToString() and then converting to NStack.ustring . To change the contents of the ListView, set the Source property (when providing custom rendering via IListDataSource ) or call SetSource(IList) an System.Collections.IList is being used. When AllowsMarking is set to true the rendering will prefix the rendered items with [x] or [ ] and bind the SPACE key to toggle the selection. To implement a different marking style set AllowsMarking to false and implement custom rendering. Constructors ListView() Initializes a new instance of ListView . Set the Source property to display something. Declaration public ListView() ListView(IList) Initializes a new instance of ListView that will display the contents of the object implementing the System.Collections.IList interface, with relative positioning. Declaration public ListView(IList source) Parameters Type Name Description System.Collections.IList source An System.Collections.IList data source, if the elements are strings or ustrings, the string is rendered, otherwise the ToString() method is invoked on the result. ListView(IListDataSource) Initializes a new instance of ListView that will display the provided data source, using relative positioning. Declaration public ListView(IListDataSource source) Parameters Type Name Description IListDataSource source IListDataSource object that provides a mechanism to render the data. The number of elements on the collection should not change, if you must change, set the \"Source\" property to reset the internal settings of the ListView. ListView(Rect, IList) Initializes a new instance of ListView that will display the contents of the object implementing the System.Collections.IList interface with an absolute position. Declaration public ListView(Rect rect, IList source) Parameters Type Name Description Rect rect Frame for the listview. System.Collections.IList source An IList data source, if the elements of the IList are strings or ustrings, the string is rendered, otherwise the ToString() method is invoked on the result. ListView(Rect, IListDataSource) Initializes a new instance of ListView with the provided data source and an absolute position Declaration public ListView(Rect rect, IListDataSource source) Parameters Type Name Description Rect rect Frame for the listview. IListDataSource source IListDataSource object that provides a mechanism to render the data. The number of elements on the collection should not change, if you must change, set the \"Source\" property to reset the internal settings of the ListView. Properties AllowsMarking Gets or sets whether this ListView allows items to be marked. Declaration public bool AllowsMarking { get; set; } Property Value Type Description System.Boolean true if allows marking elements of the list; otherwise, false . Remarks If set to true, ListView will render items marked items with \"[x]\", and unmarked items with \"[ ]\" spaces. SPACE key will toggle marking. AllowsMultipleSelection If set to true allows more than one item to be selected. If false only allow one item selected. Declaration public bool AllowsMultipleSelection { get; set; } Property Value Type Description System.Boolean SelectedItem Gets or sets the index of the currently selected item. Declaration public int SelectedItem { get; set; } Property Value Type Description System.Int32 The selected item. Source Gets or sets the IListDataSource backing this ListView , enabling custom rendering. Declaration public IListDataSource Source { get; set; } Property Value Type Description IListDataSource The source. Remarks Use SetSource(IList) to set a new System.Collections.IList source. TopItem Gets or sets the item that is displayed at the top of the ListView . Declaration public int TopItem { get; set; } Property Value Type Description System.Int32 The top item. Methods AllowsAll() Prevents marking if it's not allowed mark and if it's not allows multiple selection. Declaration public virtual bool AllowsAll() Returns Type Description System.Boolean MarkUnmarkRow() Marks an unmarked row. Declaration public virtual bool MarkUnmarkRow() Returns Type Description System.Boolean MouseEvent(MouseEvent) Declaration public override bool MouseEvent(MouseEvent me) Parameters Type Name Description MouseEvent me Returns Type Description System.Boolean Overrides Responder.MouseEvent(MouseEvent) MoveDown() Moves the selected item index to the next row. Declaration public virtual bool MoveDown() Returns Type Description System.Boolean MovePageDown() Moves the selected item index to the previous page. Declaration public virtual bool MovePageDown() Returns Type Description System.Boolean MovePageUp() Moves the selected item index to the next page. Declaration public virtual bool MovePageUp() Returns Type Description System.Boolean MoveUp() Moves the selected item index to the previous row. Declaration public virtual bool MoveUp() Returns Type Description System.Boolean OnOpenSelectedItem() Invokes the OnOpenSelectedItem event if it is defined. Declaration public virtual bool OnOpenSelectedItem() Returns Type Description System.Boolean OnSelectedChanged() Invokes the SelectedChanged event if it is defined. Declaration public virtual bool OnSelectedChanged() Returns Type Description System.Boolean PositionCursor() Declaration public override void PositionCursor() Overrides View.PositionCursor() ProcessKey(KeyEvent) Declaration public override bool ProcessKey(KeyEvent kb) Parameters Type Name Description KeyEvent kb Returns Type Description System.Boolean Overrides View.ProcessKey(KeyEvent) Redraw(Rect) Declaration public override void Redraw(Rect region) Parameters Type Name Description Rect region Overrides View.Redraw(Rect) SetSource(IList) Sets the source of the ListView to an System.Collections.IList . Declaration public void SetSource(IList source) Parameters Type Name Description System.Collections.IList source Remarks Use the Source property to set a new IListDataSource source and use custome rendering. SetSourceAsync(IList) Sets the source to an System.Collections.IList value asynchronously. Declaration public Task SetSourceAsync(IList source) Parameters Type Name Description System.Collections.IList source Returns Type Description System.Threading.Tasks.Task An item implementing the IList interface. Remarks Use the Source property to set a new IListDataSource source and use custome rendering. Events OpenSelectedItem This event is raised when the user Double Clicks on an item or presses ENTER to open the selected item. Declaration public event EventHandler OpenSelectedItem Event Type Type Description System.EventHandler < ListViewItemEventArgs > SelectedChanged This event is raised when the selected item in the ListView has changed. Declaration public event EventHandler SelectedChanged Event Type Type Description System.EventHandler < ListViewItemEventArgs > Implements System.Collections.IEnumerable" }, "api/Terminal.Gui/Terminal.Gui.ListViewItemEventArgs.html": { "href": "api/Terminal.Gui/Terminal.Gui.ListViewItemEventArgs.html", @@ -167,7 +167,7 @@ "api/Terminal.Gui/Terminal.Gui.MenuBar.html": { "href": "api/Terminal.Gui/Terminal.Gui.MenuBar.html", "title": "Class MenuBar", - "keywords": "Class MenuBar The MenuBar provides a menu for Terminal.Gui applications. Inheritance System.Object Responder View MenuBar Implements System.Collections.IEnumerable Inherited Members View.Enter View.Leave View.MouseEnter View.MouseLeave View.Driver View.Subviews View.Id View.WantMousePositionReports View.WantContinuousButtonPressed View.Frame View.GetEnumerator() View.LayoutStyle View.Bounds View.X View.Y View.Width View.Height View.SuperView View.SetNeedsDisplay() View.SetNeedsDisplay(Rect) View.ChildNeedsDisplay() 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) View.HasFocus View.OnEnter() View.OnLeave() View.Focused View.MostFocused View.ColorScheme View.AddRune(Int32, Int32, Rune) View.ClearNeedsDisplay() View.SetFocus(View) View.KeyPress View.ProcessColdKey(KeyEvent) View.KeyDown View.KeyUp View.EnsureFocus() View.FocusFirst() View.FocusLast() View.FocusPrev() View.FocusNext() View.LayoutSubviews() View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) Responder.CanFocus System.Object.Equals(System.Object) System.Object.Equals(System.Object, System.Object) System.Object.GetHashCode() System.Object.GetType() System.Object.MemberwiseClone() System.Object.ReferenceEquals(System.Object, System.Object) Namespace : Terminal.Gui Assembly : Terminal.Gui.dll Syntax public class MenuBar : View, IEnumerable Remarks The MenuBar appears on the first row of the terminal. The MenuBar provides global hotkeys for the application. Constructors MenuBar(MenuBarItem[]) Initializes a new instance of the MenuBar class with the specified set of toplevel menu items. Declaration public MenuBar(MenuBarItem[] menus) Parameters Type Name Description MenuBarItem [] menus Individual menu items; a null item will result in a separator being drawn. Properties LastFocused Get the lasted focused view before open the menu. Declaration public View LastFocused { get; } Property Value Type Description View MenuOpen True of the menu is open; otherwise false. Declaration public bool MenuOpen { get; set; } Property Value Type Description System.Boolean Menus Gets or sets the array of MenuBarItem s for the menu. Only set this when the MenuBar is vislble. Declaration public MenuBarItem[] Menus { get; set; } Property Value Type Description MenuBarItem [] The menu array. UseKeysUpDownAsKeysLeftRight Used for change the navigation key style. Declaration public bool UseKeysUpDownAsKeysLeftRight { get; set; } Property Value Type Description System.Boolean Methods MouseEvent(MouseEvent) Declaration public override bool MouseEvent(MouseEvent me) Parameters Type Name Description MouseEvent me Returns Type Description System.Boolean Overrides Responder.MouseEvent(MouseEvent) OnKeyDown(KeyEvent) Declaration public override bool OnKeyDown(KeyEvent keyEvent) Parameters Type Name Description KeyEvent keyEvent Returns Type Description System.Boolean Overrides View.OnKeyDown(KeyEvent) OnKeyUp(KeyEvent) Declaration public override bool OnKeyUp(KeyEvent keyEvent) Parameters Type Name Description KeyEvent keyEvent Returns Type Description System.Boolean Overrides View.OnKeyUp(KeyEvent) PositionCursor() Declaration public override void PositionCursor() Overrides View.PositionCursor() ProcessHotKey(KeyEvent) Declaration public override bool ProcessHotKey(KeyEvent kb) Parameters Type Name Description KeyEvent kb Returns Type Description System.Boolean Overrides View.ProcessHotKey(KeyEvent) ProcessKey(KeyEvent) Declaration public override bool ProcessKey(KeyEvent kb) Parameters Type Name Description KeyEvent kb Returns Type Description System.Boolean Overrides View.ProcessKey(KeyEvent) Redraw(Rect) Declaration public override void Redraw(Rect region) Parameters Type Name Description Rect region Overrides View.Redraw(Rect) Events OnCloseMenu Raised when a menu is closing. Declaration public event EventHandler OnCloseMenu Event Type Type Description System.EventHandler OnOpenMenu Raised as a menu is opened. Declaration public event EventHandler OnOpenMenu Event Type Type Description System.EventHandler Implements System.Collections.IEnumerable" + "keywords": "Class MenuBar The MenuBar provides a menu for Terminal.Gui applications. Inheritance System.Object Responder View MenuBar Implements System.Collections.IEnumerable Inherited Members View.Enter View.Leave View.MouseEnter View.MouseLeave View.Driver View.Subviews View.Id View.IsCurrentTop View.WantMousePositionReports View.WantContinuousButtonPressed View.Frame View.GetEnumerator() View.LayoutStyle View.Bounds View.X View.Y View.Width View.Height View.SuperView View.SetNeedsDisplay() View.SetNeedsDisplay(Rect) View.ChildNeedsDisplay() 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) View.HasFocus View.OnEnter() View.OnLeave() View.Focused View.MostFocused View.ColorScheme View.AddRune(Int32, Int32, Rune) View.ClearNeedsDisplay() View.SetFocus(View) View.KeyPress View.ProcessColdKey(KeyEvent) View.KeyDown View.KeyUp View.EnsureFocus() View.FocusFirst() View.FocusLast() View.FocusPrev() View.FocusNext() View.LayoutSubviews() View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) Responder.CanFocus System.Object.Equals(System.Object) System.Object.Equals(System.Object, System.Object) System.Object.GetHashCode() System.Object.GetType() System.Object.MemberwiseClone() System.Object.ReferenceEquals(System.Object, System.Object) Namespace : Terminal.Gui Assembly : Terminal.Gui.dll Syntax public class MenuBar : View, IEnumerable Remarks The MenuBar appears on the first row of the terminal. The MenuBar provides global hotkeys for the application. Constructors MenuBar(MenuBarItem[]) Initializes a new instance of the MenuBar class with the specified set of toplevel menu items. Declaration public MenuBar(MenuBarItem[] menus) Parameters Type Name Description MenuBarItem [] menus Individual menu items; a null item will result in a separator being drawn. Properties IsMenuOpen True if the menu is open; otherwise false. Declaration public bool IsMenuOpen { get; protected set; } Property Value Type Description System.Boolean LastFocused Get the lasted focused view before open the menu. Declaration public View LastFocused { get; } Property Value Type Description View Menus Gets or sets the array of MenuBarItem s for the menu. Only set this when the MenuBar is vislble. Declaration public MenuBarItem[] Menus { get; set; } Property Value Type Description MenuBarItem [] The menu array. UseKeysUpDownAsKeysLeftRight Used for change the navigation key style. Declaration public bool UseKeysUpDownAsKeysLeftRight { get; set; } Property Value Type Description System.Boolean Methods CloseMenu() Closes the current Menu programatically, if open. Declaration public void CloseMenu() MouseEvent(MouseEvent) Declaration public override bool MouseEvent(MouseEvent me) Parameters Type Name Description MouseEvent me Returns Type Description System.Boolean Overrides Responder.MouseEvent(MouseEvent) OnKeyDown(KeyEvent) Declaration public override bool OnKeyDown(KeyEvent keyEvent) Parameters Type Name Description KeyEvent keyEvent Returns Type Description System.Boolean Overrides View.OnKeyDown(KeyEvent) OnKeyUp(KeyEvent) Declaration public override bool OnKeyUp(KeyEvent keyEvent) Parameters Type Name Description KeyEvent keyEvent Returns Type Description System.Boolean Overrides View.OnKeyUp(KeyEvent) OpenMenu() Opens the current Menu programatically. Declaration public void OpenMenu() PositionCursor() Declaration public override void PositionCursor() Overrides View.PositionCursor() ProcessHotKey(KeyEvent) Declaration public override bool ProcessHotKey(KeyEvent kb) Parameters Type Name Description KeyEvent kb Returns Type Description System.Boolean Overrides View.ProcessHotKey(KeyEvent) ProcessKey(KeyEvent) Declaration public override bool ProcessKey(KeyEvent kb) Parameters Type Name Description KeyEvent kb Returns Type Description System.Boolean Overrides View.ProcessKey(KeyEvent) Redraw(Rect) Declaration public override void Redraw(Rect region) Parameters Type Name Description Rect region Overrides View.Redraw(Rect) Events OnCloseMenu Raised when a menu is closing. Declaration public event EventHandler OnCloseMenu Event Type Type Description System.EventHandler OnOpenMenu Raised as a menu is opened. Declaration public event EventHandler OnOpenMenu Event Type Type Description System.EventHandler Implements System.Collections.IEnumerable" }, "api/Terminal.Gui/Terminal.Gui.MenuBarItem.html": { "href": "api/Terminal.Gui/Terminal.Gui.MenuBarItem.html", @@ -197,7 +197,7 @@ "api/Terminal.Gui/Terminal.Gui.OpenDialog.html": { "href": "api/Terminal.Gui/Terminal.Gui.OpenDialog.html", "title": "Class OpenDialog", - "keywords": "Class OpenDialog The OpenDialog provides an interactive dialog box for users to select files or directories. Inheritance System.Object Responder View Toplevel Window Dialog FileDialog OpenDialog Implements System.Collections.IEnumerable Inherited Members FileDialog.WillPresent() FileDialog.Prompt FileDialog.NameFieldLabel FileDialog.Message FileDialog.CanCreateDirectories FileDialog.IsExtensionHidden FileDialog.DirectoryPath FileDialog.AllowedFileTypes FileDialog.AllowsOtherFileTypes FileDialog.FilePath FileDialog.Canceled Dialog.AddButton(Button) Dialog.LayoutSubviews() Dialog.ProcessKey(KeyEvent) Window.Title Window.GetEnumerator() Window.Add(View) Window.Remove(View) Window.RemoveAll() Window.Redraw(Rect) Window.MouseEvent(MouseEvent) Toplevel.Running Toplevel.Ready Toplevel.Create() Toplevel.CanFocus Toplevel.Modal Toplevel.MenuBar Toplevel.StatusBar View.Enter View.Leave View.MouseEnter View.MouseLeave View.Driver View.Subviews View.Id View.WantMousePositionReports View.WantContinuousButtonPressed View.Frame View.LayoutStyle View.Bounds View.X View.Y View.Width View.Height View.SuperView View.SetNeedsDisplay() View.SetNeedsDisplay(Rect) View.ChildNeedsDisplay() View.Add(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) View.PositionCursor() View.HasFocus View.OnEnter() View.OnLeave() View.Focused View.MostFocused View.ColorScheme View.AddRune(Int32, Int32, Rune) View.ClearNeedsDisplay() View.SetFocus(View) View.KeyPress View.ProcessHotKey(KeyEvent) View.ProcessColdKey(KeyEvent) View.KeyDown View.OnKeyDown(KeyEvent) View.KeyUp View.OnKeyUp(KeyEvent) View.EnsureFocus() View.FocusFirst() View.FocusLast() View.FocusPrev() View.FocusNext() View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) System.Object.Equals(System.Object) System.Object.Equals(System.Object, System.Object) System.Object.GetHashCode() System.Object.GetType() System.Object.MemberwiseClone() System.Object.ReferenceEquals(System.Object, System.Object) Namespace : Terminal.Gui Assembly : Terminal.Gui.dll Syntax public class OpenDialog : FileDialog, IEnumerable Remarks The open dialog can be used to select files for opening, it can be configured to allow multiple items to be selected (based on the AllowsMultipleSelection) variable and you can control whether this should allow files or directories to be selected. To use, create an instance of OpenDialog , and pass it to Run() . This will run the dialog modally, and when this returns, the list of filds will be available on the FilePaths property. To select more than one file, users can use the spacebar, or control-t. Constructors OpenDialog(ustring, ustring) Initializes a new OpenDialog Declaration public OpenDialog(ustring title, ustring message) Parameters Type Name Description NStack.ustring title NStack.ustring message Properties AllowsMultipleSelection Gets or sets a value indicating whether this OpenDialog allows multiple selection. Declaration public bool AllowsMultipleSelection { get; set; } Property Value Type Description System.Boolean true if allows multiple selection; otherwise, false , defaults to false. CanChooseDirectories Gets or sets a value indicating whether this OpenDialog can choose directories. Declaration public bool CanChooseDirectories { get; set; } Property Value Type Description System.Boolean true if can choose directories; otherwise, false defaults to false . CanChooseFiles Gets or sets a value indicating whether this OpenDialog can choose files. Declaration public bool CanChooseFiles { get; set; } Property Value Type Description System.Boolean true if can choose files; otherwise, false . Defaults to true FilePaths Returns the selected files, or an empty list if nothing has been selected Declaration public IReadOnlyList FilePaths { get; } Property Value Type Description System.Collections.Generic.IReadOnlyList < System.String > The file paths. Implements System.Collections.IEnumerable" + "keywords": "Class OpenDialog The OpenDialog provides an interactive dialog box for users to select files or directories. Inheritance System.Object Responder View Toplevel Window Dialog FileDialog OpenDialog Implements System.Collections.IEnumerable Inherited Members FileDialog.WillPresent() FileDialog.Prompt FileDialog.NameFieldLabel FileDialog.Message FileDialog.CanCreateDirectories FileDialog.IsExtensionHidden FileDialog.DirectoryPath FileDialog.AllowedFileTypes FileDialog.AllowsOtherFileTypes FileDialog.FilePath FileDialog.Canceled Dialog.AddButton(Button) Dialog.LayoutSubviews() Dialog.ProcessKey(KeyEvent) Window.Title Window.GetEnumerator() Window.Add(View) Window.Remove(View) Window.RemoveAll() Window.Redraw(Rect) Window.MouseEvent(MouseEvent) Toplevel.Running Toplevel.Ready Toplevel.Create() Toplevel.CanFocus Toplevel.Modal Toplevel.MenuBar Toplevel.StatusBar View.Enter View.Leave View.MouseEnter View.MouseLeave View.Driver View.Subviews View.Id View.IsCurrentTop View.WantMousePositionReports View.WantContinuousButtonPressed View.Frame View.LayoutStyle View.Bounds View.X View.Y View.Width View.Height View.SuperView View.SetNeedsDisplay() View.SetNeedsDisplay(Rect) View.ChildNeedsDisplay() View.Add(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) View.PositionCursor() View.HasFocus View.OnEnter() View.OnLeave() View.Focused View.MostFocused View.ColorScheme View.AddRune(Int32, Int32, Rune) View.ClearNeedsDisplay() View.SetFocus(View) View.KeyPress View.ProcessHotKey(KeyEvent) View.ProcessColdKey(KeyEvent) View.KeyDown View.OnKeyDown(KeyEvent) View.KeyUp View.OnKeyUp(KeyEvent) View.EnsureFocus() View.FocusFirst() View.FocusLast() View.FocusPrev() View.FocusNext() View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) System.Object.Equals(System.Object) System.Object.Equals(System.Object, System.Object) System.Object.GetHashCode() System.Object.GetType() System.Object.MemberwiseClone() System.Object.ReferenceEquals(System.Object, System.Object) Namespace : Terminal.Gui Assembly : Terminal.Gui.dll Syntax public class OpenDialog : FileDialog, IEnumerable Remarks The open dialog can be used to select files for opening, it can be configured to allow multiple items to be selected (based on the AllowsMultipleSelection) variable and you can control whether this should allow files or directories to be selected. To use, create an instance of OpenDialog , and pass it to Run() . This will run the dialog modally, and when this returns, the list of filds will be available on the FilePaths property. To select more than one file, users can use the spacebar, or control-t. Constructors OpenDialog(ustring, ustring) Initializes a new OpenDialog Declaration public OpenDialog(ustring title, ustring message) Parameters Type Name Description NStack.ustring title NStack.ustring message Properties AllowsMultipleSelection Gets or sets a value indicating whether this OpenDialog allows multiple selection. Declaration public bool AllowsMultipleSelection { get; set; } Property Value Type Description System.Boolean true if allows multiple selection; otherwise, false , defaults to false. CanChooseDirectories Gets or sets a value indicating whether this OpenDialog can choose directories. Declaration public bool CanChooseDirectories { get; set; } Property Value Type Description System.Boolean true if can choose directories; otherwise, false defaults to false . CanChooseFiles Gets or sets a value indicating whether this OpenDialog can choose files. Declaration public bool CanChooseFiles { get; set; } Property Value Type Description System.Boolean true if can choose files; otherwise, false . Defaults to true FilePaths Returns the selected files, or an empty list if nothing has been selected Declaration public IReadOnlyList FilePaths { get; } Property Value Type Description System.Collections.Generic.IReadOnlyList < System.String > The file paths. Implements System.Collections.IEnumerable" }, "api/Terminal.Gui/Terminal.Gui.Point.html": { "href": "api/Terminal.Gui/Terminal.Gui.Point.html", @@ -212,12 +212,12 @@ "api/Terminal.Gui/Terminal.Gui.ProgressBar.html": { "href": "api/Terminal.Gui/Terminal.Gui.ProgressBar.html", "title": "Class ProgressBar", - "keywords": "Class ProgressBar A Progress Bar view that can indicate progress of an activity visually. Inheritance System.Object Responder View ProgressBar Implements System.Collections.IEnumerable Inherited Members View.Enter View.Leave View.MouseEnter View.MouseLeave View.Driver View.Subviews View.Id View.WantMousePositionReports View.WantContinuousButtonPressed View.Frame View.GetEnumerator() View.LayoutStyle View.Bounds View.X View.Y View.Width View.Height View.SuperView View.SetNeedsDisplay() View.SetNeedsDisplay(Rect) View.ChildNeedsDisplay() 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) View.PositionCursor() View.HasFocus View.OnEnter() View.OnLeave() View.Focused View.MostFocused View.ColorScheme View.AddRune(Int32, Int32, Rune) View.ClearNeedsDisplay() View.SetFocus(View) View.KeyPress View.ProcessKey(KeyEvent) View.ProcessHotKey(KeyEvent) View.ProcessColdKey(KeyEvent) View.KeyDown View.OnKeyDown(KeyEvent) View.KeyUp View.OnKeyUp(KeyEvent) View.EnsureFocus() View.FocusFirst() View.FocusLast() View.FocusPrev() View.FocusNext() View.LayoutSubviews() View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) Responder.CanFocus Responder.MouseEvent(MouseEvent) System.Object.Equals(System.Object) System.Object.Equals(System.Object, System.Object) System.Object.GetHashCode() System.Object.GetType() System.Object.MemberwiseClone() System.Object.ReferenceEquals(System.Object, System.Object) Namespace : Terminal.Gui Assembly : Terminal.Gui.dll Syntax public class ProgressBar : View, IEnumerable Remarks ProgressBar can operate in two modes, percentage mode, or activity mode. The progress bar starts in percentage mode and setting the Fraction property will reflect on the UI the progress made so far. Activity mode is used when the application has no way of knowing how much time is left, and is started when the Pulse() method is called. Call Pulse() repeatedly as progress is made. Constructors ProgressBar() Initializes a new instance of the ProgressBar class, starts in percentage mode and uses relative layout. Declaration public ProgressBar() ProgressBar(Rect) Initializes a new instance of the ProgressBar class, starts in percentage mode with an absolute position and size. Declaration public ProgressBar(Rect rect) Parameters Type Name Description Rect rect Rect. Properties Fraction Gets or sets the ProgressBar fraction to display, must be a value between 0 and 1. Declaration public float Fraction { get; set; } Property Value Type Description System.Single The fraction representing the progress. Methods Pulse() Notifies the ProgressBar that some progress has taken place. Declaration public void Pulse() Remarks If the ProgressBar is is percentage mode, it switches to activity mode. If is in activity mode, the marker is moved. Redraw(Rect) Declaration public override void Redraw(Rect region) Parameters Type Name Description Rect region Overrides View.Redraw(Rect) Implements System.Collections.IEnumerable" + "keywords": "Class ProgressBar A Progress Bar view that can indicate progress of an activity visually. Inheritance System.Object Responder View ProgressBar Implements System.Collections.IEnumerable Inherited Members View.Enter View.Leave View.MouseEnter View.MouseLeave View.Driver View.Subviews View.Id View.IsCurrentTop View.WantMousePositionReports View.WantContinuousButtonPressed View.Frame View.GetEnumerator() View.LayoutStyle View.Bounds View.X View.Y View.Width View.Height View.SuperView View.SetNeedsDisplay() View.SetNeedsDisplay(Rect) View.ChildNeedsDisplay() 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) View.PositionCursor() View.HasFocus View.OnEnter() View.OnLeave() View.Focused View.MostFocused View.ColorScheme View.AddRune(Int32, Int32, Rune) View.ClearNeedsDisplay() View.SetFocus(View) View.KeyPress View.ProcessKey(KeyEvent) View.ProcessHotKey(KeyEvent) View.ProcessColdKey(KeyEvent) View.KeyDown View.OnKeyDown(KeyEvent) View.KeyUp View.OnKeyUp(KeyEvent) View.EnsureFocus() View.FocusFirst() View.FocusLast() View.FocusPrev() View.FocusNext() View.LayoutSubviews() View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) Responder.CanFocus Responder.MouseEvent(MouseEvent) System.Object.Equals(System.Object) System.Object.Equals(System.Object, System.Object) System.Object.GetHashCode() System.Object.GetType() System.Object.MemberwiseClone() System.Object.ReferenceEquals(System.Object, System.Object) Namespace : Terminal.Gui Assembly : Terminal.Gui.dll Syntax public class ProgressBar : View, IEnumerable Remarks ProgressBar can operate in two modes, percentage mode, or activity mode. The progress bar starts in percentage mode and setting the Fraction property will reflect on the UI the progress made so far. Activity mode is used when the application has no way of knowing how much time is left, and is started when the Pulse() method is called. Call Pulse() repeatedly as progress is made. Constructors ProgressBar() Initializes a new instance of the ProgressBar class, starts in percentage mode and uses relative layout. Declaration public ProgressBar() ProgressBar(Rect) Initializes a new instance of the ProgressBar class, starts in percentage mode with an absolute position and size. Declaration public ProgressBar(Rect rect) Parameters Type Name Description Rect rect Rect. Properties Fraction Gets or sets the ProgressBar fraction to display, must be a value between 0 and 1. Declaration public float Fraction { get; set; } Property Value Type Description System.Single The fraction representing the progress. Methods Pulse() Notifies the ProgressBar that some progress has taken place. Declaration public void Pulse() Remarks If the ProgressBar is is percentage mode, it switches to activity mode. If is in activity mode, the marker is moved. Redraw(Rect) Declaration public override void Redraw(Rect region) Parameters Type Name Description Rect region Overrides View.Redraw(Rect) Implements System.Collections.IEnumerable" }, "api/Terminal.Gui/Terminal.Gui.RadioGroup.html": { "href": "api/Terminal.Gui/Terminal.Gui.RadioGroup.html", "title": "Class RadioGroup", - "keywords": "Class RadioGroup RadioGroup shows a group of radio labels, only one of those can be selected at a given time Inheritance System.Object Responder View RadioGroup Implements System.Collections.IEnumerable Inherited Members View.Enter View.Leave View.MouseEnter View.MouseLeave View.Driver View.Subviews View.Id View.WantMousePositionReports View.WantContinuousButtonPressed View.Frame View.GetEnumerator() View.LayoutStyle View.Bounds View.X View.Y View.Width View.Height View.SuperView View.SetNeedsDisplay() View.SetNeedsDisplay(Rect) View.ChildNeedsDisplay() 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) View.HasFocus View.OnEnter() View.OnLeave() View.Focused View.MostFocused View.ColorScheme View.AddRune(Int32, Int32, Rune) View.ClearNeedsDisplay() View.SetFocus(View) View.KeyPress View.ProcessHotKey(KeyEvent) View.KeyDown View.OnKeyDown(KeyEvent) View.KeyUp View.OnKeyUp(KeyEvent) View.EnsureFocus() View.FocusFirst() View.FocusLast() View.FocusPrev() View.FocusNext() View.LayoutSubviews() View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) Responder.CanFocus System.Object.Equals(System.Object) System.Object.Equals(System.Object, System.Object) System.Object.GetHashCode() System.Object.GetType() System.Object.MemberwiseClone() System.Object.ReferenceEquals(System.Object, System.Object) Namespace : Terminal.Gui Assembly : Terminal.Gui.dll Syntax public class RadioGroup : View, IEnumerable Constructors RadioGroup(Int32, Int32, String[], Int32) Initializes a new instance of the RadioGroup class setting up the initial set of radio labels and the item that should be selected. The View frame is computed from the provided radio labels. Declaration public RadioGroup(int x, int y, string[] radioLabels, int selected = 0) Parameters Type Name Description System.Int32 x The x coordinate. System.Int32 y The y coordinate. System.String [] radioLabels The radio labels; an array of strings that can contain hotkeys using an underscore before the letter. System.Int32 selected The item to be selected, the value is clamped to the number of items. RadioGroup(String[], Int32) Initializes a new instance of the RadioGroup class setting up the initial set of radio labels and the item that should be selected. Declaration public RadioGroup(string[] radioLabels, int selected = 0) Parameters Type Name Description System.String [] radioLabels The radio labels; an array of strings that can contain hotkeys using an underscore before the letter. System.Int32 selected The index of the item to be selected, the value is clamped to the number of items. RadioGroup(Rect, String[], Int32) Initializes a new instance of the RadioGroup class setting up the initial set of radio labels and the item that should be selected and uses an absolute layout for the result. Declaration public RadioGroup(Rect rect, string[] radioLabels, int selected = 0) Parameters Type Name Description Rect rect Boundaries for the radio group. System.String [] radioLabels The radio labels; an array of strings that can contain hotkeys using an underscore before the letter. System.Int32 selected The index of item to be selected, the value is clamped to the number of items. Fields SelectionChanged Declaration public Action SelectionChanged Field Value Type Description System.Action < System.Int32 > Properties Cursor The location of the cursor in the RadioGroup Declaration public int Cursor { get; set; } Property Value Type Description System.Int32 RadioLabels The radio labels to display Declaration public string[] RadioLabels { get; set; } Property Value Type Description System.String [] The radio labels. Selected The currently selected item from the list of radio labels Declaration public int Selected { get; set; } Property Value Type Description System.Int32 The selected. Methods MouseEvent(MouseEvent) Declaration public override bool MouseEvent(MouseEvent me) Parameters Type Name Description MouseEvent me Returns Type Description System.Boolean Overrides Responder.MouseEvent(MouseEvent) PositionCursor() Declaration public override void PositionCursor() Overrides View.PositionCursor() ProcessColdKey(KeyEvent) Declaration public override bool ProcessColdKey(KeyEvent kb) Parameters Type Name Description KeyEvent kb Returns Type Description System.Boolean Overrides View.ProcessColdKey(KeyEvent) ProcessKey(KeyEvent) Declaration public override bool ProcessKey(KeyEvent kb) Parameters Type Name Description KeyEvent kb Returns Type Description System.Boolean Overrides View.ProcessKey(KeyEvent) Redraw(Rect) Declaration public override void Redraw(Rect region) Parameters Type Name Description Rect region Overrides View.Redraw(Rect) Implements System.Collections.IEnumerable" + "keywords": "Class RadioGroup RadioGroup shows a group of radio labels, only one of those can be selected at a given time Inheritance System.Object Responder View RadioGroup Implements System.Collections.IEnumerable Inherited Members View.Enter View.Leave View.MouseEnter View.MouseLeave View.Driver View.Subviews View.Id View.IsCurrentTop View.WantMousePositionReports View.WantContinuousButtonPressed View.Frame View.GetEnumerator() View.LayoutStyle View.Bounds View.X View.Y View.Width View.Height View.SuperView View.SetNeedsDisplay() View.SetNeedsDisplay(Rect) View.ChildNeedsDisplay() 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) View.HasFocus View.OnEnter() View.OnLeave() View.Focused View.MostFocused View.ColorScheme View.AddRune(Int32, Int32, Rune) View.ClearNeedsDisplay() View.SetFocus(View) View.KeyPress View.ProcessHotKey(KeyEvent) View.KeyDown View.OnKeyDown(KeyEvent) View.KeyUp View.OnKeyUp(KeyEvent) View.EnsureFocus() View.FocusFirst() View.FocusLast() View.FocusPrev() View.FocusNext() View.LayoutSubviews() View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) Responder.CanFocus System.Object.Equals(System.Object) System.Object.Equals(System.Object, System.Object) System.Object.GetHashCode() System.Object.GetType() System.Object.MemberwiseClone() System.Object.ReferenceEquals(System.Object, System.Object) Namespace : Terminal.Gui Assembly : Terminal.Gui.dll Syntax public class RadioGroup : View, IEnumerable Constructors RadioGroup(Int32, Int32, String[], Int32) Initializes a new instance of the RadioGroup class setting up the initial set of radio labels and the item that should be selected. The View frame is computed from the provided radio labels. Declaration public RadioGroup(int x, int y, string[] radioLabels, int selected = 0) Parameters Type Name Description System.Int32 x The x coordinate. System.Int32 y The y coordinate. System.String [] radioLabels The radio labels; an array of strings that can contain hotkeys using an underscore before the letter. System.Int32 selected The item to be selected, the value is clamped to the number of items. RadioGroup(String[], Int32) Initializes a new instance of the RadioGroup class setting up the initial set of radio labels and the item that should be selected. Declaration public RadioGroup(string[] radioLabels, int selected = 0) Parameters Type Name Description System.String [] radioLabels The radio labels; an array of strings that can contain hotkeys using an underscore before the letter. System.Int32 selected The index of the item to be selected, the value is clamped to the number of items. RadioGroup(Rect, String[], Int32) Initializes a new instance of the RadioGroup class setting up the initial set of radio labels and the item that should be selected and uses an absolute layout for the result. Declaration public RadioGroup(Rect rect, string[] radioLabels, int selected = 0) Parameters Type Name Description Rect rect Boundaries for the radio group. System.String [] radioLabels The radio labels; an array of strings that can contain hotkeys using an underscore before the letter. System.Int32 selected The index of item to be selected, the value is clamped to the number of items. Fields SelectionChanged Declaration public Action SelectionChanged Field Value Type Description System.Action < System.Int32 > Properties Cursor The location of the cursor in the RadioGroup Declaration public int Cursor { get; set; } Property Value Type Description System.Int32 RadioLabels The radio labels to display Declaration public string[] RadioLabels { get; set; } Property Value Type Description System.String [] The radio labels. Selected The currently selected item from the list of radio labels Declaration public int Selected { get; set; } Property Value Type Description System.Int32 The selected. Methods MouseEvent(MouseEvent) Declaration public override bool MouseEvent(MouseEvent me) Parameters Type Name Description MouseEvent me Returns Type Description System.Boolean Overrides Responder.MouseEvent(MouseEvent) PositionCursor() Declaration public override void PositionCursor() Overrides View.PositionCursor() ProcessColdKey(KeyEvent) Declaration public override bool ProcessColdKey(KeyEvent kb) Parameters Type Name Description KeyEvent kb Returns Type Description System.Boolean Overrides View.ProcessColdKey(KeyEvent) ProcessKey(KeyEvent) Declaration public override bool ProcessKey(KeyEvent kb) Parameters Type Name Description KeyEvent kb Returns Type Description System.Boolean Overrides View.ProcessKey(KeyEvent) Redraw(Rect) Declaration public override void Redraw(Rect region) Parameters Type Name Description Rect region Overrides View.Redraw(Rect) Implements System.Collections.IEnumerable" }, "api/Terminal.Gui/Terminal.Gui.Rect.html": { "href": "api/Terminal.Gui/Terminal.Gui.Rect.html", @@ -232,17 +232,17 @@ "api/Terminal.Gui/Terminal.Gui.SaveDialog.html": { "href": "api/Terminal.Gui/Terminal.Gui.SaveDialog.html", "title": "Class SaveDialog", - "keywords": "Class SaveDialog The SaveDialog provides an interactive dialog box for users to pick a file to save. Inheritance System.Object Responder View Toplevel Window Dialog FileDialog SaveDialog Implements System.Collections.IEnumerable Inherited Members FileDialog.WillPresent() FileDialog.Prompt FileDialog.NameFieldLabel FileDialog.Message FileDialog.CanCreateDirectories FileDialog.IsExtensionHidden FileDialog.DirectoryPath FileDialog.AllowedFileTypes FileDialog.AllowsOtherFileTypes FileDialog.FilePath FileDialog.Canceled Dialog.AddButton(Button) Dialog.LayoutSubviews() Dialog.ProcessKey(KeyEvent) Window.Title Window.GetEnumerator() Window.Add(View) Window.Remove(View) Window.RemoveAll() Window.Redraw(Rect) Window.MouseEvent(MouseEvent) Toplevel.Running Toplevel.Ready Toplevel.Create() Toplevel.CanFocus Toplevel.Modal Toplevel.MenuBar Toplevel.StatusBar View.Enter View.Leave View.MouseEnter View.MouseLeave View.Driver View.Subviews View.Id View.WantMousePositionReports View.WantContinuousButtonPressed View.Frame View.LayoutStyle View.Bounds View.X View.Y View.Width View.Height View.SuperView View.SetNeedsDisplay() View.SetNeedsDisplay(Rect) View.ChildNeedsDisplay() View.Add(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) View.PositionCursor() View.HasFocus View.OnEnter() View.OnLeave() View.Focused View.MostFocused View.ColorScheme View.AddRune(Int32, Int32, Rune) View.ClearNeedsDisplay() View.SetFocus(View) View.KeyPress View.ProcessHotKey(KeyEvent) View.ProcessColdKey(KeyEvent) View.KeyDown View.OnKeyDown(KeyEvent) View.KeyUp View.OnKeyUp(KeyEvent) View.EnsureFocus() View.FocusFirst() View.FocusLast() View.FocusPrev() View.FocusNext() View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) System.Object.Equals(System.Object) System.Object.Equals(System.Object, System.Object) System.Object.GetHashCode() System.Object.GetType() System.Object.MemberwiseClone() System.Object.ReferenceEquals(System.Object, System.Object) Namespace : Terminal.Gui Assembly : Terminal.Gui.dll Syntax public class SaveDialog : FileDialog, IEnumerable Remarks To use, create an instance of SaveDialog , and pass it to Run() . This will run the dialog modally, and when this returns, the FileName property will contain the selected file name or null if the user canceled. Constructors SaveDialog(ustring, ustring) Initializes a new SaveDialog Declaration public SaveDialog(ustring title, ustring message) Parameters Type Name Description NStack.ustring title The title. NStack.ustring message The message. Properties FileName Gets the name of the file the user selected for saving, or null if the user canceled the SaveDialog . Declaration public ustring FileName { get; } Property Value Type Description NStack.ustring The name of the file. Implements System.Collections.IEnumerable" + "keywords": "Class SaveDialog The SaveDialog provides an interactive dialog box for users to pick a file to save. Inheritance System.Object Responder View Toplevel Window Dialog FileDialog SaveDialog Implements System.Collections.IEnumerable Inherited Members FileDialog.WillPresent() FileDialog.Prompt FileDialog.NameFieldLabel FileDialog.Message FileDialog.CanCreateDirectories FileDialog.IsExtensionHidden FileDialog.DirectoryPath FileDialog.AllowedFileTypes FileDialog.AllowsOtherFileTypes FileDialog.FilePath FileDialog.Canceled Dialog.AddButton(Button) Dialog.LayoutSubviews() Dialog.ProcessKey(KeyEvent) Window.Title Window.GetEnumerator() Window.Add(View) Window.Remove(View) Window.RemoveAll() Window.Redraw(Rect) Window.MouseEvent(MouseEvent) Toplevel.Running Toplevel.Ready Toplevel.Create() Toplevel.CanFocus Toplevel.Modal Toplevel.MenuBar Toplevel.StatusBar View.Enter View.Leave View.MouseEnter View.MouseLeave View.Driver View.Subviews View.Id View.IsCurrentTop View.WantMousePositionReports View.WantContinuousButtonPressed View.Frame View.LayoutStyle View.Bounds View.X View.Y View.Width View.Height View.SuperView View.SetNeedsDisplay() View.SetNeedsDisplay(Rect) View.ChildNeedsDisplay() View.Add(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) View.PositionCursor() View.HasFocus View.OnEnter() View.OnLeave() View.Focused View.MostFocused View.ColorScheme View.AddRune(Int32, Int32, Rune) View.ClearNeedsDisplay() View.SetFocus(View) View.KeyPress View.ProcessHotKey(KeyEvent) View.ProcessColdKey(KeyEvent) View.KeyDown View.OnKeyDown(KeyEvent) View.KeyUp View.OnKeyUp(KeyEvent) View.EnsureFocus() View.FocusFirst() View.FocusLast() View.FocusPrev() View.FocusNext() View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) System.Object.Equals(System.Object) System.Object.Equals(System.Object, System.Object) System.Object.GetHashCode() System.Object.GetType() System.Object.MemberwiseClone() System.Object.ReferenceEquals(System.Object, System.Object) Namespace : Terminal.Gui Assembly : Terminal.Gui.dll Syntax public class SaveDialog : FileDialog, IEnumerable Remarks To use, create an instance of SaveDialog , and pass it to Run() . This will run the dialog modally, and when this returns, the FileName property will contain the selected file name or null if the user canceled. Constructors SaveDialog(ustring, ustring) Initializes a new SaveDialog Declaration public SaveDialog(ustring title, ustring message) Parameters Type Name Description NStack.ustring title The title. NStack.ustring message The message. Properties FileName Gets the name of the file the user selected for saving, or null if the user canceled the SaveDialog . Declaration public ustring FileName { get; } Property Value Type Description NStack.ustring The name of the file. Implements System.Collections.IEnumerable" }, "api/Terminal.Gui/Terminal.Gui.ScrollBarView.html": { "href": "api/Terminal.Gui/Terminal.Gui.ScrollBarView.html", "title": "Class ScrollBarView", - "keywords": "Class ScrollBarView ScrollBarViews are views that display a 1-character scrollbar, either horizontal or vertical Inheritance System.Object Responder View ScrollBarView Implements System.Collections.IEnumerable Inherited Members View.Enter View.Leave View.MouseEnter View.MouseLeave View.Driver View.Subviews View.Id View.WantMousePositionReports View.WantContinuousButtonPressed View.Frame View.GetEnumerator() View.LayoutStyle View.Bounds View.X View.Y View.Width View.Height View.SuperView View.SetNeedsDisplay() View.SetNeedsDisplay(Rect) View.ChildNeedsDisplay() 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) View.PositionCursor() View.HasFocus View.OnEnter() View.OnLeave() View.Focused View.MostFocused View.ColorScheme View.AddRune(Int32, Int32, Rune) View.ClearNeedsDisplay() View.SetFocus(View) View.KeyPress View.ProcessKey(KeyEvent) View.ProcessHotKey(KeyEvent) View.ProcessColdKey(KeyEvent) View.KeyDown View.OnKeyDown(KeyEvent) View.KeyUp View.OnKeyUp(KeyEvent) View.EnsureFocus() View.FocusFirst() View.FocusLast() View.FocusPrev() View.FocusNext() View.LayoutSubviews() View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) Responder.CanFocus System.Object.Equals(System.Object) System.Object.Equals(System.Object, System.Object) System.Object.GetHashCode() System.Object.GetType() System.Object.MemberwiseClone() System.Object.ReferenceEquals(System.Object, System.Object) Namespace : Terminal.Gui Assembly : Terminal.Gui.dll Syntax public class ScrollBarView : View, IEnumerable Remarks The scrollbar is drawn to be a representation of the Size, assuming that the scroll position is set at Position. If the region to display the scrollbar is larger than three characters, arrow indicators are drawn. Constructors ScrollBarView(Rect, Int32, Int32, Boolean) Initializes a new instance of the ScrollBarView class. Declaration public ScrollBarView(Rect rect, int size, int position, bool isVertical) Parameters Type Name Description Rect rect Frame for the scrollbar. System.Int32 size The size that this scrollbar represents. System.Int32 position The position within this scrollbar. System.Boolean isVertical If set to true this is a vertical scrollbar, otherwise, the scrollbar is horizontal. Properties Position The position to show the scrollbar at. Declaration public int Position { get; set; } Property Value Type Description System.Int32 The position. Size The size that this scrollbar represents Declaration public int Size { get; set; } Property Value Type Description System.Int32 The size. Methods MouseEvent(MouseEvent) Declaration public override bool MouseEvent(MouseEvent me) Parameters Type Name Description MouseEvent me Returns Type Description System.Boolean Overrides Responder.MouseEvent(MouseEvent) Redraw(Rect) Redraw the scrollbar Declaration public override void Redraw(Rect region) Parameters Type Name Description Rect region Region to be redrawn. Overrides View.Redraw(Rect) Events ChangedPosition This event is raised when the position on the scrollbar has changed. Declaration public event Action ChangedPosition Event Type Type Description System.Action Implements System.Collections.IEnumerable" + "keywords": "Class ScrollBarView ScrollBarViews are views that display a 1-character scrollbar, either horizontal or vertical Inheritance System.Object Responder View ScrollBarView Implements System.Collections.IEnumerable Inherited Members View.Enter View.Leave View.MouseEnter View.MouseLeave View.Driver View.Subviews View.Id View.IsCurrentTop View.WantMousePositionReports View.WantContinuousButtonPressed View.Frame View.GetEnumerator() View.LayoutStyle View.Bounds View.X View.Y View.Width View.Height View.SuperView View.SetNeedsDisplay() View.SetNeedsDisplay(Rect) View.ChildNeedsDisplay() 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) View.PositionCursor() View.HasFocus View.OnEnter() View.OnLeave() View.Focused View.MostFocused View.ColorScheme View.AddRune(Int32, Int32, Rune) View.ClearNeedsDisplay() View.SetFocus(View) View.KeyPress View.ProcessKey(KeyEvent) View.ProcessHotKey(KeyEvent) View.ProcessColdKey(KeyEvent) View.KeyDown View.OnKeyDown(KeyEvent) View.KeyUp View.OnKeyUp(KeyEvent) View.EnsureFocus() View.FocusFirst() View.FocusLast() View.FocusPrev() View.FocusNext() View.LayoutSubviews() View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) Responder.CanFocus System.Object.Equals(System.Object) System.Object.Equals(System.Object, System.Object) System.Object.GetHashCode() System.Object.GetType() System.Object.MemberwiseClone() System.Object.ReferenceEquals(System.Object, System.Object) Namespace : Terminal.Gui Assembly : Terminal.Gui.dll Syntax public class ScrollBarView : View, IEnumerable Remarks The scrollbar is drawn to be a representation of the Size, assuming that the scroll position is set at Position. If the region to display the scrollbar is larger than three characters, arrow indicators are drawn. Constructors ScrollBarView(Rect, Int32, Int32, Boolean) Initializes a new instance of the ScrollBarView class. Declaration public ScrollBarView(Rect rect, int size, int position, bool isVertical) Parameters Type Name Description Rect rect Frame for the scrollbar. System.Int32 size The size that this scrollbar represents. System.Int32 position The position within this scrollbar. System.Boolean isVertical If set to true this is a vertical scrollbar, otherwise, the scrollbar is horizontal. Properties Position The position to show the scrollbar at. Declaration public int Position { get; set; } Property Value Type Description System.Int32 The position. Size The size that this scrollbar represents Declaration public int Size { get; set; } Property Value Type Description System.Int32 The size. Methods MouseEvent(MouseEvent) Declaration public override bool MouseEvent(MouseEvent me) Parameters Type Name Description MouseEvent me Returns Type Description System.Boolean Overrides Responder.MouseEvent(MouseEvent) Redraw(Rect) Redraw the scrollbar Declaration public override void Redraw(Rect region) Parameters Type Name Description Rect region Region to be redrawn. Overrides View.Redraw(Rect) Events ChangedPosition This event is raised when the position on the scrollbar has changed. Declaration public event Action ChangedPosition Event Type Type Description System.Action Implements System.Collections.IEnumerable" }, "api/Terminal.Gui/Terminal.Gui.ScrollView.html": { "href": "api/Terminal.Gui/Terminal.Gui.ScrollView.html", "title": "Class ScrollView", - "keywords": "Class ScrollView Scrollviews are views that present a window into a virtual space where children views are added. Similar to the iOS UIScrollView. Inheritance System.Object Responder View ScrollView Implements System.Collections.IEnumerable Inherited Members View.Enter View.Leave View.MouseEnter View.MouseLeave View.Driver View.Subviews View.Id View.WantMousePositionReports View.WantContinuousButtonPressed View.Frame View.GetEnumerator() View.LayoutStyle View.Bounds View.X View.Y View.Width View.Height View.SuperView View.SetNeedsDisplay() View.SetNeedsDisplay(Rect) View.ChildNeedsDisplay() View.Add(View[]) 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) View.HasFocus View.OnEnter() View.OnLeave() View.Focused View.MostFocused View.ColorScheme View.AddRune(Int32, Int32, Rune) View.ClearNeedsDisplay() View.SetFocus(View) View.KeyPress View.ProcessHotKey(KeyEvent) View.ProcessColdKey(KeyEvent) View.KeyDown View.OnKeyDown(KeyEvent) View.KeyUp View.OnKeyUp(KeyEvent) View.EnsureFocus() View.FocusFirst() View.FocusLast() View.FocusPrev() View.FocusNext() View.LayoutSubviews() View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) Responder.CanFocus System.Object.Equals(System.Object) System.Object.Equals(System.Object, System.Object) System.Object.GetHashCode() System.Object.GetType() System.Object.MemberwiseClone() System.Object.ReferenceEquals(System.Object, System.Object) Namespace : Terminal.Gui Assembly : Terminal.Gui.dll Syntax public class ScrollView : View, IEnumerable Remarks The subviews that are added to this scrollview are offset by the ContentOffset property. The view itself is a window into the space represented by the ContentSize. Constructors ScrollView(Rect) Constructs a ScrollView Declaration public ScrollView(Rect frame) Parameters Type Name Description Rect frame Properties ContentOffset Represents the top left corner coordinate that is displayed by the scrollview Declaration public Point ContentOffset { get; set; } Property Value Type Description Point The content offset. ContentSize Represents the contents of the data shown inside the scrolview Declaration public Size ContentSize { get; set; } Property Value Type Description Size The size of the content. ShowHorizontalScrollIndicator Gets or sets the visibility for the horizontal scroll indicator. Declaration public bool ShowHorizontalScrollIndicator { get; set; } Property Value Type Description System.Boolean true if show vertical scroll indicator; otherwise, false . ShowVerticalScrollIndicator /// Gets or sets the visibility for the vertical scroll indicator. Declaration public bool ShowVerticalScrollIndicator { get; set; } Property Value Type Description System.Boolean true if show vertical scroll indicator; otherwise, false . Methods Add(View) Adds the view to the scrollview. Declaration public override void Add(View view) Parameters Type Name Description View view The view to add to the scrollview. Overrides View.Add(View) MouseEvent(MouseEvent) Declaration public override bool MouseEvent(MouseEvent me) Parameters Type Name Description MouseEvent me Returns Type Description System.Boolean Overrides Responder.MouseEvent(MouseEvent) PositionCursor() Declaration public override void PositionCursor() Overrides View.PositionCursor() ProcessKey(KeyEvent) Declaration public override bool ProcessKey(KeyEvent kb) Parameters Type Name Description KeyEvent kb Returns Type Description System.Boolean Overrides View.ProcessKey(KeyEvent) Redraw(Rect) This event is raised when the contents have scrolled Declaration public override void Redraw(Rect region) Parameters Type Name Description Rect region Overrides View.Redraw(Rect) RemoveAll() Removes all widgets from this container. Declaration public override void RemoveAll() Overrides View.RemoveAll() Remarks ScrollDown(Int32) Scrolls the view down. Declaration public bool ScrollDown(int lines) Parameters Type Name Description System.Int32 lines Number of lines to scroll. Returns Type Description System.Boolean true , if left was scrolled, false otherwise. ScrollLeft(Int32) Scrolls the view to the left Declaration public bool ScrollLeft(int cols) Parameters Type Name Description System.Int32 cols Number of columns to scroll by. Returns Type Description System.Boolean true , if left was scrolled, false otherwise. ScrollRight(Int32) Scrolls the view to the right. Declaration public bool ScrollRight(int cols) Parameters Type Name Description System.Int32 cols Number of columns to scroll by. Returns Type Description System.Boolean true , if right was scrolled, false otherwise. ScrollUp(Int32) Scrolls the view up. Declaration public bool ScrollUp(int lines) Parameters Type Name Description System.Int32 lines Number of lines to scroll. Returns Type Description System.Boolean true , if left was scrolled, false otherwise. Implements System.Collections.IEnumerable" + "keywords": "Class ScrollView Scrollviews are views that present a window into a virtual space where children views are added. Similar to the iOS UIScrollView. Inheritance System.Object Responder View ScrollView Implements System.Collections.IEnumerable Inherited Members View.Enter View.Leave View.MouseEnter View.MouseLeave View.Driver View.Subviews View.Id View.IsCurrentTop View.WantMousePositionReports View.WantContinuousButtonPressed View.Frame View.GetEnumerator() View.LayoutStyle View.Bounds View.X View.Y View.Width View.Height View.SuperView View.SetNeedsDisplay() View.SetNeedsDisplay(Rect) View.ChildNeedsDisplay() View.Add(View[]) 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) View.HasFocus View.OnEnter() View.OnLeave() View.Focused View.MostFocused View.ColorScheme View.AddRune(Int32, Int32, Rune) View.ClearNeedsDisplay() View.SetFocus(View) View.KeyPress View.ProcessHotKey(KeyEvent) View.ProcessColdKey(KeyEvent) View.KeyDown View.OnKeyDown(KeyEvent) View.KeyUp View.OnKeyUp(KeyEvent) View.EnsureFocus() View.FocusFirst() View.FocusLast() View.FocusPrev() View.FocusNext() View.LayoutSubviews() View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) Responder.CanFocus System.Object.Equals(System.Object) System.Object.Equals(System.Object, System.Object) System.Object.GetHashCode() System.Object.GetType() System.Object.MemberwiseClone() System.Object.ReferenceEquals(System.Object, System.Object) Namespace : Terminal.Gui Assembly : Terminal.Gui.dll Syntax public class ScrollView : View, IEnumerable Remarks The subviews that are added to this scrollview are offset by the ContentOffset property. The view itself is a window into the space represented by the ContentSize. Constructors ScrollView(Rect) Constructs a ScrollView Declaration public ScrollView(Rect frame) Parameters Type Name Description Rect frame Properties ContentOffset Represents the top left corner coordinate that is displayed by the scrollview Declaration public Point ContentOffset { get; set; } Property Value Type Description Point The content offset. ContentSize Represents the contents of the data shown inside the scrolview Declaration public Size ContentSize { get; set; } Property Value Type Description Size The size of the content. ShowHorizontalScrollIndicator Gets or sets the visibility for the horizontal scroll indicator. Declaration public bool ShowHorizontalScrollIndicator { get; set; } Property Value Type Description System.Boolean true if show vertical scroll indicator; otherwise, false . ShowVerticalScrollIndicator /// Gets or sets the visibility for the vertical scroll indicator. Declaration public bool ShowVerticalScrollIndicator { get; set; } Property Value Type Description System.Boolean true if show vertical scroll indicator; otherwise, false . Methods Add(View) Adds the view to the scrollview. Declaration public override void Add(View view) Parameters Type Name Description View view The view to add to the scrollview. Overrides View.Add(View) MouseEvent(MouseEvent) Declaration public override bool MouseEvent(MouseEvent me) Parameters Type Name Description MouseEvent me Returns Type Description System.Boolean Overrides Responder.MouseEvent(MouseEvent) PositionCursor() Declaration public override void PositionCursor() Overrides View.PositionCursor() ProcessKey(KeyEvent) Declaration public override bool ProcessKey(KeyEvent kb) Parameters Type Name Description KeyEvent kb Returns Type Description System.Boolean Overrides View.ProcessKey(KeyEvent) Redraw(Rect) This event is raised when the contents have scrolled Declaration public override void Redraw(Rect region) Parameters Type Name Description Rect region Overrides View.Redraw(Rect) RemoveAll() Removes all widgets from this container. Declaration public override void RemoveAll() Overrides View.RemoveAll() Remarks ScrollDown(Int32) Scrolls the view down. Declaration public bool ScrollDown(int lines) Parameters Type Name Description System.Int32 lines Number of lines to scroll. Returns Type Description System.Boolean true , if left was scrolled, false otherwise. ScrollLeft(Int32) Scrolls the view to the left Declaration public bool ScrollLeft(int cols) Parameters Type Name Description System.Int32 cols Number of columns to scroll by. Returns Type Description System.Boolean true , if left was scrolled, false otherwise. ScrollRight(Int32) Scrolls the view to the right. Declaration public bool ScrollRight(int cols) Parameters Type Name Description System.Int32 cols Number of columns to scroll by. Returns Type Description System.Boolean true , if right was scrolled, false otherwise. ScrollUp(Int32) Scrolls the view up. Declaration public bool ScrollUp(int lines) Parameters Type Name Description System.Int32 lines Number of lines to scroll. Returns Type Description System.Boolean true , if left was scrolled, false otherwise. Implements System.Collections.IEnumerable" }, "api/Terminal.Gui/Terminal.Gui.Size.html": { "href": "api/Terminal.Gui/Terminal.Gui.Size.html", @@ -257,7 +257,7 @@ "api/Terminal.Gui/Terminal.Gui.StatusBar.html": { "href": "api/Terminal.Gui/Terminal.Gui.StatusBar.html", "title": "Class StatusBar", - "keywords": "Class StatusBar A status bar is a View that snaps to the bottom of a Toplevel displaying set of StatusItem s. 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.Collections.IEnumerable Inherited Members View.Enter View.Leave View.MouseEnter View.MouseLeave View.Driver View.Subviews View.Id View.WantMousePositionReports View.WantContinuousButtonPressed View.Frame View.GetEnumerator() View.LayoutStyle View.Bounds View.X View.Y View.Width View.Height View.SuperView View.SetNeedsDisplay() View.SetNeedsDisplay(Rect) View.ChildNeedsDisplay() 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) View.PositionCursor() View.HasFocus View.OnEnter() View.OnLeave() View.Focused View.MostFocused View.ColorScheme View.AddRune(Int32, Int32, Rune) View.ClearNeedsDisplay() View.SetFocus(View) View.KeyPress View.ProcessKey(KeyEvent) View.ProcessColdKey(KeyEvent) View.KeyDown View.OnKeyDown(KeyEvent) View.KeyUp View.OnKeyUp(KeyEvent) View.EnsureFocus() View.FocusFirst() View.FocusLast() View.FocusPrev() View.FocusNext() View.LayoutSubviews() View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) Responder.CanFocus Responder.MouseEvent(MouseEvent) System.Object.Equals(System.Object) System.Object.Equals(System.Object, System.Object) System.Object.GetHashCode() System.Object.GetType() System.Object.MemberwiseClone() System.Object.ReferenceEquals(System.Object, System.Object) Namespace : Terminal.Gui Assembly : Terminal.Gui.dll Syntax public class StatusBar : View, IEnumerable Constructors StatusBar(StatusItem[]) Initializes a new instance of the StatusBar class with the specified set of StatusItem s. The StatusBar will be drawn on the lowest line of the terminal or Parent (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 [] Parent The parent view of the StatusBar . Declaration public View Parent { get; set; } Property Value Type Description View Methods ProcessHotKey(KeyEvent) Declaration public override bool ProcessHotKey(KeyEvent kb) Parameters Type Name Description KeyEvent kb Returns Type Description System.Boolean Overrides View.ProcessHotKey(KeyEvent) Redraw(Rect) Declaration public override void Redraw(Rect region) Parameters Type Name Description Rect region Overrides View.Redraw(Rect) Implements System.Collections.IEnumerable" + "keywords": "Class StatusBar A status bar is a View that snaps to the bottom of a Toplevel displaying set of StatusItem s. 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.Collections.IEnumerable Inherited Members View.Enter View.Leave View.MouseEnter View.MouseLeave View.Driver View.Subviews View.Id View.IsCurrentTop View.WantMousePositionReports View.WantContinuousButtonPressed View.Frame View.GetEnumerator() View.LayoutStyle View.Bounds View.X View.Y View.Width View.Height View.SuperView View.SetNeedsDisplay() View.SetNeedsDisplay(Rect) View.ChildNeedsDisplay() 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) View.PositionCursor() View.HasFocus View.OnEnter() View.OnLeave() View.Focused View.MostFocused View.ColorScheme View.AddRune(Int32, Int32, Rune) View.ClearNeedsDisplay() View.SetFocus(View) View.KeyPress View.ProcessKey(KeyEvent) View.ProcessColdKey(KeyEvent) View.KeyDown View.OnKeyDown(KeyEvent) View.KeyUp View.OnKeyUp(KeyEvent) View.EnsureFocus() View.FocusFirst() View.FocusLast() View.FocusPrev() View.FocusNext() View.LayoutSubviews() View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) Responder.CanFocus Responder.MouseEvent(MouseEvent) System.Object.Equals(System.Object) System.Object.Equals(System.Object, System.Object) System.Object.GetHashCode() System.Object.GetType() System.Object.MemberwiseClone() System.Object.ReferenceEquals(System.Object, System.Object) Namespace : Terminal.Gui Assembly : Terminal.Gui.dll Syntax public class StatusBar : View, IEnumerable Constructors StatusBar(StatusItem[]) Initializes a new instance of the StatusBar class with the specified set of StatusItem s. The StatusBar will be drawn on the lowest line of the terminal or Parent (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 [] Parent The parent view of the StatusBar . Declaration public View Parent { get; set; } Property Value Type Description View Methods ProcessHotKey(KeyEvent) Declaration public override bool ProcessHotKey(KeyEvent kb) Parameters Type Name Description KeyEvent kb Returns Type Description System.Boolean Overrides View.ProcessHotKey(KeyEvent) Redraw(Rect) Declaration public override void Redraw(Rect region) Parameters Type Name Description Rect region Overrides View.Redraw(Rect) Implements System.Collections.IEnumerable" }, "api/Terminal.Gui/Terminal.Gui.StatusItem.html": { "href": "api/Terminal.Gui/Terminal.Gui.StatusItem.html", @@ -272,27 +272,27 @@ "api/Terminal.Gui/Terminal.Gui.TextField.html": { "href": "api/Terminal.Gui/Terminal.Gui.TextField.html", "title": "Class TextField", - "keywords": "Class TextField Single-line text entry View Inheritance System.Object Responder View TextField DateField TimeField Implements System.Collections.IEnumerable Inherited Members View.Enter View.Leave View.MouseEnter View.MouseLeave View.Driver View.Subviews View.Id View.WantMousePositionReports View.WantContinuousButtonPressed View.GetEnumerator() View.LayoutStyle View.Bounds View.X View.Y View.Width View.Height View.SuperView View.SetNeedsDisplay() View.SetNeedsDisplay(Rect) View.ChildNeedsDisplay() 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) View.HasFocus View.OnEnter() View.Focused View.MostFocused View.ColorScheme View.AddRune(Int32, Int32, Rune) View.ClearNeedsDisplay() View.SetFocus(View) View.KeyPress View.ProcessHotKey(KeyEvent) View.ProcessColdKey(KeyEvent) View.KeyDown View.OnKeyDown(KeyEvent) View.KeyUp View.OnKeyUp(KeyEvent) View.EnsureFocus() View.FocusFirst() View.FocusLast() View.FocusPrev() View.FocusNext() View.LayoutSubviews() View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) System.Object.Equals(System.Object) System.Object.Equals(System.Object, System.Object) System.Object.GetHashCode() System.Object.GetType() System.Object.MemberwiseClone() System.Object.ReferenceEquals(System.Object, System.Object) Namespace : Terminal.Gui Assembly : Terminal.Gui.dll Syntax public class TextField : View, IEnumerable Remarks The TextField View provides editing functionality and mouse support. Constructors TextField(ustring) Public constructor that creates a text field, with layout controlled with X, Y, Width and Height. Declaration public TextField(ustring text) Parameters Type Name Description NStack.ustring text Initial text contents. TextField(Int32, Int32, Int32, ustring) Public constructor that creates a text field at an absolute position and size. Declaration public TextField(int x, int y, int w, ustring text) Parameters Type Name Description System.Int32 x The x coordinate. System.Int32 y The y coordinate. System.Int32 w The width. NStack.ustring text Initial text contents. TextField(String) Public constructor that creates a text field, with layout controlled with X, Y, Width and Height. Declaration public TextField(string text) Parameters Type Name Description System.String text Initial text contents. Properties CanFocus Declaration public override bool CanFocus { get; set; } Property Value Type Description System.Boolean Overrides Responder.CanFocus CursorPosition Sets or gets the current cursor position. Declaration public int CursorPosition { get; set; } Property Value Type Description System.Int32 Frame Declaration public override Rect Frame { get; set; } Property Value Type Description Rect Overrides View.Frame ReadOnly If set to true its not allow any changes in the text. Declaration public bool ReadOnly { get; set; } Property Value Type Description System.Boolean Secret Sets the secret property. Declaration public bool Secret { get; set; } Property Value Type Description System.Boolean Remarks This makes the text entry suitable for entering passwords. SelectedLength Length of the selected text. Declaration public int SelectedLength { get; set; } Property Value Type Description System.Int32 SelectedStart Start position of the selected text. Declaration public int SelectedStart { get; set; } Property Value Type Description System.Int32 SelectedText The selected text. Declaration public ustring SelectedText { get; set; } Property Value Type Description NStack.ustring Text Sets or gets the text held by the view. Declaration public ustring Text { get; set; } Property Value Type Description NStack.ustring Remarks Used Tracks whether the text field should be considered \"used\", that is, that the user has moved in the entry, so new input should be appended at the cursor position, rather than clearing the entry Declaration public bool Used { get; set; } Property Value Type Description System.Boolean Methods ClearAllSelection() Clear the selected text. Declaration public void ClearAllSelection() Copy() Copy the selected text to the clipboard. Declaration public virtual void Copy() Cut() Cut the selected text to the clipboard. Declaration public virtual void Cut() MouseEvent(MouseEvent) Declaration public override bool MouseEvent(MouseEvent ev) Parameters Type Name Description MouseEvent ev Returns Type Description System.Boolean Overrides Responder.MouseEvent(MouseEvent) OnLeave() Declaration public override bool OnLeave() Returns Type Description System.Boolean Overrides View.OnLeave() Paste() Paste the selected text from the clipboard. Declaration public virtual void Paste() PositionCursor() Sets the cursor position. Declaration public override void PositionCursor() Overrides View.PositionCursor() ProcessKey(KeyEvent) Processes key presses for the TextField . Declaration public override bool ProcessKey(KeyEvent kb) Parameters Type Name Description KeyEvent kb Returns Type Description System.Boolean Overrides View.ProcessKey(KeyEvent) Remarks The TextField control responds to the following keys: Keys Function Delete , Backspace Deletes the character before cursor. Redraw(Rect) Declaration public override void Redraw(Rect region) Parameters Type Name Description Rect region Overrides View.Redraw(Rect) Events Changed Changed event, raised when the text has clicked. Declaration public event EventHandler Changed Event Type Type Description System.EventHandler < NStack.ustring > Remarks Client code can hook up to this event, it is raised when the text in the entry changes. Implements System.Collections.IEnumerable" + "keywords": "Class TextField Single-line text entry View Inheritance System.Object Responder View TextField DateField TimeField Implements System.Collections.IEnumerable Inherited Members View.Enter View.Leave View.MouseEnter View.MouseLeave View.Driver View.Subviews View.Id View.IsCurrentTop View.WantMousePositionReports View.WantContinuousButtonPressed View.GetEnumerator() View.LayoutStyle View.Bounds View.X View.Y View.Width View.Height View.SuperView View.SetNeedsDisplay() View.SetNeedsDisplay(Rect) View.ChildNeedsDisplay() 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) View.HasFocus View.OnEnter() View.Focused View.MostFocused View.ColorScheme View.AddRune(Int32, Int32, Rune) View.ClearNeedsDisplay() View.SetFocus(View) View.KeyPress View.ProcessHotKey(KeyEvent) View.ProcessColdKey(KeyEvent) View.KeyDown View.OnKeyDown(KeyEvent) View.KeyUp View.OnKeyUp(KeyEvent) View.EnsureFocus() View.FocusFirst() View.FocusLast() View.FocusPrev() View.FocusNext() View.LayoutSubviews() View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) System.Object.Equals(System.Object) System.Object.Equals(System.Object, System.Object) System.Object.GetHashCode() System.Object.GetType() System.Object.MemberwiseClone() System.Object.ReferenceEquals(System.Object, System.Object) Namespace : Terminal.Gui Assembly : Terminal.Gui.dll Syntax public class TextField : View, IEnumerable Remarks The TextField View provides editing functionality and mouse support. Constructors TextField(ustring) Public constructor that creates a text field, with layout controlled with X, Y, Width and Height. Declaration public TextField(ustring text) Parameters Type Name Description NStack.ustring text Initial text contents. TextField(Int32, Int32, Int32, ustring) Public constructor that creates a text field at an absolute position and size. Declaration public TextField(int x, int y, int w, ustring text) Parameters Type Name Description System.Int32 x The x coordinate. System.Int32 y The y coordinate. System.Int32 w The width. NStack.ustring text Initial text contents. TextField(String) Public constructor that creates a text field, with layout controlled with X, Y, Width and Height. Declaration public TextField(string text) Parameters Type Name Description System.String text Initial text contents. Properties CanFocus Declaration public override bool CanFocus { get; set; } Property Value Type Description System.Boolean Overrides Responder.CanFocus CursorPosition Sets or gets the current cursor position. Declaration public int CursorPosition { get; set; } Property Value Type Description System.Int32 Frame Declaration public override Rect Frame { get; set; } Property Value Type Description Rect Overrides View.Frame ReadOnly If set to true its not allow any changes in the text. Declaration public bool ReadOnly { get; set; } Property Value Type Description System.Boolean Secret Sets the secret property. Declaration public bool Secret { get; set; } Property Value Type Description System.Boolean Remarks This makes the text entry suitable for entering passwords. SelectedLength Length of the selected text. Declaration public int SelectedLength { get; set; } Property Value Type Description System.Int32 SelectedStart Start position of the selected text. Declaration public int SelectedStart { get; set; } Property Value Type Description System.Int32 SelectedText The selected text. Declaration public ustring SelectedText { get; set; } Property Value Type Description NStack.ustring Text Sets or gets the text held by the view. Declaration public ustring Text { get; set; } Property Value Type Description NStack.ustring Remarks Used Tracks whether the text field should be considered \"used\", that is, that the user has moved in the entry, so new input should be appended at the cursor position, rather than clearing the entry Declaration public bool Used { get; set; } Property Value Type Description System.Boolean Methods ClearAllSelection() Clear the selected text. Declaration public void ClearAllSelection() Copy() Copy the selected text to the clipboard. Declaration public virtual void Copy() Cut() Cut the selected text to the clipboard. Declaration public virtual void Cut() MouseEvent(MouseEvent) Declaration public override bool MouseEvent(MouseEvent ev) Parameters Type Name Description MouseEvent ev Returns Type Description System.Boolean Overrides Responder.MouseEvent(MouseEvent) OnLeave() Declaration public override bool OnLeave() Returns Type Description System.Boolean Overrides View.OnLeave() Paste() Paste the selected text from the clipboard. Declaration public virtual void Paste() PositionCursor() Sets the cursor position. Declaration public override void PositionCursor() Overrides View.PositionCursor() ProcessKey(KeyEvent) Processes key presses for the TextField . Declaration public override bool ProcessKey(KeyEvent kb) Parameters Type Name Description KeyEvent kb Returns Type Description System.Boolean Overrides View.ProcessKey(KeyEvent) Remarks The TextField control responds to the following keys: Keys Function Delete , Backspace Deletes the character before cursor. Redraw(Rect) Declaration public override void Redraw(Rect region) Parameters Type Name Description Rect region Overrides View.Redraw(Rect) Events Changed Changed event, raised when the text has clicked. Declaration public event EventHandler Changed Event Type Type Description System.EventHandler < NStack.ustring > Remarks Client code can hook up to this event, it is raised when the text in the entry changes. Implements System.Collections.IEnumerable" }, "api/Terminal.Gui/Terminal.Gui.TextView.html": { "href": "api/Terminal.Gui/Terminal.Gui.TextView.html", "title": "Class TextView", - "keywords": "Class TextView Multi-line text editing View Inheritance System.Object Responder View TextView Implements System.Collections.IEnumerable Inherited Members View.Enter View.Leave View.MouseEnter View.MouseLeave View.Driver View.Subviews View.Id View.WantMousePositionReports View.WantContinuousButtonPressed View.Frame View.GetEnumerator() View.LayoutStyle View.Bounds View.X View.Y View.Width View.Height View.SuperView View.SetNeedsDisplay() View.SetNeedsDisplay(Rect) View.ChildNeedsDisplay() 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) View.HasFocus View.OnEnter() View.OnLeave() View.Focused View.MostFocused View.ColorScheme View.AddRune(Int32, Int32, Rune) View.ClearNeedsDisplay() View.SetFocus(View) View.KeyPress View.ProcessHotKey(KeyEvent) View.ProcessColdKey(KeyEvent) View.KeyDown View.OnKeyDown(KeyEvent) View.KeyUp View.OnKeyUp(KeyEvent) View.EnsureFocus() View.FocusFirst() View.FocusLast() View.FocusPrev() View.FocusNext() View.LayoutSubviews() View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) System.Object.Equals(System.Object) System.Object.Equals(System.Object, System.Object) System.Object.GetHashCode() System.Object.GetType() System.Object.MemberwiseClone() System.Object.ReferenceEquals(System.Object, System.Object) Namespace : Terminal.Gui Assembly : Terminal.Gui.dll Syntax public class TextView : View, IEnumerable Remarks TextView provides a multi-line text editor. Users interact with it with the standard Emacs commands for movement or the arrow keys. Shortcut Action performed Left cursor, Control-b Moves the editing point left. Right cursor, Control-f Moves the editing point right. Alt-b Moves one word back. Alt-f Moves one word forward. Up cursor, Control-p Moves the editing point one line up. Down cursor, Control-n Moves the editing point one line down Home key, Control-a Moves the cursor to the beginning of the line. End key, Control-e Moves the cursor to the end of the line. Delete, Control-d Deletes the character in front of the cursor. Backspace Deletes the character behind the cursor. Control-k Deletes the text until the end of the line and replaces the kill buffer with the deleted text. You can paste this text in a different place by using Control-y. Control-y Pastes the content of the kill ring into the current position. Alt-d Deletes the word above the cursor and adds it to the kill ring. You can paste the contents of the kill ring with Control-y. Control-q Quotes the next input character, to prevent the normal processing of key handling to take place. Constructors TextView() Initalizes a TextView on the specified area, with dimensions controlled with the X, Y, Width and Height properties. Declaration public TextView() TextView(Rect) Initalizes a TextView on the specified area, with absolute position and size. Declaration public TextView(Rect frame) Parameters Type Name Description Rect frame Remarks Properties CanFocus Declaration public override bool CanFocus { get; set; } Property Value Type Description System.Boolean Overrides Responder.CanFocus CurrentColumn Gets the cursor column. Declaration public int CurrentColumn { get; } Property Value Type Description System.Int32 The cursor column. CurrentRow Gets the current cursor row. Declaration public int CurrentRow { get; } Property Value Type Description System.Int32 ReadOnly Gets or sets whether the TextView is in read-only mode or not Declaration public bool ReadOnly { get; set; } Property Value Type Description System.Boolean Boolean value(Default false) Text Sets or gets the text in the TextView . Declaration public ustring Text { get; set; } Property Value Type Description NStack.ustring Remarks Methods CloseFile() Closes the contents of the stream into the TextView . Declaration public bool CloseFile() Returns Type Description System.Boolean true , if stream was closed, false otherwise. LoadFile(String) Loads the contents of the file into the TextView . Declaration public bool LoadFile(string path) Parameters Type Name Description System.String path Path to the file to load. Returns Type Description System.Boolean true , if file was loaded, false otherwise. LoadStream(Stream) Loads the contents of the stream into the TextView . Declaration public void LoadStream(Stream stream) Parameters Type Name Description System.IO.Stream stream Stream to load the contents from. MouseEvent(MouseEvent) Declaration public override bool MouseEvent(MouseEvent ev) Parameters Type Name Description MouseEvent ev Returns Type Description System.Boolean Overrides Responder.MouseEvent(MouseEvent) PositionCursor() Positions the cursor on the current row and column Declaration public override void PositionCursor() Overrides View.PositionCursor() ProcessKey(KeyEvent) Declaration public override bool ProcessKey(KeyEvent kb) Parameters Type Name Description KeyEvent kb Returns Type Description System.Boolean Overrides View.ProcessKey(KeyEvent) Redraw(Rect) Declaration public override void Redraw(Rect region) Parameters Type Name Description Rect region Overrides View.Redraw(Rect) ScrollTo(Int32) Will scroll the TextView to display the specified row at the top Declaration public void ScrollTo(int row) Parameters Type Name Description System.Int32 row Row that should be displayed at the top, if the value is negative it will be reset to zero Events TextChanged Raised when the Text of the TextView changes. Declaration public event EventHandler TextChanged Event Type Type Description System.EventHandler Implements System.Collections.IEnumerable" + "keywords": "Class TextView Multi-line text editing View Inheritance System.Object Responder View TextView Implements System.Collections.IEnumerable Inherited Members View.Enter View.Leave View.MouseEnter View.MouseLeave View.Driver View.Subviews View.Id View.IsCurrentTop View.WantMousePositionReports View.WantContinuousButtonPressed View.Frame View.GetEnumerator() View.LayoutStyle View.Bounds View.X View.Y View.Width View.Height View.SuperView View.SetNeedsDisplay() View.SetNeedsDisplay(Rect) View.ChildNeedsDisplay() 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) View.HasFocus View.OnEnter() View.OnLeave() View.Focused View.MostFocused View.ColorScheme View.AddRune(Int32, Int32, Rune) View.ClearNeedsDisplay() View.SetFocus(View) View.KeyPress View.ProcessHotKey(KeyEvent) View.ProcessColdKey(KeyEvent) View.KeyDown View.OnKeyDown(KeyEvent) View.KeyUp View.OnKeyUp(KeyEvent) View.EnsureFocus() View.FocusFirst() View.FocusLast() View.FocusPrev() View.FocusNext() View.LayoutSubviews() View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) System.Object.Equals(System.Object) System.Object.Equals(System.Object, System.Object) System.Object.GetHashCode() System.Object.GetType() System.Object.MemberwiseClone() System.Object.ReferenceEquals(System.Object, System.Object) Namespace : Terminal.Gui Assembly : Terminal.Gui.dll Syntax public class TextView : View, IEnumerable Remarks TextView provides a multi-line text editor. Users interact with it with the standard Emacs commands for movement or the arrow keys. Shortcut Action performed Left cursor, Control-b Moves the editing point left. Right cursor, Control-f Moves the editing point right. Alt-b Moves one word back. Alt-f Moves one word forward. Up cursor, Control-p Moves the editing point one line up. Down cursor, Control-n Moves the editing point one line down Home key, Control-a Moves the cursor to the beginning of the line. End key, Control-e Moves the cursor to the end of the line. Delete, Control-d Deletes the character in front of the cursor. Backspace Deletes the character behind the cursor. Control-k Deletes the text until the end of the line and replaces the kill buffer with the deleted text. You can paste this text in a different place by using Control-y. Control-y Pastes the content of the kill ring into the current position. Alt-d Deletes the word above the cursor and adds it to the kill ring. You can paste the contents of the kill ring with Control-y. Control-q Quotes the next input character, to prevent the normal processing of key handling to take place. Constructors TextView() Initalizes a TextView on the specified area, with dimensions controlled with the X, Y, Width and Height properties. Declaration public TextView() TextView(Rect) Initalizes a TextView on the specified area, with absolute position and size. Declaration public TextView(Rect frame) Parameters Type Name Description Rect frame Remarks Properties CanFocus Declaration public override bool CanFocus { get; set; } Property Value Type Description System.Boolean Overrides Responder.CanFocus CurrentColumn Gets the cursor column. Declaration public int CurrentColumn { get; } Property Value Type Description System.Int32 The cursor column. CurrentRow Gets the current cursor row. Declaration public int CurrentRow { get; } Property Value Type Description System.Int32 ReadOnly Gets or sets whether the TextView is in read-only mode or not Declaration public bool ReadOnly { get; set; } Property Value Type Description System.Boolean Boolean value(Default false) Text Sets or gets the text in the TextView . Declaration public ustring Text { get; set; } Property Value Type Description NStack.ustring Remarks Methods CloseFile() Closes the contents of the stream into the TextView . Declaration public bool CloseFile() Returns Type Description System.Boolean true , if stream was closed, false otherwise. LoadFile(String) Loads the contents of the file into the TextView . Declaration public bool LoadFile(string path) Parameters Type Name Description System.String path Path to the file to load. Returns Type Description System.Boolean true , if file was loaded, false otherwise. LoadStream(Stream) Loads the contents of the stream into the TextView . Declaration public void LoadStream(Stream stream) Parameters Type Name Description System.IO.Stream stream Stream to load the contents from. MouseEvent(MouseEvent) Declaration public override bool MouseEvent(MouseEvent ev) Parameters Type Name Description MouseEvent ev Returns Type Description System.Boolean Overrides Responder.MouseEvent(MouseEvent) PositionCursor() Positions the cursor on the current row and column Declaration public override void PositionCursor() Overrides View.PositionCursor() ProcessKey(KeyEvent) Declaration public override bool ProcessKey(KeyEvent kb) Parameters Type Name Description KeyEvent kb Returns Type Description System.Boolean Overrides View.ProcessKey(KeyEvent) Redraw(Rect) Declaration public override void Redraw(Rect region) Parameters Type Name Description Rect region Overrides View.Redraw(Rect) ScrollTo(Int32) Will scroll the TextView to display the specified row at the top Declaration public void ScrollTo(int row) Parameters Type Name Description System.Int32 row Row that should be displayed at the top, if the value is negative it will be reset to zero Events TextChanged Raised when the Text of the TextView changes. Declaration public event EventHandler TextChanged Event Type Type Description System.EventHandler Implements System.Collections.IEnumerable" }, "api/Terminal.Gui/Terminal.Gui.TimeField.html": { "href": "api/Terminal.Gui/Terminal.Gui.TimeField.html", "title": "Class TimeField", - "keywords": "Class TimeField Time editing View Inheritance System.Object Responder View TextField TimeField Implements System.Collections.IEnumerable Inherited Members TextField.Used TextField.ReadOnly TextField.Changed TextField.OnLeave() TextField.Frame TextField.Text TextField.Secret TextField.CursorPosition TextField.PositionCursor() TextField.Redraw(Rect) TextField.CanFocus TextField.SelectedStart TextField.SelectedLength TextField.SelectedText TextField.ClearAllSelection() TextField.Copy() TextField.Cut() TextField.Paste() View.Enter View.Leave View.MouseEnter View.MouseLeave View.Driver View.Subviews View.Id View.WantMousePositionReports View.WantContinuousButtonPressed View.GetEnumerator() View.LayoutStyle View.Bounds View.X View.Y View.Width View.Height View.SuperView View.SetNeedsDisplay() View.SetNeedsDisplay(Rect) View.ChildNeedsDisplay() 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) View.HasFocus View.OnEnter() View.Focused View.MostFocused View.ColorScheme View.AddRune(Int32, Int32, Rune) View.ClearNeedsDisplay() View.SetFocus(View) View.KeyPress View.ProcessHotKey(KeyEvent) View.ProcessColdKey(KeyEvent) View.KeyDown View.OnKeyDown(KeyEvent) View.KeyUp View.OnKeyUp(KeyEvent) View.EnsureFocus() View.FocusFirst() View.FocusLast() View.FocusPrev() View.FocusNext() View.LayoutSubviews() View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) System.Object.Equals(System.Object) System.Object.Equals(System.Object, System.Object) System.Object.GetHashCode() System.Object.GetType() System.Object.MemberwiseClone() System.Object.ReferenceEquals(System.Object, System.Object) Namespace : Terminal.Gui Assembly : Terminal.Gui.dll Syntax public class TimeField : TextField, IEnumerable Remarks The TimeField View provides time editing functionality with mouse support. Constructors TimeField(DateTime) Initializes a new instance of TimeField Declaration public TimeField(DateTime time) Parameters Type Name Description System.DateTime time TimeField(Int32, Int32, DateTime, Boolean) Initializes a new instance of TimeField at an absolute position and fixed size. Declaration public TimeField(int x, int y, DateTime time, bool isShort = false) Parameters Type Name Description System.Int32 x The x coordinate. System.Int32 y The y coordinate. System.DateTime time Initial time contents. System.Boolean isShort If true, the seconds are hidden. Properties IsShortFormat Get or set the data format for the widget. Declaration public bool IsShortFormat { get; set; } Property Value Type Description System.Boolean Time Gets or sets the time of the TimeField . Declaration public DateTime Time { get; set; } Property Value Type Description System.DateTime Remarks Methods MouseEvent(MouseEvent) Declaration public override bool MouseEvent(MouseEvent ev) Parameters Type Name Description MouseEvent ev Returns Type Description System.Boolean Overrides TextField.MouseEvent(MouseEvent) ProcessKey(KeyEvent) Declaration public override bool ProcessKey(KeyEvent kb) Parameters Type Name Description KeyEvent kb Returns Type Description System.Boolean Overrides TextField.ProcessKey(KeyEvent) Implements System.Collections.IEnumerable" + "keywords": "Class TimeField Time editing View Inheritance System.Object Responder View TextField TimeField Implements System.Collections.IEnumerable Inherited Members TextField.Used TextField.ReadOnly TextField.Changed TextField.OnLeave() TextField.Frame TextField.Text TextField.Secret TextField.CursorPosition TextField.PositionCursor() TextField.Redraw(Rect) TextField.CanFocus TextField.SelectedStart TextField.SelectedLength TextField.SelectedText TextField.ClearAllSelection() TextField.Copy() TextField.Cut() TextField.Paste() View.Enter View.Leave View.MouseEnter View.MouseLeave View.Driver View.Subviews View.Id View.IsCurrentTop View.WantMousePositionReports View.WantContinuousButtonPressed View.GetEnumerator() View.LayoutStyle View.Bounds View.X View.Y View.Width View.Height View.SuperView View.SetNeedsDisplay() View.SetNeedsDisplay(Rect) View.ChildNeedsDisplay() 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) View.HasFocus View.OnEnter() View.Focused View.MostFocused View.ColorScheme View.AddRune(Int32, Int32, Rune) View.ClearNeedsDisplay() View.SetFocus(View) View.KeyPress View.ProcessHotKey(KeyEvent) View.ProcessColdKey(KeyEvent) View.KeyDown View.OnKeyDown(KeyEvent) View.KeyUp View.OnKeyUp(KeyEvent) View.EnsureFocus() View.FocusFirst() View.FocusLast() View.FocusPrev() View.FocusNext() View.LayoutSubviews() View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) System.Object.Equals(System.Object) System.Object.Equals(System.Object, System.Object) System.Object.GetHashCode() System.Object.GetType() System.Object.MemberwiseClone() System.Object.ReferenceEquals(System.Object, System.Object) Namespace : Terminal.Gui Assembly : Terminal.Gui.dll Syntax public class TimeField : TextField, IEnumerable Remarks The TimeField View provides time editing functionality with mouse support. Constructors TimeField(DateTime) Initializes a new instance of TimeField Declaration public TimeField(DateTime time) Parameters Type Name Description System.DateTime time TimeField(Int32, Int32, DateTime, Boolean) Initializes a new instance of TimeField at an absolute position and fixed size. Declaration public TimeField(int x, int y, DateTime time, bool isShort = false) Parameters Type Name Description System.Int32 x The x coordinate. System.Int32 y The y coordinate. System.DateTime time Initial time contents. System.Boolean isShort If true, the seconds are hidden. Properties IsShortFormat Get or set the data format for the widget. Declaration public bool IsShortFormat { get; set; } Property Value Type Description System.Boolean Time Gets or sets the time of the TimeField . Declaration public DateTime Time { get; set; } Property Value Type Description System.DateTime Remarks Methods MouseEvent(MouseEvent) Declaration public override bool MouseEvent(MouseEvent ev) Parameters Type Name Description MouseEvent ev Returns Type Description System.Boolean Overrides TextField.MouseEvent(MouseEvent) ProcessKey(KeyEvent) Declaration public override bool ProcessKey(KeyEvent kb) Parameters Type Name Description KeyEvent kb Returns Type Description System.Boolean Overrides TextField.ProcessKey(KeyEvent) Implements System.Collections.IEnumerable" }, "api/Terminal.Gui/Terminal.Gui.Toplevel.html": { "href": "api/Terminal.Gui/Terminal.Gui.Toplevel.html", "title": "Class Toplevel", - "keywords": "Class Toplevel Toplevel views can be modally executed. Inheritance System.Object Responder View Toplevel Window Implements System.Collections.IEnumerable Inherited Members View.Enter View.Leave View.MouseEnter View.MouseLeave View.Driver View.Subviews View.Id View.WantMousePositionReports View.WantContinuousButtonPressed View.Frame View.GetEnumerator() View.LayoutStyle View.Bounds View.X View.Y View.Width View.Height View.SuperView View.SetNeedsDisplay() View.SetNeedsDisplay(Rect) View.ChildNeedsDisplay() View.Add(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) View.PositionCursor() View.HasFocus View.OnEnter() View.OnLeave() View.Focused View.MostFocused View.ColorScheme View.AddRune(Int32, Int32, Rune) View.ClearNeedsDisplay() View.SetFocus(View) View.KeyPress View.ProcessHotKey(KeyEvent) View.ProcessColdKey(KeyEvent) View.KeyDown View.OnKeyDown(KeyEvent) View.KeyUp View.OnKeyUp(KeyEvent) View.EnsureFocus() View.FocusFirst() View.FocusLast() View.FocusPrev() View.FocusNext() View.LayoutSubviews() View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) Responder.MouseEvent(MouseEvent) System.Object.Equals(System.Object) System.Object.Equals(System.Object, System.Object) System.Object.GetHashCode() System.Object.GetType() System.Object.MemberwiseClone() System.Object.ReferenceEquals(System.Object, System.Object) Namespace : Terminal.Gui Assembly : Terminal.Gui.dll Syntax public class Toplevel : View, IEnumerable Remarks Toplevels can be modally executing views, and they return control to the caller when the \"Running\" property is set to false, or by calling Terminal.Gui.Application.RequestStop() There will be a toplevel created for you on the first time use and can be accessed from the property Top , but new toplevels can be created and ran on top of it. To run, create the toplevel and then invoke Run() with the new toplevel. TopLevels can also opt-in to more sophisticated initialization by implementing System.ComponentModel.ISupportInitialize . When they do so, the System.ComponentModel.ISupportInitialize.BeginInit and System.ComponentModel.ISupportInitialize.EndInit methods will be called before running the view. If first-run-only initialization is preferred, the System.ComponentModel.ISupportInitializeNotification can be implemented too, in which case the System.ComponentModel.ISupportInitialize methods will only be called if System.ComponentModel.ISupportInitializeNotification.IsInitialized is false . This allows proper View inheritance hierarchies to override base class layout code optimally by doing so only on first run, instead of on every run. Constructors Toplevel() Initializes a new instance of the Toplevel class with Computed layout, defaulting to async full screen. Declaration public Toplevel() Toplevel(Rect) Initializes a new instance of the Toplevel class with the specified absolute layout. Declaration public Toplevel(Rect frame) Parameters Type Name Description Rect frame Frame. Properties CanFocus Gets or sets a value indicating whether this Toplevel can focus. Declaration public override bool CanFocus { get; } Property Value Type Description System.Boolean true if can focus; otherwise, false . Overrides Responder.CanFocus MenuBar Check id current toplevel has menu bar Declaration public MenuBar MenuBar { get; set; } Property Value Type Description MenuBar Modal Determines whether the Toplevel is modal or not. Causes ProcessKey(KeyEvent) to propagate keys upwards by default unless set to true . Declaration public bool Modal { get; set; } Property Value Type Description System.Boolean Running Gets or sets whether the Mainloop for this Toplevel is running or not. Setting this property to false will cause the MainLoop to exit. Declaration public bool Running { get; set; } Property Value Type Description System.Boolean StatusBar Check id current toplevel has status bar Declaration public StatusBar StatusBar { get; set; } Property Value Type Description StatusBar Methods Add(View) Declaration public override void Add(View view) Parameters Type Name Description View view Overrides View.Add(View) Create() Convenience factory method that creates a new toplevel with the current terminal dimensions. Declaration public static Toplevel Create() Returns Type Description Toplevel The create. ProcessKey(KeyEvent) Declaration public override bool ProcessKey(KeyEvent keyEvent) Parameters Type Name Description KeyEvent keyEvent Returns Type Description System.Boolean Overrides View.ProcessKey(KeyEvent) Redraw(Rect) Declaration public override void Redraw(Rect region) Parameters Type Name Description Rect region Overrides View.Redraw(Rect) Remove(View) Declaration public override void Remove(View view) Parameters Type Name Description View view Overrides View.Remove(View) RemoveAll() Declaration public override void RemoveAll() Overrides View.RemoveAll() WillPresent() This method is invoked by Application.Begin as part of the Application.Run after the views have been laid out, and before the views are drawn for the first time. Declaration public virtual void WillPresent() Events Ready Fired once the Toplevel's MainLoop has started it's first iteration. Subscribe to this event to perform tasks when the Toplevel has been laid out and focus has been set. changes. A Ready event handler is a good place to finalize initialization after calling ` Run() (topLevel)`. Declaration public event EventHandler Ready Event Type Type Description System.EventHandler Implements System.Collections.IEnumerable" + "keywords": "Class Toplevel Toplevel views can be modally executed. Inheritance System.Object Responder View Toplevel Window Implements System.Collections.IEnumerable Inherited Members View.Enter View.Leave View.MouseEnter View.MouseLeave View.Driver View.Subviews View.Id View.IsCurrentTop View.WantMousePositionReports View.WantContinuousButtonPressed View.Frame View.GetEnumerator() View.LayoutStyle View.Bounds View.X View.Y View.Width View.Height View.SuperView View.SetNeedsDisplay() View.SetNeedsDisplay(Rect) View.ChildNeedsDisplay() View.Add(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) View.PositionCursor() View.HasFocus View.OnEnter() View.OnLeave() View.Focused View.MostFocused View.ColorScheme View.AddRune(Int32, Int32, Rune) View.ClearNeedsDisplay() View.SetFocus(View) View.KeyPress View.ProcessHotKey(KeyEvent) View.ProcessColdKey(KeyEvent) View.KeyDown View.OnKeyDown(KeyEvent) View.KeyUp View.OnKeyUp(KeyEvent) View.EnsureFocus() View.FocusFirst() View.FocusLast() View.FocusPrev() View.FocusNext() View.LayoutSubviews() View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) Responder.MouseEvent(MouseEvent) System.Object.Equals(System.Object) System.Object.Equals(System.Object, System.Object) System.Object.GetHashCode() System.Object.GetType() System.Object.MemberwiseClone() System.Object.ReferenceEquals(System.Object, System.Object) Namespace : Terminal.Gui Assembly : Terminal.Gui.dll Syntax public class Toplevel : View, IEnumerable Remarks Toplevels can be modally executing views, and they return control to the caller when the \"Running\" property is set to false, or by calling Terminal.Gui.Application.RequestStop() There will be a toplevel created for you on the first time use and can be accessed from the property Top , but new toplevels can be created and ran on top of it. To run, create the toplevel and then invoke Run() with the new toplevel. TopLevels can also opt-in to more sophisticated initialization by implementing System.ComponentModel.ISupportInitialize . When they do so, the System.ComponentModel.ISupportInitialize.BeginInit and System.ComponentModel.ISupportInitialize.EndInit methods will be called before running the view. If first-run-only initialization is preferred, the System.ComponentModel.ISupportInitializeNotification can be implemented too, in which case the System.ComponentModel.ISupportInitialize methods will only be called if System.ComponentModel.ISupportInitializeNotification.IsInitialized is false . This allows proper View inheritance hierarchies to override base class layout code optimally by doing so only on first run, instead of on every run. Constructors Toplevel() Initializes a new instance of the Toplevel class with Computed layout, defaulting to async full screen. Declaration public Toplevel() Toplevel(Rect) Initializes a new instance of the Toplevel class with the specified absolute layout. Declaration public Toplevel(Rect frame) Parameters Type Name Description Rect frame Frame. Properties CanFocus Gets or sets a value indicating whether this Toplevel can focus. Declaration public override bool CanFocus { get; } Property Value Type Description System.Boolean true if can focus; otherwise, false . Overrides Responder.CanFocus MenuBar Check id current toplevel has menu bar Declaration public MenuBar MenuBar { get; set; } Property Value Type Description MenuBar Modal Determines whether the Toplevel is modal or not. Causes ProcessKey(KeyEvent) to propagate keys upwards by default unless set to true . Declaration public bool Modal { get; set; } Property Value Type Description System.Boolean Running Gets or sets whether the Mainloop for this Toplevel is running or not. Setting this property to false will cause the MainLoop to exit. Declaration public bool Running { get; set; } Property Value Type Description System.Boolean StatusBar Check id current toplevel has status bar Declaration public StatusBar StatusBar { get; set; } Property Value Type Description StatusBar Methods Add(View) Declaration public override void Add(View view) Parameters Type Name Description View view Overrides View.Add(View) Create() Convenience factory method that creates a new toplevel with the current terminal dimensions. Declaration public static Toplevel Create() Returns Type Description Toplevel The create. ProcessKey(KeyEvent) Declaration public override bool ProcessKey(KeyEvent keyEvent) Parameters Type Name Description KeyEvent keyEvent Returns Type Description System.Boolean Overrides View.ProcessKey(KeyEvent) Redraw(Rect) Declaration public override void Redraw(Rect region) Parameters Type Name Description Rect region Overrides View.Redraw(Rect) Remove(View) Declaration public override void Remove(View view) Parameters Type Name Description View view Overrides View.Remove(View) RemoveAll() Declaration public override void RemoveAll() Overrides View.RemoveAll() WillPresent() This method is invoked by Application.Begin as part of the Application.Run after the views have been laid out, and before the views are drawn for the first time. Declaration public virtual void WillPresent() Events Ready Fired once the Toplevel's MainLoop has started it's first iteration. Subscribe to this event to perform tasks when the Toplevel has been laid out and focus has been set. changes. A Ready event handler is a good place to finalize initialization after calling ` Run() (topLevel)`. Declaration public event EventHandler Ready Event Type Type Description System.EventHandler Implements System.Collections.IEnumerable" }, "api/Terminal.Gui/Terminal.Gui.View.html": { "href": "api/Terminal.Gui/Terminal.Gui.View.html", "title": "Class View", - "keywords": "Class View View is the base class for all views on the screen and represents a visible element that can render itself and contains zero or more nested views. Inheritance System.Object Responder View Button CheckBox ComboBox FrameView HexView Label ListView MenuBar ProgressBar RadioGroup ScrollBarView ScrollView StatusBar TextField TextView Toplevel Implements System.Collections.IEnumerable Inherited Members Responder.CanFocus Responder.MouseEvent(MouseEvent) System.Object.Equals(System.Object) System.Object.Equals(System.Object, System.Object) System.Object.GetHashCode() System.Object.GetType() System.Object.MemberwiseClone() System.Object.ReferenceEquals(System.Object, System.Object) Namespace : Terminal.Gui Assembly : Terminal.Gui.dll Syntax public class View : Responder, IEnumerable Remarks The View defines the base functionality for user interface elements in Terminal/gui.cs. Views can contain one or more subviews, can respond to user input and render themselves on the screen. Views can either be created with an absolute position, by calling the constructor that takes a Rect parameter to specify the absolute position and size (the Frame of the View) or by setting the X, Y, Width and Height properties on the view. Both approaches use coordinates that are relative to the container they are being added to. When you do not specify a Rect frame you can use the more flexible Dim and Pos objects that can dynamically update the position of a view. The X and Y properties are of type Pos and you can use either absolute positions, percentages or anchor points. The Width and Height properties are of type Dim and can use absolute position, percentages and anchors. These are useful as they will take care of repositioning your views if your view's frames are resized or if the terminal size changes. When you specify the Rect parameter to a view, you are setting the LayoutStyle to Absolute, and the view will always stay in the position that you placed it. To change the position change the Frame property to the new position. Subviews can be added to a View by calling the Add method. The container of a view is the Superview. Developers can call the SetNeedsDisplay method on the view to flag a region or the entire view as requiring to be redrawn. Views have a ColorScheme property that defines the default colors that subviews should use for rendering. This ensures that the views fit in the context where they are being used, and allows for themes to be plugged in. For example, the default colors for windows and toplevels uses a blue background, while it uses a white background for dialog boxes and a red background for errors. If a ColorScheme is not set on a view, the result of the ColorScheme is the value of the SuperView and the value might only be valid once a view has been added to a SuperView, so your subclasses should not rely on ColorScheme being set at construction time. Using ColorSchemes has the advantage that your application will work both in color as well as black and white displays. Views that are focusable should implement the PositionCursor to make sure that the cursor is placed in a location that makes sense. Unix terminals do not have a way of hiding the cursor, so it can be distracting to have the cursor left at the last focused view. So views should make sure that they place the cursor in a visually sensible place. The metnod LayoutSubviews is invoked when the size or layout of a view has changed. The default processing system will keep the size and dimensions for views that use the LayoutKind.Absolute, and will recompute the frames for the vies that use LayoutKind.Computed. Constructors View() Initializes a new instance of the View class and sets the view up for Computed layout, which will use the values in X, Y, Width and Height to compute the View's Frame. Declaration public View() View(Rect) Initializes a new instance of the View class with the absolute dimensions specified in the frame. If you want to have Views that can be positioned with Pos and Dim properties on X, Y, Width and Height, use the empty constructor. Declaration public View(Rect frame) Parameters Type Name Description Rect frame The region covered by this view. Properties Bounds The bounds represent the View-relative rectangle used for this view. Updates to the Bounds update the Frame, and has the same side effects as updating the frame. Declaration public Rect Bounds { get; set; } Property Value Type Description Rect The bounds. ColorScheme The color scheme for this view, if it is not defined, it returns the parent's color scheme. Declaration public ColorScheme ColorScheme { get; set; } Property Value Type Description ColorScheme Driver Points to the current driver in use by the view, it is a convenience property for simplifying the development of new views. Declaration public static ConsoleDriver Driver { get; } Property Value Type Description ConsoleDriver Focused Returns the currently focused view inside this view, or null if nothing is focused. Declaration public View Focused { get; } Property Value Type Description View The focused. Frame Gets or sets the frame for the view. Declaration public virtual Rect Frame { get; set; } Property Value Type Description Rect The frame. Remarks Altering the Frame of a view will trigger the redrawing of the view as well as the redrawing of the affected regions in the superview. HasFocus Declaration public override bool HasFocus { get; } Property Value Type Description System.Boolean Overrides Responder.HasFocus Height Gets or sets the height for the view. This is only used when the LayoutStyle is Computed, if the LayoutStyle is set to Absolute, this value is ignored. Declaration public Dim Height { get; set; } Property Value Type Description Dim The height. Id Gets or sets an identifier for the view; Declaration public ustring Id { get; set; } Property Value Type Description NStack.ustring The identifier. LayoutStyle Controls how the view's Frame is computed during the LayoutSubviews method, if Absolute, then LayoutSubviews does not change the Frame properties, otherwise the Frame is updated from the values in X, Y, Width and Height properties. Declaration public LayoutStyle LayoutStyle { get; set; } Property Value Type Description LayoutStyle The layout style. MostFocused Returns the most focused view in the chain of subviews (the leaf view that has the focus). Declaration public View MostFocused { get; } Property Value Type Description View The most focused. Subviews This returns a list of the subviews contained by this view. Declaration public IList Subviews { get; } Property Value Type Description System.Collections.Generic.IList < View > The subviews. SuperView Returns the container for this view, or null if this view has not been added to a container. Declaration public View SuperView { get; } Property Value Type Description View The super view. WantContinuousButtonPressed Gets or sets a value indicating whether this View want continuous button pressed event. Declaration public virtual bool WantContinuousButtonPressed { get; set; } Property Value Type Description System.Boolean WantMousePositionReports Gets or sets a value indicating whether this View want mouse position reports. Declaration public virtual bool WantMousePositionReports { get; set; } Property Value Type Description System.Boolean true if want mouse position reports; otherwise, false . Width Gets or sets the width for the view. This is only used when the LayoutStyle is Computed, if the LayoutStyle is set to Absolute, this value is ignored. Declaration public Dim Width { get; set; } Property Value Type Description Dim The width. X Gets or sets the X position for the view (the column). This is only used when the LayoutStyle is Computed, if the LayoutStyle is set to Absolute, this value is ignored. Declaration public Pos X { get; set; } Property Value Type Description Pos The X Position. Y Gets or sets the Y position for the view (line). This is only used when the LayoutStyle is Computed, if the LayoutStyle is set to Absolute, this value is ignored. Declaration public Pos Y { get; set; } Property Value Type Description Pos The y position (line). Methods Add(View) Adds a subview to this view. Declaration public virtual void Add(View view) Parameters Type Name Description View view Remarks Add(View[]) Adds the specified views to the view. Declaration public void Add(params View[] views) Parameters Type Name Description View [] views Array of one or more views (can be optional parameter). AddRune(Int32, Int32, Rune) Displays the specified character in the specified column and row. Declaration public void AddRune(int col, int row, Rune ch) Parameters Type Name Description System.Int32 col Col. System.Int32 row Row. System.Rune ch Ch. BringSubviewForward(View) Moves the subview backwards in the hierarchy, only one step Declaration public void BringSubviewForward(View subview) Parameters Type Name Description View subview The subview to send backwards Remarks If you want to send the view all the way to the back use SendSubviewToBack. BringSubviewToFront(View) Brings the specified subview to the front so it is drawn on top of any other views. Declaration public void BringSubviewToFront(View subview) Parameters Type Name Description View subview The subview to send to the front Remarks SendSubviewToBack(View) . ChildNeedsDisplay() Flags this view for requiring the children views to be repainted. Declaration public void ChildNeedsDisplay() Clear() Clears the view region with the current color. Declaration public void Clear() Remarks This clears the entire region used by this view. Clear(Rect) Clears the specified rectangular region with the current color Declaration public void Clear(Rect r) Parameters Type Name Description Rect r ClearNeedsDisplay() Removes the SetNeedsDisplay and the ChildNeedsDisplay setting on this view. Declaration protected void ClearNeedsDisplay() ClipToBounds() Sets the Console driver's clip region to the current View's Bounds. Declaration public Rect ClipToBounds() Returns Type Description Rect The existing driver's Clip region, which can be then set by setting the Driver.Clip property. DrawFrame(Rect, Int32, Boolean) Draws a frame in the current view, clipped by the boundary of this view Declaration public void DrawFrame(Rect rect, int padding = 0, bool fill = false) Parameters Type Name Description Rect rect Rectangular region for the frame to be drawn. System.Int32 padding The padding to add to the drawn frame. System.Boolean fill If set to true it fill will the contents. DrawHotString(ustring, Boolean, ColorScheme) Utility function to draw strings that contains a hotkey using a colorscheme and the \"focused\" state. Declaration public void DrawHotString(ustring text, bool focused, ColorScheme scheme) Parameters Type Name Description NStack.ustring text String to display, the underscoore before a letter flags the next letter as the hotkey. System.Boolean focused If set to true this uses the focused colors from the color scheme, otherwise the regular ones. ColorScheme scheme The color scheme to use. DrawHotString(ustring, Attribute, Attribute) Utility function to draw strings that contain a hotkey Declaration public void DrawHotString(ustring text, Attribute hotColor, Attribute normalColor) Parameters Type Name Description NStack.ustring text String to display, the underscoore before a letter flags the next letter as the hotkey. Attribute hotColor Hot color. Attribute normalColor Normal color. EnsureFocus() Finds the first view in the hierarchy that wants to get the focus if nothing is currently focused, otherwise, it does nothing. Declaration public void EnsureFocus() FocusFirst() Focuses the first focusable subview if one exists. Declaration public void FocusFirst() FocusLast() Focuses the last focusable subview if one exists. Declaration public void FocusLast() FocusNext() Focuses the next view. Declaration public bool FocusNext() Returns Type Description System.Boolean true , if next was focused, false otherwise. FocusPrev() Focuses the previous view. Declaration public bool FocusPrev() Returns Type Description System.Boolean true , if previous was focused, false otherwise. GetEnumerator() Gets an enumerator that enumerates the subviews in this view. Declaration public IEnumerator GetEnumerator() Returns Type Description System.Collections.IEnumerator The enumerator. LayoutSubviews() This virtual method is invoked when a view starts executing or when the dimensions of the view have changed, for example in response to the container view or terminal resizing. Declaration public virtual void LayoutSubviews() Move(Int32, Int32) This moves the cursor to the specified column and row in the view. Declaration public void Move(int col, int row) Parameters Type Name Description System.Int32 col Col. System.Int32 row Row. OnEnter() Declaration public override bool OnEnter() Returns Type Description System.Boolean Overrides Responder.OnEnter() OnKeyDown(KeyEvent) Declaration public override bool OnKeyDown(KeyEvent keyEvent) Parameters Type Name Description KeyEvent keyEvent Contains the details about the key that produced the event. Returns Type Description System.Boolean Overrides Responder.OnKeyDown(KeyEvent) OnKeyUp(KeyEvent) Declaration public override bool OnKeyUp(KeyEvent keyEvent) Parameters Type Name Description KeyEvent keyEvent Contains the details about the key that produced the event. Returns Type Description System.Boolean Overrides Responder.OnKeyUp(KeyEvent) OnLeave() Declaration public override bool OnLeave() Returns Type Description System.Boolean Overrides Responder.OnLeave() OnMouseEnter(MouseEvent) Declaration public override bool OnMouseEnter(MouseEvent mouseEvent) Parameters Type Name Description MouseEvent mouseEvent Returns Type Description System.Boolean Overrides Responder.OnMouseEnter(MouseEvent) OnMouseLeave(MouseEvent) Declaration public override bool OnMouseLeave(MouseEvent mouseEvent) Parameters Type Name Description MouseEvent mouseEvent Returns Type Description System.Boolean Overrides Responder.OnMouseLeave(MouseEvent) PositionCursor() Positions the cursor in the right position based on the currently focused view in the chain. Declaration public virtual void PositionCursor() ProcessColdKey(KeyEvent) Declaration public override bool ProcessColdKey(KeyEvent keyEvent) Parameters Type Name Description KeyEvent keyEvent Returns Type Description System.Boolean Overrides Responder.ProcessColdKey(KeyEvent) ProcessHotKey(KeyEvent) Declaration public override bool ProcessHotKey(KeyEvent keyEvent) Parameters Type Name Description KeyEvent keyEvent Returns Type Description System.Boolean Overrides Responder.ProcessHotKey(KeyEvent) ProcessKey(KeyEvent) Declaration public override bool ProcessKey(KeyEvent keyEvent) Parameters Type Name Description KeyEvent keyEvent Returns Type Description System.Boolean Overrides Responder.ProcessKey(KeyEvent) Redraw(Rect) Performs a redraw of this view and its subviews, only redraws the views that have been flagged for a re-display. Declaration public virtual void Redraw(Rect region) Parameters Type Name Description Rect region The region to redraw, this is relative to the view itself. Remarks Views should set the color that they want to use on entry, as otherwise this will inherit the last color that was set globaly on the driver. Remove(View) Removes a widget from this container. Declaration public virtual void Remove(View view) Parameters Type Name Description View view Remarks RemoveAll() Removes all the widgets from this container. Declaration public virtual void RemoveAll() Remarks ScreenToView(Int32, Int32) Converts a point from screen coordinates into the view coordinate space. Declaration public Point ScreenToView(int x, int y) Parameters Type Name Description System.Int32 x X screen-coordinate point. System.Int32 y Y screen-coordinate point. Returns Type Description Point The mapped point. SendSubviewBackwards(View) Moves the subview backwards in the hierarchy, only one step Declaration public void SendSubviewBackwards(View subview) Parameters Type Name Description View subview The subview to send backwards Remarks If you want to send the view all the way to the back use SendSubviewToBack. SendSubviewToBack(View) Sends the specified subview to the front so it is the first view drawn Declaration public void SendSubviewToBack(View subview) Parameters Type Name Description View subview The subview to send to the front Remarks BringSubviewToFront(View) . SetClip(Rect) Sets the clipping region to the specified region, the region is view-relative Declaration public Rect SetClip(Rect rect) Parameters Type Name Description Rect rect Rectangle region to clip into, the region is view-relative. Returns Type Description Rect The previous clip region. SetFocus(View) Focuses the specified sub-view. Declaration public void SetFocus(View view) Parameters Type Name Description View view View. SetNeedsDisplay() Invoke to flag that this view needs to be redisplayed, by any code that alters the state of the view. Declaration public void SetNeedsDisplay() SetNeedsDisplay(Rect) Flags the specified rectangle region on this view as needing to be repainted. Declaration public void SetNeedsDisplay(Rect region) Parameters Type Name Description Rect region The region that must be flagged for repaint. ToString() Declaration public override string ToString() Returns Type Description System.String Overrides System.Object.ToString() Events Enter Event fired when the view get focus. Declaration public event EventHandler Enter Event Type Type Description System.EventHandler KeyDown Invoked when a key is pressed Declaration public event EventHandler KeyDown Event Type Type Description System.EventHandler < View.KeyEventEventArgs > KeyPress Invoked when a character key is pressed and occurs after the key up event. Declaration public event EventHandler KeyPress Event Type Type Description System.EventHandler < View.KeyEventEventArgs > KeyUp Invoked when a key is released Declaration public event EventHandler KeyUp Event Type Type Description System.EventHandler < View.KeyEventEventArgs > Leave Event fired when the view lost focus. Declaration public event EventHandler Leave Event Type Type Description System.EventHandler MouseEnter Event fired when the view receives the mouse event for the first time. Declaration public event EventHandler MouseEnter Event Type Type Description System.EventHandler < MouseEvent > MouseLeave Event fired when the view loses mouse event for the last time. Declaration public event EventHandler MouseLeave Event Type Type Description System.EventHandler < MouseEvent > Implements System.Collections.IEnumerable" + "keywords": "Class View View is the base class for all views on the screen and represents a visible element that can render itself and contains zero or more nested views. Inheritance System.Object Responder View Button CheckBox ComboBox FrameView HexView Label ListView MenuBar ProgressBar RadioGroup ScrollBarView ScrollView StatusBar TextField TextView Toplevel Implements System.Collections.IEnumerable Inherited Members Responder.CanFocus Responder.MouseEvent(MouseEvent) System.Object.Equals(System.Object) System.Object.Equals(System.Object, System.Object) System.Object.GetHashCode() System.Object.GetType() System.Object.MemberwiseClone() System.Object.ReferenceEquals(System.Object, System.Object) Namespace : Terminal.Gui Assembly : Terminal.Gui.dll Syntax public class View : Responder, IEnumerable Remarks The View defines the base functionality for user interface elements in Terminal/gui.cs. Views can contain one or more subviews, can respond to user input and render themselves on the screen. Views can either be created with an absolute position, by calling the constructor that takes a Rect parameter to specify the absolute position and size (the Frame of the View) or by setting the X, Y, Width and Height properties on the view. Both approaches use coordinates that are relative to the container they are being added to. When you do not specify a Rect frame you can use the more flexible Dim and Pos objects that can dynamically update the position of a view. The X and Y properties are of type Pos and you can use either absolute positions, percentages or anchor points. The Width and Height properties are of type Dim and can use absolute position, percentages and anchors. These are useful as they will take care of repositioning your views if your view's frames are resized or if the terminal size changes. When you specify the Rect parameter to a view, you are setting the LayoutStyle to Absolute, and the view will always stay in the position that you placed it. To change the position change the Frame property to the new position. Subviews can be added to a View by calling the Add method. The container of a view is the Superview. Developers can call the SetNeedsDisplay method on the view to flag a region or the entire view as requiring to be redrawn. Views have a ColorScheme property that defines the default colors that subviews should use for rendering. This ensures that the views fit in the context where they are being used, and allows for themes to be plugged in. For example, the default colors for windows and toplevels uses a blue background, while it uses a white background for dialog boxes and a red background for errors. If a ColorScheme is not set on a view, the result of the ColorScheme is the value of the SuperView and the value might only be valid once a view has been added to a SuperView, so your subclasses should not rely on ColorScheme being set at construction time. Using ColorSchemes has the advantage that your application will work both in color as well as black and white displays. Views that are focusable should implement the PositionCursor to make sure that the cursor is placed in a location that makes sense. Unix terminals do not have a way of hiding the cursor, so it can be distracting to have the cursor left at the last focused view. So views should make sure that they place the cursor in a visually sensible place. The metnod LayoutSubviews is invoked when the size or layout of a view has changed. The default processing system will keep the size and dimensions for views that use the LayoutKind.Absolute, and will recompute the frames for the vies that use LayoutKind.Computed. Constructors View() Initializes a new instance of the View class and sets the view up for Computed layout, which will use the values in X, Y, Width and Height to compute the View's Frame. Declaration public View() View(Rect) Initializes a new instance of the View class with the absolute dimensions specified in the frame. If you want to have Views that can be positioned with Pos and Dim properties on X, Y, Width and Height, use the empty constructor. Declaration public View(Rect frame) Parameters Type Name Description Rect frame The region covered by this view. Properties Bounds The bounds represent the View-relative rectangle used for this view. Updates to the Bounds update the Frame, and has the same side effects as updating the frame. Declaration public Rect Bounds { get; set; } Property Value Type Description Rect The bounds. ColorScheme The color scheme for this view, if it is not defined, it returns the parent's color scheme. Declaration public ColorScheme ColorScheme { get; set; } Property Value Type Description ColorScheme Driver Points to the current driver in use by the view, it is a convenience property for simplifying the development of new views. Declaration public static ConsoleDriver Driver { get; } Property Value Type Description ConsoleDriver Focused Returns the currently focused view inside this view, or null if nothing is focused. Declaration public View Focused { get; } Property Value Type Description View The focused. Frame Gets or sets the frame for the view. Declaration public virtual Rect Frame { get; set; } Property Value Type Description Rect The frame. Remarks Altering the Frame of a view will trigger the redrawing of the view as well as the redrawing of the affected regions in the superview. HasFocus Declaration public override bool HasFocus { get; } Property Value Type Description System.Boolean Overrides Responder.HasFocus Height Gets or sets the height for the view. This is only used when the LayoutStyle is Computed, if the LayoutStyle is set to Absolute, this value is ignored. Declaration public Dim Height { get; set; } Property Value Type Description Dim The height. Id Gets or sets an identifier for the view; Declaration public ustring Id { get; set; } Property Value Type Description NStack.ustring The identifier. IsCurrentTop Returns a value indicating if this View is currently on Top (Active) Declaration public bool IsCurrentTop { get; } Property Value Type Description System.Boolean LayoutStyle Controls how the view's Frame is computed during the LayoutSubviews method, if Absolute, then LayoutSubviews does not change the Frame properties, otherwise the Frame is updated from the values in X, Y, Width and Height properties. Declaration public LayoutStyle LayoutStyle { get; set; } Property Value Type Description LayoutStyle The layout style. MostFocused Returns the most focused view in the chain of subviews (the leaf view that has the focus). Declaration public View MostFocused { get; } Property Value Type Description View The most focused. Subviews This returns a list of the subviews contained by this view. Declaration public IList Subviews { get; } Property Value Type Description System.Collections.Generic.IList < View > The subviews. SuperView Returns the container for this view, or null if this view has not been added to a container. Declaration public View SuperView { get; } Property Value Type Description View The super view. WantContinuousButtonPressed Gets or sets a value indicating whether this View want continuous button pressed event. Declaration public virtual bool WantContinuousButtonPressed { get; set; } Property Value Type Description System.Boolean WantMousePositionReports Gets or sets a value indicating whether this View want mouse position reports. Declaration public virtual bool WantMousePositionReports { get; set; } Property Value Type Description System.Boolean true if want mouse position reports; otherwise, false . Width Gets or sets the width for the view. This is only used when the LayoutStyle is Computed, if the LayoutStyle is set to Absolute, this value is ignored. Declaration public Dim Width { get; set; } Property Value Type Description Dim The width. X Gets or sets the X position for the view (the column). This is only used when the LayoutStyle is Computed, if the LayoutStyle is set to Absolute, this value is ignored. Declaration public Pos X { get; set; } Property Value Type Description Pos The X Position. Y Gets or sets the Y position for the view (line). This is only used when the LayoutStyle is Computed, if the LayoutStyle is set to Absolute, this value is ignored. Declaration public Pos Y { get; set; } Property Value Type Description Pos The y position (line). Methods Add(View) Adds a subview to this view. Declaration public virtual void Add(View view) Parameters Type Name Description View view Remarks Add(View[]) Adds the specified views to the view. Declaration public void Add(params View[] views) Parameters Type Name Description View [] views Array of one or more views (can be optional parameter). AddRune(Int32, Int32, Rune) Displays the specified character in the specified column and row. Declaration public void AddRune(int col, int row, Rune ch) Parameters Type Name Description System.Int32 col Col. System.Int32 row Row. System.Rune ch Ch. BringSubviewForward(View) Moves the subview backwards in the hierarchy, only one step Declaration public void BringSubviewForward(View subview) Parameters Type Name Description View subview The subview to send backwards Remarks If you want to send the view all the way to the back use SendSubviewToBack. BringSubviewToFront(View) Brings the specified subview to the front so it is drawn on top of any other views. Declaration public void BringSubviewToFront(View subview) Parameters Type Name Description View subview The subview to send to the front Remarks SendSubviewToBack(View) . ChildNeedsDisplay() Flags this view for requiring the children views to be repainted. Declaration public void ChildNeedsDisplay() Clear() Clears the view region with the current color. Declaration public void Clear() Remarks This clears the entire region used by this view. Clear(Rect) Clears the specified rectangular region with the current color Declaration public void Clear(Rect r) Parameters Type Name Description Rect r ClearNeedsDisplay() Removes the SetNeedsDisplay and the ChildNeedsDisplay setting on this view. Declaration protected void ClearNeedsDisplay() ClipToBounds() Sets the Console driver's clip region to the current View's Bounds. Declaration public Rect ClipToBounds() Returns Type Description Rect The existing driver's Clip region, which can be then set by setting the Driver.Clip property. DrawFrame(Rect, Int32, Boolean) Draws a frame in the current view, clipped by the boundary of this view Declaration public void DrawFrame(Rect rect, int padding = 0, bool fill = false) Parameters Type Name Description Rect rect Rectangular region for the frame to be drawn. System.Int32 padding The padding to add to the drawn frame. System.Boolean fill If set to true it fill will the contents. DrawHotString(ustring, Boolean, ColorScheme) Utility function to draw strings that contains a hotkey using a colorscheme and the \"focused\" state. Declaration public void DrawHotString(ustring text, bool focused, ColorScheme scheme) Parameters Type Name Description NStack.ustring text String to display, the underscoore before a letter flags the next letter as the hotkey. System.Boolean focused If set to true this uses the focused colors from the color scheme, otherwise the regular ones. ColorScheme scheme The color scheme to use. DrawHotString(ustring, Attribute, Attribute) Utility function to draw strings that contain a hotkey Declaration public void DrawHotString(ustring text, Attribute hotColor, Attribute normalColor) Parameters Type Name Description NStack.ustring text String to display, the underscoore before a letter flags the next letter as the hotkey. Attribute hotColor Hot color. Attribute normalColor Normal color. EnsureFocus() Finds the first view in the hierarchy that wants to get the focus if nothing is currently focused, otherwise, it does nothing. Declaration public void EnsureFocus() FocusFirst() Focuses the first focusable subview if one exists. Declaration public void FocusFirst() FocusLast() Focuses the last focusable subview if one exists. Declaration public void FocusLast() FocusNext() Focuses the next view. Declaration public bool FocusNext() Returns Type Description System.Boolean true , if next was focused, false otherwise. FocusPrev() Focuses the previous view. Declaration public bool FocusPrev() Returns Type Description System.Boolean true , if previous was focused, false otherwise. GetEnumerator() Gets an enumerator that enumerates the subviews in this view. Declaration public IEnumerator GetEnumerator() Returns Type Description System.Collections.IEnumerator The enumerator. LayoutSubviews() This virtual method is invoked when a view starts executing or when the dimensions of the view have changed, for example in response to the container view or terminal resizing. Declaration public virtual void LayoutSubviews() Move(Int32, Int32) This moves the cursor to the specified column and row in the view. Declaration public void Move(int col, int row) Parameters Type Name Description System.Int32 col Col. System.Int32 row Row. OnEnter() Declaration public override bool OnEnter() Returns Type Description System.Boolean Overrides Responder.OnEnter() OnKeyDown(KeyEvent) Declaration public override bool OnKeyDown(KeyEvent keyEvent) Parameters Type Name Description KeyEvent keyEvent Contains the details about the key that produced the event. Returns Type Description System.Boolean Overrides Responder.OnKeyDown(KeyEvent) OnKeyUp(KeyEvent) Declaration public override bool OnKeyUp(KeyEvent keyEvent) Parameters Type Name Description KeyEvent keyEvent Contains the details about the key that produced the event. Returns Type Description System.Boolean Overrides Responder.OnKeyUp(KeyEvent) OnLeave() Declaration public override bool OnLeave() Returns Type Description System.Boolean Overrides Responder.OnLeave() OnMouseEnter(MouseEvent) Declaration public override bool OnMouseEnter(MouseEvent mouseEvent) Parameters Type Name Description MouseEvent mouseEvent Returns Type Description System.Boolean Overrides Responder.OnMouseEnter(MouseEvent) OnMouseLeave(MouseEvent) Declaration public override bool OnMouseLeave(MouseEvent mouseEvent) Parameters Type Name Description MouseEvent mouseEvent Returns Type Description System.Boolean Overrides Responder.OnMouseLeave(MouseEvent) PositionCursor() Positions the cursor in the right position based on the currently focused view in the chain. Declaration public virtual void PositionCursor() ProcessColdKey(KeyEvent) Declaration public override bool ProcessColdKey(KeyEvent keyEvent) Parameters Type Name Description KeyEvent keyEvent Returns Type Description System.Boolean Overrides Responder.ProcessColdKey(KeyEvent) ProcessHotKey(KeyEvent) Declaration public override bool ProcessHotKey(KeyEvent keyEvent) Parameters Type Name Description KeyEvent keyEvent Returns Type Description System.Boolean Overrides Responder.ProcessHotKey(KeyEvent) ProcessKey(KeyEvent) Declaration public override bool ProcessKey(KeyEvent keyEvent) Parameters Type Name Description KeyEvent keyEvent Returns Type Description System.Boolean Overrides Responder.ProcessKey(KeyEvent) Redraw(Rect) Performs a redraw of this view and its subviews, only redraws the views that have been flagged for a re-display. Declaration public virtual void Redraw(Rect region) Parameters Type Name Description Rect region The region to redraw, this is relative to the view itself. Remarks Views should set the color that they want to use on entry, as otherwise this will inherit the last color that was set globaly on the driver. Remove(View) Removes a widget from this container. Declaration public virtual void Remove(View view) Parameters Type Name Description View view Remarks RemoveAll() Removes all the widgets from this container. Declaration public virtual void RemoveAll() Remarks ScreenToView(Int32, Int32) Converts a point from screen coordinates into the view coordinate space. Declaration public Point ScreenToView(int x, int y) Parameters Type Name Description System.Int32 x X screen-coordinate point. System.Int32 y Y screen-coordinate point. Returns Type Description Point The mapped point. SendSubviewBackwards(View) Moves the subview backwards in the hierarchy, only one step Declaration public void SendSubviewBackwards(View subview) Parameters Type Name Description View subview The subview to send backwards Remarks If you want to send the view all the way to the back use SendSubviewToBack. SendSubviewToBack(View) Sends the specified subview to the front so it is the first view drawn Declaration public void SendSubviewToBack(View subview) Parameters Type Name Description View subview The subview to send to the front Remarks BringSubviewToFront(View) . SetClip(Rect) Sets the clipping region to the specified region, the region is view-relative Declaration public Rect SetClip(Rect rect) Parameters Type Name Description Rect rect Rectangle region to clip into, the region is view-relative. Returns Type Description Rect The previous clip region. SetFocus(View) Focuses the specified sub-view. Declaration public void SetFocus(View view) Parameters Type Name Description View view View. SetNeedsDisplay() Invoke to flag that this view needs to be redisplayed, by any code that alters the state of the view. Declaration public void SetNeedsDisplay() SetNeedsDisplay(Rect) Flags the specified rectangle region on this view as needing to be repainted. Declaration public void SetNeedsDisplay(Rect region) Parameters Type Name Description Rect region The region that must be flagged for repaint. ToString() Declaration public override string ToString() Returns Type Description System.String Overrides System.Object.ToString() Events Enter Event fired when the view get focus. Declaration public event EventHandler Enter Event Type Type Description System.EventHandler KeyDown Invoked when a key is pressed Declaration public event EventHandler KeyDown Event Type Type Description System.EventHandler < View.KeyEventEventArgs > KeyPress Invoked when a character key is pressed and occurs after the key up event. Declaration public event EventHandler KeyPress Event Type Type Description System.EventHandler < View.KeyEventEventArgs > KeyUp Invoked when a key is released Declaration public event EventHandler KeyUp Event Type Type Description System.EventHandler < View.KeyEventEventArgs > Leave Event fired when the view lost focus. Declaration public event EventHandler Leave Event Type Type Description System.EventHandler MouseEnter Event fired when the view receives the mouse event for the first time. Declaration public event EventHandler MouseEnter Event Type Type Description System.EventHandler < MouseEvent > MouseLeave Event fired when the view loses mouse event for the last time. Declaration public event EventHandler MouseLeave Event Type Type Description System.EventHandler < MouseEvent > Implements System.Collections.IEnumerable" }, "api/Terminal.Gui/Terminal.Gui.View.KeyEventEventArgs.html": { "href": "api/Terminal.Gui/Terminal.Gui.View.KeyEventEventArgs.html", @@ -302,7 +302,7 @@ "api/Terminal.Gui/Terminal.Gui.Window.html": { "href": "api/Terminal.Gui/Terminal.Gui.Window.html", "title": "Class Window", - "keywords": "Class Window A Toplevel View that draws a frame around its region and has a \"ContentView\" subview where the contents are added. Inheritance System.Object Responder View Toplevel Window Dialog Implements System.Collections.IEnumerable Inherited Members Toplevel.Running Toplevel.Ready Toplevel.Create() Toplevel.CanFocus Toplevel.Modal Toplevel.MenuBar Toplevel.StatusBar Toplevel.ProcessKey(KeyEvent) Toplevel.WillPresent() View.Enter View.Leave View.MouseEnter View.MouseLeave View.Driver View.Subviews View.Id View.WantMousePositionReports View.WantContinuousButtonPressed View.Frame View.LayoutStyle View.Bounds View.X View.Y View.Width View.Height View.SuperView View.SetNeedsDisplay() View.SetNeedsDisplay(Rect) View.ChildNeedsDisplay() View.Add(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) View.PositionCursor() View.HasFocus View.OnEnter() View.OnLeave() View.Focused View.MostFocused View.ColorScheme View.AddRune(Int32, Int32, Rune) View.ClearNeedsDisplay() View.SetFocus(View) View.KeyPress View.ProcessHotKey(KeyEvent) View.ProcessColdKey(KeyEvent) View.KeyDown View.OnKeyDown(KeyEvent) View.KeyUp View.OnKeyUp(KeyEvent) View.EnsureFocus() View.FocusFirst() View.FocusLast() View.FocusPrev() View.FocusNext() View.LayoutSubviews() View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) System.Object.Equals(System.Object) System.Object.Equals(System.Object, System.Object) System.Object.GetHashCode() System.Object.GetType() System.Object.MemberwiseClone() System.Object.ReferenceEquals(System.Object, System.Object) Namespace : Terminal.Gui Assembly : Terminal.Gui.dll Syntax public class Window : Toplevel, IEnumerable Constructors Window(ustring) Initializes a new instance of the Window class with an optional title. Declaration public Window(ustring title = null) Parameters Type Name Description NStack.ustring title Title. Window(ustring, Int32) Initializes a new instance of the Window with the specified frame for its location, with the specified border an optional title. Declaration public Window(ustring title = null, int padding = 0) Parameters Type Name Description NStack.ustring title Title. System.Int32 padding Number of characters to use for padding of the drawn frame. Window(Rect, ustring) Initializes a new instance of the Window class with an optional title and a set frame. Declaration public Window(Rect frame, ustring title = null) Parameters Type Name Description Rect frame Frame. NStack.ustring title Title. Window(Rect, ustring, Int32) Initializes a new instance of the Window with the specified frame for its location, with the specified border an optional title. Declaration public Window(Rect frame, ustring title = null, int padding = 0) Parameters Type Name Description Rect frame Frame. NStack.ustring title Title. System.Int32 padding Number of characters to use for padding of the drawn frame. Properties Title The title to be displayed for this window. Declaration public ustring Title { get; set; } Property Value Type Description NStack.ustring The title. Methods Add(View) Add the specified view to the Terminal.Gui.Window.ContentView . Declaration public override void Add(View view) Parameters Type Name Description View view View to add to the window. Overrides Toplevel.Add(View) GetEnumerator() Enumerates the various View s in the embedded Terminal.Gui.Window.ContentView . Declaration public IEnumerator GetEnumerator() Returns Type Description System.Collections.IEnumerator The enumerator. MouseEvent(MouseEvent) Declaration public override bool MouseEvent(MouseEvent mouseEvent) Parameters Type Name Description MouseEvent mouseEvent Returns Type Description System.Boolean Overrides Responder.MouseEvent(MouseEvent) Redraw(Rect) Declaration public override void Redraw(Rect bounds) Parameters Type Name Description Rect bounds Overrides Toplevel.Redraw(Rect) Remove(View) Removes a widget from this container. Declaration public override void Remove(View view) Parameters Type Name Description View view Overrides Toplevel.Remove(View) Remarks RemoveAll() Removes all widgets from this container. Declaration public override void RemoveAll() Overrides Toplevel.RemoveAll() Remarks Implements System.Collections.IEnumerable" + "keywords": "Class Window A Toplevel View that draws a frame around its region and has a \"ContentView\" subview where the contents are added. Inheritance System.Object Responder View Toplevel Window Dialog Implements System.Collections.IEnumerable Inherited Members Toplevel.Running Toplevel.Ready Toplevel.Create() Toplevel.CanFocus Toplevel.Modal Toplevel.MenuBar Toplevel.StatusBar Toplevel.ProcessKey(KeyEvent) Toplevel.WillPresent() View.Enter View.Leave View.MouseEnter View.MouseLeave View.Driver View.Subviews View.Id View.IsCurrentTop View.WantMousePositionReports View.WantContinuousButtonPressed View.Frame View.LayoutStyle View.Bounds View.X View.Y View.Width View.Height View.SuperView View.SetNeedsDisplay() View.SetNeedsDisplay(Rect) View.ChildNeedsDisplay() View.Add(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) View.PositionCursor() View.HasFocus View.OnEnter() View.OnLeave() View.Focused View.MostFocused View.ColorScheme View.AddRune(Int32, Int32, Rune) View.ClearNeedsDisplay() View.SetFocus(View) View.KeyPress View.ProcessHotKey(KeyEvent) View.ProcessColdKey(KeyEvent) View.KeyDown View.OnKeyDown(KeyEvent) View.KeyUp View.OnKeyUp(KeyEvent) View.EnsureFocus() View.FocusFirst() View.FocusLast() View.FocusPrev() View.FocusNext() View.LayoutSubviews() View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) System.Object.Equals(System.Object) System.Object.Equals(System.Object, System.Object) System.Object.GetHashCode() System.Object.GetType() System.Object.MemberwiseClone() System.Object.ReferenceEquals(System.Object, System.Object) Namespace : Terminal.Gui Assembly : Terminal.Gui.dll Syntax public class Window : Toplevel, IEnumerable Constructors Window(ustring) Initializes a new instance of the Window class with an optional title. Declaration public Window(ustring title = null) Parameters Type Name Description NStack.ustring title Title. Window(ustring, Int32) Initializes a new instance of the Window with the specified frame for its location, with the specified border an optional title. Declaration public Window(ustring title = null, int padding = 0) Parameters Type Name Description NStack.ustring title Title. System.Int32 padding Number of characters to use for padding of the drawn frame. Window(Rect, ustring) Initializes a new instance of the Window class with an optional title and a set frame. Declaration public Window(Rect frame, ustring title = null) Parameters Type Name Description Rect frame Frame. NStack.ustring title Title. Window(Rect, ustring, Int32) Initializes a new instance of the Window with the specified frame for its location, with the specified border an optional title. Declaration public Window(Rect frame, ustring title = null, int padding = 0) Parameters Type Name Description Rect frame Frame. NStack.ustring title Title. System.Int32 padding Number of characters to use for padding of the drawn frame. Properties Title The title to be displayed for this window. Declaration public ustring Title { get; set; } Property Value Type Description NStack.ustring The title. Methods Add(View) Add the specified view to the Terminal.Gui.Window.ContentView . Declaration public override void Add(View view) Parameters Type Name Description View view View to add to the window. Overrides Toplevel.Add(View) GetEnumerator() Enumerates the various View s in the embedded Terminal.Gui.Window.ContentView . Declaration public IEnumerator GetEnumerator() Returns Type Description System.Collections.IEnumerator The enumerator. MouseEvent(MouseEvent) Declaration public override bool MouseEvent(MouseEvent mouseEvent) Parameters Type Name Description MouseEvent mouseEvent Returns Type Description System.Boolean Overrides Responder.MouseEvent(MouseEvent) Redraw(Rect) Declaration public override void Redraw(Rect bounds) Parameters Type Name Description Rect bounds Overrides Toplevel.Redraw(Rect) Remove(View) Removes a widget from this container. Declaration public override void Remove(View view) Parameters Type Name Description View view Overrides Toplevel.Remove(View) Remarks RemoveAll() Removes all widgets from this container. Declaration public override void RemoveAll() Overrides Toplevel.RemoveAll() Remarks Implements System.Collections.IEnumerable" }, "api/Terminal.Gui/Unix.Terminal.Curses.Event.html": { "href": "api/Terminal.Gui/Unix.Terminal.Curses.Event.html", @@ -354,6 +354,31 @@ "title": "Class UICatalogApp", "keywords": "Class UICatalogApp UI Catalog is a comprehensive sample app and scenario library for Terminal.Gui Inheritance System.Object UICatalogApp Inherited Members System.Object.Equals(System.Object) System.Object.Equals(System.Object, System.Object) System.Object.GetHashCode() System.Object.GetType() System.Object.MemberwiseClone() System.Object.ReferenceEquals(System.Object, System.Object) System.Object.ToString() Namespace : UICatalog Assembly : UICatalog.dll Syntax public class UICatalogApp" }, + "articles/index.html": { + "href": "articles/index.html", + "title": "Conceptual Documentation", + "keywords": "Conceptual Documentation Terminal.Gui Overview Keyboard Event Processing Event Processing and the Application Main Loop" + }, + "articles/keyboard.html": { + "href": "articles/keyboard.html", + "title": "Keyboard Event Processing", + "keywords": "Keyboard Event Processing Keyboard events are sent by the Main Loop to the Application class for processing. The keyboard events are sent exclusively to the current Toplevel , this being either the default that is created when you call Application.Init , or one that you created an passed to Application.Run(Toplevel) . Flow Keystrokes are first processes as hotkeys, then as regular keys, and there is a final cold post-processing event that is invoked if no view processed the key. HotKey Processing Events are first send to all views as a \"HotKey\", this means that the View.ProcessHotKey method is invoked on the current toplevel, which in turns propagates this to all the views in the hierarchy. If any view decides to process the event, no further processing takes place. This is how hotkeys for buttons are implemented. For example, the keystroke \"Alt-A\" is handled by Buttons that have a hot-letter \"A\" to activate the button. Regular Processing Unlike the hotkey processing, the regular processing is only sent to the currently focused view in the focus chain. The regular key processing is only invoked if no hotkey was caught. Cold-key Processing This stage only is executed if the focused view did not process the event, and is broadcast to all the views in the Toplevel. This method can be overwritten by views that want to provide accelerator functionality (Alt-key for example), but without interefering with normal ProcessKey behavior." + }, + "articles/mainloop.html": { + "href": "articles/mainloop.html", + "title": "Event Processing and the Application Main Loop", + "keywords": "Event Processing and the Application Main Loop The method Application.Run that we covered before will wait for events from either the keyboard or mouse and route those events to the proper view. The job of waiting for events and dispatching them in the Application is implemented by an instance of the MainLoop class. Mainloops are a common idiom in many user interface toolkits so many of the concepts will be familiar to you if you have used other toolkits before. This class provides the following capabilities: Keyboard and mouse processing .NET Async support Timers processing Invoking of UI code from a background thread Idle processing handlers Possibility of integration with other mainloops. On Unix systems, it can monitor file descriptors for readability or writability. The MainLoop property in the the Application provides access to these functions. When your code invokes Application.Run (Toplevel) , the application will prepare the current Toplevel instance by redrawing the screen appropriately and then calling the mainloop to run. You can configure the Mainloop before calling Application.Run, or you can configure the MainLoop in response to events during the execution. The keyboard inputs is dispatched by the application class to the current TopLevel window this is covered in more detail in the Keyboard Event Processing document. Async Execution On startup, the Application class configured the .NET Asynchronous machinery to allow you to use the await keyword to run tasks in the background and have the execution of those tasks resume on the context of the main thread running the main loop. Once you invoke Application.Main the async machinery will be ready to use, and you can merely call methods using await from your main thread, and the awaited code will resume execution on the main thread. Timers Processing You can register timers to be executed at specified intervals by calling the AddTimeout method, like this: void UpdateTimer () { time.Text = DateTime.Now.ToString (); } var token = Application.MainLoop.AddTimeout (TimeSpan.FromSeconds (20), UpdateTimer); The return value from AddTimeout is a token value that you can use if you desire to cancel the timer before it runs: Application.MainLoop.RemoveTimeout (token); Idle Handlers You can register code to be executed when the application is idling and there are no events to process by calling the AddIdle method. This method takes as a parameter a function that will be invoked when the application is idling. Idle functions should return true if they should be invoked again, and false if the idle invocations should stop. Like the timer APIs, the return value is a token that can be used to cancel the scheduled idle function from being executed. Threading Like other UI toolkits, Terminal.Gui is generally not thread safe. You should avoid calling methods in the UI classes from a background thread as there is no guarantee that they will not corrupt the state of the UI application. Generally, as there is not much state, you will get lucky, but the application will not behave properly. You will be served better off by using C# async machinery and the various APIs in the System.Threading.Tasks.Task APIs. But if you absolutely must work with threads on your own you should only invoke APIs in Terminal.Gui from the main thread. To make this simple, you can use the Application.MainLoop.Invoke method and pass an Action . This action will be queued for execution on the main thread at an appropriate time and will run your code there. For example, the following shows how to properly update a label from a background thread: void BackgroundThreadUpdateProgress () { Application.MainLoop.Invoke (() => { progress.Text = $\"Progress: {bytesDownloaded/totalBytes}\"; }); } Integration With Other Main Loop Drivers It is possible to run the main loop in a way that it does not take over control of your application, but rather in a cooperative way. To do this, you must use the lower-level APIs in Application : the Begin method to prepare a toplevel for execution, followed by calls to MainLoop.EventsPending to determine whether the events must be processed, and in that case, calling RunLoop method and finally completing the process by calling End . The method Run is implemented like this: void Run (Toplevel top) { var runToken = Begin (view); RunLoop (runToken); End (runToken); } Unix File Descriptor Monitoring On Unix, it is possible to monitor file descriptors for input being available, or for the file descriptor being available for data to be written without blocking the application. To do this, you on Unix, you can cast the MainLoop instance to a UnixMainLoop and use the AddWatch method to register an interest on a particular condition." + }, + "articles/overview.html": { + "href": "articles/overview.html", + "title": "Terminal.Gui API Overview", + "keywords": "Terminal.Gui API Overview Terminal.Gui is a library intended to create console-based applications using C#. The framework has been designed to make it easy to write applications that will work on monochrome terminals, as well as modern color terminals with mouse support. This library works across Windows, Linux and MacOS. This library provides a text-based toolkit as works in a way similar to graphic toolkits. There are many controls that can be used to create your applications and it is event based, meaning that you create the user interface, hook up various events and then let the a processing loop run your application, and your code is invoked via one or more callbacks. The simplest application looks like this: using Terminal.Gui; class Demo { static int Main () { Application.Init (); var n = MessageBox.Query (50, 7, \"Question\", \"Do you like console apps?\", \"Yes\", \"No\"); return n; } } This example shows a prompt and returns an integer value depending on which value was selected by the user (Yes, No, or if they use chose not to make a decision and instead pressed the ESC key). More interesting user interfaces can be created by composing some of the various views that are included. In the following sections, you will see how applications are put together. In the example above, you can see that we have initialized the runtime by calling the Init method in the Application class - this sets up the environment, initializes the color schemes available for your application and clears the screen to start your application. The Application class, additionally creates an instance of the [Toplevel]((../api/Terminal.Gui/Terminal.Gui.Toplevel.html) class that is ready to be consumed, this instance is available in the Application.Top property, and can be used like this: using Terminal.Gui; class Demo { static int Main () { Application.Init (); var label = new Label (\"Hello World\") { X = Pos.Center (), Y = Pos.Center (), Height = 1, }; Application.Top.Add (label); Application.Run (); } } Typically, you will want your application to have more than a label, you might want a menu, and a region for your application to live in, the following code does this: using Terminal.Gui; class Demo { static int Main () { Application.Init (); var menu = new MenuBar (new MenuBarItem [] { new MenuBarItem (\"_File\", new MenuItem [] { new MenuItem (\"_Quit\", \"\", () => { Application.RequestStop (); }) }), }); var win = new Window (\"Hello\") { X = 0, Y = 1, Width = Dim.Fill (), Height = Dim.Fill () - 1 }; // Add both menu and win in a single call Application.Top.Add (menu, win); Application.Run (); } } Views All visible elements on a Terminal.Gui application are implemented as Views . Views are self-contained objects that take care of displaying themselves, can receive keyboard and mouse input and participate in the focus mechanism. Every view can contain an arbitrary number of children views. These are called the Subviews. You can add a view to an existing view, by calling the Add method, for example, to add a couple of buttons to a UI, you can do this: void SetupMyView (View myView) { var label = new Label (\"Username: \") { X = 1, Y = 1, Width = 20, Height = 1 }; myView.Add (label); var username = new TextField (\"\") { X = 1, Y = 2, Width = 30, Height = 1 }; myView.Add (username); } The container of a given view is called the SuperView and it is a property of every View. There are many views that you can use to spice up your application: Buttons , Labels , Text entry , Text view , Radio buttons , Checkboxes , Dialog boxes , Message boxes , Windows , Menus , ListViews , Frames , ProgressBars , Scroll views and Scrollbars . Layout Terminal.Gui supports two different layout systems, absolute and computed \\ (controlled by the LayoutStyle property on the view. The absolute system is used when you want the view to be positioned exactly in one location and want to manually control where the view is. This is done by invoking your View constructor with an argument of type Rect . When you do this, to change the position of the View, you can change the Frame property on the View. The computed layout system offers a few additional capabilities, like automatic centering, expanding of dimensions and a handful of other features. To use this you construct your object without an initial Frame , but set the X , Y , Width and Height properties after the object has been created. Examples: // Dynamically computed var label = new Label (\"Hello\") { X = 1, Y = Pos.Center (), Width = Dim.Fill (), Height = 1 }; // Absolute position using the provided rectangle var label2 = new Label (new Rect (1, 2, 20, 1), \"World\") The computed layout system does not take integers, instead the X and Y properties are of type Pos and the Width and Height properties are of type Dim both which can be created implicitly from integer values. The Pos Type The Pos type on X and Y offers a few options: Absolute position, by passing an integer Percentage of the parent's view size - Pos.Percent(n) Anchored from the end of the dimension - AnchorEnd(int margin=0) Centered, using Center() Reference the Left (X), Top (Y), Bottom, Right positions of another view The Pos values can be added or subtracted, like this: // Set the X coordinate to 10 characters left from the center view.X = Pos.Center () - 10; view.Y = Pos.Percent (20); anotherView.X = AnchorEnd (10); anotherView.Width = 9; myView.X = Pos.X (view); myView.Y = Pos.Bottom (anotherView); The Dim Type The Dim type is used for the Width and Height properties on the View and offers the following options: Absolute size, by passing an integer Percentage of the parent's view size - Dim.Percent(n) Fill to the end - Dim.Fill () Reference the Width or Height of another view Like, Pos , objects of type Dim can be added an subtracted, like this: // Set the Width to be 10 characters less than filling // the remaining portion of the screen view.Width = Dim.Fill () - 10; view.Height = Dim.Percent(20) - 1; anotherView.Height = Dim.Height (view)+1 TopLevels, Windows and Dialogs. Among the many kinds of views, you typically will create a Toplevel view (or any of its subclasses, like Window or Dialog which is special kind of views that can be executed modally - that is, the view can take over all input and returns only when the user chooses to complete their work there. The following sections cover the differences. TopLevel Views Toplevel views have no visible user interface elements and occupy an arbitrary portion of the screen. You would use a toplevel Modal view for example to launch an entire new experience in your application, one where you would have a new top-level menu for example. You typically would add a Menu and a Window to your Toplevel, it would look like this: using Terminal.Gui; class Demo { static void Edit (string filename) { var top = new Toplevel () { X = 0, Y = 0, Width = Dim.Fill (), Height = Dim.Fill () }; var menu = new MenuBar (new MenuBarItem [] { new MenuBarItem (\"_File\", new MenuItem [] { new MenuItem (\"_Close\", \"\", () => { Application.RequestStop (); }) }), }); // nest a window for the editor var win = new Window (filename) { X = 0, Y = 1, Width = Dim.Fill (), Height = Dim.Fill () - 1 }; var editor = new TextView () { X = 0, Y = 0, Width = Dim.Fill (), Height = Dim.Fill () }; editor.Text = System.IO.File.ReadAllText (filename); win.Add (editor); // Add both menu and win in a single call top.Add (win, menu); Application.Run (top); } } Window Views Window views extend the Toplevel view by providing a frame and a title around the toplevel - and can be moved on the screen with the mouse (caveat: code is currently disabled) From a user interface perspective, you might have more than one Window on the screen at a given time. Dialogs Dialog are Window objects that happen to be centered in the middle of the screen. Dialogs are instances of a Window that are centered in the screen, and are intended to be used modally - that is, they run, and they are expected to return a result before resuming execution of your application. Dialogs are a subclass of Window and additionally expose the AddButton API which manages the layout of any button passed to it, ensuring that the buttons are at the bottom of the dialog. Example: bool okpressed = false; var ok = new Button(\"Ok\"); var cancel = new Button(\"Cancel\"); var dialog = new Dialog (\"Quit\", 60, 7, ok, cancel); Which will show something like this: +- Quit -----------------------------------------------+ | | | | | [ Ok ] [ Cancel ] | +------------------------------------------------------+ Running Modally To run your Dialog, Window or Toplevel modally, you will invoke the Application.Run method on the toplevel. It is up to your code and event handlers to invoke the Application.RequestStop() method to terminate the modal execution. bool okpressed = false; var ok = new Button(3, 14, \"Ok\") { Clicked = () => { Application.RequestStop (); okpressed = true; } }; var cancel = new Button(10, 14, \"Cancel\") { Clicked = () => Application.RequestStop () }; var dialog = new Dialog (\"Login\", 60, 18, ok, cancel); var entry = new TextField () { X = 1, Y = 1, Width = Dim.Fill (), Height = 1 }; dialog.Add (entry); Application.Run (dialog); if (okpressed) Console.WriteLine (\"The user entered: \" + entry.Text); There is no return value from running modally, so your code will need to have a mechanism of indicating the reason that the execution of the modal dialog was completed, in the case above, the okpressed value is set to true if the user pressed or selected the Ok button. Input Handling Every view has a focused view, and if that view has nested views, one of those is the focused view. This is called the focus chain, and at any given time, only one View has the focus. The library binds the key Tab to focus the next logical view, and the Shift-Tab combination to focus the previous logical view. Keyboard processing is divided in three stages: HotKey processing, regular processing and cold key processing. Hot key processing happens first, and it gives all the views in the current toplevel a chance to monitor whether the key needs to be treated specially. This for example handles the scenarios where the user pressed Alt-o, and a view with a highlighted \"o\" is being displayed. If no view processed the hotkey, then the key is sent to the currently focused view. If the key was not processed by the normal processing, all views are given a chance to process the keystroke in their cold processing stage. Examples include the processing of the \"return\" key in a dialog when a button in the dialog has been flagged as the \"default\" action. The most common case is the normal processing, which sends the keystrokes to the currently focused view. Mouse events are processed in visual order, and the event will be sent to the view on the screen. The only exception is that no mouse events are delivered to background views when a modal view is running. More details are available on the Keyboard Event Processing document. Colors and Color Schemes All views have been configured with a color scheme that will work both in color terminals as well as the more limited black and white terminals. The various styles are captured in the Colors class which defined color schemes for the normal views, the menu bar, popup dialog boxes and error dialog boxes, that you can use like this: Colors.Base Colors.Menu Colors.Dialog Colors.Error You can use them for example like this to set the colors for a new Window: var w = new Window (\"Hello\"); w.ColorScheme = Colors.Error The ColorScheme represents four values, the color used for Normal text, the color used for normal text when a view is focused an the colors for the hot-keys both in focused and unfocused modes. By using ColorSchemes you ensure that your application will work correctbly both in color and black and white terminals. Some views support setting individual color attributes, you create an attribute for a particular pair of Foreground/Background like this: var myColor = Application.Driver.MakeAttribute (Color.Blue, Color.Red); var label = new Label (...); label.TextColor = myColor MainLoop, Threads and Input Handling Detailed description of the mainlop is described on the Event Processing and the Application Main Loop document." + }, + "articles/views.html": { + "href": "articles/views.html", + "title": "Views", + "keywords": "Views Layout Creating Custom Views Constructor Rendering Using Custom Colors Keyboard processing Mouse event processing" + }, "index.html": { "href": "index.html", "title": "Terminal.Gui - Terminal UI toolkit for .NET", diff --git a/docs/manifest.json b/docs/manifest.json index d1e105519..d38dcce3c 100644 --- a/docs/manifest.json +++ b/docs/manifest.json @@ -126,7 +126,7 @@ "output": { ".html": { "relative_path": "api/Terminal.Gui/Terminal.Gui.Button.html", - "hash": "ilXNdpYPiE1OJCU7+1lCLw==" + "hash": "DPqk1YW7zWdTAHdKvgrmvQ==" } }, "is_incremental": false, @@ -138,7 +138,7 @@ "output": { ".html": { "relative_path": "api/Terminal.Gui/Terminal.Gui.CheckBox.html", - "hash": "Cbl89aC2ejrTf8zNOtzcsQ==" + "hash": "h+TxnYmO2bL74EKIthAV0g==" } }, "is_incremental": false, @@ -198,7 +198,7 @@ "output": { ".html": { "relative_path": "api/Terminal.Gui/Terminal.Gui.ComboBox.html", - "hash": "Zey5Xu3k3/8vfC9a59sA1A==" + "hash": "NEaAt7h3dfVr/0lmWoixpA==" } }, "is_incremental": false, @@ -234,7 +234,7 @@ "output": { ".html": { "relative_path": "api/Terminal.Gui/Terminal.Gui.DateField.html", - "hash": "nS+Bsuzc9GCUQmhtTiTIUg==" + "hash": "SVdI9shNZqsipNelRy2yUQ==" } }, "is_incremental": false, @@ -246,7 +246,7 @@ "output": { ".html": { "relative_path": "api/Terminal.Gui/Terminal.Gui.Dialog.html", - "hash": "UWcJ7RMX29z1JpnA32IqKg==" + "hash": "xNXXfNqW1djDbbTFnuWvLw==" } }, "is_incremental": false, @@ -270,7 +270,7 @@ "output": { ".html": { "relative_path": "api/Terminal.Gui/Terminal.Gui.FileDialog.html", - "hash": "EVTb/fhVHCrjyS0UqJm29w==" + "hash": "4jK2oHF8nhAics9kABKnvg==" } }, "is_incremental": false, @@ -282,7 +282,7 @@ "output": { ".html": { "relative_path": "api/Terminal.Gui/Terminal.Gui.FrameView.html", - "hash": "ajN8HLD+4gKgcE/B2X3Wwg==" + "hash": "WhXoplCWivxd919cExe0fg==" } }, "is_incremental": false, @@ -294,7 +294,7 @@ "output": { ".html": { "relative_path": "api/Terminal.Gui/Terminal.Gui.HexView.html", - "hash": "XPJ46K0S8RlS8a5UiDZEsw==" + "hash": "UieMUUEcCS+KaMcfttPYXw==" } }, "is_incremental": false, @@ -342,7 +342,7 @@ "output": { ".html": { "relative_path": "api/Terminal.Gui/Terminal.Gui.Label.html", - "hash": "pwVeTei/vdIDxK8K+3ctqQ==" + "hash": "OwQ94j2YlYvHBNouV5VysQ==" } }, "is_incremental": false, @@ -366,7 +366,7 @@ "output": { ".html": { "relative_path": "api/Terminal.Gui/Terminal.Gui.ListView.html", - "hash": "oKA/PNKQmL7qMGo5iadfjg==" + "hash": "6fNA37R4D3IRokJF8ei2Pg==" } }, "is_incremental": false, @@ -402,7 +402,7 @@ "output": { ".html": { "relative_path": "api/Terminal.Gui/Terminal.Gui.MenuBar.html", - "hash": "beoKZaYWneiHnW2E9LOBqg==" + "hash": "Y4x1nboKWkISg6Scs4LoGw==" } }, "is_incremental": false, @@ -474,7 +474,7 @@ "output": { ".html": { "relative_path": "api/Terminal.Gui/Terminal.Gui.OpenDialog.html", - "hash": "v4Pfg2yez0022e2feoDdtw==" + "hash": "BO7HL76h2mZ99N6SRtFSvA==" } }, "is_incremental": false, @@ -510,7 +510,7 @@ "output": { ".html": { "relative_path": "api/Terminal.Gui/Terminal.Gui.ProgressBar.html", - "hash": "fQWxwtZ0AVgcay8u9u6QpQ==" + "hash": "iJqqparpcjqV9fiKTr6Z6g==" } }, "is_incremental": false, @@ -522,7 +522,7 @@ "output": { ".html": { "relative_path": "api/Terminal.Gui/Terminal.Gui.RadioGroup.html", - "hash": "hk+Y0f+VWxqssH/yAOr9hg==" + "hash": "jTPFAiG8vUOLUGLLV+N/oQ==" } }, "is_incremental": false, @@ -558,7 +558,7 @@ "output": { ".html": { "relative_path": "api/Terminal.Gui/Terminal.Gui.SaveDialog.html", - "hash": "Nm53mGgn8p5uNbeL+iG40g==" + "hash": "Jp6X+FExiw9UP8AWeBox6A==" } }, "is_incremental": false, @@ -570,7 +570,7 @@ "output": { ".html": { "relative_path": "api/Terminal.Gui/Terminal.Gui.ScrollBarView.html", - "hash": "LIXjdf5ZVUrqPHIVnEDBcQ==" + "hash": "u1YykBL/tVQc7oWusxKk9A==" } }, "is_incremental": false, @@ -582,7 +582,7 @@ "output": { ".html": { "relative_path": "api/Terminal.Gui/Terminal.Gui.ScrollView.html", - "hash": "/xOGZCuJ9iEc42rmfp559w==" + "hash": "DZ8owPSpQpS9D+TZL9utNg==" } }, "is_incremental": false, @@ -618,7 +618,7 @@ "output": { ".html": { "relative_path": "api/Terminal.Gui/Terminal.Gui.StatusBar.html", - "hash": "V4K1vnnvRm7Om1LYnPFSVw==" + "hash": "eJTIklLmCvFJAU7G2Ai3zA==" } }, "is_incremental": false, @@ -654,7 +654,7 @@ "output": { ".html": { "relative_path": "api/Terminal.Gui/Terminal.Gui.TextField.html", - "hash": "KAYeokUuA+aZhsNWqQ4bdA==" + "hash": "RZOjetrqKbvCH6RwwnxovA==" } }, "is_incremental": false, @@ -666,7 +666,7 @@ "output": { ".html": { "relative_path": "api/Terminal.Gui/Terminal.Gui.TextView.html", - "hash": "2iTqEaYkGQviPo6yqEdDxQ==" + "hash": "VbIUZ5fUvyoA+mF620tOvg==" } }, "is_incremental": false, @@ -678,7 +678,7 @@ "output": { ".html": { "relative_path": "api/Terminal.Gui/Terminal.Gui.TimeField.html", - "hash": "H+wxXjEnHuTT4geNf3eGjg==" + "hash": "qHj8zJzjpju3K87ib+wioQ==" } }, "is_incremental": false, @@ -690,7 +690,7 @@ "output": { ".html": { "relative_path": "api/Terminal.Gui/Terminal.Gui.Toplevel.html", - "hash": "FI3Z1qb9QgaDxJPWU5xczA==" + "hash": "tBSiS1Y23Fj1qMUA/SF08g==" } }, "is_incremental": false, @@ -714,7 +714,7 @@ "output": { ".html": { "relative_path": "api/Terminal.Gui/Terminal.Gui.View.html", - "hash": "aT9vupbHNZ6NO0LI3e9ZgQ==" + "hash": "sTbbY0w9ioS2fxDSOWT5Xg==" } }, "is_incremental": false, @@ -726,7 +726,7 @@ "output": { ".html": { "relative_path": "api/Terminal.Gui/Terminal.Gui.Window.html", - "hash": "7bWJ7tjWH8J9nKg+ypKQCQ==" + "hash": "0VBLxR7lZU3IQKbubTD+FA==" } }, "is_incremental": false, @@ -888,6 +888,78 @@ "is_incremental": false, "version": "" }, + { + "log_codes": [ + "InvalidFileLink" + ], + "type": "Conceptual", + "source_relative_path": "articles/index.md", + "output": { + ".html": { + "relative_path": "articles/index.html", + "hash": "u5MbFvWPgaLbF3dmQPptFQ==" + } + }, + "is_incremental": false, + "version": "" + }, + { + "log_codes": [ + "InvalidFileLink" + ], + "type": "Conceptual", + "source_relative_path": "articles/keyboard.md", + "output": { + ".html": { + "relative_path": "articles/keyboard.html", + "hash": "9TB/0rhbNFDq23mWiPMmlQ==" + } + }, + "is_incremental": false, + "version": "" + }, + { + "log_codes": [ + "InvalidFileLink" + ], + "type": "Conceptual", + "source_relative_path": "articles/mainloop.md", + "output": { + ".html": { + "relative_path": "articles/mainloop.html", + "hash": "UbzMNAse3jLWLOxEnm2tog==" + } + }, + "is_incremental": false, + "version": "" + }, + { + "log_codes": [ + "InvalidFileLink" + ], + "type": "Conceptual", + "source_relative_path": "articles/overview.md", + "output": { + ".html": { + "relative_path": "articles/overview.html", + "hash": "ZuXXiSy4n3r3tDlv7/OjRw==" + } + }, + "is_incremental": false, + "version": "" + }, + { + "type": "Conceptual", + "source_relative_path": "articles/views.md", + "output": { + ".html": { + "relative_path": "articles/views.html", + "hash": "VM8NCSAPSFlqb7aMLHxn+A==" + } + }, + "is_incremental": false, + "version": "" + }, { "type": "Resource", "source_relative_path": "images/logo.png", @@ -938,8 +1010,8 @@ "ConceptualDocumentProcessor": { "can_incremental": true, "incrementalPhase": "build", - "total_file_count": 1, - "skipped_file_count": 1 + "total_file_count": 6, + "skipped_file_count": 6 }, "ManagedReferenceDocumentProcessor": { "can_incremental": true, diff --git a/docs/xrefmap.yml b/docs/xrefmap.yml index 5f2aa381a..48a9f7ac0 100644 --- a/docs/xrefmap.yml +++ b/docs/xrefmap.yml @@ -3759,6 +3759,32 @@ references: isSpec: "True" fullName: Terminal.Gui.MenuBar.MenuBar nameWithType: MenuBar.MenuBar +- uid: Terminal.Gui.MenuBar.CloseMenu + name: CloseMenu() + href: api/Terminal.Gui/Terminal.Gui.MenuBar.html#Terminal_Gui_MenuBar_CloseMenu + commentId: M:Terminal.Gui.MenuBar.CloseMenu + fullName: Terminal.Gui.MenuBar.CloseMenu() + nameWithType: MenuBar.CloseMenu() +- uid: Terminal.Gui.MenuBar.CloseMenu* + name: CloseMenu + href: api/Terminal.Gui/Terminal.Gui.MenuBar.html#Terminal_Gui_MenuBar_CloseMenu_ + commentId: Overload:Terminal.Gui.MenuBar.CloseMenu + isSpec: "True" + fullName: Terminal.Gui.MenuBar.CloseMenu + nameWithType: MenuBar.CloseMenu +- uid: Terminal.Gui.MenuBar.IsMenuOpen + name: IsMenuOpen + href: api/Terminal.Gui/Terminal.Gui.MenuBar.html#Terminal_Gui_MenuBar_IsMenuOpen + commentId: P:Terminal.Gui.MenuBar.IsMenuOpen + fullName: Terminal.Gui.MenuBar.IsMenuOpen + nameWithType: MenuBar.IsMenuOpen +- uid: Terminal.Gui.MenuBar.IsMenuOpen* + name: IsMenuOpen + href: api/Terminal.Gui/Terminal.Gui.MenuBar.html#Terminal_Gui_MenuBar_IsMenuOpen_ + commentId: Overload:Terminal.Gui.MenuBar.IsMenuOpen + isSpec: "True" + fullName: Terminal.Gui.MenuBar.IsMenuOpen + nameWithType: MenuBar.IsMenuOpen - uid: Terminal.Gui.MenuBar.LastFocused name: LastFocused href: api/Terminal.Gui/Terminal.Gui.MenuBar.html#Terminal_Gui_MenuBar_LastFocused @@ -3772,19 +3798,6 @@ references: isSpec: "True" fullName: Terminal.Gui.MenuBar.LastFocused nameWithType: MenuBar.LastFocused -- uid: Terminal.Gui.MenuBar.MenuOpen - name: MenuOpen - href: api/Terminal.Gui/Terminal.Gui.MenuBar.html#Terminal_Gui_MenuBar_MenuOpen - commentId: P:Terminal.Gui.MenuBar.MenuOpen - fullName: Terminal.Gui.MenuBar.MenuOpen - nameWithType: MenuBar.MenuOpen -- uid: Terminal.Gui.MenuBar.MenuOpen* - name: MenuOpen - href: api/Terminal.Gui/Terminal.Gui.MenuBar.html#Terminal_Gui_MenuBar_MenuOpen_ - commentId: Overload:Terminal.Gui.MenuBar.MenuOpen - isSpec: "True" - fullName: Terminal.Gui.MenuBar.MenuOpen - nameWithType: MenuBar.MenuOpen - uid: Terminal.Gui.MenuBar.Menus name: Menus href: api/Terminal.Gui/Terminal.Gui.MenuBar.html#Terminal_Gui_MenuBar_Menus @@ -3849,6 +3862,19 @@ references: commentId: E:Terminal.Gui.MenuBar.OnOpenMenu fullName: Terminal.Gui.MenuBar.OnOpenMenu nameWithType: MenuBar.OnOpenMenu +- uid: Terminal.Gui.MenuBar.OpenMenu + name: OpenMenu() + href: api/Terminal.Gui/Terminal.Gui.MenuBar.html#Terminal_Gui_MenuBar_OpenMenu + commentId: M:Terminal.Gui.MenuBar.OpenMenu + fullName: Terminal.Gui.MenuBar.OpenMenu() + nameWithType: MenuBar.OpenMenu() +- uid: Terminal.Gui.MenuBar.OpenMenu* + name: OpenMenu + href: api/Terminal.Gui/Terminal.Gui.MenuBar.html#Terminal_Gui_MenuBar_OpenMenu_ + commentId: Overload:Terminal.Gui.MenuBar.OpenMenu + isSpec: "True" + fullName: Terminal.Gui.MenuBar.OpenMenu + nameWithType: MenuBar.OpenMenu - uid: Terminal.Gui.MenuBar.PositionCursor name: PositionCursor() href: api/Terminal.Gui/Terminal.Gui.MenuBar.html#Terminal_Gui_MenuBar_PositionCursor @@ -7410,6 +7436,19 @@ references: isSpec: "True" fullName: Terminal.Gui.View.Id nameWithType: View.Id +- uid: Terminal.Gui.View.IsCurrentTop + name: IsCurrentTop + href: api/Terminal.Gui/Terminal.Gui.View.html#Terminal_Gui_View_IsCurrentTop + commentId: P:Terminal.Gui.View.IsCurrentTop + fullName: Terminal.Gui.View.IsCurrentTop + nameWithType: View.IsCurrentTop +- uid: Terminal.Gui.View.IsCurrentTop* + name: IsCurrentTop + href: api/Terminal.Gui/Terminal.Gui.View.html#Terminal_Gui_View_IsCurrentTop_ + commentId: Overload:Terminal.Gui.View.IsCurrentTop + isSpec: "True" + fullName: Terminal.Gui.View.IsCurrentTop + nameWithType: View.IsCurrentTop - uid: Terminal.Gui.View.KeyDown name: KeyDown href: api/Terminal.Gui/Terminal.Gui.View.html#Terminal_Gui_View_KeyDown