From ce30a837642cc72aef6433e9322a6c4970c13028 Mon Sep 17 00:00:00 2001 From: BDisp Date: Tue, 2 Jun 2020 19:41:12 +0100 Subject: [PATCH 01/11] Ensures that only the current top to execute keys. --- Terminal.Gui/Core/View.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Terminal.Gui/Core/View.cs b/Terminal.Gui/Core/View.cs index b426a9a06d..3d20d64dc6 100644 --- a/Terminal.Gui/Core/View.cs +++ b/Terminal.Gui/Core/View.cs @@ -989,7 +989,7 @@ public override bool ProcessHotKey (KeyEvent keyEvent) if (subviews == null || subviews.Count == 0) return false; foreach (var view in subviews) - if (view.ProcessHotKey (keyEvent)) + if (view.SuperView.IsCurrentTop && view.ProcessHotKey (keyEvent)) return true; return false; } @@ -1004,7 +1004,7 @@ public override bool ProcessColdKey (KeyEvent keyEvent) if (subviews == null || subviews.Count == 0) return false; foreach (var view in subviews) - if (view.ProcessColdKey (keyEvent)) + if (view.SuperView.IsCurrentTop && view.ProcessColdKey (keyEvent)) return true; return false; } @@ -1024,7 +1024,7 @@ public override bool OnKeyDown (KeyEvent keyEvent) if (subviews == null || subviews.Count == 0) return false; foreach (var view in subviews) - if (view.OnKeyDown (keyEvent)) + if (view.SuperView.IsCurrentTop && view.OnKeyDown (keyEvent)) return true; return false; @@ -1045,7 +1045,7 @@ public override bool OnKeyUp (KeyEvent keyEvent) if (subviews == null || subviews.Count == 0) return false; foreach (var view in subviews) - if (view.OnKeyUp (keyEvent)) + if (view.SuperView.IsCurrentTop && view.OnKeyUp (keyEvent)) return true; return false; From f4fba4282371a80447de26b91c5a8c1b59176f51 Mon Sep 17 00:00:00 2001 From: BDisp Date: Tue, 2 Jun 2020 19:48:45 +0100 Subject: [PATCH 02/11] Improvements the mouse and keys of the MenuBar. --- Terminal.Gui/Views/Menu.cs | 71 ++++++++++++++++++-------------------- 1 file changed, 34 insertions(+), 37 deletions(-) diff --git a/Terminal.Gui/Views/Menu.cs b/Terminal.Gui/Views/Menu.cs index 5f25cb7970..522121f2e5 100644 --- a/Terminal.Gui/Views/Menu.cs +++ b/Terminal.Gui/Views/Menu.cs @@ -573,25 +573,15 @@ public MenuBar (MenuBarItem [] menus) : base () /// public override bool OnKeyDown (KeyEvent keyEvent) - { - if (keyEvent.IsAlt) { - openedByAltKey = true; - SetNeedsDisplay (); - openedByHotKey = false; - } - return false; - } - - /// - public override bool OnKeyUp (KeyEvent keyEvent) { if (keyEvent.IsAlt) { // User pressed Alt - this may be a precursor to a menu accelerator (e.g. Alt-F) - if (!keyEvent.IsCtrl && openedByAltKey && !IsMenuOpen && openMenu == null && ((uint)keyEvent.Key & (uint)Key.CharMask) == 0) { + if (!keyEvent.IsCtrl && !openedByAltKey && !IsMenuOpen && openMenu == null && ((uint)keyEvent.Key & (uint)Key.CharMask) == 0) { // There's no open menu, the first menu item should be highlight. // The right way to do this is to SetFocus(MenuBar), but for some reason // that faults. + openedByAltKey = true; //Activate (0); //StartMenu (); IsMenuOpen = true; @@ -601,7 +591,7 @@ public override bool OnKeyUp (KeyEvent keyEvent) SuperView.SetFocus (this); SetNeedsDisplay (); Application.GrabMouse (this); - } else if (!openedByHotKey) { + } else if (IsMenuOpen && !openedByAltKey) { // There's an open menu. If this Alt key-up is a pre-cursor to an accelerator // we don't want to close the menu because it'll flash. // How to deal with that? @@ -623,6 +613,16 @@ public override bool OnKeyUp (KeyEvent keyEvent) return false; } + /// + public override bool OnKeyUp (KeyEvent keyEvent) + { + if (keyEvent.IsAlt) { + openedByAltKey = false; + SetNeedsDisplay (); + } + return false; + } + /// public override void Redraw (Rect region) { @@ -788,6 +788,7 @@ public void CloseMenu () { CloseMenu (false, false); } + internal void CloseMenu (bool reopen = false, bool isSubMenu = false) { isMenuClosing = true; @@ -815,6 +816,7 @@ internal void CloseMenu (bool reopen = false, bool isSubMenu = false) IsMenuOpen = false; PositionCursor (); } + IsMenuOpen = false; break; case true: @@ -823,10 +825,10 @@ internal void CloseMenu (bool reopen = false, bool isSubMenu = false) RemoveAllOpensSubMenus (); openCurrentMenu.previousSubFocused?.SuperView?.SetFocus (openCurrentMenu.previousSubFocused); openSubMenu = null; + IsMenuOpen = true; break; } isMenuClosing = false; - IsMenuOpen = false; } void RemoveSubMenu (int index) @@ -1087,31 +1089,26 @@ public override bool MouseEvent (MouseEvent me) } handled = false; - if (me.Flags == MouseFlags.Button1Pressed || me.Flags == MouseFlags.Button1Clicked || me.Flags == MouseFlags.Button1DoubleClicked || + if (me.Flags == MouseFlags.Button1Pressed || me.Flags == MouseFlags.Button1DoubleClicked || me.Flags == MouseFlags.Button1Clicked || (me.Flags == MouseFlags.ReportMousePosition && selected > -1) || (me.Flags.HasFlag (MouseFlags.Button1Pressed | MouseFlags.ReportMousePosition) && selected > -1)) { int pos = 1; int cx = me.X; for (int i = 0; i < Menus.Length; i++) { if (cx > pos && me.X < pos + 1 + Menus [i].TitleLength) { - if (selected == i && (me.Flags == MouseFlags.Button1Pressed || me.Flags == MouseFlags.Button1DoubleClicked) && - IsMenuOpen) { - Application.UngrabMouse (); + if (me.Flags == MouseFlags.Button1Clicked) { if (Menus [i].IsTopLevel) { var menu = new Menu (this, i, 0, Menus [i]); menu.Run (Menus [i].Action); - } else { - CloseMenu (); } - } else if ((me.Flags == MouseFlags.Button1Pressed || me.Flags == MouseFlags.Button1DoubleClicked) && - !IsMenuOpen) { - if (Menus [i].IsTopLevel) { - var menu = new Menu (this, i, 0, Menus [i]); - menu.Run (Menus [i].Action); + } else if (me.Flags == MouseFlags.Button1Pressed || me.Flags == MouseFlags.Button1DoubleClicked) { + if (IsMenuOpen) { + CloseAllMenus (); } else { Activate (i); } - } else if (selected != i && selected > -1 && me.Flags == MouseFlags.ReportMousePosition) { + } else if (selected != i && selected > -1 && (me.Flags == MouseFlags.ReportMousePosition || + me.Flags == MouseFlags.Button1Pressed && me.Flags == MouseFlags.ReportMousePosition)) { if (IsMenuOpen) { CloseMenu (); Activate (i); @@ -1140,7 +1137,7 @@ internal bool HandleGrabView (MouseEvent me, View current) me.View.MouseEvent (me); } } else if (!(me.View is MenuBar || me.View is Menu) && (me.Flags.HasFlag (MouseFlags.Button1Clicked) || - me.Flags == MouseFlags.Button1DoubleClicked || me.Flags == MouseFlags.Button1Pressed)) { + me.Flags == MouseFlags.Button1Pressed || me.Flags == MouseFlags.Button1DoubleClicked)) { Application.UngrabMouse (); CloseAllMenus (); handled = false; @@ -1149,24 +1146,25 @@ internal bool HandleGrabView (MouseEvent me, View current) handled = false; return false; } - } else if (!IsMenuOpen && (me.Flags == MouseFlags.Button1Pressed || me.Flags == MouseFlags.Button1DoubleClicked || - me.Flags.HasFlag (MouseFlags.Button1Pressed | MouseFlags.ReportMousePosition))) { + } else if (!IsMenuOpen && (me.Flags == MouseFlags.Button1Pressed || me.Flags == MouseFlags.Button1DoubleClicked || me.Flags.HasFlag (MouseFlags.Button1Pressed | MouseFlags.ReportMousePosition))) { Application.GrabMouse (current); - } else { + } else if (IsMenuOpen && (me.View is MenuBar || me.View is Menu)) { + Application.GrabMouse (me.View); + } + else { handled = false; return false; } - //if (me.View != this && (me.Flags != MouseFlags.Button1Pressed || me.Flags == MouseFlags.Button1DoubleClicked)) + //if (me.View != this && me.Flags != MouseFlags.Button1Pressed) // return true; - //else if (me.View != this && (me.Flags == MouseFlags.Button1Pressed || me.Flags == MouseFlags.Button1DoubleClicked)) { + //else if (me.View != this && me.Flags == MouseFlags.Button1Pressed || me.Flags == MouseFlags.Button1DoubleClicked) { // Application.UngrabMouse (); // host.CloseAllMenus (); // return true; //} - //if (!(me.View is MenuBar) && !(me.View is Menu) && (me.Flags != MouseFlags.Button1Pressed || - // me.Flags != MouseFlags.Button1DoubleClicked)) + //if (!(me.View is MenuBar) && !(me.View is Menu) && me.Flags != MouseFlags.Button1Pressed)) // return false; //if (Application.mouseGrabView != null) { @@ -1175,12 +1173,11 @@ internal bool HandleGrabView (MouseEvent me, View current) // me.Y -= me.OfY; // me.View.MouseEvent (me); // return true; - // } else if (!(me.View is MenuBar || me.View is Menu) && (me.Flags == MouseFlags.Button1Pressed || - // me.Flags == MouseFlags.Button1DoubleClicked)) { + // } else if (!(me.View is MenuBar || me.View is Menu) && me.Flags == MouseFlags.Button1Pressed || me.Flags == MouseFlags.Button1DoubleClicked) { // Application.UngrabMouse (); // CloseAllMenus (); // } - //} else if (!isMenuClosed && selected == -1 && (me.Flags == MouseFlags.Button1Pressed || me.Flags == MouseFlags.Button1DoubleClicked)) { + //} else if (!isMenuClosed && selected == -1 && me.Flags == MouseFlags.Button1Pressed || me.Flags == MouseFlags.Button1DoubleClicked) { // Application.GrabMouse (this); // return true; //} From ae126b48d585c76e583060e85e444a7577af88e4 Mon Sep 17 00:00:00 2001 From: BDisp Date: Wed, 3 Jun 2020 14:37:28 +0100 Subject: [PATCH 03/11] Reverting this because it interfere with the Alt+Tab when switching through windows. --- Terminal.Gui/Views/Menu.cs | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/Terminal.Gui/Views/Menu.cs b/Terminal.Gui/Views/Menu.cs index 522121f2e5..82c737515f 100644 --- a/Terminal.Gui/Views/Menu.cs +++ b/Terminal.Gui/Views/Menu.cs @@ -573,15 +573,25 @@ public MenuBar (MenuBarItem [] menus) : base () /// public override bool OnKeyDown (KeyEvent keyEvent) + { + if (keyEvent.IsAlt) { + openedByAltKey = true; + SetNeedsDisplay (); + openedByHotKey = false; + } + return false; + } + + /// + public override bool OnKeyUp (KeyEvent keyEvent) { if (keyEvent.IsAlt) { // User pressed Alt - this may be a precursor to a menu accelerator (e.g. Alt-F) - if (!keyEvent.IsCtrl && !openedByAltKey && !IsMenuOpen && openMenu == null && ((uint)keyEvent.Key & (uint)Key.CharMask) == 0) { + if (!keyEvent.IsCtrl && openedByAltKey && !IsMenuOpen && openMenu == null && ((uint)keyEvent.Key & (uint)Key.CharMask) == 0) { // There's no open menu, the first menu item should be highlight. // The right way to do this is to SetFocus(MenuBar), but for some reason // that faults. - openedByAltKey = true; //Activate (0); //StartMenu (); IsMenuOpen = true; @@ -591,7 +601,7 @@ public override bool OnKeyDown (KeyEvent keyEvent) SuperView.SetFocus (this); SetNeedsDisplay (); Application.GrabMouse (this); - } else if (IsMenuOpen && !openedByAltKey) { + } else if (!openedByHotKey) { // There's an open menu. If this Alt key-up is a pre-cursor to an accelerator // we don't want to close the menu because it'll flash. // How to deal with that? @@ -613,16 +623,6 @@ public override bool OnKeyDown (KeyEvent keyEvent) return false; } - /// - public override bool OnKeyUp (KeyEvent keyEvent) - { - if (keyEvent.IsAlt) { - openedByAltKey = false; - SetNeedsDisplay (); - } - return false; - } - /// public override void Redraw (Rect region) { From 767eeec8cb0d90c2271b50573393bf85aba35fad Mon Sep 17 00:00:00 2001 From: BDisp Date: Wed, 3 Jun 2020 19:10:00 +0100 Subject: [PATCH 04/11] Fixes #604 Toplevel repaint. --- Terminal.Gui/Core/Toplevel.cs | 2 +- Terminal.Gui/Core/Window.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Terminal.Gui/Core/Toplevel.cs b/Terminal.Gui/Core/Toplevel.cs index 4e2c6ca1d7..bb647bf215 100644 --- a/Terminal.Gui/Core/Toplevel.cs +++ b/Terminal.Gui/Core/Toplevel.cs @@ -264,7 +264,7 @@ public override void Redraw (Rect bounds) if (IsCurrentTop || this == Application.Top) { if (NeedDisplay != null && !NeedDisplay.IsEmpty) { Driver.SetAttribute (Colors.TopLevel.Normal); - Clear (Frame); + Clear (bounds); Driver.SetAttribute (Colors.Base.Normal); } foreach (var view in Subviews) { diff --git a/Terminal.Gui/Core/Window.cs b/Terminal.Gui/Core/Window.cs index 37184cbf0f..462bb24ad3 100644 --- a/Terminal.Gui/Core/Window.cs +++ b/Terminal.Gui/Core/Window.cs @@ -201,7 +201,7 @@ public override bool MouseEvent (MouseEvent mouseEvent) if (dragPosition.HasValue) { if (SuperView == null) { Application.Top.SetNeedsDisplay (Frame); - Application.Top.Redraw (Bounds); + Application.Top.Redraw (Frame); } else { SuperView.SetNeedsDisplay (Frame); } From f1af54db523bedba3ee8481e64df73d1f6ef15aa Mon Sep 17 00:00:00 2001 From: Ross Ferguson Date: Wed, 3 Jun 2020 17:30:19 +0100 Subject: [PATCH 05/11] ComboBox. Support parameterless constructor. Update scenario demo --- Terminal.Gui/Views/ComboBox.cs | 121 +++++++++++++++++++++----- UICatalog/Scenarios/ListsAndCombos.cs | 8 +- 2 files changed, 103 insertions(+), 26 deletions(-) diff --git a/Terminal.Gui/Views/ComboBox.cs b/Terminal.Gui/Views/ComboBox.cs index a89879f8d8..0dd20039e9 100644 --- a/Terminal.Gui/Views/ComboBox.cs +++ b/Terminal.Gui/Views/ComboBox.cs @@ -24,15 +24,28 @@ public class ComboBox : View { /// public event EventHandler Changed; - readonly IList listsource; + IList listsource; IList searchset; ustring text = ""; - readonly TextField search; - readonly ListView listview; - readonly int height; - readonly int width; + TextField search; + ListView listview; + int x; + int y; + int height; + int width; bool autoHide = true; + /// + /// Public constructor + /// + public ComboBox () : base() + { + search = new TextField ("") { LayoutStyle = LayoutStyle.Computed }; + listview = new ListView () { LayoutStyle = LayoutStyle.Computed, CanFocus = true /* why? */ }; + + Initialize (); + } + /// /// Public constructor /// @@ -41,24 +54,34 @@ public class ComboBox : View { /// The width /// The height /// Auto completion source - public ComboBox(int x, int y, int w, int h, IList source) + public ComboBox (int x, int y, int w, int h, IList source) { - listsource = new List(source); + SetSource (source); + this.x = x; + this.y = y; height = h; width = w; - search = new TextField(x, y, w, ""); - search.Changed += Search_Changed; - listview = new ListView(new Rect(x, y + 1, w, 0), listsource.ToList()) - { + search = new TextField (x, y, w, ""); + + listview = new ListView (new Rect (x, y + 1, w, 0), listsource.ToList ()) { LayoutStyle = LayoutStyle.Computed, }; + + Initialize (); + } + + private void Initialize() + { + search.Changed += Search_Changed; + listview.SelectedChanged += (object sender, ListViewItemEventArgs e) => { if(searchset.Count > 0) SetValue (searchset [listview.SelectedItem]); }; - LayoutComplete += (sender, a) => { + // TODO: LayoutComplete event breaks cursor up/down. Revert to Application.Loaded + Application.Loaded += (sender, a) => { // Determine if this view is hosted inside a dialog for (View view = this.SuperView; view != null; view = view.SuperView) { if (view is Dialog) { @@ -70,10 +93,31 @@ public ComboBox(int x, int y, int w, int h, IList source) searchset = autoHide ? new List () : listsource; // Needs to be re-applied for LayoutStyle.Computed - listview.X = x; - listview.Y = y + 1; - listview.Width = CalculateWidth(); - listview.Height = CalculatetHeight (); + // If Dim or Pos are null, these are the from the parametrized constructor + if (X == null) + listview.X = x; + + if (Y == null) + listview.Y = y + 1; + else + listview.Y = Pos.Bottom (search); + + if (Width == null) + listview.Width = CalculateWidth (); + else { + width = GetDimAsInt (Width); + listview.Width = CalculateWidth (); + } + + if (Height == null) + listview.Height = CalculatetHeight (); + else { + height = GetDimAsInt (Height); + listview.Height = CalculatetHeight (); + } + + if (this.Text != null) + Search_Changed (search, Text); if (autoHide) listview.ColorScheme = Colors.Menu; @@ -83,17 +127,24 @@ public ComboBox(int x, int y, int w, int h, IList source) search.MouseClick += Search_MouseClick; - this.Add(listview); - this.Add(search); + this.Add(listview, search); this.SetFocus(search); } + /// + /// Set search list source + /// + public void SetSource(IList source) + { + listsource = new List (source); + } + private void Search_MouseClick (object sender, MouseEventEventArgs e) { if (e.MouseEvent.Flags != MouseFlags.Button1Clicked) return; - SuperView.SetFocus (((View)sender)); + SuperView.SetFocus ((View)sender); } /// @@ -128,7 +179,7 @@ public override bool ProcessKey(KeyEvent e) Changed?.Invoke (this, text); searchset.Clear(); - listview.SetSource(new List ()); + listview.Clear (); listview.Height = 0; this.SetFocus(search); @@ -141,6 +192,9 @@ public override bool ProcessKey(KeyEvent e) return true; } + if (e.Key == Key.CursorUp && search.HasFocus) // stop odd behavior on KeyUp when search has focus + return true; + if (e.Key == Key.CursorUp && listview.HasFocus && listview.SelectedItem == 0 && searchset.Count > 0) // jump back to search { search.CursorPosition = search.Text.Length; @@ -204,6 +258,9 @@ private void Reset() private void Search_Changed (object sender, ustring text) { + if (listsource == null) // Object initialization + return; + if (string.IsNullOrEmpty (search.Text.ToString())) searchset = autoHide ? new List () : listsource; else @@ -226,12 +283,30 @@ private int CalculatetHeight () } /// - /// Internal width + /// Internal width of search list + /// + /// + private int CalculateWidth () + { + return autoHide ? Math.Max (1, width - 1) : width; + } + + /// + /// Get DimAbsolute as integer value /// + /// /// - private int CalculateWidth() + private int GetDimAsInt(Dim dim) { - return autoHide? Math.Max (1, width - 1) : width; + if (!(dim is Dim.DimAbsolute)) + throw new ArgumentException ("Dim must be an absolute value"); + + // Anchor in the case of DimAbsolute returns absolute value. No documentation on what Anchor() does so not sure if this will change in the future. + // + // TODO: Does Dim need:- + // public static implicit operator int (Dim d) + // + return dim.Anchor (0); } } } diff --git a/UICatalog/Scenarios/ListsAndCombos.cs b/UICatalog/Scenarios/ListsAndCombos.cs index 62b5f38d7d..bd41c70d5b 100644 --- a/UICatalog/Scenarios/ListsAndCombos.cs +++ b/UICatalog/Scenarios/ListsAndCombos.cs @@ -15,10 +15,9 @@ public override void Setup () List items = new List (); foreach (var dir in new [] { "/etc", @"\windows\System32" }) { if (Directory.Exists (dir)) { - items = Directory.GetFiles (dir) + items = Directory.GetFiles (dir).Union(Directory.GetDirectories(dir)) .Select (Path.GetFileName) .Where (x => char.IsLetterOrDigit (x [0])) - .Distinct () .OrderBy (x => x).ToList (); } } @@ -45,11 +44,14 @@ public override void Setup () Width = 30 }; - var comboBox = new ComboBox (0, 0, 30, 10, items) { + var comboBox = new ComboBox() { X = Pos.Right(listview) + 1 , Y = Pos.Bottom (lbListView) +1, + Height = 10, Width = 30 }; + comboBox.SetSource (items); + comboBox.Changed += (object sender, ustring text) => lbComboBox.Text = text; Win.Add (lbComboBox, comboBox); } From ca036453b3f1601bf6986e83a7bc1f5db9001862 Mon Sep 17 00:00:00 2001 From: BDisp Date: Wed, 3 Jun 2020 19:21:29 +0100 Subject: [PATCH 06/11] Added some features to TextView like mouse welling and Ctrl+End/Home to navigate to the end and begin of the text. --- Terminal.Gui/Views/TextView.cs | 103 +++++++++++++++++++++------------ 1 file changed, 67 insertions(+), 36 deletions(-) diff --git a/Terminal.Gui/Views/TextView.cs b/Terminal.Gui/Views/TextView.cs index a6d782fe49..7e665ecdcd 100644 --- a/Terminal.Gui/Views/TextView.cs +++ b/Terminal.Gui/Views/TextView.cs @@ -771,32 +771,12 @@ public override bool ProcessKey (KeyEvent kb) case Key.ControlN: case Key.CursorDown: - if (currentRow + 1 < model.Count) { - if (columnTrack == -1) - columnTrack = currentColumn; - currentRow++; - if (currentRow >= topRow + Frame.Height) { - topRow++; - SetNeedsDisplay (); - } - TrackColumn (); - PositionCursor (); - } + MoveDown (); break; case Key.ControlP: case Key.CursorUp: - if (currentRow > 0) { - if (columnTrack == -1) - columnTrack = currentColumn; - currentRow--; - if (currentRow < topRow) { - topRow--; - SetNeedsDisplay (); - } - TrackColumn (); - PositionCursor (); - } + MoveUp (); break; case Key.ControlF: @@ -1024,6 +1004,18 @@ public override bool ProcessKey (KeyEvent kb) SetNeedsDisplay (new Rect (0, currentRow - topRow, 2, Frame.Height)); break; + case Key.CtrlMask | Key.End: + currentRow = model.Count; + TrackColumn (); + PositionCursor (); + break; + + case Key.CtrlMask | Key.Home: + currentRow = 0; + TrackColumn (); + PositionCursor (); + break; + default: // Ignore control characters and other special keys if (kb.Key < Key.Space || kb.Key > Key.CharMask) @@ -1043,6 +1035,36 @@ public override bool ProcessKey (KeyEvent kb) return true; } + private void MoveUp () + { + if (currentRow > 0) { + if (columnTrack == -1) + columnTrack = currentColumn; + currentRow--; + if (currentRow < topRow) { + topRow--; + SetNeedsDisplay (); + } + TrackColumn (); + PositionCursor (); + } + } + + private void MoveDown () + { + if (currentRow + 1 < model.Count) { + if (columnTrack == -1) + columnTrack = currentColumn; + currentRow++; + if (currentRow >= topRow + Frame.Height) { + topRow++; + SetNeedsDisplay (); + } + TrackColumn (); + PositionCursor (); + } + } + IEnumerable<(int col, int row, Rune rune)> ForwardIterator (int col, int row) { if (col < 0 || row < 0) @@ -1173,28 +1195,37 @@ bool MovePrev (ref int col, ref int row, out Rune rune) /// public override bool MouseEvent (MouseEvent ev) { - if (!ev.Flags.HasFlag (MouseFlags.Button1Clicked)) { + if (!ev.Flags.HasFlag (MouseFlags.Button1Clicked) && + !ev.Flags.HasFlag (MouseFlags.WheeledDown) && !ev.Flags.HasFlag (MouseFlags.WheeledUp)) { return false; } if (!HasFocus) SuperView.SetFocus (this); - - if (model.Count > 0) { - var maxCursorPositionableLine = (model.Count - 1) - topRow; - if (ev.Y > maxCursorPositionableLine) { - currentRow = maxCursorPositionableLine; - } else { - currentRow = ev.Y + topRow; + if (ev.Flags == MouseFlags.Button1Clicked) { + if (model.Count > 0) { + var maxCursorPositionableLine = (model.Count - 1) - topRow; + if (ev.Y > maxCursorPositionableLine) { + currentRow = maxCursorPositionableLine; + } else { + currentRow = ev.Y + topRow; + } + var r = GetCurrentLine (); + if (ev.X - leftColumn >= r.Count) + currentColumn = r.Count - leftColumn; + else + currentColumn = ev.X - leftColumn; } - var r = GetCurrentLine (); - if (ev.X - leftColumn >= r.Count) - currentColumn = r.Count - leftColumn; - else - currentColumn = ev.X - leftColumn; + PositionCursor (); + } else if (ev.Flags == MouseFlags.WheeledDown) { + lastWasKill = false; + MoveDown (); + } else if (ev.Flags == MouseFlags.WheeledUp) { + lastWasKill = false; + MoveUp (); } - PositionCursor (); + return true; } } From 020d43f8c5020c22f91e4215cae794ab38cbc4e3 Mon Sep 17 00:00:00 2001 From: BDisp Date: Wed, 3 Jun 2020 21:50:27 +0100 Subject: [PATCH 07/11] Added a comment as suggested. --- Terminal.Gui/Core/Window.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Terminal.Gui/Core/Window.cs b/Terminal.Gui/Core/Window.cs index 462bb24ad3..919204171b 100644 --- a/Terminal.Gui/Core/Window.cs +++ b/Terminal.Gui/Core/Window.cs @@ -201,6 +201,9 @@ public override bool MouseEvent (MouseEvent mouseEvent) if (dragPosition.HasValue) { if (SuperView == null) { Application.Top.SetNeedsDisplay (Frame); + // Redraw the entire app window using just our Frame. Since we are + // Application.Top, and our Frame always == our Bounds (Location is always (0,0)) + // our Frame is actually view-relative (which is what Redraw takes). Application.Top.Redraw (Frame); } else { SuperView.SetNeedsDisplay (Frame); From afae8b8f853c4c8523fc371c3586f76f272015f7 Mon Sep 17 00:00:00 2001 From: BDisp Date: Wed, 3 Jun 2020 23:21:44 +0100 Subject: [PATCH 08/11] Requested changes made. --- Terminal.Gui/ConsoleDrivers/WindowsDriver.cs | 9 +++++---- Terminal.Gui/Core/Application.cs | 3 ++- Terminal.Gui/Views/Menu.cs | 2 -- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Terminal.Gui/ConsoleDrivers/WindowsDriver.cs b/Terminal.Gui/ConsoleDrivers/WindowsDriver.cs index 016da41121..d8049817a4 100644 --- a/Terminal.Gui/ConsoleDrivers/WindowsDriver.cs +++ b/Terminal.Gui/ConsoleDrivers/WindowsDriver.cs @@ -695,8 +695,9 @@ void IMainLoopDriver.MainIteration () keyUpHandler (new KeyEvent (map, keyModifiers)); } } - if (!inputEvent.KeyEvent.bKeyDown) + if (!inputEvent.KeyEvent.bKeyDown) { keyModifiers = null; + } break; case WindowsConsole.EventType.Mouse: @@ -879,7 +880,7 @@ MouseEvent ToDriverMouse (WindowsConsole.MouseEventRecord mouseEvent) }; } - private async Task ProcessButtonDoubleClickedAsync () + async Task ProcessButtonDoubleClickedAsync () { await Task.Delay (200); IsButtonDoubleClicked = false; @@ -896,11 +897,11 @@ async Task ProcessContinuousButtonPressedAsync (WindowsConsole.MouseEventRecord }; var view = Application.wantContinuousButtonPressedView; - if (view == null) + if (view == null) { break; + } if (IsButtonPressed && (mouseFlag & MouseFlags.ReportMousePosition) == 0) { mouseHandler (me); - //mainLoop.Driver.Wakeup (); } } } diff --git a/Terminal.Gui/Core/Application.cs b/Terminal.Gui/Core/Application.cs index 53bfb3ae5a..ccd9d9f929 100644 --- a/Terminal.Gui/Core/Application.cs +++ b/Terminal.Gui/Core/Application.cs @@ -351,8 +351,9 @@ static void ProcessMouseEvent (MouseEvent me) OfY = me.Y - newxy.Y, View = view }; - if (OutsideFrame (new Point (nme.X, nme.Y), mouseGrabView.Frame)) + if (OutsideFrame (new Point (nme.X, nme.Y), mouseGrabView.Frame)) { lastMouseOwnerView?.OnMouseLeave (me); + } if (mouseGrabView != null) { mouseGrabView.OnMouseEvent (nme); return; diff --git a/Terminal.Gui/Views/Menu.cs b/Terminal.Gui/Views/Menu.cs index 82c737515f..4477d9f1a6 100644 --- a/Terminal.Gui/Views/Menu.cs +++ b/Terminal.Gui/Views/Menu.cs @@ -810,10 +810,8 @@ internal void CloseMenu (bool reopen = false, bool isSubMenu = false) if (!reopen) selected = -1; LastFocused.SuperView?.SetFocus (LastFocused); - IsMenuOpen = false; } else { SuperView.SetFocus (this); - IsMenuOpen = false; PositionCursor (); } IsMenuOpen = false; From e87b56cd77b6082ab9eda722f239ffabd5999ec1 Mon Sep 17 00:00:00 2001 From: Charlie Kindel Date: Wed, 3 Jun 2020 18:18:19 -0600 Subject: [PATCH 09/11] updated api docs; implemented inheritdoc; may break deploy --- Terminal.Gui/Core/Application.cs | 25 +- Terminal.Gui/Core/ConsoleDriver.cs | 2 +- Terminal.Gui/Core/Event.cs | 5 +- Terminal.Gui/Core/Toplevel.cs | 15 +- Terminal.Gui/Core/View.cs | 44 +- Terminal.Gui/Core/Window.cs | 39 +- Terminal.Gui/Terminal.Gui.csproj | 8 +- Terminal.Gui/Views/Button.cs | 12 +- Terminal.Gui/Views/Checkbox.cs | 8 +- Terminal.Gui/Views/ComboBox.cs | 4 +- Terminal.Gui/Views/DateField.cs | 4 +- Terminal.Gui/Views/FrameView.cs | 2 +- Terminal.Gui/Views/HexView.cs | 8 +- Terminal.Gui/Views/Label.cs | 2 +- Terminal.Gui/Views/ListView.cs | 8 +- Terminal.Gui/Views/Menu.cs | 14 +- Terminal.Gui/Views/ProgressBar.cs | 2 +- Terminal.Gui/Views/RadioGroup.cs | 14 +- Terminal.Gui/Views/ScrollView.cs | 12 +- Terminal.Gui/Views/StatusBar.cs | 6 +- Terminal.Gui/Views/TextField.cs | 10 +- Terminal.Gui/Views/TextView.cs | 8 +- Terminal.Gui/Views/TimeField.cs | 4 +- Terminal.Gui/Windows/Dialog.cs | 4 +- Terminal.Gui/Windows/FileDialog.cs | 2 +- UICatalog/Scenario.cs | 2 +- docfx/docfx.json | 2 - ...inal.Gui.Application.ResizedEventArgs.html | 4 +- .../Terminal.Gui.Application.RunState.html | 4 +- .../Terminal.Gui.Application.html | 29 +- .../Terminal.Gui/Terminal.Gui.Attribute.html | 4 +- .../api/Terminal.Gui/Terminal.Gui.Button.html | 152 ++++- .../Terminal.Gui/Terminal.Gui.CheckBox.html | 112 +++- .../Terminal.Gui/Terminal.Gui.Clipboard.html | 4 +- docs/api/Terminal.Gui/Terminal.Gui.Color.html | 6 +- .../Terminal.Gui.ColorScheme.html | 4 +- .../api/Terminal.Gui/Terminal.Gui.Colors.html | 4 +- .../Terminal.Gui/Terminal.Gui.ComboBox.html | 53 +- .../Terminal.Gui.ConsoleDriver.html | 10 +- .../Terminal.Gui/Terminal.Gui.DateField.html | 34 +- .../api/Terminal.Gui/Terminal.Gui.Dialog.html | 104 +++- docs/api/Terminal.Gui/Terminal.Gui.Dim.html | 4 +- .../Terminal.Gui/Terminal.Gui.FileDialog.html | 24 +- .../Terminal.Gui/Terminal.Gui.FrameView.html | 39 +- .../Terminal.Gui/Terminal.Gui.HexView.html | 89 ++- .../Terminal.Gui.IListDataSource.html | 4 +- .../Terminal.Gui.IMainLoopDriver.html | 4 +- docs/api/Terminal.Gui/Terminal.Gui.Key.html | 4 +- .../Terminal.Gui/Terminal.Gui.KeyEvent.html | 98 +++- .../Terminal.Gui.KeyModifiers.html | 318 ++++++++++ docs/api/Terminal.Gui/Terminal.Gui.Label.html | 43 +- .../Terminal.Gui.LayoutStyle.html | 6 +- .../Terminal.Gui/Terminal.Gui.ListView.html | 77 ++- .../Terminal.Gui.ListViewItemEventArgs.html | 4 +- .../Terminal.Gui.ListWrapper.html | 4 +- .../Terminal.Gui/Terminal.Gui.MainLoop.html | 4 +- .../Terminal.Gui/Terminal.Gui.MenuBar.html | 104 +++- .../Terminal.Gui.MenuBarItem.html | 4 +- .../Terminal.Gui/Terminal.Gui.MenuItem.html | 4 +- .../Terminal.Gui/Terminal.Gui.MessageBox.html | 152 ++++- .../Terminal.Gui/Terminal.Gui.MouseEvent.html | 4 +- .../Terminal.Gui/Terminal.Gui.MouseFlags.html | 4 +- .../Terminal.Gui/Terminal.Gui.OpenDialog.html | 19 +- docs/api/Terminal.Gui/Terminal.Gui.Point.html | 4 +- docs/api/Terminal.Gui/Terminal.Gui.Pos.html | 9 +- .../Terminal.Gui.ProgressBar.html | 37 +- .../Terminal.Gui/Terminal.Gui.RadioGroup.html | 104 +++- docs/api/Terminal.Gui/Terminal.Gui.Rect.html | 4 +- .../Terminal.Gui/Terminal.Gui.Responder.html | 4 +- .../Terminal.Gui/Terminal.Gui.SaveDialog.html | 19 +- .../Terminal.Gui.ScrollBarView.html | 165 +++++- .../Terminal.Gui/Terminal.Gui.ScrollView.html | 93 ++- docs/api/Terminal.Gui/Terminal.Gui.Size.html | 4 +- .../Terminal.Gui/Terminal.Gui.StatusBar.html | 113 +++- .../Terminal.Gui/Terminal.Gui.StatusItem.html | 6 +- .../Terminal.Gui.TextAlignment.html | 4 +- .../Terminal.Gui/Terminal.Gui.TextField.html | 77 ++- .../Terminal.Gui/Terminal.Gui.TextView.html | 79 ++- .../Terminal.Gui/Terminal.Gui.TimeField.html | 34 +- .../Terminal.Gui/Terminal.Gui.Toplevel.html | 128 +++- .../Terminal.Gui.View.FocusEventArgs.html | 208 +++++++ .../Terminal.Gui.View.KeyEventEventArgs.html | 6 +- .../Terminal.Gui.View.LayoutEventArgs.html | 193 ++++++ ...Terminal.Gui.View.MouseEventEventArgs.html | 252 ++++++++ docs/api/Terminal.Gui/Terminal.Gui.View.html | 548 ++++++++++++++---- .../api/Terminal.Gui/Terminal.Gui.Window.html | 111 +++- docs/api/Terminal.Gui/Terminal.Gui.html | 34 +- .../Unix.Terminal.Curses.Event.html | 4 +- .../Unix.Terminal.Curses.MouseEvent.html | 4 +- .../Unix.Terminal.Curses.Window.html | 4 +- .../Terminal.Gui/Unix.Terminal.Curses.html | 4 +- docs/api/Terminal.Gui/Unix.Terminal.html | 4 +- docs/api/Terminal.Gui/toc.html | 12 + .../UICatalog.Scenario.ScenarioCategory.html | 4 +- .../UICatalog.Scenario.ScenarioMetadata.html | 4 +- docs/api/UICatalog/UICatalog.Scenario.html | 4 +- .../api/UICatalog/UICatalog.UICatalogApp.html | 4 +- docs/api/UICatalog/UICatalog.html | 4 +- docs/articles/index.html | 4 +- docs/articles/keyboard.html | 4 +- docs/articles/mainloop.html | 4 +- docs/articles/overview.html | 4 +- docs/articles/views.html | 4 +- docs/index.html | 4 +- docs/index.json | 88 +-- docs/manifest.json | 210 ++++--- docs/styles/main.css | 299 ---------- docs/xrefmap.yml | 359 +++++++++++- 108 files changed, 4031 insertions(+), 1040 deletions(-) create mode 100644 docs/api/Terminal.Gui/Terminal.Gui.KeyModifiers.html create mode 100644 docs/api/Terminal.Gui/Terminal.Gui.View.FocusEventArgs.html create mode 100644 docs/api/Terminal.Gui/Terminal.Gui.View.LayoutEventArgs.html create mode 100644 docs/api/Terminal.Gui/Terminal.Gui.View.MouseEventEventArgs.html diff --git a/Terminal.Gui/Core/Application.cs b/Terminal.Gui/Core/Application.cs index 3d33fd785b..3039c99604 100644 --- a/Terminal.Gui/Core/Application.cs +++ b/Terminal.Gui/Core/Application.cs @@ -23,18 +23,33 @@ namespace Terminal.Gui { /// - /// The application driver for Terminal.Gui. + /// A static, singelton class provding the main application driver for Terminal.Gui apps. /// + /// + /// + /// // A simple Terminal.Gui app that creates a window with a frame and title with + /// // 5 rows/columns of padding. + /// Application.Init(); + /// var win = new Window ("Hello World - CTRL-Q to quit") { + /// X = 5, + /// Y = 5, + /// Width = Dim.Fill (5), + /// Height = Dim.Fill (5) + /// }; + /// Application.Top.Add(win); + /// Application.Run(); + /// + /// /// /// - /// You can hook up to the event to have your method - /// invoked on each iteration of the . - /// - /// /// Creates a instance of to process input events, handle timers and /// other sources of data. It is accessible via the property. /// /// + /// You can hook up to the event to have your method + /// invoked on each iteration of the . + /// + /// /// When invoked sets the SynchronizationContext to one that is tied /// to the mainloop, allowing user code to use async/await. /// diff --git a/Terminal.Gui/Core/ConsoleDriver.cs b/Terminal.Gui/Core/ConsoleDriver.cs index 72bd854b16..3a1c06b5bd 100644 --- a/Terminal.Gui/Core/ConsoleDriver.cs +++ b/Terminal.Gui/Core/ConsoleDriver.cs @@ -14,7 +14,7 @@ namespace Terminal.Gui { /// - /// Basic colors that can be used to set the foreground and background colors in console applications. These can only be + /// Basic colors that can be used to set the foreground and background colors in console applications. /// public enum Color { /// diff --git a/Terminal.Gui/Core/Event.cs b/Terminal.Gui/Core/Event.cs index 1a72b897eb..8d58c3f65a 100644 --- a/Terminal.Gui/Core/Event.cs +++ b/Terminal.Gui/Core/Event.cs @@ -396,7 +396,10 @@ public KeyEvent (Key k, KeyModifiers km) keyModifiers = km; } - /// + /// + /// Pretty prints the KeyEvent + /// + /// public override string ToString () { string msg = ""; diff --git a/Terminal.Gui/Core/Toplevel.cs b/Terminal.Gui/Core/Toplevel.cs index bb647bf215..ddd105e849 100644 --- a/Terminal.Gui/Core/Toplevel.cs +++ b/Terminal.Gui/Core/Toplevel.cs @@ -64,7 +64,7 @@ internal virtual void OnReady () /// /// Initializes a new instance of the class with the specified absolute layout. /// - /// Frame. + /// A superview-relative rectangle specifying the location and size for the new Toplevel public Toplevel (Rect frame) : base (frame) { Initialize (); @@ -119,7 +119,7 @@ public override bool CanFocus { /// public StatusBar StatusBar { get; set; } - /// + /// public override bool ProcessKey (KeyEvent keyEvent) { if (base.ProcessKey (keyEvent)) @@ -171,7 +171,7 @@ public override bool ProcessKey (KeyEvent keyEvent) return false; } - /// + /// public override void Add (View view) { if (this == Application.Top) { @@ -183,7 +183,7 @@ public override void Add (View view) base.Add (view); } - /// + /// public override void Remove (View view) { if (this == Application.Top) { @@ -195,7 +195,7 @@ public override void Remove (View view) base.Remove (view); } - /// + /// public override void RemoveAll () { if (this == Application.Top) { @@ -256,7 +256,7 @@ internal void PositionToplevels () } } - /// + /// public override void Redraw (Rect bounds) { Application.CurrentView = this; @@ -264,6 +264,9 @@ public override void Redraw (Rect bounds) if (IsCurrentTop || this == Application.Top) { if (NeedDisplay != null && !NeedDisplay.IsEmpty) { Driver.SetAttribute (Colors.TopLevel.Normal); + + // This is the Application.Top. Clear just the region we're being asked to redraw + // (the bounds passed to us). Clear (bounds); Driver.SetAttribute (Colors.Base.Normal); } diff --git a/Terminal.Gui/Core/View.cs b/Terminal.Gui/Core/View.cs index c6936909ed..de86b5ea3e 100644 --- a/Terminal.Gui/Core/View.cs +++ b/Terminal.Gui/Core/View.cs @@ -76,8 +76,8 @@ public enum LayoutStyle { /// The container of a View can be accessed with the property. /// /// - /// The method flags a region or the entire view - /// as requiring to be redrawn. + /// To flag a region of the View's to be redrawn call . To flag the entire view + /// for redraw call . /// /// /// Views have a property that defines the default colors that subviews @@ -210,7 +210,7 @@ public bool IsCurrentTop { public virtual bool WantContinuousButtonPressed { get; set; } = false; /// - /// Gets or sets the frame for the view. The frame is relative to the . + /// Gets or sets the frame for the view. The frame is relative to the view's container (). /// /// The frame. /// @@ -219,7 +219,7 @@ public bool IsCurrentTop { /// /// /// Altering the Frame of a view will trigger the redrawing of the - /// view as well as the redrawing of the affected regions in the . + /// view as well as the redrawing of the affected regions of the . /// /// public virtual Rect Frame { @@ -263,9 +263,21 @@ public LayoutStyle LayoutStyle { } /// - /// The bounds represent the View-relative rectangle used for this view. Updates to the Bounds update the , and has the same side effects as updating the . + /// The bounds represent the View-relative rectangle used for this view; the area inside of the view. /// /// The bounds. + /// + /// + /// Updates to the Bounds update the , + /// and has the same side effects as updating the . + /// + /// + /// Because coordinates are relative to the upper-left corner of the , + /// the coordinates of the upper-left corner of the rectangle returned by this property are (0,0). + /// Use this property to obtain the size and coordinates of the client area of the + /// control for tasks such as drawing on the surface of the control. + /// + /// public Rect Bounds { get => new Rect (Point.Empty, Frame.Size); set { @@ -781,7 +793,7 @@ public virtual void PositionCursor () Move (frame.X, frame.Y); } - /// + /// public override bool HasFocus { get { return base.HasFocus; @@ -819,7 +831,7 @@ public FocusEventArgs () { } public bool Handled { get; set; } } - /// + /// public override bool OnEnter () { FocusEventArgs args = new FocusEventArgs (); @@ -832,7 +844,7 @@ public override bool OnEnter () return false; } - /// + /// public override bool OnLeave () { FocusEventArgs args = new FocusEventArgs (); @@ -946,6 +958,7 @@ public virtual void Redraw (Rect bounds) var savedClip = ClipToBounds (); // Draw the subview + // Use the view's bounds (view-relative; Location will always be (0,0) because view.Redraw (view.Bounds); // Undo the clip @@ -1042,7 +1055,7 @@ public class KeyEventEventArgs : EventArgs { /// public event EventHandler KeyPress; - /// + /// public override bool ProcessKey (KeyEvent keyEvent) { @@ -1056,7 +1069,7 @@ public override bool ProcessKey (KeyEvent keyEvent) return false; } - /// + /// public override bool ProcessHotKey (KeyEvent keyEvent) { KeyEventEventArgs args = new KeyEventEventArgs (keyEvent); @@ -1071,7 +1084,7 @@ public override bool ProcessHotKey (KeyEvent keyEvent) return false; } - /// + /// public override bool ProcessColdKey (KeyEvent keyEvent) { KeyEventEventArgs args = new KeyEventEventArgs (keyEvent); @@ -1432,7 +1445,10 @@ public virtual void LayoutSubviews () OnLayoutComplete (new LayoutEventArgs () { OldBounds = oldBounds }); } - /// + /// + /// Pretty prints the View + /// + /// public override string ToString () { return $"{GetType ().Name}({Id})({Frame})"; @@ -1458,7 +1474,7 @@ public class MouseEventEventArgs : EventArgs { public bool Handled { get; set; } } - /// + /// public override bool OnMouseEnter (MouseEvent mouseEvent) { MouseEventEventArgs args = new MouseEventEventArgs (mouseEvent); @@ -1471,7 +1487,7 @@ public override bool OnMouseEnter (MouseEvent mouseEvent) return false; } - /// + /// public override bool OnMouseLeave (MouseEvent mouseEvent) { MouseEventEventArgs args = new MouseEventEventArgs (mouseEvent); diff --git a/Terminal.Gui/Core/Window.cs b/Terminal.Gui/Core/Window.cs index 919204171b..daea97f935 100644 --- a/Terminal.Gui/Core/Window.cs +++ b/Terminal.Gui/Core/Window.cs @@ -7,8 +7,12 @@ namespace Terminal.Gui { /// - /// A that draws a frame around its region and has a "Content" subview where the contents are added. + /// A that draws a border around its with a at the top. /// + /// + /// The 'client area' of a is a rectangle deflated by one or more rows/columns from . A this time there is no + /// API to determine this rectangle. + /// public class Window : Toplevel, IEnumerable { View contentView; ustring title; @@ -16,7 +20,7 @@ public class Window : Toplevel, IEnumerable { /// /// The title to be displayed for this window. /// - /// The title. + /// The title public ustring Title { get => title; set { @@ -25,6 +29,12 @@ public ustring Title { } } + + /// + /// ContentView is an internal implementation detail of Window. It is used to host Views added with . + /// Its ONLY reason for being is to provide a simple way for Window to expose to those SubViews that the Window's Bounds + /// are actually deflated due to the border. + /// class ContentView : View { public ContentView (Rect frame) : base (frame) { } public ContentView () : base () { } @@ -46,13 +56,13 @@ public override void Redraw (Rect bounds) } /// - /// Initializes a new instance of the class with an optional title and a set frame. + /// Initializes a new instance of the class with an optional title using positioning. /// - /// Frame. - /// Title. + /// Superview-relatie rectangle specifying the location and size + /// Title /// /// This constructor intitalizes a Window with a of . Use constructors - /// that do not take Rect parameters to initialize a Window with of + /// that do not take Rect parameters to initialize a Window with . /// public Window (Rect frame, ustring title = null) : this (frame, title, padding: 0) { @@ -75,9 +85,9 @@ public Window (ustring title = null) : this (title, padding: 0) /// Initializes a new instance of the with the specified frame for its location, with the specified border, /// and an optional title. /// - /// Frame. + /// Superview-relatie rectangle specifying the location and size /// Number of characters to use for padding of the drawn frame. - /// Title. + /// Title /// /// This constructor intitalizes a Window with a of . Use constructors /// that do not take Rect parameters to initialize a Window with of @@ -125,7 +135,7 @@ public Window (ustring title = null, int padding = 0) : base () return contentView.GetEnumerator (); } - /// + /// public override void Add (View view) { contentView.Add (view); @@ -134,7 +144,7 @@ public override void Add (View view) } - /// + /// public override void Remove (View view) { if (view == null) @@ -148,13 +158,13 @@ public override void Remove (View view) this.CanFocus = false; } - /// + /// public override void RemoveAll () { contentView.RemoveAll (); } - /// + /// public override void Redraw (Rect bounds) { //var padding = 0; @@ -168,6 +178,9 @@ public override void Redraw (Rect bounds) } var savedClip = ClipToBounds (); + + // Redraw our contenetView + // TODO: smartly constrict contentView.Bounds to just be what intersects with the 'bounds' we were passed contentView.Redraw (contentView.Bounds); Driver.Clip = savedClip; @@ -188,7 +201,7 @@ public override void Redraw (Rect bounds) internal static Point? dragPosition; Point start; - /// + /// public override bool MouseEvent (MouseEvent mouseEvent) { // FIXED:The code is currently disabled, because the diff --git a/Terminal.Gui/Terminal.Gui.csproj b/Terminal.Gui/Terminal.Gui.csproj index d78c6950d1..7d3eb47f8b 100644 --- a/Terminal.Gui/Terminal.Gui.csproj +++ b/Terminal.Gui/Terminal.Gui.csproj @@ -74,7 +74,7 @@ * Added a OpenSelectedItem event to the ListView #429. (Thanks @bdisp!) * Fixes the return value of the position cursor in the TextField. (Thanks @bdisp!) * Updates screen on Unix window resizing. (Thanks @bdisp!) - * Fixes the functions of the Edit->Copy-Cut-Paste menu for the TextField that was not working well. (Thanks @bdisp!) + * Fixes the functions of the Edit->Copy-Cut-Paste menu for the TextField that was not working well. (Thanks @bdisp!) * More robust error handing in Pos/Dim. Fixes #355 stack overflow with Pos based on the size of windows at startup. Added a OnResized action to set the Pos after the terminal are resized. (Thanks @bdisp!) * Fixes #389 Window layouting breaks when resizing. (Thanks @bdisp!) * Fixes #557 MessageBox needs to take ustrings (BREAKING CHANGE). (Thanks @tig!) @@ -181,4 +181,10 @@ + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + diff --git a/Terminal.Gui/Views/Button.cs b/Terminal.Gui/Views/Button.cs index eaf56b62fe..0474e43637 100644 --- a/Terminal.Gui/Views/Button.cs +++ b/Terminal.Gui/Views/Button.cs @@ -167,7 +167,7 @@ internal void Update () SetNeedsDisplay (); } - /// + /// public override void Redraw (Rect bounds) { Driver.SetAttribute (HasFocus ? ColorScheme.Focus : ColorScheme.Normal); @@ -181,7 +181,7 @@ public override void Redraw (Rect bounds) } } - /// + /// public override void PositionCursor () { Move (hot_pos == -1 ? 1 : hot_pos, 0); @@ -197,7 +197,7 @@ bool CheckKey (KeyEvent key) return false; } - /// + /// public override bool ProcessHotKey (KeyEvent kb) { if (kb.IsAlt) @@ -206,7 +206,7 @@ public override bool ProcessHotKey (KeyEvent kb) return false; } - /// + /// public override bool ProcessColdKey (KeyEvent kb) { if (IsDefault && kb.KeyValue == '\n') { @@ -217,7 +217,7 @@ public override bool ProcessColdKey (KeyEvent kb) return CheckKey (kb); } - /// + /// public override bool ProcessKey (KeyEvent kb) { var c = kb.KeyValue; @@ -229,7 +229,7 @@ public override bool ProcessKey (KeyEvent kb) return base.ProcessKey (kb); } - /// + /// public override bool MouseEvent (MouseEvent me) { if (me.Flags == MouseFlags.Button1Clicked) { diff --git a/Terminal.Gui/Views/Checkbox.cs b/Terminal.Gui/Views/Checkbox.cs index a9c18c045f..29813ebc5c 100644 --- a/Terminal.Gui/Views/Checkbox.cs +++ b/Terminal.Gui/Views/Checkbox.cs @@ -104,7 +104,7 @@ public ustring Text { } } - /// + /// public override void Redraw (Rect bounds) { Driver.SetAttribute (HasFocus ? ColorScheme.Focus : ColorScheme.Normal); @@ -119,13 +119,13 @@ public override void Redraw (Rect bounds) } } - /// + /// public override void PositionCursor () { Move (1, 0); } - /// + /// public override bool ProcessKey (KeyEvent kb) { if (kb.KeyValue == ' ') { @@ -138,7 +138,7 @@ public override bool ProcessKey (KeyEvent kb) return base.ProcessKey (kb); } - /// + /// public override bool MouseEvent (MouseEvent me) { if (!me.Flags.HasFlag (MouseFlags.Button1Clicked)) diff --git a/Terminal.Gui/Views/ComboBox.cs b/Terminal.Gui/Views/ComboBox.cs index a89879f8d8..5eaad25cb6 100644 --- a/Terminal.Gui/Views/ComboBox.cs +++ b/Terminal.Gui/Views/ComboBox.cs @@ -96,7 +96,7 @@ private void Search_MouseClick (object sender, MouseEventEventArgs e) SuperView.SetFocus (((View)sender)); } - /// + /// public override bool OnEnter () { if (!search.HasFocus) @@ -107,7 +107,7 @@ public override bool OnEnter () return true; } - /// + /// public override bool ProcessKey(KeyEvent e) { if (e.Key == Key.Tab) diff --git a/Terminal.Gui/Views/DateField.cs b/Terminal.Gui/Views/DateField.cs index defdee49a3..bb0268d4e7 100644 --- a/Terminal.Gui/Views/DateField.cs +++ b/Terminal.Gui/Views/DateField.cs @@ -259,7 +259,7 @@ void AdjCursorPosition () CursorPosition++; } - /// + /// public override bool ProcessKey(KeyEvent kb) { switch (kb.Key) { @@ -306,7 +306,7 @@ public override bool ProcessKey(KeyEvent kb) return true; } - /// + /// public override bool MouseEvent(MouseEvent ev) { if (!ev.Flags.HasFlag (MouseFlags.Button1Clicked)) diff --git a/Terminal.Gui/Views/FrameView.cs b/Terminal.Gui/Views/FrameView.cs index b2d44bb576..dd5280349c 100644 --- a/Terminal.Gui/Views/FrameView.cs +++ b/Terminal.Gui/Views/FrameView.cs @@ -131,7 +131,7 @@ public override void RemoveAll() contentView.RemoveAll(); } - /// + /// public override void Redraw (Rect bounds) { var padding = 0; diff --git a/Terminal.Gui/Views/HexView.cs b/Terminal.Gui/Views/HexView.cs index 089e987b9e..5397552f23 100644 --- a/Terminal.Gui/Views/HexView.cs +++ b/Terminal.Gui/Views/HexView.cs @@ -98,7 +98,7 @@ public long DisplayStart { const int bsize = 4; int bytesPerLine; - /// + /// public override Rect Frame { get => base.Frame; set { @@ -129,7 +129,7 @@ byte GetData (byte [] buffer, int offset, out bool edited) return buffer [offset]; } - /// + /// public override void Redraw (Rect bounds) { Attribute currentAttribute; @@ -212,7 +212,7 @@ void SetAttribute (Attribute attribute) } - /// + /// public override void PositionCursor () { var delta = (int)(position - displayStart); @@ -280,7 +280,7 @@ void MoveDown (int bytes) RedisplayLine (position); } - /// + /// public override bool ProcessKey (KeyEvent keyEvent) { switch (keyEvent.Key) { diff --git a/Terminal.Gui/Views/Label.cs b/Terminal.Gui/Views/Label.cs index af56003c2e..334949e2bc 100644 --- a/Terminal.Gui/Views/Label.cs +++ b/Terminal.Gui/Views/Label.cs @@ -162,7 +162,7 @@ static void Recalc (ustring textStr, List lineResult, int width, TextAl lineResult.Add(ClipAndJustify(textStr[lp, textLen], width, talign)); } - /// + /// public override void Redraw (Rect bounds) { if (recalcPending) diff --git a/Terminal.Gui/Views/ListView.cs b/Terminal.Gui/Views/ListView.cs index 44ec32f201..460918bc53 100644 --- a/Terminal.Gui/Views/ListView.cs +++ b/Terminal.Gui/Views/ListView.cs @@ -271,7 +271,7 @@ public ListView (Rect rect, IListDataSource source) : base (rect) CanFocus = true; } - /// + /// public override void Redraw (Rect bounds) { var current = ColorScheme.Focus; @@ -314,7 +314,7 @@ public override void Redraw (Rect bounds) /// public event EventHandler OpenSelectedItem; - /// + /// public override bool ProcessKey (KeyEvent kb) { if (source == null) @@ -489,7 +489,7 @@ public virtual bool OnOpenSelectedItem () return true; } - /// + /// public override void PositionCursor () { if (allowsMarking) @@ -498,7 +498,7 @@ public override void PositionCursor () Move (0, selected - top); } - /// + /// public override bool MouseEvent(MouseEvent me) { if (!me.Flags.HasFlag (MouseFlags.Button1Clicked) && !me.Flags.HasFlag (MouseFlags.Button1DoubleClicked) && diff --git a/Terminal.Gui/Views/Menu.cs b/Terminal.Gui/Views/Menu.cs index 5c5de6c8f6..f95320ad16 100644 --- a/Terminal.Gui/Views/Menu.cs +++ b/Terminal.Gui/Views/Menu.cs @@ -571,7 +571,7 @@ public MenuBar (MenuBarItem [] menus) : base () bool openedByAltKey; - /// + /// public override bool OnKeyDown (KeyEvent keyEvent) { if (keyEvent.IsAlt) { @@ -582,7 +582,7 @@ public override bool OnKeyDown (KeyEvent keyEvent) return false; } - /// + /// public override bool OnKeyUp (KeyEvent keyEvent) { if (keyEvent.IsAlt) { @@ -623,7 +623,7 @@ public override bool OnKeyUp (KeyEvent keyEvent) return false; } - /// + /// public override void Redraw (Rect bounds) { Move (0, 0); @@ -654,7 +654,7 @@ public override void Redraw (Rect bounds) PositionCursor (); } - /// + /// public override void PositionCursor () { int pos = 0; @@ -999,7 +999,7 @@ private void ProcessMenu (int i, MenuBarItem mi) } } - /// + /// public override bool ProcessHotKey (KeyEvent kb) { if (kb.Key == Key.F9) { @@ -1024,7 +1024,7 @@ public override bool ProcessHotKey (KeyEvent kb) return base.ProcessHotKey (kb); } - /// + /// public override bool ProcessKey (KeyEvent kb) { switch (kb.Key) { @@ -1079,7 +1079,7 @@ public override bool ProcessKey (KeyEvent kb) return true; } - /// + /// public override bool MouseEvent (MouseEvent me) { if (!handled && !HandleGrabView (me, this)) { diff --git a/Terminal.Gui/Views/ProgressBar.cs b/Terminal.Gui/Views/ProgressBar.cs index d0fb4feacf..18a04c5dda 100644 --- a/Terminal.Gui/Views/ProgressBar.cs +++ b/Terminal.Gui/Views/ProgressBar.cs @@ -79,7 +79,7 @@ public void Pulse () SetNeedsDisplay (); } - /// + /// public override void Redraw(Rect region) { Driver.SetAttribute (ColorScheme.Normal); diff --git a/Terminal.Gui/Views/RadioGroup.cs b/Terminal.Gui/Views/RadioGroup.cs index d3cf2e659c..67af0e110b 100644 --- a/Terminal.Gui/Views/RadioGroup.cs +++ b/Terminal.Gui/Views/RadioGroup.cs @@ -107,7 +107,7 @@ void Update(string [] newRadioLabels) } } - /// + /// public override void Redraw (Rect bounds) { for (int i = 0; i < radioLabels.Length; i++) { @@ -119,13 +119,15 @@ public override void Redraw (Rect bounds) base.Redraw (bounds); } - /// + /// public override void PositionCursor () { Move (1, cursor); } - /// + /// + /// Invoked when the selected radio label has changed + /// public Action SelectionChanged; /// @@ -141,7 +143,7 @@ public int Selected { } } - /// + /// public override bool ProcessColdKey (KeyEvent kb) { var key = kb.KeyValue; @@ -170,7 +172,7 @@ public override bool ProcessColdKey (KeyEvent kb) return false; } - /// + /// public override bool ProcessKey (KeyEvent kb) { switch (kb.Key) { @@ -195,7 +197,7 @@ public override bool ProcessKey (KeyEvent kb) return base.ProcessKey (kb); } - /// + /// public override bool MouseEvent (MouseEvent me) { if (!me.Flags.HasFlag (MouseFlags.Button1Clicked)) diff --git a/Terminal.Gui/Views/ScrollView.cs b/Terminal.Gui/Views/ScrollView.cs index bd63f22409..db1171e63d 100644 --- a/Terminal.Gui/Views/ScrollView.cs +++ b/Terminal.Gui/Views/ScrollView.cs @@ -122,7 +122,7 @@ void Init (int size, int position, bool isVertical) WantContinuousButtonPressed = true; } - /// + /// public override void Redraw (Rect region) { if (ColorScheme == null) @@ -229,7 +229,7 @@ public override void Redraw (Rect region) } } - /// + /// public override bool MouseEvent (MouseEvent me) { if (me.Flags != MouseFlags.Button1Pressed && me.Flags != MouseFlags.Button1Clicked && @@ -467,7 +467,7 @@ public bool ShowVerticalScrollIndicator { } } - /// + /// public override void Redraw (Rect region) { Driver.SetAttribute (ColorScheme.Normal); @@ -503,7 +503,7 @@ void SetViewsNeedsDisplay () } } - /// + /// public override void PositionCursor () { if (InternalSubviews.Count == 0) @@ -569,7 +569,7 @@ public bool ScrollRight (int cols) return true; } - /// + /// public override bool ProcessKey (KeyEvent kb) { if (base.ProcessKey (kb)) @@ -605,7 +605,7 @@ public override bool ProcessKey (KeyEvent kb) return false; } - /// + /// public override bool MouseEvent (MouseEvent me) { if (me.Flags != MouseFlags.WheeledDown && me.Flags != MouseFlags.WheeledUp && diff --git a/Terminal.Gui/Views/StatusBar.cs b/Terminal.Gui/Views/StatusBar.cs index 1fd3448d6b..a7897ca77f 100644 --- a/Terminal.Gui/Views/StatusBar.cs +++ b/Terminal.Gui/Views/StatusBar.cs @@ -150,7 +150,7 @@ Attribute ToggleScheme (Attribute scheme) return result; } - /// + /// public override void Redraw (Rect bounds) { //if (Frame.Y != Driver.Rows - 1) { @@ -180,7 +180,7 @@ public override void Redraw (Rect bounds) } } - /// + /// public override bool ProcessHotKey (KeyEvent kb) { foreach (var item in Items) { @@ -192,7 +192,7 @@ public override bool ProcessHotKey (KeyEvent kb) return false; } - /// + /// public override bool MouseEvent (MouseEvent me) { if (me.Flags != MouseFlags.Button1Clicked) diff --git a/Terminal.Gui/Views/TextField.cs b/Terminal.Gui/Views/TextField.cs index afd94d4087..a2383abbbf 100644 --- a/Terminal.Gui/Views/TextField.cs +++ b/Terminal.Gui/Views/TextField.cs @@ -86,7 +86,7 @@ void Initialize (ustring text, int w) WantMousePositionReports = true; } - /// + /// public override bool OnLeave () { if (Application.mouseGrabView != null && Application.mouseGrabView == this) @@ -97,7 +97,7 @@ public override bool OnLeave () return base.OnLeave (); } - /// + /// public override Rect Frame { get => base.Frame; set { @@ -183,7 +183,7 @@ public override void PositionCursor () Move (col, 0); } - /// + /// public override void Redraw (Rect bounds) { ColorScheme color = Colors.Menu; @@ -255,7 +255,7 @@ void SetText (IEnumerable newText) SetText (newText.ToList ()); } - /// + /// public override bool CanFocus { get => true; set { base.CanFocus = value; } @@ -629,7 +629,7 @@ int WordBackward (int p) int start, length; bool isButtonReleased = true; - /// + /// public override bool MouseEvent (MouseEvent ev) { if (!ev.Flags.HasFlag (MouseFlags.Button1Pressed) && !ev.Flags.HasFlag (MouseFlags.ReportMousePosition) && diff --git a/Terminal.Gui/Views/TextView.cs b/Terminal.Gui/Views/TextView.cs index 7e665ecdcd..0f272bd409 100644 --- a/Terminal.Gui/Views/TextView.cs +++ b/Terminal.Gui/Views/TextView.cs @@ -524,7 +524,7 @@ void ClearRegion () SetNeedsDisplay (); } - /// + /// public override void Redraw (Rect bounds) { ColorNormal (); @@ -564,7 +564,7 @@ public override void Redraw (Rect bounds) PositionCursor (); } - /// + /// public override bool CanFocus { get => true; set { base.CanFocus = value; } @@ -712,7 +712,7 @@ public void ScrollTo (int row) bool lastWasKill; - /// + /// public override bool ProcessKey (KeyEvent kb) { int restCount; @@ -1192,7 +1192,7 @@ bool MovePrev (ref int col, ref int row, out Rune rune) return null; } - /// + /// public override bool MouseEvent (MouseEvent ev) { if (!ev.Flags.HasFlag (MouseFlags.Button1Clicked) && diff --git a/Terminal.Gui/Views/TimeField.cs b/Terminal.Gui/Views/TimeField.cs index 52c9ce40bf..c339e38359 100644 --- a/Terminal.Gui/Views/TimeField.cs +++ b/Terminal.Gui/Views/TimeField.cs @@ -180,7 +180,7 @@ void AdjCursorPosition () CursorPosition++; } - /// + /// public override bool ProcessKey (KeyEvent kb) { switch (kb.Key) { @@ -227,7 +227,7 @@ public override bool ProcessKey (KeyEvent kb) return true; } - /// + /// public override bool MouseEvent (MouseEvent ev) { if (!ev.Flags.HasFlag (MouseFlags.Button1Clicked)) diff --git a/Terminal.Gui/Windows/Dialog.cs b/Terminal.Gui/Windows/Dialog.cs index 1455ebacd8..b528275791 100644 --- a/Terminal.Gui/Windows/Dialog.cs +++ b/Terminal.Gui/Windows/Dialog.cs @@ -100,7 +100,7 @@ internal int GetButtonsWidth () } return buttons.Select (b => b.Bounds.Width).Sum () + buttons.Count() - 1; } - /// + /// public override void LayoutSubviews () { int buttonsWidth = GetButtonsWidth (); @@ -116,7 +116,7 @@ public override void LayoutSubviews () base.LayoutSubviews (); } - /// + /// public override bool ProcessKey (KeyEvent kb) { switch (kb.Key) { diff --git a/Terminal.Gui/Windows/FileDialog.cs b/Terminal.Gui/Windows/FileDialog.cs index 48451f0450..3390febc6f 100644 --- a/Terminal.Gui/Windows/FileDialog.cs +++ b/Terminal.Gui/Windows/FileDialog.cs @@ -497,7 +497,7 @@ public FileDialog (ustring title, ustring prompt, ustring nameFieldLabel, ustrin internal bool canceled; - /// + /// public override void WillPresent () { base.WillPresent (); diff --git a/UICatalog/Scenario.cs b/UICatalog/Scenario.cs index f422bdefa4..6df4825365 100644 --- a/UICatalog/Scenario.cs +++ b/UICatalog/Scenario.cs @@ -175,7 +175,7 @@ public static List GetCategories (Type t) => System.Attribute.GetCustomA /// list of catagory names public List GetCategories () => ScenarioCategory.GetCategories (this.GetType ()); - /// + /// public override string ToString () => $"{GetName (),-30}{GetDescription ()}"; /// diff --git a/docfx/docfx.json b/docfx/docfx.json index fd16850ca4..4e35d5cf47 100644 --- a/docfx/docfx.json +++ b/docfx/docfx.json @@ -91,8 +91,6 @@ }, "globalMetadataFiles": [], "fileMetadataFiles": [], - "template": ["default", "templates/material" - ], "postProcessors": ["ExtractSearchIndex"], "noLangKeyword": false, "keepFileLink": false diff --git a/docs/api/Terminal.Gui/Terminal.Gui.Application.ResizedEventArgs.html b/docs/api/Terminal.Gui/Terminal.Gui.Application.ResizedEventArgs.html index d406eec8c5..b40d7eaedd 100644 --- a/docs/api/Terminal.Gui/Terminal.Gui.Application.ResizedEventArgs.html +++ b/docs/api/Terminal.Gui/Terminal.Gui.Application.ResizedEventArgs.html @@ -16,13 +16,13 @@ - - + +
diff --git a/docs/api/Terminal.Gui/Terminal.Gui.Application.RunState.html b/docs/api/Terminal.Gui/Terminal.Gui.Application.RunState.html index 8491bc34a0..c8716eb020 100644 --- a/docs/api/Terminal.Gui/Terminal.Gui.Application.RunState.html +++ b/docs/api/Terminal.Gui/Terminal.Gui.Application.RunState.html @@ -16,13 +16,13 @@ - - + +
diff --git a/docs/api/Terminal.Gui/Terminal.Gui.Application.html b/docs/api/Terminal.Gui/Terminal.Gui.Application.html index 9914658046..15685a6c11 100644 --- a/docs/api/Terminal.Gui/Terminal.Gui.Application.html +++ b/docs/api/Terminal.Gui/Terminal.Gui.Application.html @@ -16,13 +16,13 @@ - - + +
@@ -84,7 +84,7 @@

Class Application

-The application driver for Terminal.Gui. +A static, singelton class provding the main application driver for Terminal.Gui apps.
@@ -124,19 +124,33 @@
Syntax
Remarks
-

- You can hook up to the Iteration event to have your method - invoked on each iteration of the MainLoop. -

Creates a instance of MainLoop to process input events, handle timers and other sources of data. It is accessible via the MainLoop property.

+

+ You can hook up to the Iteration event to have your method + invoked on each iteration of the MainLoop. +

When invoked sets the SynchronizationContext to one that is tied to the mainloop, allowing user code to use async/await.

+
Examples
+ +
// A simple Terminal.Gui app that creates a window with a frame and title with 
+// 5 rows/columns of padding.
+Application.Init();
+var win = new Window ("Hello World - CTRL-Q to quit") {
+    X = 5,
+    Y = 5,
+    Width = Dim.Fill (5),
+    Height = Dim.Fill (5)
+};
+Application.Top.Add(win);
+Application.Run();
+

Fields

@@ -625,7 +639,6 @@

Declaration

public static void Run<T>()
-
     where T : Toplevel, new()
Type Parameters
diff --git a/docs/api/Terminal.Gui/Terminal.Gui.Attribute.html b/docs/api/Terminal.Gui/Terminal.Gui.Attribute.html index 5ef3a84123..e8c75189e3 100644 --- a/docs/api/Terminal.Gui/Terminal.Gui.Attribute.html +++ b/docs/api/Terminal.Gui/Terminal.Gui.Attribute.html @@ -16,13 +16,13 @@ - - + +
diff --git a/docs/api/Terminal.Gui/Terminal.Gui.Button.html b/docs/api/Terminal.Gui/Terminal.Gui.Button.html index b32f8b5915..d8d9ad509f 100644 --- a/docs/api/Terminal.Gui/Terminal.Gui.Button.html +++ b/docs/api/Terminal.Gui/Terminal.Gui.Button.html @@ -16,13 +16,13 @@ - - + +
@@ -112,6 +112,9 @@
Inherited Members
+ @@ -241,6 +244,12 @@
Inherited Members
+ + @@ -274,6 +283,9 @@
Inherited Members
+ @@ -286,6 +298,9 @@
Inherited Members
+ @@ -334,7 +349,7 @@

Constructors

Button(ustring, Boolean)

-Initializes a new instance of Button based on the given text at position 0,0 +Initializes a new instance of Button using Computed layout.
Declaration
@@ -359,21 +374,24 @@
Parameters
System.Boolean is_default - If set, this makes the button the default button in the current view. IsDefault + +If true, a special decoration is used, and the user pressing the enter key +in a Dialog will implicitly activate this button. +
Remarks
-The size of the Button is computed based on the -text length. +The width of the Button is computed based on the +text length. The height will always be 1.

Button(Int32, Int32, ustring)

-Initializes a new instance of Button at the given coordinates, based on the given text +Initializes a new instance of Button using Absolute layout, based on the given text
Declaration
@@ -409,15 +427,15 @@
Parameters
Remarks
-The size of the Button is computed based on the -text length. +The width of the Button is computed based on the +text length. The height will always be 1.

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 +Initializes a new instance of Button using Absolute layout, based on the given text.
Declaration
@@ -452,15 +470,17 @@
Parameters
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 + +If true, a special decoration is used, and the user pressing the enter key +in a Dialog will implicitly activate this 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. +The width of the Button is computed based on the +text length. The height will always be 1.

Fields

@@ -558,7 +578,9 @@

Methods

MouseEvent(MouseEvent)

-
+
+Method invoked when a mouse event is generated +
Declaration
@@ -592,7 +614,7 @@
Returns
System.Boolean - + true, if the event was handled, false otherwise. @@ -602,7 +624,9 @@
Overrides

PositionCursor()

-
+
+Positions the cursor in the right position based on the currently focused view in the chain. +
Declaration
@@ -614,7 +638,12 @@
Overrides

ProcessColdKey(KeyEvent)

-
+
+This method can be overwritten by views that +want to provide accelerator functionality +(Alt-key for example), but without +interefering with normal ProcessKey behavior. +
Declaration
@@ -654,11 +683,31 @@
Returns
Overrides
+
Remarks
+
+

+ After keys are sent to the subviews on the + current view, all the view are + processed and the key is passed to the views + to allow some of them to process the keystroke + as a cold-key.

+

+ This functionality is used, for example, by + default buttons to act on the enter key. + Processing this as a hot-key would prevent + non-default buttons from consuming the enter + keypress when they have the focus. +

+

ProcessHotKey(KeyEvent)

-
+
+This method can be overwritten by view that +want to provide accelerator functionality +(Alt-key for example). +
Declaration
@@ -698,11 +747,31 @@
Returns
Overrides
+
Remarks
+
+

+ Before keys are sent to the subview on the + current view, all the views are + processed and the key is passed to the widgets + to allow some of them to process the keystroke + as a hot-key.

+

+ For example, if you implement a button that + has a hotkey ok "o", you would catch the + combination Alt-o here. If the event is + caught, you must return true to stop the + keystroke from being dispatched to other + views. +

+

ProcessKey(KeyEvent)

-
+
+If the view is focused, gives the view a +chance to process the keystroke. +
Declaration
@@ -742,15 +811,36 @@
Returns
Overrides
+
Remarks
+
+

+ Views can override this method if they are + interested in processing the given keystroke. + If they consume the keystroke, they must + return true to stop the keystroke from being + processed by other widgets or consumed by the + widget engine. If they return false, the + keystroke will be passed using the ProcessColdKey + method to other views to process. +

+

+ The View implementation does nothing but return false, + so it is not necessary to call base.ProcessKey if you + derive directly from View, but you should if you derive + other View subclasses. +

+

Redraw(Rect)

-
+
+Redraws this view and its subviews; only redraws the views that have been flagged for a re-display. +
Declaration
-
public override void Redraw(Rect region)
+
public override void Redraw(Rect bounds)
Parameters
@@ -764,13 +854,27 @@
Parameters
- - + +
RectregionboundsThe bounds (view-relative region) to redraw.
Overrides
+
Remarks
+
+

+ Always use Bounds (view-relative) when calling Redraw(Rect), NOT Frame (superview-relative). +

+

+ 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. +

+

+ Overrides of Redraw(Rect) must ensure they do not set Driver.Clip to a clip region + larger than the region parameter. +

+

Implements

System.Collections.IEnumerable diff --git a/docs/api/Terminal.Gui/Terminal.Gui.CheckBox.html b/docs/api/Terminal.Gui/Terminal.Gui.CheckBox.html index f89cf21591..978c65b75c 100644 --- a/docs/api/Terminal.Gui/Terminal.Gui.CheckBox.html +++ b/docs/api/Terminal.Gui/Terminal.Gui.CheckBox.html @@ -16,13 +16,13 @@ - - + +
@@ -112,6 +112,9 @@
Inherited Members
+ @@ -241,6 +244,12 @@
Inherited Members
+ + @@ -280,6 +289,9 @@
Inherited Members
+ @@ -292,6 +304,9 @@
Inherited Members
+ @@ -511,7 +526,9 @@

Methods

MouseEvent(MouseEvent)

-
+
+Method invoked when a mouse event is generated +
Declaration
@@ -545,7 +562,7 @@
Returns
System.Boolean - + true, if the event was handled, false otherwise. @@ -553,9 +570,40 @@
Overrides
+ +

OnToggled(Boolean)

+
+Called when the Checked property changes. Invokes the Toggled event. +
+
+
Declaration
+
+
public virtual void OnToggled(bool previousChecked)
+
+
Parameters
+ + + + + + + + + + + + + + + +
TypeNameDescription
System.BooleanpreviousChecked
+ +

PositionCursor()

-
+
+Positions the cursor in the right position based on the currently focused view in the chain. +
Declaration
@@ -567,7 +615,10 @@
Overrides

ProcessKey(KeyEvent)

-
+
+If the view is focused, gives the view a +chance to process the keystroke. +
Declaration
@@ -607,15 +658,36 @@
Returns
Overrides
+
Remarks
+
+

+ Views can override this method if they are + interested in processing the given keystroke. + If they consume the keystroke, they must + return true to stop the keystroke from being + processed by other widgets or consumed by the + widget engine. If they return false, the + keystroke will be passed using the ProcessColdKey + method to other views to process. +

+

+ The View implementation does nothing but return false, + so it is not necessary to call base.ProcessKey if you + derive directly from View, but you should if you derive + other View subclasses. +

+

Redraw(Rect)

-
+
+Redraws this view and its subviews; only redraws the views that have been flagged for a re-display. +
Declaration
-
public override void Redraw(Rect region)
+
public override void Redraw(Rect bounds)
Parameters
@@ -629,13 +701,27 @@
Parameters
- - + +
RectregionboundsThe bounds (view-relative region) to redraw.
Overrides
+
Remarks
+
+

+ Always use Bounds (view-relative) when calling Redraw(Rect), NOT Frame (superview-relative). +

+

+ 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. +

+

+ Overrides of Redraw(Rect) must ensure they do not set Driver.Clip to a clip region + larger than the region parameter. +

+

Events

@@ -647,7 +733,7 @@

Declaration
-
public event EventHandler Toggled
+
public event EventHandler<bool> Toggled
Event Type
@@ -659,7 +745,7 @@
Event Type
- + @@ -668,7 +754,7 @@
Remarks
Client code can hook up to this event, it is raised when the CheckBox is activated either with -the mouse or the keyboard. +the mouse or the keyboard. The passed bool contains the previous state.

Implements

diff --git a/docs/api/Terminal.Gui/Terminal.Gui.Clipboard.html b/docs/api/Terminal.Gui/Terminal.Gui.Clipboard.html index 66c7a43a46..3cbc42b6c2 100644 --- a/docs/api/Terminal.Gui/Terminal.Gui.Clipboard.html +++ b/docs/api/Terminal.Gui/Terminal.Gui.Clipboard.html @@ -16,13 +16,13 @@ - - + +
diff --git a/docs/api/Terminal.Gui/Terminal.Gui.Color.html b/docs/api/Terminal.Gui/Terminal.Gui.Color.html index 48e7600e30..d3ddc6060d 100644 --- a/docs/api/Terminal.Gui/Terminal.Gui.Color.html +++ b/docs/api/Terminal.Gui/Terminal.Gui.Color.html @@ -16,13 +16,13 @@ - - + +
@@ -84,7 +84,7 @@

Enum Color

-Basic colors that can be used to set the foreground and background colors in console applications. These can only be +Basic colors that can be used to set the foreground and background colors in console applications.
Namespace: Terminal.Gui
diff --git a/docs/api/Terminal.Gui/Terminal.Gui.ColorScheme.html b/docs/api/Terminal.Gui/Terminal.Gui.ColorScheme.html index 4cb31727b0..1324cfc290 100644 --- a/docs/api/Terminal.Gui/Terminal.Gui.ColorScheme.html +++ b/docs/api/Terminal.Gui/Terminal.Gui.ColorScheme.html @@ -16,13 +16,13 @@ - - + +
diff --git a/docs/api/Terminal.Gui/Terminal.Gui.Colors.html b/docs/api/Terminal.Gui/Terminal.Gui.Colors.html index c329f6e5ed..e0453a05e8 100644 --- a/docs/api/Terminal.Gui/Terminal.Gui.Colors.html +++ b/docs/api/Terminal.Gui/Terminal.Gui.Colors.html @@ -16,13 +16,13 @@ - - + +
diff --git a/docs/api/Terminal.Gui/Terminal.Gui.ComboBox.html b/docs/api/Terminal.Gui/Terminal.Gui.ComboBox.html index 3397caab64..c75e7ebae7 100644 --- a/docs/api/Terminal.Gui/Terminal.Gui.ComboBox.html +++ b/docs/api/Terminal.Gui/Terminal.Gui.ComboBox.html @@ -16,13 +16,13 @@ - - + +
@@ -112,6 +112,9 @@
Inherited Members
+ @@ -244,6 +247,12 @@
Inherited Members
+ + @@ -283,6 +292,9 @@
Inherited Members
+ @@ -295,6 +307,9 @@
Inherited Members
+ @@ -373,7 +388,7 @@
Parameters
- +
System.EventHandlerSystem.EventHandler<System.Boolean>
System.Collections.Generic.IList<System.String> sourceAuto completetion sourceAuto completion source
@@ -384,7 +399,7 @@

Properties

Text

-The currenlty selected list item +The currently selected list item
Declaration
@@ -412,7 +427,9 @@

Methods

OnEnter()

-
+
+Method invoked when a view gets focus. +
Declaration
@@ -429,7 +446,7 @@
Returns
System.Boolean - + true, if the event was handled, false otherwise. @@ -439,7 +456,10 @@
Overrides

ProcessKey(KeyEvent)

-
+
+If the view is focused, gives the view a +chance to process the keystroke. +
Declaration
@@ -479,6 +499,25 @@
Returns
Overrides
+
Remarks
+
+

+ Views can override this method if they are + interested in processing the given keystroke. + If they consume the keystroke, they must + return true to stop the keystroke from being + processed by other widgets or consumed by the + widget engine. If they return false, the + keystroke will be passed using the ProcessColdKey + method to other views to process. +

+

+ The View implementation does nothing but return false, + so it is not necessary to call base.ProcessKey if you + derive directly from View, but you should if you derive + other View subclasses. +

+

Events

diff --git a/docs/api/Terminal.Gui/Terminal.Gui.ConsoleDriver.html b/docs/api/Terminal.Gui/Terminal.Gui.ConsoleDriver.html index 6f4f2b425b..2e08fce8ac 100644 --- a/docs/api/Terminal.Gui/Terminal.Gui.ConsoleDriver.html +++ b/docs/api/Terminal.Gui/Terminal.Gui.ConsoleDriver.html @@ -16,13 +16,13 @@ - - + +
@@ -643,7 +643,7 @@
Parameters
Rect region - Region where the frame will be drawn.. + Screen relative region where the frame will be drawn. System.Int32 @@ -658,13 +658,13 @@
Parameters
Remarks
- +

DrawWindowFrame(Rect, Int32, Int32, Int32, Int32, Boolean, Boolean)

-Draws a frame for a window with padding aand n optional visible border inside the padding. +Draws a frame for a window with padding and an optional visible border inside the padding.
Declaration
diff --git a/docs/api/Terminal.Gui/Terminal.Gui.DateField.html b/docs/api/Terminal.Gui/Terminal.Gui.DateField.html index 2892a49bfa..70a4743365 100644 --- a/docs/api/Terminal.Gui/Terminal.Gui.DateField.html +++ b/docs/api/Terminal.Gui/Terminal.Gui.DateField.html @@ -16,13 +16,13 @@ - - + +
@@ -167,6 +167,9 @@
Inherited Members
+ @@ -290,6 +293,12 @@
Inherited Members
+ + @@ -329,6 +338,9 @@
Inherited Members
+ @@ -341,6 +353,9 @@
Inherited Members
+
System.Object.Equals(System.Object)
@@ -510,7 +525,9 @@

Methods

MouseEvent(MouseEvent)

-
+
+Method invoked when a mouse event is generated +
Declaration
@@ -544,7 +561,7 @@
Returns
System.Boolean - + true, if the event was handled, false otherwise. @@ -554,7 +571,9 @@
Overrides

ProcessKey(KeyEvent)

-
+
+Processes key presses for the TextField. +
Declaration
@@ -594,6 +613,11 @@
Returns
Overrides
+
Remarks
+
+The TextField control responds to the following keys: +
KeysFunction
Delete, BackspaceDeletes the character before cursor.
+

Implements

System.Collections.IEnumerable diff --git a/docs/api/Terminal.Gui/Terminal.Gui.Dialog.html b/docs/api/Terminal.Gui/Terminal.Gui.Dialog.html index 0452cf13a0..3c75f11db5 100644 --- a/docs/api/Terminal.Gui/Terminal.Gui.Dialog.html +++ b/docs/api/Terminal.Gui/Terminal.Gui.Dialog.html @@ -16,13 +16,13 @@ - - + +
@@ -85,7 +85,7 @@

C

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. +or more Buttons. It defaults to the Dialog color scheme and has a 1 cell padding around the edges.
@@ -161,6 +161,9 @@
Inherited Members
+ @@ -281,6 +284,12 @@
Inherited Members
+ + @@ -320,6 +329,9 @@
Inherited Members
+ @@ -329,6 +341,9 @@
Inherited Members
+
System.Object.Equals(System.Object)
@@ -367,7 +382,8 @@

Constructors

Dialog(ustring, Int32, Int32, Button[])

-Initializes a new instance of the Dialog class with an optional set of Buttons to display +Initializes a new instance of the Dialog class using Absolute positioning +and an optional set of Buttons to display
Declaration
@@ -406,6 +422,53 @@
Parameters
+
Remarks
+
+if width and height are both 0, the Dialog will be vertically and horizontally centered in the +container and the size will be 85% of the container. +After initialzation use X, Y, Width, and Height to override this with a location or size. +
+ + + +

Dialog(ustring, Button[])

+
+Initializes a new instance of the Dialog class using Computed positioning +and with an optional set of Buttons to display +
+
+
Declaration
+
+
public Dialog(ustring title, params Button[] buttons)
+
+
Parameters
+ + + + + + + + + + + + + + + + + + + + +
TypeNameDescription
NStack.ustringtitleTitle for the dialog.
Button[]buttonsOptional buttons to lay out at the bottom of the dialog.
+
Remarks
+
+if width and height are both 0, the Dialog will be vertically and horizontally centered in the +container and the size will be 85% of the container. +After initialzation use X, Y, Width, and Height to override this with a location or size. +

Methods

@@ -441,7 +504,10 @@
Parameters

LayoutSubviews()

-
+
+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
@@ -449,11 +515,18 @@
Declaration
Overrides
+
Remarks
+
+Calls Terminal.Gui.View.OnLayoutComplete(Terminal.Gui.View.LayoutEventArgs) (which raises the LayoutComplete event) before it returns. +

ProcessKey(KeyEvent)

-
+
+If the view is focused, gives the view a +chance to process the keystroke. +
Declaration
@@ -493,6 +566,25 @@
Returns
Overrides
+
Remarks
+
+

+ Views can override this method if they are + interested in processing the given keystroke. + If they consume the keystroke, they must + return true to stop the keystroke from being + processed by other widgets or consumed by the + widget engine. If they return false, the + keystroke will be passed using the ProcessColdKey + method to other views to process. +

+

+ The View implementation does nothing but return false, + so it is not necessary to call base.ProcessKey if you + derive directly from View, but you should if you derive + other View subclasses. +

+

Implements

System.Collections.IEnumerable diff --git a/docs/api/Terminal.Gui/Terminal.Gui.Dim.html b/docs/api/Terminal.Gui/Terminal.Gui.Dim.html index 43f710b8b8..5a4e6bb87b 100644 --- a/docs/api/Terminal.Gui/Terminal.Gui.Dim.html +++ b/docs/api/Terminal.Gui/Terminal.Gui.Dim.html @@ -16,13 +16,13 @@ - - + +
diff --git a/docs/api/Terminal.Gui/Terminal.Gui.FileDialog.html b/docs/api/Terminal.Gui/Terminal.Gui.FileDialog.html index 6bbce7b3d2..a2f29c019e 100644 --- a/docs/api/Terminal.Gui/Terminal.Gui.FileDialog.html +++ b/docs/api/Terminal.Gui/Terminal.Gui.FileDialog.html @@ -16,13 +16,13 @@ - - + +
@@ -168,6 +168,9 @@
Inherited Members
+ @@ -288,6 +291,12 @@
Inherited Members
+ + @@ -327,6 +336,9 @@
Inherited Members
+ @@ -336,6 +348,9 @@
Inherited Members
+
System.Object.Equals(System.Object)
@@ -685,7 +700,10 @@

Methods

WillPresent()

-
+
+Invoked by Begin(Toplevel) as part of the Run(Toplevel, Boolean) after +the views have been laid out, and before the views are drawn for the first time. +
Declaration
diff --git a/docs/api/Terminal.Gui/Terminal.Gui.FrameView.html b/docs/api/Terminal.Gui/Terminal.Gui.FrameView.html index eb1ade6355..5be278b7bb 100644 --- a/docs/api/Terminal.Gui/Terminal.Gui.FrameView.html +++ b/docs/api/Terminal.Gui/Terminal.Gui.FrameView.html @@ -16,13 +16,13 @@ - - + +
@@ -113,6 +113,9 @@
Inherited Members
+ @@ -236,6 +239,12 @@
Inherited Members
+ + @@ -278,6 +287,9 @@
Inherited Members
+ @@ -290,6 +302,9 @@
Inherited Members
+ @@ -494,7 +509,9 @@
Overrides

Redraw(Rect)

-
+
+Redraws this view and its subviews; only redraws the views that have been flagged for a re-display. +
Declaration
@@ -513,12 +530,26 @@
Parameters
Rect bounds - + The bounds (view-relative region) to redraw.
Overrides
+
Remarks
+
+

+ Always use Bounds (view-relative) when calling Redraw(Rect), NOT Frame (superview-relative). +

+

+ 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. +

+

+ Overrides of Redraw(Rect) must ensure they do not set Driver.Clip to a clip region + larger than the region parameter. +

+
diff --git a/docs/api/Terminal.Gui/Terminal.Gui.HexView.html b/docs/api/Terminal.Gui/Terminal.Gui.HexView.html index bb6cf04d96..4f48eebabf 100644 --- a/docs/api/Terminal.Gui/Terminal.Gui.HexView.html +++ b/docs/api/Terminal.Gui/Terminal.Gui.HexView.html @@ -16,13 +16,13 @@ - - + +
@@ -112,6 +112,9 @@
Inherited Members
+ @@ -238,6 +241,12 @@
Inherited Members
+ + @@ -277,6 +286,9 @@
Inherited Members
+ @@ -289,6 +301,9 @@
Inherited Members
+ @@ -462,7 +477,9 @@
Property Value

Frame

-
+
+Gets or sets the frame for the view. The frame is relative to the view's container (SuperView). +
Declaration
@@ -479,12 +496,22 @@
Property Value
Rect - + The frame.
Overrides
+
Remarks
+
+

+ Change the Frame when using the Absolute layout style to move or resize views. +

+

+ Altering the Frame of a view will trigger the redrawing of the + view as well as the redrawing of the affected regions of the SuperView. +

+
@@ -531,7 +558,9 @@
Declaration

PositionCursor()

-
+
+Positions the cursor in the right position based on the currently focused view in the chain. +
Declaration
@@ -543,7 +572,10 @@
Overrides

ProcessKey(KeyEvent)

-
+
+If the view is focused, gives the view a +chance to process the keystroke. +
Declaration
@@ -562,7 +594,7 @@
Parameters
KeyEvent keyEvent - + Contains the details about the key that produced the event. @@ -583,15 +615,36 @@
Returns
Overrides
+
Remarks
+
+

+ Views can override this method if they are + interested in processing the given keystroke. + If they consume the keystroke, they must + return true to stop the keystroke from being + processed by other widgets or consumed by the + widget engine. If they return false, the + keystroke will be passed using the ProcessColdKey + method to other views to process. +

+

+ The View implementation does nothing but return false, + so it is not necessary to call base.ProcessKey if you + derive directly from View, but you should if you derive + other View subclasses. +

+

Redraw(Rect)

-
+
+Redraws this view and its subviews; only redraws the views that have been flagged for a re-display. +
Declaration
-
public override void Redraw(Rect region)
+
public override void Redraw(Rect bounds)
Parameters
@@ -605,13 +658,27 @@
Parameters
- - + +
RectregionboundsThe bounds (view-relative region) to redraw.
Overrides
+
Remarks
+
+

+ Always use Bounds (view-relative) when calling Redraw(Rect), NOT Frame (superview-relative). +

+

+ 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. +

+

+ Overrides of Redraw(Rect) must ensure they do not set Driver.Clip to a clip region + larger than the region parameter. +

+

Implements

System.Collections.IEnumerable diff --git a/docs/api/Terminal.Gui/Terminal.Gui.IListDataSource.html b/docs/api/Terminal.Gui/Terminal.Gui.IListDataSource.html index 667ca5719a..47dfc4aa31 100644 --- a/docs/api/Terminal.Gui/Terminal.Gui.IListDataSource.html +++ b/docs/api/Terminal.Gui/Terminal.Gui.IListDataSource.html @@ -16,13 +16,13 @@ - - + +
diff --git a/docs/api/Terminal.Gui/Terminal.Gui.IMainLoopDriver.html b/docs/api/Terminal.Gui/Terminal.Gui.IMainLoopDriver.html index 0b5b23d559..6e14a02c41 100644 --- a/docs/api/Terminal.Gui/Terminal.Gui.IMainLoopDriver.html +++ b/docs/api/Terminal.Gui/Terminal.Gui.IMainLoopDriver.html @@ -16,13 +16,13 @@ - - + +
diff --git a/docs/api/Terminal.Gui/Terminal.Gui.Key.html b/docs/api/Terminal.Gui/Terminal.Gui.Key.html index 1d8c3b57e1..8e7f00ef82 100644 --- a/docs/api/Terminal.Gui/Terminal.Gui.Key.html +++ b/docs/api/Terminal.Gui/Terminal.Gui.Key.html @@ -16,13 +16,13 @@ - - + +
diff --git a/docs/api/Terminal.Gui/Terminal.Gui.KeyEvent.html b/docs/api/Terminal.Gui/Terminal.Gui.KeyEvent.html index df43f98b6d..cd3cad3082 100644 --- a/docs/api/Terminal.Gui/Terminal.Gui.KeyEvent.html +++ b/docs/api/Terminal.Gui/Terminal.Gui.KeyEvent.html @@ -16,13 +16,13 @@ - - + +
@@ -136,14 +136,14 @@
Declaration
-

KeyEvent(Key)

+

KeyEvent(Key, KeyModifiers)

Constructs a new KeyEvent from the provided Key value - can be a rune cast into a Key value
Declaration
-
public KeyEvent(Key k)
+
public KeyEvent(Key k, KeyModifiers km)
Parameters
@@ -160,6 +160,11 @@
Parameters
+ + + + +
k
KeyModifierskm

Fields @@ -221,6 +226,33 @@

Property Value
+ +

IsCapslock

+
+Gets a value indicating whether the Caps lock key was pressed (real or synthesized) +
+
+
Declaration
+
+
public bool IsCapslock { get; }
+
+
Property Value
+ + + + + + + + + + + + + +
TypeDescription
System.Booleantrue if is alternate; otherwise, false.
+ +

IsCtrl

@@ -248,6 +280,60 @@
Property Value
+ +

IsNumlock

+
+Gets a value indicating whether the Num lock key was pressed (real or synthesized) +
+
+
Declaration
+
+
public bool IsNumlock { get; }
+
+
Property Value
+ + + + + + + + + + + + + +
TypeDescription
System.Booleantrue if is alternate; otherwise, false.
+ + + +

IsScrolllock

+
+Gets a value indicating whether the Scroll lock key was pressed (real or synthesized) +
+
+
Declaration
+
+
public bool IsScrolllock { get; }
+
+
Property Value
+ + + + + + + + + + + + + +
TypeDescription
System.Booleantrue if is alternate; otherwise, false.
+ +

IsShift

@@ -308,7 +394,9 @@

Methods

ToString()

-
+
+Pretty prints the KeyEvent +
Declaration
diff --git a/docs/api/Terminal.Gui/Terminal.Gui.KeyModifiers.html b/docs/api/Terminal.Gui/Terminal.Gui.KeyModifiers.html new file mode 100644 index 0000000000..7ffb1d119d --- /dev/null +++ b/docs/api/Terminal.Gui/Terminal.Gui.KeyModifiers.html @@ -0,0 +1,318 @@ + + + + + + + + Class KeyModifiers + + + + + + + + + + + + + + + + +
+
+ + + + +
+
+ +
+
+
+

+
+
    +
    +
    + + + +
    + + + + + + diff --git a/docs/api/Terminal.Gui/Terminal.Gui.Label.html b/docs/api/Terminal.Gui/Terminal.Gui.Label.html index 7d0de2b8f4..11bf479bf3 100644 --- a/docs/api/Terminal.Gui/Terminal.Gui.Label.html +++ b/docs/api/Terminal.Gui/Terminal.Gui.Label.html @@ -16,13 +16,13 @@ - - + +
    @@ -112,6 +112,9 @@
    Inherited Members
    + @@ -244,6 +247,12 @@
    Inherited Members
    + + @@ -286,6 +295,9 @@
    Inherited Members
    + @@ -298,6 +310,9 @@
    Inherited Members
    + @@ -625,11 +640,13 @@
    Returns

    Redraw(Rect)

    -
    +
    +Redraws this view and its subviews; only redraws the views that have been flagged for a re-display. +
    Declaration
    -
    public override void Redraw(Rect region)
    +
    public override void Redraw(Rect bounds)
    Parameters
    @@ -643,13 +660,27 @@
    Parameters
    - - + +
    RectregionboundsThe bounds (view-relative region) to redraw.
    Overrides
    +
    Remarks
    +
    +

    + Always use Bounds (view-relative) when calling Redraw(Rect), NOT Frame (superview-relative). +

    +

    + 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. +

    +

    + Overrides of Redraw(Rect) must ensure they do not set Driver.Clip to a clip region + larger than the region parameter. +

    +

    Implements

    System.Collections.IEnumerable diff --git a/docs/api/Terminal.Gui/Terminal.Gui.LayoutStyle.html b/docs/api/Terminal.Gui/Terminal.Gui.LayoutStyle.html index 9b6275ef07..4222ba2e7f 100644 --- a/docs/api/Terminal.Gui/Terminal.Gui.LayoutStyle.html +++ b/docs/api/Terminal.Gui/Terminal.Gui.LayoutStyle.html @@ -16,13 +16,13 @@ - - + +
    @@ -85,7 +85,7 @@

    Determines the LayoutStyle for a view, if Absolute, during LayoutSubviews, the -value from the Frame will be used, if the value is Computer, then the Frame +value from the Frame will be used, if the value is Computed, then the Frame will be updated from the X, Y Pos objects and the Width and Height Dim objects.

    diff --git a/docs/api/Terminal.Gui/Terminal.Gui.ListView.html b/docs/api/Terminal.Gui/Terminal.Gui.ListView.html index 2c28a6830c..40f559be86 100644 --- a/docs/api/Terminal.Gui/Terminal.Gui.ListView.html +++ b/docs/api/Terminal.Gui/Terminal.Gui.ListView.html @@ -16,13 +16,13 @@ - - + +
    @@ -112,6 +112,9 @@
    Inherited Members
    + @@ -241,6 +244,12 @@
    Inherited Members
    + + @@ -280,6 +289,9 @@
    Inherited Members
    + @@ -292,6 +304,9 @@
    Inherited Members
    + @@ -699,7 +714,9 @@
    Returns

    MouseEvent(MouseEvent)

    -
    +
    +Method invoked when a mouse event is generated +
    Declaration
    @@ -733,7 +750,7 @@
    Returns
    System.Boolean - + true, if the event was handled, false otherwise. @@ -905,7 +922,9 @@
    Returns

    PositionCursor()

    -
    +
    +Positions the cursor in the right position based on the currently focused view in the chain. +
    Declaration
    @@ -917,7 +936,10 @@
    Overrides

    ProcessKey(KeyEvent)

    -
    +
    +If the view is focused, gives the view a +chance to process the keystroke. +
    Declaration
    @@ -957,15 +979,36 @@
    Returns
    Overrides
    +
    Remarks
    +
    +

    + Views can override this method if they are + interested in processing the given keystroke. + If they consume the keystroke, they must + return true to stop the keystroke from being + processed by other widgets or consumed by the + widget engine. If they return false, the + keystroke will be passed using the ProcessColdKey + method to other views to process. +

    +

    + The View implementation does nothing but return false, + so it is not necessary to call base.ProcessKey if you + derive directly from View, but you should if you derive + other View subclasses. +

    +

    Redraw(Rect)

    -
    +
    +Redraws this view and its subviews; only redraws the views that have been flagged for a re-display. +
    Declaration
    -
    public override void Redraw(Rect region)
    +
    public override void Redraw(Rect bounds)
    Parameters
    @@ -979,13 +1022,27 @@
    Parameters
    - - + +
    RectregionboundsThe bounds (view-relative region) to redraw.
    Overrides
    +
    Remarks
    +
    +

    + Always use Bounds (view-relative) when calling Redraw(Rect), NOT Frame (superview-relative). +

    +

    + 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. +

    +

    + Overrides of Redraw(Rect) must ensure they do not set Driver.Clip to a clip region + larger than the region parameter. +

    +
    diff --git a/docs/api/Terminal.Gui/Terminal.Gui.ListViewItemEventArgs.html b/docs/api/Terminal.Gui/Terminal.Gui.ListViewItemEventArgs.html index 0de2b30c24..1a44f3550c 100644 --- a/docs/api/Terminal.Gui/Terminal.Gui.ListViewItemEventArgs.html +++ b/docs/api/Terminal.Gui/Terminal.Gui.ListViewItemEventArgs.html @@ -16,13 +16,13 @@ - - + +
    diff --git a/docs/api/Terminal.Gui/Terminal.Gui.ListWrapper.html b/docs/api/Terminal.Gui/Terminal.Gui.ListWrapper.html index 40c2dd806b..fb3a960a98 100644 --- a/docs/api/Terminal.Gui/Terminal.Gui.ListWrapper.html +++ b/docs/api/Terminal.Gui/Terminal.Gui.ListWrapper.html @@ -16,13 +16,13 @@ - - + +
    diff --git a/docs/api/Terminal.Gui/Terminal.Gui.MainLoop.html b/docs/api/Terminal.Gui/Terminal.Gui.MainLoop.html index 5a58063dc9..e945e34fd8 100644 --- a/docs/api/Terminal.Gui/Terminal.Gui.MainLoop.html +++ b/docs/api/Terminal.Gui/Terminal.Gui.MainLoop.html @@ -16,13 +16,13 @@ - - + +
    diff --git a/docs/api/Terminal.Gui/Terminal.Gui.MenuBar.html b/docs/api/Terminal.Gui/Terminal.Gui.MenuBar.html index e3c93399d1..ceb036343c 100644 --- a/docs/api/Terminal.Gui/Terminal.Gui.MenuBar.html +++ b/docs/api/Terminal.Gui/Terminal.Gui.MenuBar.html @@ -16,13 +16,13 @@ - - + +
    @@ -112,6 +112,9 @@
    Inherited Members
    + @@ -241,6 +244,12 @@
    Inherited Members
    + + @@ -271,6 +280,9 @@
    Inherited Members
    + @@ -283,6 +295,9 @@
    Inherited Members
    + @@ -479,7 +494,9 @@
    Declaration

    MouseEvent(MouseEvent)

    -
    +
    +Method invoked when a mouse event is generated +
    Declaration
    @@ -513,7 +530,7 @@
    Returns
    System.Boolean - + true, if the event was handled, false otherwise. @@ -542,7 +559,7 @@
    Parameters
    KeyEvent keyEvent - + Contains the details about the key that produced the event. @@ -586,7 +603,7 @@
    Parameters
    KeyEvent keyEvent - + Contains the details about the key that produced the event. @@ -623,7 +640,9 @@
    Declaration

    PositionCursor()

    -
    +
    +Positions the cursor in the right position based on the currently focused view in the chain. +
    Declaration
    @@ -635,7 +654,11 @@
    Overrides

    ProcessHotKey(KeyEvent)

    -
    +
    +This method can be overwritten by view that +want to provide accelerator functionality +(Alt-key for example). +
    Declaration
    @@ -675,11 +698,31 @@
    Returns
    Overrides
    +
    Remarks
    +
    +

    + Before keys are sent to the subview on the + current view, all the views are + processed and the key is passed to the widgets + to allow some of them to process the keystroke + as a hot-key.

    +

    + For example, if you implement a button that + has a hotkey ok "o", you would catch the + combination Alt-o here. If the event is + caught, you must return true to stop the + keystroke from being dispatched to other + views. +

    +

    ProcessKey(KeyEvent)

    -
    +
    +If the view is focused, gives the view a +chance to process the keystroke. +
    Declaration
    @@ -719,15 +762,36 @@
    Returns
    Overrides
    +
    Remarks
    +
    +

    + Views can override this method if they are + interested in processing the given keystroke. + If they consume the keystroke, they must + return true to stop the keystroke from being + processed by other widgets or consumed by the + widget engine. If they return false, the + keystroke will be passed using the ProcessColdKey + method to other views to process. +

    +

    + The View implementation does nothing but return false, + so it is not necessary to call base.ProcessKey if you + derive directly from View, but you should if you derive + other View subclasses. +

    +

    Redraw(Rect)

    -
    +
    +Redraws this view and its subviews; only redraws the views that have been flagged for a re-display. +
    Declaration
    -
    public override void Redraw(Rect region)
    +
    public override void Redraw(Rect bounds)
    Parameters
    @@ -741,13 +805,27 @@
    Parameters
    - - + +
    RectregionboundsThe bounds (view-relative region) to redraw.
    Overrides
    +
    Remarks
    +
    +

    + Always use Bounds (view-relative) when calling Redraw(Rect), NOT Frame (superview-relative). +

    +

    + 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. +

    +

    + Overrides of Redraw(Rect) must ensure they do not set Driver.Clip to a clip region + larger than the region parameter. +

    +

    Events

    diff --git a/docs/api/Terminal.Gui/Terminal.Gui.MenuBarItem.html b/docs/api/Terminal.Gui/Terminal.Gui.MenuBarItem.html index 352a45771d..94edc2688a 100644 --- a/docs/api/Terminal.Gui/Terminal.Gui.MenuBarItem.html +++ b/docs/api/Terminal.Gui/Terminal.Gui.MenuBarItem.html @@ -16,13 +16,13 @@ - - + +
    diff --git a/docs/api/Terminal.Gui/Terminal.Gui.MenuItem.html b/docs/api/Terminal.Gui/Terminal.Gui.MenuItem.html index ed9fb04fcd..01df150515 100644 --- a/docs/api/Terminal.Gui/Terminal.Gui.MenuItem.html +++ b/docs/api/Terminal.Gui/Terminal.Gui.MenuItem.html @@ -16,13 +16,13 @@ - - + +
    diff --git a/docs/api/Terminal.Gui/Terminal.Gui.MessageBox.html b/docs/api/Terminal.Gui/Terminal.Gui.MessageBox.html index b00122542d..29b1404856 100644 --- a/docs/api/Terminal.Gui/Terminal.Gui.MessageBox.html +++ b/docs/api/Terminal.Gui/Terminal.Gui.MessageBox.html @@ -16,13 +16,13 @@ - - + +
    @@ -124,7 +124,7 @@
    Syntax
    Examples
    -
    var n = MessageBox.Query (50, 7, "Quit Demo", "Are you sure you want to quit this demo?", "Yes", "No");
    +
    var n = MessageBox.Query ("Quit Demo", "Are you sure you want to quit this demo?", "Yes", "No");
     if (n == 0)
        quit = true;
     else
    @@ -135,14 +135,73 @@ 

    Methods -

    ErrorQuery(Int32, Int32, String, String, String[])

    +

    ErrorQuery(ustring, ustring, ustring[])

    Presents an error MessageBox with the specified title and message and a list of buttons to show to the user.
    Declaration
    -
    public static int ErrorQuery(int width, int height, string title, string message, params string[] buttons)
    +
    public static int ErrorQuery(ustring title, ustring message, params ustring[] buttons)
    +
    +
    Parameters
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    TypeNameDescription
    NStack.ustringtitleTitle for the query.
    NStack.ustringmessageMessage to display, might contain multiple lines.
    NStack.ustring[]buttonsArray of buttons to add.
    +
    Returns
    + + + + + + + + + + + + + +
    TypeDescription
    System.Int32The index of the selected button, or -1 if the user pressed ESC to close the dialog.
    +
    Remarks
    +
    +The message box will be vertically and horizontally centered in the container and the size will be automatically determined +from the size of the title, message. and buttons. +
    + + + +

    ErrorQuery(Int32, Int32, ustring, ustring, ustring[])

    +
    +Presents an error MessageBox with the specified title and message and a list of buttons to show to the user. +
    +
    +
    Declaration
    +
    +
    public static int ErrorQuery(int width, int height, ustring title, ustring message, params ustring[] buttons)
    Parameters
    @@ -165,17 +224,75 @@
    Parameters
    - + + + + + + + + + + + + + + + +
    Height for the window.
    System.StringNStack.ustringtitleTitle for the query.
    NStack.ustringmessageMessage to display, might contain multiple lines.
    NStack.ustring[]buttonsArray of buttons to add.
    +
    Returns
    + + + + + + + + + + + + + +
    TypeDescription
    System.Int32The index of the selected button, or -1 if the user pressed ESC to close the dialog.
    +
    Remarks
    +
    +Use ErrorQuery(ustring, ustring, ustring[]) instead; it automatically sizes the MessageBox based on the contents. +
    + + + +

    Query(ustring, ustring, ustring[])

    +
    +Presents an error MessageBox with the specified title and message and a list of buttons to show to the user. +
    +
    +
    Declaration
    +
    +
    public static int Query(ustring title, ustring message, params ustring[] buttons)
    +
    +
    Parameters
    + + + + + + + + + + + - + - + @@ -196,17 +313,22 @@
    Returns
    TypeNameDescription
    NStack.ustring title Title for the query.
    System.StringNStack.ustring message Message to display, might contain multiple lines.
    System.String[]NStack.ustring[] buttons Array of buttons to add.
    +
    Remarks
    +
    +The message box will be vertically and horizontally centered in the container and the size will be automatically determined +from the size of the message and buttons. +
    -

    Query(Int32, Int32, String, String, String[])

    +

    Query(Int32, Int32, ustring, ustring, ustring[])

    Presents a normal MessageBox with the specified title and message and a list of buttons to show to the user.
    Declaration
    -
    public static int Query(int width, int height, string title, string message, params string[] buttons)
    +
    public static int Query(int width, int height, ustring title, ustring message, params ustring[] buttons)
    Parameters
    @@ -229,17 +351,17 @@
    Parameters
    - + - + - + @@ -260,6 +382,10 @@
    Returns
    Height for the window.
    System.StringNStack.ustring title Title for the query.
    System.StringNStack.ustring message Message to display, might contain multiple lines..
    System.String[]NStack.ustring[] buttons Array of buttons to add.
    +
    Remarks
    +
    +Use Query(ustring, ustring, ustring[]) instead; it automatically sizes the MessageBox based on the contents. +
    diff --git a/docs/api/Terminal.Gui/Terminal.Gui.MouseEvent.html b/docs/api/Terminal.Gui/Terminal.Gui.MouseEvent.html index e0b0f867e2..eeffa3816e 100644 --- a/docs/api/Terminal.Gui/Terminal.Gui.MouseEvent.html +++ b/docs/api/Terminal.Gui/Terminal.Gui.MouseEvent.html @@ -16,13 +16,13 @@ - - + +
    diff --git a/docs/api/Terminal.Gui/Terminal.Gui.MouseFlags.html b/docs/api/Terminal.Gui/Terminal.Gui.MouseFlags.html index 8e67ac16e6..ad4cd361a4 100644 --- a/docs/api/Terminal.Gui/Terminal.Gui.MouseFlags.html +++ b/docs/api/Terminal.Gui/Terminal.Gui.MouseFlags.html @@ -16,13 +16,13 @@ - - + +
    diff --git a/docs/api/Terminal.Gui/Terminal.Gui.OpenDialog.html b/docs/api/Terminal.Gui/Terminal.Gui.OpenDialog.html index d47bb8ac39..f52db147d9 100644 --- a/docs/api/Terminal.Gui/Terminal.Gui.OpenDialog.html +++ b/docs/api/Terminal.Gui/Terminal.Gui.OpenDialog.html @@ -16,13 +16,13 @@ - - + +
    @@ -200,6 +200,9 @@
    Inherited Members
    + @@ -320,6 +323,12 @@
    Inherited Members
    + + @@ -359,6 +368,9 @@
    Inherited Members
    + @@ -368,6 +380,9 @@
    Inherited Members
    +
    System.Object.Equals(System.Object)
    diff --git a/docs/api/Terminal.Gui/Terminal.Gui.Point.html b/docs/api/Terminal.Gui/Terminal.Gui.Point.html index 415b1a44ac..28f4bb7a4e 100644 --- a/docs/api/Terminal.Gui/Terminal.Gui.Point.html +++ b/docs/api/Terminal.Gui/Terminal.Gui.Point.html @@ -16,13 +16,13 @@ - - + +
    diff --git a/docs/api/Terminal.Gui/Terminal.Gui.Pos.html b/docs/api/Terminal.Gui/Terminal.Gui.Pos.html index ab3582a3b6..9ed7a8e79e 100644 --- a/docs/api/Terminal.Gui/Terminal.Gui.Pos.html +++ b/docs/api/Terminal.Gui/Terminal.Gui.Pos.html @@ -16,13 +16,13 @@ - - + +
    @@ -193,8 +193,9 @@
    Returns
    Examples
    This sample shows how align a Button to the bottom-right of a View. -
    anchorButton.X = Pos.AnchorEnd () - (Pos.Right (anchorButton) - Pos.Left (anchorButton));
    -anchorButton.Y = Pos.AnchorEnd () - 1;
    +
    // See Issue #502 
    +anchorButton.X = Pos.AnchorEnd () - (Pos.Right (anchorButton) - Pos.Left (anchorButton));
    +anchorButton.Y = Pos.AnchorEnd (1);
    diff --git a/docs/api/Terminal.Gui/Terminal.Gui.ProgressBar.html b/docs/api/Terminal.Gui/Terminal.Gui.ProgressBar.html index 5c3074bde0..b6c7c02982 100644 --- a/docs/api/Terminal.Gui/Terminal.Gui.ProgressBar.html +++ b/docs/api/Terminal.Gui/Terminal.Gui.ProgressBar.html @@ -16,13 +16,13 @@ - - + +
    @@ -112,6 +112,9 @@
    Inherited Members
    + @@ -244,6 +247,12 @@
    Inherited Members
    + + @@ -286,6 +295,9 @@
    Inherited Members
    + @@ -298,6 +310,9 @@
    Inherited Members
    + @@ -435,7 +450,9 @@
    Remarks

    Redraw(Rect)

    -
    +
    +Redraws this view and its subviews; only redraws the views that have been flagged for a re-display. +
    Declaration
    @@ -460,6 +477,20 @@
    Parameters
    Overrides
    +
    Remarks
    +
    +

    + Always use Bounds (view-relative) when calling Redraw(Rect), NOT Frame (superview-relative). +

    +

    + 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. +

    +

    + Overrides of Redraw(Rect) must ensure they do not set Driver.Clip to a clip region + larger than the region parameter. +

    +

    Implements

    System.Collections.IEnumerable diff --git a/docs/api/Terminal.Gui/Terminal.Gui.RadioGroup.html b/docs/api/Terminal.Gui/Terminal.Gui.RadioGroup.html index 0565450efd..5360d92523 100644 --- a/docs/api/Terminal.Gui/Terminal.Gui.RadioGroup.html +++ b/docs/api/Terminal.Gui/Terminal.Gui.RadioGroup.html @@ -16,13 +16,13 @@ - - + +
    @@ -112,6 +112,9 @@
    Inherited Members
    + @@ -241,6 +244,12 @@
    Inherited Members
    + + @@ -277,6 +286,9 @@
    Inherited Members
    + @@ -289,6 +301,9 @@
    Inherited Members
    + @@ -446,7 +461,9 @@

    Fields

    SelectionChanged

    -
    +
    +Invoked when the selected radio label has changed +
    Declaration
    @@ -556,7 +573,9 @@

    Methods

    MouseEvent(MouseEvent)

    -
    +
    +Method invoked when a mouse event is generated +
    Declaration
    @@ -590,7 +609,7 @@
    Returns
    System.Boolean - + true, if the event was handled, false otherwise. @@ -600,7 +619,9 @@
    Overrides

    PositionCursor()

    -
    +
    +Positions the cursor in the right position based on the currently focused view in the chain. +
    Declaration
    @@ -612,7 +633,12 @@
    Overrides

    ProcessColdKey(KeyEvent)

    -
    +
    +This method can be overwritten by views that +want to provide accelerator functionality +(Alt-key for example), but without +interefering with normal ProcessKey behavior. +
    Declaration
    @@ -652,11 +678,30 @@
    Returns
    Overrides
    +
    Remarks
    +
    +

    + After keys are sent to the subviews on the + current view, all the view are + processed and the key is passed to the views + to allow some of them to process the keystroke + as a cold-key.

    +

    + This functionality is used, for example, by + default buttons to act on the enter key. + Processing this as a hot-key would prevent + non-default buttons from consuming the enter + keypress when they have the focus. +

    +

    ProcessKey(KeyEvent)

    -
    +
    +If the view is focused, gives the view a +chance to process the keystroke. +
    Declaration
    @@ -696,15 +741,36 @@
    Returns
    Overrides
    +
    Remarks
    +
    +

    + Views can override this method if they are + interested in processing the given keystroke. + If they consume the keystroke, they must + return true to stop the keystroke from being + processed by other widgets or consumed by the + widget engine. If they return false, the + keystroke will be passed using the ProcessColdKey + method to other views to process. +

    +

    + The View implementation does nothing but return false, + so it is not necessary to call base.ProcessKey if you + derive directly from View, but you should if you derive + other View subclasses. +

    +

    Redraw(Rect)

    -
    +
    +Redraws this view and its subviews; only redraws the views that have been flagged for a re-display. +
    Declaration
    -
    public override void Redraw(Rect region)
    +
    public override void Redraw(Rect bounds)
    Parameters
    @@ -718,13 +784,27 @@
    Parameters
    - - + +
    RectregionboundsThe bounds (view-relative region) to redraw.
    Overrides
    +
    Remarks
    +
    +

    + Always use Bounds (view-relative) when calling Redraw(Rect), NOT Frame (superview-relative). +

    +

    + 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. +

    +

    + Overrides of Redraw(Rect) must ensure they do not set Driver.Clip to a clip region + larger than the region parameter. +

    +

    Implements

    System.Collections.IEnumerable diff --git a/docs/api/Terminal.Gui/Terminal.Gui.Rect.html b/docs/api/Terminal.Gui/Terminal.Gui.Rect.html index 27cbaa216f..5103ea4a5e 100644 --- a/docs/api/Terminal.Gui/Terminal.Gui.Rect.html +++ b/docs/api/Terminal.Gui/Terminal.Gui.Rect.html @@ -16,13 +16,13 @@ - - + +
    diff --git a/docs/api/Terminal.Gui/Terminal.Gui.Responder.html b/docs/api/Terminal.Gui/Terminal.Gui.Responder.html index 7d6215ee57..6827f3d365 100644 --- a/docs/api/Terminal.Gui/Terminal.Gui.Responder.html +++ b/docs/api/Terminal.Gui/Terminal.Gui.Responder.html @@ -16,13 +16,13 @@ - - + +
    diff --git a/docs/api/Terminal.Gui/Terminal.Gui.SaveDialog.html b/docs/api/Terminal.Gui/Terminal.Gui.SaveDialog.html index e477920eaa..b60c8853aa 100644 --- a/docs/api/Terminal.Gui/Terminal.Gui.SaveDialog.html +++ b/docs/api/Terminal.Gui/Terminal.Gui.SaveDialog.html @@ -16,13 +16,13 @@ - - + +
    @@ -201,6 +201,9 @@
    Inherited Members
    + @@ -321,6 +324,12 @@
    Inherited Members
    + + @@ -360,6 +369,9 @@
    Inherited Members
    + @@ -369,6 +381,9 @@
    Inherited Members
    +
    System.Object.Equals(System.Object)
    diff --git a/docs/api/Terminal.Gui/Terminal.Gui.ScrollBarView.html b/docs/api/Terminal.Gui/Terminal.Gui.ScrollBarView.html index 96eeb86597..4ee8dda9a3 100644 --- a/docs/api/Terminal.Gui/Terminal.Gui.ScrollBarView.html +++ b/docs/api/Terminal.Gui/Terminal.Gui.ScrollBarView.html @@ -16,13 +16,13 @@ - - + +
    @@ -112,6 +112,9 @@
    Inherited Members
    + @@ -244,6 +247,12 @@
    Inherited Members
    + + @@ -286,6 +295,9 @@
    Inherited Members
    + @@ -298,6 +310,9 @@
    Inherited Members
    + @@ -341,10 +356,90 @@

    Constructors

    + +

    ScrollBarView()

    +
    +Initializes a new instance of the ScrollBarView class using Computed layout. +
    +
    +
    Declaration
    +
    +
    public ScrollBarView()
    +
    + + + +

    ScrollBarView(Int32, Int32, Boolean)

    +
    +Initializes a new instance of the ScrollBarView class using Computed layout. +
    +
    +
    Declaration
    +
    +
    public ScrollBarView(int size, int position, bool isVertical)
    +
    +
    Parameters
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    TypeNameDescription
    System.Int32sizeThe size that this scrollbar represents.
    System.Int32positionThe position within this scrollbar.
    System.BooleanisVerticalIf set to true this is a vertical scrollbar, otherwise, the scrollbar is horizontal.
    + + + +

    ScrollBarView(Rect)

    +
    +Initializes a new instance of the ScrollBarView class using Absolute layout. +
    +
    +
    Declaration
    +
    +
    public ScrollBarView(Rect rect)
    +
    +
    Parameters
    + + + + + + + + + + + + + + + +
    TypeNameDescription
    RectrectFrame for the scrollbar.
    + +

    ScrollBarView(Rect, Int32, Int32, Boolean)

    -Initializes a new instance of the ScrollBarView class. +Initializes a new instance of the ScrollBarView class using Absolute layout.
    Declaration
    @@ -369,17 +464,17 @@
    Parameters
    System.Int32 size - The size that this scrollbar represents. + The size that this scrollbar represents. Sets the Size property. System.Int32 position - The position within this scrollbar. + The position within this scrollbar. Sets the Position property. System.Boolean isVertical - If set to true this is a vertical scrollbar, otherwise, the scrollbar is horizontal. + If set to true this is a vertical scrollbar, otherwise, the scrollbar is horizontal. Sets the IsVertical property. @@ -387,10 +482,37 @@

    Properties

    + +

    IsVertical

    +
    +If set to true this is a vertical scrollbar, otherwise, the scrollbar is horizontal. +
    +
    +
    Declaration
    +
    +
    public bool IsVertical { get; set; }
    +
    +
    Property Value
    + + + + + + + + + + + + + +
    TypeDescription
    System.Boolean
    + +

    Position

    -The position to show the scrollbar at. +The position, relative to Size, to set the scrollbar at.
    Declaration
    @@ -417,7 +539,7 @@
    Property Value

    Size

    -The size that this scrollbar represents +The size of content the scrollbar represents.
    Declaration
    @@ -439,13 +561,18 @@
    Property Value
    +
    Remarks
    +
    The Size is typically the size of the virtual content. E.g. when a Scrollbar is +part of a ScrollView the Size is set to the appropriate dimension of ContentSize.

    Methods

    MouseEvent(MouseEvent)

    -
    +
    +Method invoked when a mouse event is generated +
    Declaration
    @@ -479,7 +606,7 @@
    Returns
    System.Boolean - + true, if the event was handled, false otherwise. @@ -490,7 +617,7 @@
    Overrides

    Redraw(Rect)

    -Redraw the scrollbar +Redraws this view and its subviews; only redraws the views that have been flagged for a re-display.
    Declaration
    @@ -510,12 +637,26 @@
    Parameters
    Rect region - Region to be redrawn. +
    Overrides
    +
    Remarks
    +
    +

    + Always use Bounds (view-relative) when calling Redraw(Rect), NOT Frame (superview-relative). +

    +

    + 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. +

    +

    + Overrides of Redraw(Rect) must ensure they do not set Driver.Clip to a clip region + larger than the region parameter. +

    +

    Events

    diff --git a/docs/api/Terminal.Gui/Terminal.Gui.ScrollView.html b/docs/api/Terminal.Gui/Terminal.Gui.ScrollView.html index a1dfec7e4b..6815ce4a13 100644 --- a/docs/api/Terminal.Gui/Terminal.Gui.ScrollView.html +++ b/docs/api/Terminal.Gui/Terminal.Gui.ScrollView.html @@ -16,13 +16,13 @@ - - + +
    @@ -84,7 +84,7 @@

    Class ScrollView

    -Scrollviews are views that present a window into a virtual space where children views are added. Similar to the iOS UIScrollView. +Scrollviews are views that present a window into a virtual space where subviews are added. Similar to the iOS UIScrollView.
    @@ -112,6 +112,9 @@
    Inherited Members
    + @@ -235,6 +238,12 @@
    Inherited Members
    + + @@ -274,6 +283,9 @@
    Inherited Members
    + @@ -286,6 +298,9 @@
    Inherited Members
    + @@ -317,22 +332,34 @@
    Syntax
    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. + 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.

    - + Use the

    Constructors

    + +

    ScrollView()

    +
    +Initializes a new instance of the ScrollView class using Computed positioning. +
    +
    +
    Declaration
    +
    +
    public ScrollView()
    +
    + +

    ScrollView(Rect)

    -Constructs a ScrollView +Initializes a new instance of the ScrollView class using Absolute positioning.
    Declaration
    @@ -503,7 +530,9 @@
    Overrides

    MouseEvent(MouseEvent)

    -
    +
    +Method invoked when a mouse event is generated +
    Declaration
    @@ -537,7 +566,7 @@
    Returns
    System.Boolean - + true, if the event was handled, false otherwise. @@ -547,7 +576,9 @@
    Overrides

    PositionCursor()

    -
    +
    +Positions the cursor in the right position based on the currently focused view in the chain. +
    Declaration
    @@ -559,7 +590,10 @@
    Overrides

    ProcessKey(KeyEvent)

    -
    +
    +If the view is focused, gives the view a +chance to process the keystroke. +
    Declaration
    @@ -599,12 +633,31 @@
    Returns
    Overrides
    +
    Remarks
    +
    +

    + Views can override this method if they are + interested in processing the given keystroke. + If they consume the keystroke, they must + return true to stop the keystroke from being + processed by other widgets or consumed by the + widget engine. If they return false, the + keystroke will be passed using the ProcessColdKey + method to other views to process. +

    +

    + The View implementation does nothing but return false, + so it is not necessary to call base.ProcessKey if you + derive directly from View, but you should if you derive + other View subclasses. +

    +

    Redraw(Rect)

    -This event is raised when the contents have scrolled +Redraws this view and its subviews; only redraws the views that have been flagged for a re-display.
    Declaration
    @@ -630,6 +683,20 @@
    Parameters
    Overrides
    +
    Remarks
    +
    +

    + Always use Bounds (view-relative) when calling Redraw(Rect), NOT Frame (superview-relative). +

    +

    + 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. +

    +

    + Overrides of Redraw(Rect) must ensure they do not set Driver.Clip to a clip region + larger than the region parameter. +

    +
    diff --git a/docs/api/Terminal.Gui/Terminal.Gui.Size.html b/docs/api/Terminal.Gui/Terminal.Gui.Size.html index a1d59e8d8c..19603b9f34 100644 --- a/docs/api/Terminal.Gui/Terminal.Gui.Size.html +++ b/docs/api/Terminal.Gui/Terminal.Gui.Size.html @@ -16,13 +16,13 @@ - - + +
    diff --git a/docs/api/Terminal.Gui/Terminal.Gui.StatusBar.html b/docs/api/Terminal.Gui/Terminal.Gui.StatusBar.html index 0b34ea3959..f72a1a63fd 100644 --- a/docs/api/Terminal.Gui/Terminal.Gui.StatusBar.html +++ b/docs/api/Terminal.Gui/Terminal.Gui.StatusBar.html @@ -16,13 +16,13 @@ - - + +
    @@ -115,6 +115,9 @@
    Inherited Members
    + @@ -247,6 +250,12 @@
    Inherited Members
    + + @@ -286,6 +295,9 @@
    Inherited Members
    + @@ -299,10 +311,10 @@
    Inherited Members
    View.OnMouseLeave(MouseEvent)
    System.Object.Equals(System.Object) @@ -421,9 +433,59 @@

    Methods

    + +

    MouseEvent(MouseEvent)

    +
    +Method invoked when a mouse event is generated +
    +
    +
    Declaration
    +
    +
    public override bool MouseEvent(MouseEvent me)
    +
    +
    Parameters
    + + + + + + + + + + + + + + + +
    TypeNameDescription
    MouseEventme
    +
    Returns
    + + + + + + + + + + + + + +
    TypeDescription
    System.Booleantrue, if the event was handled, false otherwise.
    +
    Overrides
    + + +

    ProcessHotKey(KeyEvent)

    -
    +
    +This method can be overwritten by view that +want to provide accelerator functionality +(Alt-key for example). +
    Declaration
    @@ -463,15 +525,34 @@
    Returns
    Overrides
    +
    Remarks
    +
    +

    + Before keys are sent to the subview on the + current view, all the views are + processed and the key is passed to the widgets + to allow some of them to process the keystroke + as a hot-key.

    +

    + For example, if you implement a button that + has a hotkey ok "o", you would catch the + combination Alt-o here. If the event is + caught, you must return true to stop the + keystroke from being dispatched to other + views. +

    +

    Redraw(Rect)

    -
    +
    +Redraws this view and its subviews; only redraws the views that have been flagged for a re-display. +
    Declaration
    -
    public override void Redraw(Rect region)
    +
    public override void Redraw(Rect bounds)
    Parameters
    @@ -485,13 +566,27 @@
    Parameters
    - - + +
    RectregionboundsThe bounds (view-relative region) to redraw.
    Overrides
    +
    Remarks
    +
    +

    + Always use Bounds (view-relative) when calling Redraw(Rect), NOT Frame (superview-relative). +

    +

    + 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. +

    +

    + Overrides of Redraw(Rect) must ensure they do not set Driver.Clip to a clip region + larger than the region parameter. +

    +

    Implements

    System.Collections.IEnumerable diff --git a/docs/api/Terminal.Gui/Terminal.Gui.StatusItem.html b/docs/api/Terminal.Gui/Terminal.Gui.StatusItem.html index a0921b5184..4cfc3dc007 100644 --- a/docs/api/Terminal.Gui/Terminal.Gui.StatusItem.html +++ b/docs/api/Terminal.Gui/Terminal.Gui.StatusItem.html @@ -16,13 +16,13 @@ - - + +
    @@ -235,7 +235,7 @@

    Declaration
    -
    public ustring Title { get; }
    +
    public ustring Title { get; set; }
    Property Value
    diff --git a/docs/api/Terminal.Gui/Terminal.Gui.TextAlignment.html b/docs/api/Terminal.Gui/Terminal.Gui.TextAlignment.html index c7587497a3..1abaa10660 100644 --- a/docs/api/Terminal.Gui/Terminal.Gui.TextAlignment.html +++ b/docs/api/Terminal.Gui/Terminal.Gui.TextAlignment.html @@ -16,13 +16,13 @@ - - + +
    diff --git a/docs/api/Terminal.Gui/Terminal.Gui.TextField.html b/docs/api/Terminal.Gui/Terminal.Gui.TextField.html index b3760923ce..582e47afc2 100644 --- a/docs/api/Terminal.Gui/Terminal.Gui.TextField.html +++ b/docs/api/Terminal.Gui/Terminal.Gui.TextField.html @@ -16,13 +16,13 @@ - - + +
    @@ -114,6 +114,9 @@
    Inherited Members
    + @@ -237,6 +240,12 @@
    Inherited Members
    + + @@ -276,6 +285,9 @@
    Inherited Members
    + @@ -288,6 +300,9 @@
    Inherited Members
    +
    System.Object.Equals(System.Object)
    @@ -427,7 +442,9 @@

    Properties

    CanFocus

    -
    +
    +Gets or sets a value indicating whether this Responder can focus. +
    Declaration
    @@ -444,7 +461,7 @@
    Property Value
    - +
    System.Booleantrue if can focus; otherwise, false.
    @@ -481,7 +498,9 @@
    Property Value

    Frame

    -
    +
    +Gets or sets the frame for the view. The frame is relative to the view's container (SuperView). +
    Declaration
    @@ -498,12 +517,22 @@
    Property Value
    Rect - + The frame.
    Overrides
    +
    Remarks
    +
    +

    + Change the Frame when using the Absolute layout style to move or resize views. +

    +

    + Altering the Frame of a view will trigger the redrawing of the + view as well as the redrawing of the affected regions of the SuperView. +

    +
    @@ -742,7 +771,9 @@
    Declaration

    MouseEvent(MouseEvent)

    -
    +
    +Method invoked when a mouse event is generated +
    Declaration
    @@ -776,7 +807,7 @@
    Returns
    System.Boolean - + true, if the event was handled, false otherwise. @@ -786,7 +817,9 @@
    Overrides

    OnLeave()

    -
    +
    +Method invoked when a view loses focus. +
    Declaration
    @@ -803,7 +836,7 @@
    Returns
    System.Boolean - + true, if the event was handled, false otherwise. @@ -890,11 +923,13 @@
    Remark

    Redraw(Rect)

    -
    +
    +Redraws this view and its subviews; only redraws the views that have been flagged for a re-display. +
    Declaration
    -
    public override void Redraw(Rect region)
    +
    public override void Redraw(Rect bounds)
    Parameters
    @@ -908,13 +943,27 @@
    Parameters
    - - + +
    RectregionboundsThe bounds (view-relative region) to redraw.
    Overrides
    +
    Remarks
    +
    +

    + Always use Bounds (view-relative) when calling Redraw(Rect), NOT Frame (superview-relative). +

    +

    + 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. +

    +

    + Overrides of Redraw(Rect) must ensure they do not set Driver.Clip to a clip region + larger than the region parameter. +

    +

    Events

    diff --git a/docs/api/Terminal.Gui/Terminal.Gui.TextView.html b/docs/api/Terminal.Gui/Terminal.Gui.TextView.html index 466f5fa68b..0930e4745d 100644 --- a/docs/api/Terminal.Gui/Terminal.Gui.TextView.html +++ b/docs/api/Terminal.Gui/Terminal.Gui.TextView.html @@ -16,13 +16,13 @@ - - + +
    @@ -112,6 +112,9 @@
    Inherited Members
    + @@ -241,6 +244,12 @@
    Inherited Members
    + + @@ -280,6 +289,9 @@
    Inherited Members
    + @@ -292,6 +304,9 @@
    Inherited Members
    +
    System.Object.Equals(System.Object)
    @@ -411,7 +426,9 @@

    Properties

    CanFocus

    -
    +
    +Gets or sets a value indicating whether this Responder can focus. +
    Declaration
    @@ -428,7 +445,7 @@
    Property Value
    System.Boolean - + true if can focus; otherwise, false. @@ -651,7 +668,9 @@
    Parameters

    MouseEvent(MouseEvent)

    -
    +
    +Method invoked when a mouse event is generated +
    Declaration
    @@ -685,7 +704,7 @@
    Returns
    System.Boolean - + true, if the event was handled, false otherwise. @@ -709,7 +728,10 @@
    Overrides

    ProcessKey(KeyEvent)

    -
    +
    +If the view is focused, gives the view a +chance to process the keystroke. +
    Declaration
    @@ -749,15 +771,36 @@
    Returns
    Overrides
    +
    Remarks
    +
    +

    + Views can override this method if they are + interested in processing the given keystroke. + If they consume the keystroke, they must + return true to stop the keystroke from being + processed by other widgets or consumed by the + widget engine. If they return false, the + keystroke will be passed using the ProcessColdKey + method to other views to process. +

    +

    + The View implementation does nothing but return false, + so it is not necessary to call base.ProcessKey if you + derive directly from View, but you should if you derive + other View subclasses. +

    +

    Redraw(Rect)

    -
    +
    +Redraws this view and its subviews; only redraws the views that have been flagged for a re-display. +
    Declaration
    -
    public override void Redraw(Rect region)
    +
    public override void Redraw(Rect bounds)
    Parameters
    @@ -771,13 +814,27 @@
    Parameters
    - - + +
    RectregionboundsThe bounds (view-relative region) to redraw.
    Overrides
    +
    Remarks
    +
    +

    + Always use Bounds (view-relative) when calling Redraw(Rect), NOT Frame (superview-relative). +

    +

    + 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. +

    +

    + Overrides of Redraw(Rect) must ensure they do not set Driver.Clip to a clip region + larger than the region parameter. +

    +
    diff --git a/docs/api/Terminal.Gui/Terminal.Gui.TimeField.html b/docs/api/Terminal.Gui/Terminal.Gui.TimeField.html index f2ee698939..eb63ac94c5 100644 --- a/docs/api/Terminal.Gui/Terminal.Gui.TimeField.html +++ b/docs/api/Terminal.Gui/Terminal.Gui.TimeField.html @@ -16,13 +16,13 @@ - - + +
    @@ -167,6 +167,9 @@
    Inherited Members
    + @@ -290,6 +293,12 @@
    Inherited Members
    + + @@ -329,6 +338,9 @@
    Inherited Members
    + @@ -341,6 +353,9 @@
    Inherited Members
    +
    System.Object.Equals(System.Object)
    @@ -510,7 +525,9 @@

    Methods

    MouseEvent(MouseEvent)

    -
    +
    +Method invoked when a mouse event is generated +
    Declaration
    @@ -544,7 +561,7 @@
    Returns
    System.Boolean - + true, if the event was handled, false otherwise. @@ -554,7 +571,9 @@
    Overrides

    ProcessKey(KeyEvent)

    -
    +
    +Processes key presses for the TextField. +
    Declaration
    @@ -594,6 +613,11 @@
    Returns
    Overrides
    +
    Remarks
    +
    +The TextField control responds to the following keys: +
    KeysFunction
    Delete, BackspaceDeletes the character before cursor.
    +

    Implements

    System.Collections.IEnumerable diff --git a/docs/api/Terminal.Gui/Terminal.Gui.Toplevel.html b/docs/api/Terminal.Gui/Terminal.Gui.Toplevel.html index b8aba889a4..745890f175 100644 --- a/docs/api/Terminal.Gui/Terminal.Gui.Toplevel.html +++ b/docs/api/Terminal.Gui/Terminal.Gui.Toplevel.html @@ -16,13 +16,13 @@ - - + +
    @@ -113,6 +113,9 @@
    Inherited Members
    + @@ -236,6 +239,12 @@
    Inherited Members
    + + @@ -275,6 +284,9 @@
    Inherited Members
    + @@ -287,6 +299,9 @@
    Inherited Members
    + @@ -318,19 +333,18 @@
    Syntax
    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() + Toplevels can be modally executing views, started by calling Run(Toplevel, Boolean). + They return control to the caller when RequestStop() has + been called (which sets the Running property to false).

    - 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. + A Toplevel is created when an application initialzies Terminal.Gui by callling Init(). + The application Toplevel can be accessed via Top. Additional Toplevels can be created + and run (e.g. Dialogs. To run a Toplevel, create the Toplevel and + call Run(Toplevel, Boolean).

    - TopLevels can also opt-in to more sophisticated initialization + 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 @@ -338,7 +352,7 @@

    Remarks
    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 +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.

    @@ -350,7 +364,7 @@

    Constructors

    Toplevel()

    -Initializes a new instance of the Toplevel class with Computed layout, defaulting to async full screen. +Initializes a new instance of the Toplevel class with Computed layout, defaulting to full screen.
    Declaration
    @@ -382,7 +396,7 @@
    Parameters
    Rect frame - Frame. + A superview-relative rectangle specifying the location and size for the new Toplevel @@ -422,7 +436,7 @@
    Overrides

    MenuBar

    -Check id current toplevel has menu bar +Gets or sets the menu for this Toplevel
    Declaration
    @@ -478,8 +492,7 @@
    Property Value

    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. +Gets or sets whether the MainLoop for this Toplevel is running or not.
    Declaration
    @@ -501,12 +514,16 @@
    Property Value
    +
    Remarks
    +
    +Setting this property directly is discouraged. Use RequestStop() instead. +

    StatusBar

    -Check id current toplevel has status bar +Gets or sets the status bar for this Toplevel
    Declaration
    @@ -534,7 +551,9 @@

    Methods

    Add(View)

    -
    +
    +Adds a subview (child) to this view. +
    Declaration
    @@ -559,12 +578,16 @@
    Parameters
    Overrides
    +
    Remarks
    +
    +The Views that have been added to this view can be retrieved via the Subviews property. See also Remove(View) RemoveAll() +

    Create()

    -Convenience factory method that creates a new toplevel with the current terminal dimensions. +Convenience factory method that creates a new Toplevel with the current terminal dimensions.
    Declaration
    @@ -590,7 +613,10 @@
    Returns

    ProcessKey(KeyEvent)

    -
    +
    +If the view is focused, gives the view a +chance to process the keystroke. +
    Declaration
    @@ -609,7 +635,7 @@
    Parameters
    KeyEvent keyEvent - + Contains the details about the key that produced the event. @@ -630,15 +656,36 @@
    Returns
    Overrides
    +
    Remarks
    +
    +

    + Views can override this method if they are + interested in processing the given keystroke. + If they consume the keystroke, they must + return true to stop the keystroke from being + processed by other widgets or consumed by the + widget engine. If they return false, the + keystroke will be passed using the ProcessColdKey + method to other views to process. +

    +

    + The View implementation does nothing but return false, + so it is not necessary to call base.ProcessKey if you + derive directly from View, but you should if you derive + other View subclasses. +

    +

    Redraw(Rect)

    -
    +
    +Redraws this view and its subviews; only redraws the views that have been flagged for a re-display. +
    Declaration
    -
    public override void Redraw(Rect region)
    +
    public override void Redraw(Rect bounds)
    Parameters
    @@ -652,18 +699,34 @@
    Parameters
    - - + +
    RectregionboundsThe bounds (view-relative region) to redraw.
    Overrides
    +
    Remarks
    +
    +

    + Always use Bounds (view-relative) when calling Redraw(Rect), NOT Frame (superview-relative). +

    +

    + 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. +

    +

    + Overrides of Redraw(Rect) must ensure they do not set Driver.Clip to a clip region + larger than the region parameter. +

    +

    Remove(View)

    -
    +
    +Removes a subview added via Add(View) or Add(View[]) from this View. +
    Declaration
    @@ -688,11 +751,16 @@
    Parameters
    Overrides
    +
    Remarks
    +
    +

    RemoveAll()

    -
    +
    +Removes all subviews (children) added via Add(View) or Add(View[]) from this View. +
    Declaration
    @@ -705,7 +773,7 @@
    Overrides

    WillPresent()

    -This method is invoked by Application.Begin as part of the Application.Run after +Invoked by Begin(Toplevel) as part of the Run(Toplevel, Boolean) after the views have been laid out, and before the views are drawn for the first time.
    @@ -719,7 +787,7 @@

    Events

    Ready

    -Fired once the Toplevel's MainLoop has started it's first iteration. +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)`.
    diff --git a/docs/api/Terminal.Gui/Terminal.Gui.View.FocusEventArgs.html b/docs/api/Terminal.Gui/Terminal.Gui.View.FocusEventArgs.html new file mode 100644 index 0000000000..bc23f5b4d1 --- /dev/null +++ b/docs/api/Terminal.Gui/Terminal.Gui.View.FocusEventArgs.html @@ -0,0 +1,208 @@ + + + + + + + + Class View.FocusEventArgs + + + + + + + + + + + + + + + + +
    +
    + + + + +
    +
    + +
    +
    +
    +

    +
    +
      +
      +
      + + + +
      + + + + + + diff --git a/docs/api/Terminal.Gui/Terminal.Gui.View.KeyEventEventArgs.html b/docs/api/Terminal.Gui/Terminal.Gui.View.KeyEventEventArgs.html index f85b64449f..8360d20d3c 100644 --- a/docs/api/Terminal.Gui/Terminal.Gui.View.KeyEventEventArgs.html +++ b/docs/api/Terminal.Gui/Terminal.Gui.View.KeyEventEventArgs.html @@ -16,13 +16,13 @@ - - + +
      @@ -84,7 +84,7 @@

      Class View.KeyEventEventArgs

      -Specifies the event arguments for KeyEvent +Defines the event arguments for KeyEvent
      diff --git a/docs/api/Terminal.Gui/Terminal.Gui.View.LayoutEventArgs.html b/docs/api/Terminal.Gui/Terminal.Gui.View.LayoutEventArgs.html new file mode 100644 index 0000000000..6e4f54b7db --- /dev/null +++ b/docs/api/Terminal.Gui/Terminal.Gui.View.LayoutEventArgs.html @@ -0,0 +1,193 @@ + + + + + + + + Class View.LayoutEventArgs + + + + + + + + + + + + + + + + +
      +
      + + + + +
      +
      + +
      +
      +
      +

      +
      +
        +
        +
        + + + +
        + + + + + + diff --git a/docs/api/Terminal.Gui/Terminal.Gui.View.MouseEventEventArgs.html b/docs/api/Terminal.Gui/Terminal.Gui.View.MouseEventEventArgs.html new file mode 100644 index 0000000000..3e5834292c --- /dev/null +++ b/docs/api/Terminal.Gui/Terminal.Gui.View.MouseEventEventArgs.html @@ -0,0 +1,252 @@ + + + + + + + + Class View.MouseEventEventArgs + + + + + + + + + + + + + + + + +
        +
        + + + + +
        +
        + +
        +
        +
        +

        +
        +
          +
          +
          + + + +
          + + + + + + diff --git a/docs/api/Terminal.Gui/Terminal.Gui.View.html b/docs/api/Terminal.Gui/Terminal.Gui.View.html index 3c02537cbb..4e0721c659 100644 --- a/docs/api/Terminal.Gui/Terminal.Gui.View.html +++ b/docs/api/Terminal.Gui/Terminal.Gui.View.html @@ -16,13 +16,13 @@ - - + +
          @@ -149,68 +149,73 @@
          Syntax
          Remarks

          - The View defines the base functionality for user interface elements in Terminal/gui.cs. Views + The View defines the base functionality for user interface elements in Terminal.Gui. 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. + Views supports two layout styles: Absolute or Computed. The choice as to which layout style is used by the View + is determined when the View is initizlied. To create a View using Absolute layout, call a constructor that takes a + Rect parameter to specify the absolute position and size (the View.Frame)/. To create a View + using Computed layout use a constructor that does not take a Rect parametr and set 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. + To switch between Absolute and Computed layout, use the LayoutStyle property. +

          +

          + Computed layout is more flexible and supports dynamic console apps where controls adjust layout + as the terminal resizes or other Views change size or position. The X, Y, Width and Height + properties are Dim and Pos objects that 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. +care of repositioning views when 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. + Absolute layout requires specifying coordiantes and sizes of Views explicitly, and the + View will typcialy stay in a fixed position and size. To change the position and size use the +Frame property.

          - Subviews can be added to a View by calling the Add method. The container of a view is the - Superview. + Subviews (child views) can be added to a View by calling the Add(View) method. + The container of a View can be accessed with the SuperView property.

          - Developers can call the SetNeedsDisplay method on the view to flag a region or the entire view - as requiring to be redrawn. + To flag a region of the View's Bounds to be redrawn call SetNeedsDisplay(Rect). To flag the entire view + for redraw call SetNeedsDisplay().

          - Views have a ColorScheme property that defines the default colors that subviews + 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. + Subclasses should not rely on ColorScheme being + set at construction time. If a ColorScheme is not set on a view, the view will inherit the + value from its SuperView and the value might only be valid once a view has been + added to a SuperView.

          - Using ColorSchemes has the advantage that your application will work both + By using ColorScheme applications 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 + 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 + The LayoutSubviews() method 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. + for views that use the Absolute, and will recompute the + frames for the vies that use Computed.

          Constructors @@ -220,23 +225,24 @@

          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. +Initializes a new instance of Computed View class.
          Declaration
          public View()
          +
          Remarks
          +
          +Use X, Y, Width, and Height properties to dynamically control the size and location of the 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. +Initializes a new instance of a Absolute View class with the absolute +dimensions specified in the frame parameter.
          Declaration
          @@ -260,6 +266,11 @@
          Parameters
          +
          Remarks
          +
          +This constructor intitalize a View with a LayoutStyle of Absolute. Use View() to +initialize a View with LayoutStyle of Computed +

          Properties

          @@ -267,7 +278,7 @@

          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. +The bounds represent the View-relative rectangle used for this view; the area inside of the view.
          Declaration
          @@ -289,12 +300,25 @@
          Property Value
          +
          Remarks
          +
          +

          +Updates to the Bounds update the Frame, +and has the same side effects as updating the Frame. +

          +

          +Because Bounds coordinates are relative to the upper-left corner of the View, +the coordinates of the upper-left corner of the rectangle returned by this property are (0,0). +Use this property to obtain the size and coordinates of the client area of the +control for tasks such as drawing on the surface of the control. +

          +

          ColorScheme

          -The color scheme for this view, if it is not defined, it returns the parent's +The color scheme for this view, if it is not defined, it returns the SuperView's color scheme.
          @@ -377,7 +401,7 @@
          Property Value

          Frame

          -Gets or sets the frame for the view. +Gets or sets the frame for the view. The frame is relative to the view's container (SuperView).
          Declaration
          @@ -401,14 +425,21 @@
          Property Value
          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. +

          + Change the Frame when using the Absolute layout style to move or resize views. +

          +

          + Altering the Frame of a view will trigger the redrawing of the + view as well as the redrawing of the affected regions of the SuperView. +

          HasFocus

          -
          +
          +Gets or sets a value indicating whether this Responder has focus. +
          Declaration
          @@ -425,7 +456,7 @@
          Property Value
          System.Boolean - + true if has focus; otherwise, false. @@ -436,8 +467,7 @@
          Overrides

          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. +Gets or sets the height of the view. Only used whe LayoutStyle is Computed.
          Declaration
          @@ -486,6 +516,8 @@
          Property Value
          +
          Remarks
          +
          The id should be unique across all Views that share a SuperView.
          @@ -518,9 +550,9 @@
          Property Value

          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. +Controls how the View's Frame is computed during the LayoutSubviews method, if the style is set to Absolute, +LayoutSubviews does not change the Frame. If the style is Computed the Frame is updated using +the X, Y, Width, and Height properties.
          Declaration
          @@ -655,7 +687,7 @@
          Property Value

          WantMousePositionReports

          -Gets or sets a value indicating whether this View want mouse position reports. +Gets or sets a value indicating whether this View wants mouse position reports.
          Declaration
          @@ -682,8 +714,7 @@
          Property Value

          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. +Gets or sets the width of the view. Only used whe LayoutStyle is Computed.
          Declaration
          @@ -705,13 +736,16 @@
          Property Value
          +
          Remarks
          +
          +If LayoutStyle is Absolute changing this property has no effect and its value is indeterminate. +

          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. +Gets or sets the X position for the view (the column). Only used whe LayoutStyle is Computed.
          Declaration
          @@ -733,13 +767,16 @@
          Property Value
          +
          Remarks
          +
          +If LayoutStyle is Absolute changing this property has no effect and its value is indeterminate. +

          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. +Gets or sets the Y position for the view (the row). Only used whe LayoutStyle is Computed.
          Declaration
          @@ -761,6 +798,10 @@
          Property Value
          +
          Remarks
          +
          +If LayoutStyle is Absolute changing this property has no effect and its value is indeterminate. +

          Methods

          @@ -768,7 +809,7 @@

          Methods

          Add(View)

          -Adds a subview to this view. +Adds a subview (child) to this view.
          Declaration
          @@ -794,13 +835,14 @@
          Parameters
          Remarks
          +The Views that have been added to this view can be retrieved via the Subviews property. See also Remove(View) RemoveAll()

          Add(View[])

          -Adds the specified views to the view. +Adds the specified views (children) to the view.
          Declaration
          @@ -824,12 +866,16 @@
          Parameters
          +
          Remarks
          +
          +The Views that have been added to this view can be retrieved via the Subviews property. See also Remove(View) RemoveAll() +

          AddRune(Int32, Int32, Rune)

          -Displays the specified character in the specified column and row. +Displays the specified character in the specified column and row of the View.
          Declaration
          @@ -849,12 +895,12 @@
          Parameters
          System.Int32 col - Col. + Column (view-relative). System.Int32 row - Row. + Row (view-relative). System.Rune @@ -934,7 +980,7 @@
          Remark

          ChildNeedsDisplay()

          -Flags this view for requiring the children views to be repainted. +Indicates that any child views (in the Subviews list) need to be repainted.
          Declaration
          @@ -964,12 +1010,12 @@
          Remarks

          Clear(Rect)

          -Clears the specified rectangular region with the current color +Clears the specified region with the current color.
          Declaration
          -
          public void Clear(Rect r)
          +
          public void Clear(Rect regionScreen)
          Parameters
          @@ -983,17 +1029,20 @@
          Parameters
          - - + +
          RectrregionScreenThe screen-relative region to clear.
          +
          Remarks
          +
          +

          ClearNeedsDisplay()

          -Removes the SetNeedsDisplay and the ChildNeedsDisplay setting on this view. +Removes the SetNeedsDisplay() and the ChildNeedsDisplay() setting on this view.
          Declaration
          @@ -1005,7 +1054,7 @@
          Declaration

          ClipToBounds()

          -Sets the Console driver's clip region to the current View's Bounds. +Sets the ConsoleDriver's clip region to the current View's Bounds.
          Declaration
          @@ -1023,10 +1072,14 @@
          Returns
          Rect - The existing driver's Clip region, which can be then set by setting the Driver.Clip property. + The existing driver's clip region, which can be then re-eapplied by setting Driver.Clip (Clip). +
          Remarks
          +
          +Bounds is View-relative. +
          @@ -1037,7 +1090,7 @@

          Declaration
          -
          public void DrawFrame(Rect rect, int padding = 0, bool fill = false)
          +
          public void DrawFrame(Rect region, int padding = 0, bool fill = false)
          Parameters
          @@ -1051,13 +1104,13 @@
          Parameters
          - - + + - + @@ -1071,7 +1124,7 @@
          Parameters

          DrawHotString(ustring, Boolean, ColorScheme)

          -Utility function to draw strings that contains a hotkey using a colorscheme and the "focused" state. +Utility function to draw strings that contains a hotkey using a ColorScheme and the "focused" state.
          Declaration
          @@ -1110,7 +1163,7 @@
          Parameters

          DrawHotString(ustring, Attribute, Attribute)

          -Utility function to draw strings that contain a hotkey +Utility function to draw strings that contain a hotkey.
          Declaration
          @@ -1144,6 +1197,9 @@
          Parameters
          RectrectRectangular region for the frame to be drawn.regionView-relative region for the frame to be drawn.
          System.Int32 paddingThe padding to add to the drawn frame.The padding to add around the outside of the drawn frame.
          System.Boolean
          +
          Remarks
          +
          +The hotkey is any character following an underscore ('_') character.
          @@ -1266,8 +1322,7 @@
          Returns

          LayoutSubviews()

          -This virtual method is invoked when a view starts executing or -when the dimensions of the view have changed, for example in +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.
          @@ -1275,6 +1330,10 @@
          Declaration
          public virtual void LayoutSubviews()
          +
          Remarks
          +
          +Calls Terminal.Gui.View.OnLayoutComplete(Terminal.Gui.View.LayoutEventArgs) (which raises the LayoutComplete event) before it returns. +
          @@ -1300,20 +1359,55 @@
          Parameters
          System.Int32 col - Col. + Col (view-relative). System.Int32 row - Row. + Row (view-relative). + + + + + + +

          OnDrawContent(Rect)

          +
          +Enables overrides to draw infinitely scrolled content and/or a background behind added controls. +
          +
          +
          Declaration
          +
          +
          public virtual void OnDrawContent(Rect viewport)
          +
          +
          Parameters
          + + + + + + + + + + + + +
          TypeNameDescription
          RectviewportThe view-relative rectangle describing the currently visible viewport into the View
          +
          Remarks
          +
          +This method will be called before any subviews added with Add(View) have been drawn. +

          OnEnter()

          -
          +
          +Method invoked when a view gets focus. +
          Declaration
          @@ -1330,7 +1424,7 @@
          Returns
          System.Boolean - + true, if the event was handled, false otherwise. @@ -1428,7 +1522,9 @@
          Overrides

          OnLeave()

          -
          +
          +Method invoked when a view loses focus. +
          Declaration
          @@ -1445,7 +1541,7 @@
          Returns
          System.Boolean - + true, if the event was handled, false otherwise. @@ -1455,7 +1551,9 @@
          Overrides

          OnMouseEnter(MouseEvent)

          -
          +
          +Method invoked when a mouse event is generated for the first time. +
          Declaration
          @@ -1489,7 +1587,7 @@
          Returns
          System.Boolean - + true, if the event was handled, false otherwise. @@ -1497,9 +1595,55 @@
          Overrides
          + +

          OnMouseEvent(MouseEvent)

          +
          +Method invoked when a mouse event is generated +
          +
          +
          Declaration
          +
          +
          public virtual bool OnMouseEvent(MouseEvent mouseEvent)
          +
          +
          Parameters
          + + + + + + + + + + + + + + + +
          TypeNameDescription
          MouseEventmouseEvent
          +
          Returns
          + + + + + + + + + + + + + +
          TypeDescription
          System.Booleantrue, if the event was handled, false otherwise.
          + +

          OnMouseLeave(MouseEvent)

          -
          +
          +Method invoked when a mouse event is generated for the last time. +
          Declaration
          @@ -1533,7 +1677,7 @@
          Returns
          System.Boolean - + true, if the event was handled, false otherwise. @@ -1555,7 +1699,12 @@
          Declaration

          ProcessColdKey(KeyEvent)

          -
          +
          +This method can be overwritten by views that +want to provide accelerator functionality +(Alt-key for example), but without +interefering with normal ProcessKey behavior. +
          Declaration
          @@ -1574,7 +1723,7 @@
          Parameters
          KeyEvent keyEvent - + Contains the details about the key that produced the event. @@ -1595,11 +1744,31 @@
          Returns
          Overrides
          +
          Remarks
          +
          +

          + After keys are sent to the subviews on the + current view, all the view are + processed and the key is passed to the views + to allow some of them to process the keystroke + as a cold-key.

          +

          + This functionality is used, for example, by + default buttons to act on the enter key. + Processing this as a hot-key would prevent + non-default buttons from consuming the enter + keypress when they have the focus. +

          +

          ProcessHotKey(KeyEvent)

          -
          +
          +This method can be overwritten by view that +want to provide accelerator functionality +(Alt-key for example). +
          Declaration
          @@ -1639,11 +1808,31 @@
          Returns
          Overrides
          +
          Remarks
          +
          +

          + Before keys are sent to the subview on the + current view, all the views are + processed and the key is passed to the widgets + to allow some of them to process the keystroke + as a hot-key.

          +

          + For example, if you implement a button that + has a hotkey ok "o", you would catch the + combination Alt-o here. If the event is + caught, you must return true to stop the + keystroke from being dispatched to other + views. +

          +

          ProcessKey(KeyEvent)

          -
          +
          +If the view is focused, gives the view a +chance to process the keystroke. +
          Declaration
          @@ -1662,7 +1851,7 @@
          Parameters
          KeyEvent keyEvent - + Contains the details about the key that produced the event. @@ -1683,17 +1872,36 @@
          Returns
          Overrides
          +
          Remarks
          +
          +

          + Views can override this method if they are + interested in processing the given keystroke. + If they consume the keystroke, they must + return true to stop the keystroke from being + processed by other widgets or consumed by the + widget engine. If they return false, the + keystroke will be passed using the ProcessColdKey + method to other views to process. +

          +

          + The View implementation does nothing but return false, + so it is not necessary to call base.ProcessKey if you + derive directly from View, but you should if you derive + other View subclasses. +

          +

          Redraw(Rect)

          -Performs a redraw of this view and its subviews, only redraws the views that have been flagged for a re-display. +Redraws this view and its subviews; only redraws the views that have been flagged for a re-display.
          Declaration
          -
          public virtual void Redraw(Rect region)
          +
          public virtual void Redraw(Rect bounds)
          Parameters
          @@ -1707,24 +1915,31 @@
          Parameters
          - - + +
          RectregionThe region to redraw, this is relative to the view itself.boundsThe bounds (view-relative region) to redraw.
          Remarks
          +

          + Always use Bounds (view-relative) when calling Redraw(Rect), NOT Frame (superview-relative). +

          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.

          +

          + Overrides of Redraw(Rect) must ensure they do not set Driver.Clip to a clip region + larger than the region parameter. +

          Remove(View)

          -Removes a widget from this container. +Removes a subview added via Add(View) or Add(View[]) from this View.
          Declaration
          @@ -1756,22 +1971,19 @@
          Remarks

          RemoveAll()

          -Removes all the widgets from this container. +Removes all subviews (children) added via Add(View) or Add(View[]) from this View.
          Declaration
          public virtual void RemoveAll()
          -
          Remarks
          -
          -

          ScreenToView(Int32, Int32)

          -Converts a point from screen coordinates into the view coordinate space. +Converts a point from screen-relative coordinates to view-relative coordinates.
          Declaration
          @@ -1886,12 +2098,12 @@
          Remarks<

          SetClip(Rect)

          -Sets the clipping region to the specified region, the region is view-relative +Sets the clip region to the specified view-relative region.
          Declaration
          -
          public Rect SetClip(Rect rect)
          +
          public Rect SetClip(Rect region)
          Parameters
          @@ -1905,8 +2117,8 @@
          Parameters
          - - + +
          RectrectRectangle region to clip into, the region is view-relative.regionView-relative clip region.
          @@ -1921,7 +2133,7 @@
          Returns
          Rect - The previous clip region. + The previous screen-relative clip region. @@ -1930,7 +2142,7 @@
          Returns

          SetFocus(View)

          -Focuses the specified sub-view. +Causes the specified subview to have focus.
          Declaration
          @@ -1959,8 +2171,7 @@
          Parameters

          SetNeedsDisplay()

          -Invoke to flag that this view needs to be redisplayed, by any code -that alters the state of the view. +Sets a flag indicating this view needs to be redisplayed because its state has changed.
          Declaration
          @@ -1972,7 +2183,7 @@
          Declaration

          SetNeedsDisplay(Rect)

          -Flags the specified rectangle region on this view as needing to be repainted. +Flags the view-relative region on this View as needing to be repainted.
          Declaration
          @@ -1992,7 +2203,7 @@
          Parameters
          Rect region - The region that must be flagged for repaint. + The view-relative region that must be flagged for repaint. @@ -2000,7 +2211,9 @@
          Parameters

          ToString()

          -
          +
          +Pretty prints the View +
          Declaration
          @@ -2027,14 +2240,49 @@

          Events

          +

          DrawContent

          +
          +Event invoked when the content area of the View is to be drawn. +
          +
          +
          Declaration
          +
          +
          public event EventHandler<Rect> DrawContent
          +
          +
          Event Type
          + + + + + + + + + + + + + +
          TypeDescription
          System.EventHandler<Rect>
          +
          Remarks
          +
          +

          +Will be invoked before any subviews added with Add(View) have been drawn. +

          +

          +Rect provides the view-relative rectangle describing the currently visible viewport into the View. +

          +
          + +

          Enter

          -Event fired when the view get focus. +Event fired when the view gets focus.
          Declaration
          -
          public event EventHandler Enter
          +
          public event EventHandler<View.FocusEventArgs> Enter
          Event Type
          @@ -2046,7 +2294,7 @@
          Event Type
          - + @@ -2131,14 +2379,70 @@
          Event Type
          System.EventHandlerSystem.EventHandler<View.FocusEventArgs>
          +

          LayoutComplete

          +
          +Fired after the Views's LayoutSubviews() method has completed. +
          +
          +
          Declaration
          +
          +
          public event EventHandler<View.LayoutEventArgs> LayoutComplete
          +
          +
          Event Type
          + + + + + + + + + + + + + +
          TypeDescription
          System.EventHandler<View.LayoutEventArgs>
          +
          Remarks
          +
          +Subscribe to this event to perform tasks when the View has been resized or the layout has otherwise changed. +
          + +

          Leave

          -Event fired when the view lost focus. +Event fired when the view looses focus. +
          +
          +
          Declaration
          +
          +
          public event EventHandler<View.FocusEventArgs> Leave
          +
          +
          Event Type
          + + + + + + + + + + + + + +
          TypeDescription
          System.EventHandler<View.FocusEventArgs>
          + + +

          MouseClick

          +
          +Event fired when a mouse event is generated.
          Declaration
          -
          public event EventHandler Leave
          +
          public event EventHandler<View.MouseEventEventArgs> MouseClick
          Event Type
          @@ -2150,7 +2454,7 @@
          Event Type
          - + @@ -2164,7 +2468,7 @@

          Mo

          Declaration
          -
          public event EventHandler<MouseEvent> MouseEnter
          +
          public event EventHandler<View.MouseEventEventArgs> MouseEnter
          Event Type
          System.EventHandlerSystem.EventHandler<View.MouseEventEventArgs>
          @@ -2176,7 +2480,7 @@
          Event Type
          - + @@ -2185,12 +2489,12 @@
          Event Type

          MouseLeave

          -Event fired when the view loses mouse event for the last time. +Event fired when the view receives a mouse event for the last time.
          Declaration
          -
          public event EventHandler<MouseEvent> MouseLeave
          +
          public event EventHandler<View.MouseEventEventArgs> MouseLeave
          Event Type
          System.EventHandler<MouseEvent>System.EventHandler<View.MouseEventEventArgs>
          @@ -2202,7 +2506,7 @@
          Event Type
          - + diff --git a/docs/api/Terminal.Gui/Terminal.Gui.Window.html b/docs/api/Terminal.Gui/Terminal.Gui.Window.html index dcc86b8f68..6443992a5e 100644 --- a/docs/api/Terminal.Gui/Terminal.Gui.Window.html +++ b/docs/api/Terminal.Gui/Terminal.Gui.Window.html @@ -16,13 +16,13 @@ - - + +
          @@ -84,7 +84,7 @@

          Class Window

          -A Toplevel View that draws a frame around its region and has a "ContentView" subview where the contents are added. +A Toplevel View that draws a border around its Frame with a Title at the top.
          @@ -141,6 +141,9 @@
          Inherited Members
          + @@ -261,6 +264,12 @@
          Inherited Members
          + + @@ -300,6 +309,9 @@
          Inherited Members
          + @@ -312,6 +324,9 @@
          Inherited Members
          +
          System.Object.Equals(System.Object)
          @@ -337,6 +352,11 @@
          Syntax
          public class Window : Toplevel, IEnumerable
          +
          Remarks
          +
          +The 'client area' of a Window is a rectangle deflated by one or more rows/columns from Bounds. A this time there is no +API to determine this rectangle. +

          Constructors

          @@ -368,14 +388,18 @@
          Parameters
          System.EventHandler<MouseEvent>System.EventHandler<View.MouseEventEventArgs>
          +
          Remarks
          +
          +This constructor intitalize a View with a LayoutStyle of Computed. +Use X, Y, Width, and Height properties to dynamically control the size and location of the view. +

          Window(ustring, Int32)

          -Initializes a new instance of the Window with -the specified frame for its location, with the specified border -an optional title. +Initializes a new instance of the Window with the specified frame for its location, with the specified border, +and an optional title.
          Declaration
          @@ -404,12 +428,17 @@
          Parameters
          +
          Remarks
          +
          +This constructor intitalize a View with a LayoutStyle of Computed. +Use X, Y, Width, and Height properties to dynamically control the size and location of the view. +

          Window(Rect, ustring)

          -Initializes a new instance of the Window class with an optional title and a set frame. +Initializes a new instance of the Window class with an optional title using Absolute positioning.
          Declaration
          @@ -429,23 +458,27 @@
          Parameters
          Rect frame - Frame. + Superview-relatie rectangle specifying the location and size NStack.ustring title - Title. + Title +
          Remarks
          +
          +This constructor intitalizes a Window with a LayoutStyle of Absolute. Use constructors +that do not take Rect parameters to initialize a Window with Computed. +

          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. +Initializes a new instance of the Window with the specified frame for its location, with the specified border, +and an optional title.
          Declaration
          @@ -465,12 +498,12 @@
          Parameters
          Rect frame - Frame. + Superview-relatie rectangle specifying the location and size NStack.ustring title - Title. + Title System.Int32 @@ -479,6 +512,11 @@
          Parameters
          +
          Remarks
          +
          +This constructor intitalizes a Window with a LayoutStyle of Absolute. Use constructors +that do not take Rect parameters to initialize a Window with LayoutStyle of Computed +

          Properties

          @@ -504,7 +542,7 @@
          Property Value
          NStack.ustring - The title. + The title @@ -515,7 +553,7 @@

          Methods

          Add(View)

          -Add the specified view to the Terminal.Gui.Window.ContentView. +Adds a subview (child) to this view.
          Declaration
          @@ -535,12 +573,16 @@
          Parameters
          View view - View to add to the window. +
          Overrides
          +
          Remarks
          +
          +The Views that have been added to this view can be retrieved via the Subviews property. See also Remove(View) RemoveAll() +
          @@ -572,7 +614,9 @@
          Returns

          MouseEvent(MouseEvent)

          -
          +
          +Method invoked when a mouse event is generated +
          Declaration
          @@ -591,7 +635,7 @@
          Parameters
          MouseEvent mouseEvent - + Contains the details about the mouse event. @@ -606,7 +650,7 @@
          Returns
          System.Boolean - + true, if the event was handled, false otherwise. @@ -616,7 +660,9 @@
          Overrides

          Redraw(Rect)

          -
          +
          +Redraws this view and its subviews; only redraws the views that have been flagged for a re-display. +
          Declaration
          @@ -635,18 +681,32 @@
          Parameters
          Rect bounds - + The bounds (view-relative region) to redraw.
          Overrides
          +
          Remarks
          +
          +

          + Always use Bounds (view-relative) when calling Redraw(Rect), NOT Frame (superview-relative). +

          +

          + 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. +

          +

          + Overrides of Redraw(Rect) must ensure they do not set Driver.Clip to a clip region + larger than the region parameter. +

          +

          Remove(View)

          -Removes a widget from this container. +Removes a subview added via Add(View) or Add(View[]) from this View.
          Declaration
          @@ -680,7 +740,7 @@
          Remarks

          RemoveAll()

          -Removes all widgets from this container. +Removes all subviews (children) added via Add(View) or Add(View[]) from this View.
          Declaration
          @@ -689,9 +749,6 @@
          Declaration
          Overrides
          -
          Remarks
          -
          -

          Implements

          System.Collections.IEnumerable diff --git a/docs/api/Terminal.Gui/Terminal.Gui.html b/docs/api/Terminal.Gui/Terminal.Gui.html index 51516ca6dd..fa1f95d55c 100644 --- a/docs/api/Terminal.Gui/Terminal.Gui.html +++ b/docs/api/Terminal.Gui/Terminal.Gui.html @@ -16,13 +16,13 @@ - - + +
          @@ -89,7 +89,7 @@

          Classes

          Application

          -The application driver for Terminal.Gui. +A static, singelton class provding the main application driver for Terminal.Gui apps.

          Application.ResizedEventArgs

          @@ -138,7 +138,7 @@

          DateField

          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. +or more Buttons. It defaults to the Dialog color scheme and has a 1 cell padding around the edges.

          Dim

          @@ -160,6 +160,10 @@

          HexView

          KeyEvent

          Describes a keyboard event. +
          +

          KeyModifiers

          +
          +Identifies the state of the "shift"-keys within a event.

          Label

          @@ -233,7 +237,7 @@

          ScrollBarView

          ScrollView

          -Scrollviews are views that present a window into a virtual space where children views are added. Similar to the iOS UIScrollView. +Scrollviews are views that present a window into a virtual space where subviews are added. Similar to the iOS UIScrollView.

          StatusBar

          @@ -271,14 +275,26 @@

          Toplevel

          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. +
          +

          View.FocusEventArgs

          +
          +Defines the event arguments for SetFocus(View)

          View.KeyEventEventArgs

          -Specifies the event arguments for KeyEvent +Defines the event arguments for KeyEvent +
          +

          View.LayoutEventArgs

          +
          +Event arguments for the LayoutComplete event. +
          +

          View.MouseEventEventArgs

          +
          +Specifies the event arguments for MouseEvent

          Window

          -A Toplevel View that draws a frame around its region and has a "ContentView" subview where the contents are added. +A Toplevel View that draws a border around its Frame with a Title at the top.

          Structs

          @@ -316,7 +332,7 @@

          Enums

          Color

          -Basic colors that can be used to set the foreground and background colors in console applications. These can only be +Basic colors that can be used to set the foreground and background colors in console applications.

          Key

          @@ -326,7 +342,7 @@

          Key

          LayoutStyle

          Determines the LayoutStyle for a view, if Absolute, during LayoutSubviews, the -value from the Frame will be used, if the value is Computer, then the Frame +value from the Frame will be used, if the value is Computed, then the Frame will be updated from the X, Y Pos objects and the Width and Height Dim objects.

          MouseFlags

          diff --git a/docs/api/Terminal.Gui/Unix.Terminal.Curses.Event.html b/docs/api/Terminal.Gui/Unix.Terminal.Curses.Event.html index d043f3376b..24f28a27cb 100644 --- a/docs/api/Terminal.Gui/Unix.Terminal.Curses.Event.html +++ b/docs/api/Terminal.Gui/Unix.Terminal.Curses.Event.html @@ -16,13 +16,13 @@ - - + +
          diff --git a/docs/api/Terminal.Gui/Unix.Terminal.Curses.MouseEvent.html b/docs/api/Terminal.Gui/Unix.Terminal.Curses.MouseEvent.html index 3fb5583465..a39ba4db0d 100644 --- a/docs/api/Terminal.Gui/Unix.Terminal.Curses.MouseEvent.html +++ b/docs/api/Terminal.Gui/Unix.Terminal.Curses.MouseEvent.html @@ -16,13 +16,13 @@ - - + +
          diff --git a/docs/api/Terminal.Gui/Unix.Terminal.Curses.Window.html b/docs/api/Terminal.Gui/Unix.Terminal.Curses.Window.html index 19093719d0..b996188699 100644 --- a/docs/api/Terminal.Gui/Unix.Terminal.Curses.Window.html +++ b/docs/api/Terminal.Gui/Unix.Terminal.Curses.Window.html @@ -16,13 +16,13 @@ - - + +
          diff --git a/docs/api/Terminal.Gui/Unix.Terminal.Curses.html b/docs/api/Terminal.Gui/Unix.Terminal.Curses.html index e9ccdc94a3..03f8622474 100644 --- a/docs/api/Terminal.Gui/Unix.Terminal.Curses.html +++ b/docs/api/Terminal.Gui/Unix.Terminal.Curses.html @@ -16,13 +16,13 @@ - - + +
          diff --git a/docs/api/Terminal.Gui/Unix.Terminal.html b/docs/api/Terminal.Gui/Unix.Terminal.html index ba3d425782..892fce68a7 100644 --- a/docs/api/Terminal.Gui/Unix.Terminal.html +++ b/docs/api/Terminal.Gui/Unix.Terminal.html @@ -16,13 +16,13 @@ - - + +
          diff --git a/docs/api/Terminal.Gui/toc.html b/docs/api/Terminal.Gui/toc.html index 89edb657f8..5474f29fd0 100644 --- a/docs/api/Terminal.Gui/toc.html +++ b/docs/api/Terminal.Gui/toc.html @@ -83,6 +83,9 @@
        • KeyEvent
        • +
        • + KeyModifiers +
        • Label
        • @@ -176,9 +179,18 @@
        • View
        • +
        • + View.FocusEventArgs +
        • View.KeyEventEventArgs
        • +
        • + View.LayoutEventArgs +
        • +
        • + View.MouseEventEventArgs +
        • Window
        • diff --git a/docs/api/UICatalog/UICatalog.Scenario.ScenarioCategory.html b/docs/api/UICatalog/UICatalog.Scenario.ScenarioCategory.html index ac837fad42..36bf58b3c0 100644 --- a/docs/api/UICatalog/UICatalog.Scenario.ScenarioCategory.html +++ b/docs/api/UICatalog/UICatalog.Scenario.ScenarioCategory.html @@ -16,13 +16,13 @@ - - + +
          diff --git a/docs/api/UICatalog/UICatalog.Scenario.ScenarioMetadata.html b/docs/api/UICatalog/UICatalog.Scenario.ScenarioMetadata.html index 9396393aac..d4932f8876 100644 --- a/docs/api/UICatalog/UICatalog.Scenario.ScenarioMetadata.html +++ b/docs/api/UICatalog/UICatalog.Scenario.ScenarioMetadata.html @@ -16,13 +16,13 @@ - - + +
          diff --git a/docs/api/UICatalog/UICatalog.Scenario.html b/docs/api/UICatalog/UICatalog.Scenario.html index 95f7295141..eef191b9b5 100644 --- a/docs/api/UICatalog/UICatalog.Scenario.html +++ b/docs/api/UICatalog/UICatalog.Scenario.html @@ -16,13 +16,13 @@ - - + +
          diff --git a/docs/api/UICatalog/UICatalog.UICatalogApp.html b/docs/api/UICatalog/UICatalog.UICatalogApp.html index 6551173cb4..15686365f0 100644 --- a/docs/api/UICatalog/UICatalog.UICatalogApp.html +++ b/docs/api/UICatalog/UICatalog.UICatalogApp.html @@ -16,13 +16,13 @@ - - + +
          diff --git a/docs/api/UICatalog/UICatalog.html b/docs/api/UICatalog/UICatalog.html index fab978ea8f..8fd5a1fb4f 100644 --- a/docs/api/UICatalog/UICatalog.html +++ b/docs/api/UICatalog/UICatalog.html @@ -16,13 +16,13 @@ - - + +
          diff --git a/docs/articles/index.html b/docs/articles/index.html index 6f59d046b3..a832dd1738 100644 --- a/docs/articles/index.html +++ b/docs/articles/index.html @@ -14,13 +14,13 @@ - - + +
          diff --git a/docs/articles/keyboard.html b/docs/articles/keyboard.html index b41658778d..ac8252d51b 100644 --- a/docs/articles/keyboard.html +++ b/docs/articles/keyboard.html @@ -14,13 +14,13 @@ - - + +
          diff --git a/docs/articles/mainloop.html b/docs/articles/mainloop.html index df9b9861d9..95319bfdce 100644 --- a/docs/articles/mainloop.html +++ b/docs/articles/mainloop.html @@ -14,13 +14,13 @@ - - + +
          diff --git a/docs/articles/overview.html b/docs/articles/overview.html index 664edecc8b..f5a7ca32bf 100644 --- a/docs/articles/overview.html +++ b/docs/articles/overview.html @@ -14,13 +14,13 @@ - - + +
          diff --git a/docs/articles/views.html b/docs/articles/views.html index 23289d5994..84d1d2afb8 100644 --- a/docs/articles/views.html +++ b/docs/articles/views.html @@ -14,13 +14,13 @@ - - + +
          diff --git a/docs/index.html b/docs/index.html index 395ecbef49..f943d56ca5 100644 --- a/docs/index.html +++ b/docs/index.html @@ -14,13 +14,13 @@ - - + +
          diff --git a/docs/index.json b/docs/index.json index 2f77620e68..971413a337 100644 --- a/docs/index.json +++ b/docs/index.json @@ -2,7 +2,7 @@ "api/Terminal.Gui/Terminal.Gui.Application.html": { "href": "api/Terminal.Gui/Terminal.Gui.Application.html", "title": "Class Application", - "keywords": "Class Application The application driver for Terminal.Gui. Inheritance System.Object Application 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 : Terminal.Gui Assembly : Terminal.Gui.dll Syntax public static class Application Remarks You can hook up to the Iteration event to have your method invoked on each iteration of the MainLoop . Creates a instance of MainLoop to process input events, handle timers and other sources of data. It is accessible via the MainLoop property. When invoked sets the SynchronizationContext to one that is tied to the mainloop, allowing user code to use async/await. Fields Driver The current ConsoleDriver in use. Declaration public static ConsoleDriver Driver Field Value Type Description ConsoleDriver RootMouseEvent Merely a debugging aid to see the raw mouse events Declaration public static Action RootMouseEvent Field Value Type Description System.Action < MouseEvent > UseSystemConsole If set, it forces the use of the System.Console-based driver. Declaration public static bool UseSystemConsole Field Value Type Description System.Boolean Properties Current The current Toplevel object. This is updated when Run() enters and leaves to point to the current Toplevel . Declaration public static Toplevel Current { get; } Property Value Type Description Toplevel The current. CurrentView TThe current View object being redrawn. Declaration public static View CurrentView { get; set; } Property Value Type Description View The current. MainLoop The MainLoop driver for the applicaiton Declaration public static MainLoop MainLoop { get; } Property Value Type Description MainLoop The main loop. Top The Toplevel object used for the application on startup ( Top ) Declaration public static Toplevel Top { get; } Property Value Type Description Toplevel The top. Methods Begin(Toplevel) Building block API: Prepares the provided Toplevel for execution. Declaration public static Application.RunState Begin(Toplevel toplevel) Parameters Type Name Description Toplevel toplevel Toplevel to prepare execution for. Returns Type Description Application.RunState The runstate handle that needs to be passed to the End(Application.RunState, Boolean) method upon completion. Remarks This method prepares the provided toplevel for running with the focus, it adds this to the list of toplevels, sets up the mainloop to process the event, lays out the subviews, focuses the first element, and draws the toplevel in the screen. This is usually followed by executing the RunLoop(Application.RunState, Boolean) method, and then the End(Application.RunState, Boolean) method upon termination which will undo these changes. End(Application.RunState, Boolean) Building block API: completes the execution of a Toplevel that was started with Begin(Toplevel) . Declaration public static void End(Application.RunState runState, bool closeDriver = true) Parameters Type Name Description Application.RunState runState The runstate returned by the Begin(Toplevel) method. System.Boolean closeDriver true Closes the application. false Closes the toplevels only. GrabMouse(View) Grabs the mouse, forcing all mouse events to be routed to the specified view until UngrabMouse is called. Declaration public static void GrabMouse(View view) Parameters Type Name Description View view View that will receive all mouse events until UngrabMouse is invoked. Init() Initializes a new instance of Terminal.Gui Application. Declaration public static void Init() Remarks Call this method once per instance (or after Shutdown(Boolean) has been called). Loads the right ConsoleDriver for the platform. Creates a Toplevel and assigns it to Top and CurrentView MakeCenteredRect(Size) Returns a rectangle that is centered in the screen for the provided size. Declaration public static Rect MakeCenteredRect(Size size) Parameters Type Name Description Size size Size for the rectangle. Returns Type Description Rect The centered rect. Refresh() Triggers a refresh of the entire display. Declaration public static void Refresh() RequestStop() Stops running the most recent Toplevel . Declaration public static void RequestStop() Remarks This will cause Run() to return. Calling RequestStop() is equivalent to setting the Running property on the curently running Toplevel to false. Run() Runs the application by calling Run(Toplevel, Boolean) with the value of Top Declaration public static void Run() Run(Toplevel, Boolean) Runs the main loop on the given Toplevel container. Declaration public static void Run(Toplevel view, bool closeDriver = true) Parameters Type Name Description Toplevel view System.Boolean closeDriver Remarks This method is used to start processing events for the main application, but it is also used to run other modal View s such as Dialog boxes. To make a Run(Toplevel, Boolean) stop execution, call RequestStop() . Calling Run(Toplevel, Boolean) is equivalent to calling Begin(Toplevel) , followed by RunLoop(Application.RunState, Boolean) , and then calling End(Application.RunState, Boolean) . Alternatively, to have a program control the main loop and process events manually, call Begin(Toplevel) to set things up manually and then repeatedly call RunLoop(Application.RunState, Boolean) with the wait parameter set to false. By doing this the RunLoop(Application.RunState, Boolean) method will only process any pending events, timers, idle handlers and then return control immediately. Run() Runs the application by calling Run(Toplevel, Boolean) with a new instance of the specified Toplevel -derived class Declaration public static void Run() where T : Toplevel, new() Type Parameters Name Description T RunLoop(Application.RunState, Boolean) Building block API: Runs the main loop for the created dialog Declaration public static void RunLoop(Application.RunState state, bool wait = true) Parameters Type Name Description Application.RunState state The state returned by the Begin method. System.Boolean wait By default this is true which will execute the runloop waiting for events, if you pass false, you can use this method to run a single iteration of the events. Remarks Use the wait parameter to control whether this is a blocking or non-blocking call. Shutdown(Boolean) Shutdown an application initialized with Init() Declaration public static void Shutdown(bool closeDriver = true) Parameters Type Name Description System.Boolean closeDriver true Closes the application. false Closes toplevels only. UngrabMouse() Releases the mouse grab, so mouse events will be routed to the view on which the mouse is. Declaration public static void UngrabMouse() Events Iteration This event is raised on each iteration of the MainLoop Declaration public static event EventHandler Iteration Event Type Type Description System.EventHandler Remarks See also System.Threading.Timeout Loaded This event is fired once when the application is first loaded. The dimensions of the terminal are provided. Declaration public static event EventHandler Loaded Event Type Type Description System.EventHandler < Application.ResizedEventArgs > Resized Invoked when the terminal was resized. The new size of the terminal is provided. Declaration public static event EventHandler Resized Event Type Type Description System.EventHandler < Application.ResizedEventArgs >" + "keywords": "Class Application A static, singelton class provding the main application driver for Terminal.Gui apps. Inheritance System.Object Application 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 : Terminal.Gui Assembly : Terminal.Gui.dll Syntax public static class Application Remarks Creates a instance of MainLoop to process input events, handle timers and other sources of data. It is accessible via the MainLoop property. You can hook up to the Iteration event to have your method invoked on each iteration of the MainLoop . When invoked sets the SynchronizationContext to one that is tied to the mainloop, allowing user code to use async/await. Examples // A simple Terminal.Gui app that creates a window with a frame and title with // 5 rows/columns of padding. Application.Init(); var win = new Window (\"Hello World - CTRL-Q to quit\") { X = 5, Y = 5, Width = Dim.Fill (5), Height = Dim.Fill (5) }; Application.Top.Add(win); Application.Run(); Fields Driver The current ConsoleDriver in use. Declaration public static ConsoleDriver Driver Field Value Type Description ConsoleDriver RootMouseEvent Merely a debugging aid to see the raw mouse events Declaration public static Action RootMouseEvent Field Value Type Description System.Action < MouseEvent > UseSystemConsole If set, it forces the use of the System.Console-based driver. Declaration public static bool UseSystemConsole Field Value Type Description System.Boolean Properties Current The current Toplevel object. This is updated when Run() enters and leaves to point to the current Toplevel . Declaration public static Toplevel Current { get; } Property Value Type Description Toplevel The current. CurrentView TThe current View object being redrawn. Declaration public static View CurrentView { get; set; } Property Value Type Description View The current. MainLoop The MainLoop driver for the applicaiton Declaration public static MainLoop MainLoop { get; } Property Value Type Description MainLoop The main loop. Top The Toplevel object used for the application on startup ( Top ) Declaration public static Toplevel Top { get; } Property Value Type Description Toplevel The top. Methods Begin(Toplevel) Building block API: Prepares the provided Toplevel for execution. Declaration public static Application.RunState Begin(Toplevel toplevel) Parameters Type Name Description Toplevel toplevel Toplevel to prepare execution for. Returns Type Description Application.RunState The runstate handle that needs to be passed to the End(Application.RunState, Boolean) method upon completion. Remarks This method prepares the provided toplevel for running with the focus, it adds this to the list of toplevels, sets up the mainloop to process the event, lays out the subviews, focuses the first element, and draws the toplevel in the screen. This is usually followed by executing the RunLoop(Application.RunState, Boolean) method, and then the End(Application.RunState, Boolean) method upon termination which will undo these changes. End(Application.RunState, Boolean) Building block API: completes the execution of a Toplevel that was started with Begin(Toplevel) . Declaration public static void End(Application.RunState runState, bool closeDriver = true) Parameters Type Name Description Application.RunState runState The runstate returned by the Begin(Toplevel) method. System.Boolean closeDriver true Closes the application. false Closes the toplevels only. GrabMouse(View) Grabs the mouse, forcing all mouse events to be routed to the specified view until UngrabMouse is called. Declaration public static void GrabMouse(View view) Parameters Type Name Description View view View that will receive all mouse events until UngrabMouse is invoked. Init() Initializes a new instance of Terminal.Gui Application. Declaration public static void Init() Remarks Call this method once per instance (or after Shutdown(Boolean) has been called). Loads the right ConsoleDriver for the platform. Creates a Toplevel and assigns it to Top and CurrentView MakeCenteredRect(Size) Returns a rectangle that is centered in the screen for the provided size. Declaration public static Rect MakeCenteredRect(Size size) Parameters Type Name Description Size size Size for the rectangle. Returns Type Description Rect The centered rect. Refresh() Triggers a refresh of the entire display. Declaration public static void Refresh() RequestStop() Stops running the most recent Toplevel . Declaration public static void RequestStop() Remarks This will cause Run() to return. Calling RequestStop() is equivalent to setting the Running property on the curently running Toplevel to false. Run() Runs the application by calling Run(Toplevel, Boolean) with the value of Top Declaration public static void Run() Run(Toplevel, Boolean) Runs the main loop on the given Toplevel container. Declaration public static void Run(Toplevel view, bool closeDriver = true) Parameters Type Name Description Toplevel view System.Boolean closeDriver Remarks This method is used to start processing events for the main application, but it is also used to run other modal View s such as Dialog boxes. To make a Run(Toplevel, Boolean) stop execution, call RequestStop() . Calling Run(Toplevel, Boolean) is equivalent to calling Begin(Toplevel) , followed by RunLoop(Application.RunState, Boolean) , and then calling End(Application.RunState, Boolean) . Alternatively, to have a program control the main loop and process events manually, call Begin(Toplevel) to set things up manually and then repeatedly call RunLoop(Application.RunState, Boolean) with the wait parameter set to false. By doing this the RunLoop(Application.RunState, Boolean) method will only process any pending events, timers, idle handlers and then return control immediately. Run() Runs the application by calling Run(Toplevel, Boolean) with a new instance of the specified Toplevel -derived class Declaration public static void Run() where T : Toplevel, new() Type Parameters Name Description T RunLoop(Application.RunState, Boolean) Building block API: Runs the main loop for the created dialog Declaration public static void RunLoop(Application.RunState state, bool wait = true) Parameters Type Name Description Application.RunState state The state returned by the Begin method. System.Boolean wait By default this is true which will execute the runloop waiting for events, if you pass false, you can use this method to run a single iteration of the events. Remarks Use the wait parameter to control whether this is a blocking or non-blocking call. Shutdown(Boolean) Shutdown an application initialized with Init() Declaration public static void Shutdown(bool closeDriver = true) Parameters Type Name Description System.Boolean closeDriver true Closes the application. false Closes toplevels only. UngrabMouse() Releases the mouse grab, so mouse events will be routed to the view on which the mouse is. Declaration public static void UngrabMouse() Events Iteration This event is raised on each iteration of the MainLoop Declaration public static event EventHandler Iteration Event Type Type Description System.EventHandler Remarks See also System.Threading.Timeout Loaded This event is fired once when the application is first loaded. The dimensions of the terminal are provided. Declaration public static event EventHandler Loaded Event Type Type Description System.EventHandler < Application.ResizedEventArgs > Resized Invoked when the terminal was resized. The new size of the terminal is provided. Declaration public static event EventHandler Resized Event Type Type Description System.EventHandler < Application.ResizedEventArgs >" }, "api/Terminal.Gui/Terminal.Gui.Application.ResizedEventArgs.html": { "href": "api/Terminal.Gui/Terminal.Gui.Application.ResizedEventArgs.html", @@ -22,12 +22,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.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" + "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.MouseClick 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.DrawContent View.OnDrawContent(Rect) 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.LayoutComplete View.LayoutSubviews() View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) View.OnMouseEvent(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 using Computed layout. 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 true , a special decoration is used, and the user pressing the enter key in a Dialog will implicitly activate this button. Remarks The width of the Button is computed based on the text length. The height will always be 1. Button(Int32, Int32, ustring) Initializes a new instance of Button using Absolute layout, 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 width of the Button is computed based on the text length. The height will always be 1. Button(Int32, Int32, ustring, Boolean) Initializes a new instance of Button using Absolute layout, based on the given text. 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 true , a special decoration is used, and the user pressing the enter key in a Dialog will implicitly activate this button. Remarks The width of the Button is computed based on the text length. The height will always be 1. 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) Method invoked when a mouse event is generated Declaration public override bool MouseEvent(MouseEvent me) Parameters Type Name Description MouseEvent me Returns Type Description System.Boolean true , if the event was handled, false otherwise. Overrides Responder.MouseEvent(MouseEvent) PositionCursor() Positions the cursor in the right position based on the currently focused view in the chain. Declaration public override void PositionCursor() Overrides View.PositionCursor() ProcessColdKey(KeyEvent) This method can be overwritten by views that want to provide accelerator functionality (Alt-key for example), but without interefering with normal ProcessKey behavior. Declaration public override bool ProcessColdKey(KeyEvent kb) Parameters Type Name Description KeyEvent kb Returns Type Description System.Boolean Overrides View.ProcessColdKey(KeyEvent) Remarks After keys are sent to the subviews on the current view, all the view are processed and the key is passed to the views to allow some of them to process the keystroke as a cold-key. This functionality is used, for example, by default buttons to act on the enter key. Processing this as a hot-key would prevent non-default buttons from consuming the enter keypress when they have the focus. ProcessHotKey(KeyEvent) This method can be overwritten by view that want to provide accelerator functionality (Alt-key for example). Declaration public override bool ProcessHotKey(KeyEvent kb) Parameters Type Name Description KeyEvent kb Returns Type Description System.Boolean Overrides View.ProcessHotKey(KeyEvent) Remarks Before keys are sent to the subview on the current view, all the views are processed and the key is passed to the widgets to allow some of them to process the keystroke as a hot-key. For example, if you implement a button that has a hotkey ok \"o\", you would catch the combination Alt-o here. If the event is caught, you must return true to stop the keystroke from being dispatched to other views. ProcessKey(KeyEvent) If the view is focused, gives the view a chance to process the keystroke. Declaration public override bool ProcessKey(KeyEvent kb) Parameters Type Name Description KeyEvent kb Returns Type Description System.Boolean Overrides View.ProcessKey(KeyEvent) Remarks Views can override this method if they are interested in processing the given keystroke. If they consume the keystroke, they must return true to stop the keystroke from being processed by other widgets or consumed by the widget engine. If they return false, the keystroke will be passed using the ProcessColdKey method to other views to process. The View implementation does nothing but return false, so it is not necessary to call base.ProcessKey if you derive directly from View, but you should if you derive other View subclasses. Redraw(Rect) Redraws this view and its subviews; only redraws the views that have been flagged for a re-display. Declaration public override void Redraw(Rect bounds) Parameters Type Name Description Rect bounds The bounds (view-relative region) to redraw. Overrides View.Redraw(Rect) Remarks Always use Bounds (view-relative) when calling Redraw(Rect) , NOT Frame (superview-relative). 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. Overrides of Redraw(Rect) must ensure they do not set Driver.Clip to a clip region larger than the region parameter. 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.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" + "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.MouseClick 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.DrawContent View.OnDrawContent(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.LayoutComplete View.LayoutSubviews() View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) View.OnMouseEvent(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) Method invoked when a mouse event is generated Declaration public override bool MouseEvent(MouseEvent me) Parameters Type Name Description MouseEvent me Returns Type Description System.Boolean true , if the event was handled, false otherwise. Overrides Responder.MouseEvent(MouseEvent) OnToggled(Boolean) Called when the Checked property changes. Invokes the Toggled event. Declaration public virtual void OnToggled(bool previousChecked) Parameters Type Name Description System.Boolean previousChecked PositionCursor() Positions the cursor in the right position based on the currently focused view in the chain. Declaration public override void PositionCursor() Overrides View.PositionCursor() ProcessKey(KeyEvent) If the view is focused, gives the view a chance to process the keystroke. Declaration public override bool ProcessKey(KeyEvent kb) Parameters Type Name Description KeyEvent kb Returns Type Description System.Boolean Overrides View.ProcessKey(KeyEvent) Remarks Views can override this method if they are interested in processing the given keystroke. If they consume the keystroke, they must return true to stop the keystroke from being processed by other widgets or consumed by the widget engine. If they return false, the keystroke will be passed using the ProcessColdKey method to other views to process. The View implementation does nothing but return false, so it is not necessary to call base.ProcessKey if you derive directly from View, but you should if you derive other View subclasses. Redraw(Rect) Redraws this view and its subviews; only redraws the views that have been flagged for a re-display. Declaration public override void Redraw(Rect bounds) Parameters Type Name Description Rect bounds The bounds (view-relative region) to redraw. Overrides View.Redraw(Rect) Remarks Always use Bounds (view-relative) when calling Redraw(Rect) , NOT Frame (superview-relative). 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. Overrides of Redraw(Rect) must ensure they do not set Driver.Clip to a clip region larger than the region parameter. Events Toggled Toggled event, raised when the CheckBox is toggled. Declaration public event EventHandler Toggled Event Type Type Description System.EventHandler < System.Boolean > Remarks Client code can hook up to this event, it is raised when the CheckBox is activated either with the mouse or the keyboard. The passed bool contains the previous state. Implements System.Collections.IEnumerable" }, "api/Terminal.Gui/Terminal.Gui.Clipboard.html": { "href": "api/Terminal.Gui/Terminal.Gui.Clipboard.html", @@ -37,7 +37,7 @@ "api/Terminal.Gui/Terminal.Gui.Color.html": { "href": "api/Terminal.Gui/Terminal.Gui.Color.html", "title": "Enum Color", - "keywords": "Enum Color Basic colors that can be used to set the foreground and background colors in console applications. These can only be Namespace : Terminal.Gui Assembly : Terminal.Gui.dll Syntax public enum Color Fields Name Description Black The black color. Blue The blue color. BrighCyan The brigh cyan color. BrightBlue The bright bBlue color. BrightGreen The bright green color. BrightMagenta The bright magenta color. BrightRed The bright red color. BrightYellow The bright yellow color. Brown The brown color. Cyan The cyan color. DarkGray The dark gray color. Gray The gray color. Green The green color. Magenta The magenta color. Red The red color. White The White color." + "keywords": "Enum Color Basic colors that can be used to set the foreground and background colors in console applications. Namespace : Terminal.Gui Assembly : Terminal.Gui.dll Syntax public enum Color Fields Name Description Black The black color. Blue The blue color. BrighCyan The brigh cyan color. BrightBlue The bright bBlue color. BrightGreen The bright green color. BrightMagenta The bright magenta color. BrightRed The bright red color. BrightYellow The bright yellow color. Brown The brown color. Cyan The cyan color. DarkGray The dark gray color. Gray The gray color. Green The green color. Magenta The magenta color. Red The red color. White The White color." }, "api/Terminal.Gui/Terminal.Gui.Colors.html": { "href": "api/Terminal.Gui/Terminal.Gui.Colors.html", @@ -52,22 +52,22 @@ "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.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" + "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.MouseClick 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.DrawContent View.OnDrawContent(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.LayoutComplete View.LayoutSubviews() View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) View.OnMouseEvent(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 completion source Properties Text The currently selected list item Declaration public ustring Text { get; set; } Property Value Type Description NStack.ustring Methods OnEnter() Method invoked when a view gets focus. Declaration public override bool OnEnter() Returns Type Description System.Boolean true , if the event was handled, false otherwise. Overrides View.OnEnter() ProcessKey(KeyEvent) If the view is focused, gives the view a chance to process the keystroke. Declaration public override bool ProcessKey(KeyEvent e) Parameters Type Name Description KeyEvent e Returns Type Description System.Boolean Overrides View.ProcessKey(KeyEvent) Remarks Views can override this method if they are interested in processing the given keystroke. If they consume the keystroke, they must return true to stop the keystroke from being processed by other widgets or consumed by the widget engine. If they return false, the keystroke will be passed using the ProcessColdKey method to other views to process. The View implementation does nothing but return false, so it is not necessary to call base.ProcessKey if you derive directly from View, but you should if you derive other View subclasses. 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", "title": "Class ConsoleDriver", - "keywords": "Class ConsoleDriver ConsoleDriver is an abstract class that defines the requirements for a console driver. There are currently three implementations: Terminal.Gui.CursesDriver (for Unix and Mac), Terminal.Gui.WindowsDriver , and Terminal.Gui.NetDriver that uses the .NET Console API. Inheritance System.Object ConsoleDriver 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 : Terminal.Gui Assembly : Terminal.Gui.dll Syntax public abstract class ConsoleDriver Fields BottomTee The bottom tee. Declaration public Rune BottomTee Field Value Type Description System.Rune Diamond Diamond character Declaration public Rune Diamond Field Value Type Description System.Rune HLine Horizontal line character. Declaration public Rune HLine Field Value Type Description System.Rune LeftTee Left tee Declaration public Rune LeftTee Field Value Type Description System.Rune LLCorner Lower left corner Declaration public Rune LLCorner Field Value Type Description System.Rune LRCorner Lower right corner Declaration public Rune LRCorner Field Value Type Description System.Rune RightTee Right tee Declaration public Rune RightTee Field Value Type Description System.Rune Stipple Stipple pattern Declaration public Rune Stipple Field Value Type Description System.Rune TerminalResized The handler fired when the terminal is resized. Declaration protected Action TerminalResized Field Value Type Description System.Action TopTee Top tee Declaration public Rune TopTee Field Value Type Description System.Rune ULCorner Upper left corner Declaration public Rune ULCorner Field Value Type Description System.Rune URCorner Upper right corner Declaration public Rune URCorner Field Value Type Description System.Rune VLine Vertical line character. Declaration public Rune VLine Field Value Type Description System.Rune Properties Clip Controls the current clipping region that AddRune/AddStr is subject to. Declaration public Rect Clip { get; set; } Property Value Type Description Rect The clip. Cols The current number of columns in the terminal. Declaration public abstract int Cols { get; } Property Value Type Description System.Int32 Rows The current number of rows in the terminal. Declaration public abstract int Rows { get; } Property Value Type Description System.Int32 Methods AddRune(Rune) Adds the specified rune to the display at the current cursor position Declaration public abstract void AddRune(Rune rune) Parameters Type Name Description System.Rune rune Rune to add. AddStr(ustring) Adds the specified Declaration public abstract void AddStr(ustring str) Parameters Type Name Description NStack.ustring str String. CookMouse() Enables the cooked event processing from the mouse driver Declaration public abstract void CookMouse() DrawFrame(Rect, Int32, Boolean) Draws a frame on the specified region with the specified padding around the frame. Declaration public virtual void DrawFrame(Rect region, int padding, bool fill) Parameters Type Name Description Rect region Region where the frame will be drawn.. System.Int32 padding Padding to add on the sides. System.Boolean fill If set to true it will clear the contents with the current color, otherwise the contents will be left untouched. Remarks This is a legacy/depcrecated API. Use DrawWindowFrame(Rect, Int32, Int32, Int32, Int32, Boolean, Boolean) . DrawWindowFrame(Rect, Int32, Int32, Int32, Int32, Boolean, Boolean) Draws a frame for a window with padding aand n optional visible border inside the padding. Declaration public virtual void DrawWindowFrame(Rect region, int paddingLeft = 0, int paddingTop = 0, int paddingRight = 0, int paddingBottom = 0, bool border = true, bool fill = false) Parameters Type Name Description Rect region Screen relative region where the frame will be drawn. System.Int32 paddingLeft Number of columns to pad on the left (if 0 the border will not appear on the left). System.Int32 paddingTop Number of rows to pad on the top (if 0 the border and title will not appear on the top). System.Int32 paddingRight Number of columns to pad on the right (if 0 the border will not appear on the right). System.Int32 paddingBottom Number of rows to pad on the bottom (if 0 the border will not appear on the bottom). System.Boolean border If set to true and any padding dimension is > 0 the border will be drawn. System.Boolean fill If set to true it will clear the content area (the area inside the padding) with the current color, otherwise the content area will be left untouched. DrawWindowTitle(Rect, ustring, Int32, Int32, Int32, Int32, TextAlignment) Draws the title for a Window-style view incorporating padding. Declaration public virtual void DrawWindowTitle(Rect region, ustring title, int paddingLeft, int paddingTop, int paddingRight, int paddingBottom, TextAlignment textAlignment = TextAlignment.Left) Parameters Type Name Description Rect region Screen relative region where the frame will be drawn. NStack.ustring title The title for the window. The title will only be drawn if title is not null or empty and paddingTop is greater than 0. System.Int32 paddingLeft Number of columns to pad on the left (if 0 the border will not appear on the left). System.Int32 paddingTop Number of rows to pad on the top (if 0 the border and title will not appear on the top). System.Int32 paddingRight Number of columns to pad on the right (if 0 the border will not appear on the right). System.Int32 paddingBottom Number of rows to pad on the bottom (if 0 the border will not appear on the bottom). TextAlignment textAlignment Not yet immplemented. End() Ends the execution of the console driver. Declaration public abstract void End() Init(Action) Initializes the driver Declaration public abstract void Init(Action terminalResized) Parameters Type Name Description System.Action terminalResized Method to invoke when the terminal is resized. MakeAttribute(Color, Color) Make the attribute for the foreground and background colors. Declaration public abstract Attribute MakeAttribute(Color fore, Color back) Parameters Type Name Description Color fore Foreground. Color back Background. Returns Type Description Attribute Move(Int32, Int32) Moves the cursor to the specified column and row. Declaration public abstract void Move(int col, int row) Parameters Type Name Description System.Int32 col Column to move the cursor to. System.Int32 row Row to move the cursor to. PrepareToRun(MainLoop, Action, Action, Action, Action) Prepare the driver and set the key and mouse events handlers. Declaration public abstract void PrepareToRun(MainLoop mainLoop, Action keyHandler, Action keyDownHandler, Action keyUpHandler, Action mouseHandler) Parameters Type Name Description MainLoop mainLoop The main loop. System.Action < KeyEvent > keyHandler The handler for ProcessKey System.Action < KeyEvent > keyDownHandler The handler for key down events System.Action < KeyEvent > keyUpHandler The handler for key up events System.Action < MouseEvent > mouseHandler The handler for mouse events Refresh() Updates the screen to reflect all the changes that have been done to the display buffer Declaration public abstract void Refresh() SetAttribute(Attribute) Selects the specified attribute as the attribute to use for future calls to AddRune, AddString. Declaration public abstract void SetAttribute(Attribute c) Parameters Type Name Description Attribute c C. SetColors(ConsoleColor, ConsoleColor) Set Colors from limit sets of colors. Declaration public abstract void SetColors(ConsoleColor foreground, ConsoleColor background) Parameters Type Name Description System.ConsoleColor foreground Foreground. System.ConsoleColor background Background. SetColors(Int16, Int16) Advanced uses - set colors to any pre-set pairs, you would need to init_color that independently with the R, G, B values. Declaration public abstract void SetColors(short foregroundColorId, short backgroundColorId) Parameters Type Name Description System.Int16 foregroundColorId Foreground color identifier. System.Int16 backgroundColorId Background color identifier. SetTerminalResized(Action) Set the handler when the terminal is resized. Declaration public void SetTerminalResized(Action terminalResized) Parameters Type Name Description System.Action terminalResized StartReportingMouseMoves() Start of mouse moves. Declaration public abstract void StartReportingMouseMoves() StopReportingMouseMoves() Stop reporting mouses moves. Declaration public abstract void StopReportingMouseMoves() Suspend() Suspend the application, typically needs to save the state, suspend the app and upon return, reset the console driver. Declaration public abstract void Suspend() UncookMouse() Disables the cooked event processing from the mouse driver. At startup, it is assumed mouse events are cooked. Declaration public abstract void UncookMouse() UpdateCursor() Updates the location of the cursor position Declaration public abstract void UpdateCursor() UpdateScreen() Redraws the physical screen with the contents that have been queued up via any of the printing commands. Declaration public abstract void UpdateScreen()" + "keywords": "Class ConsoleDriver ConsoleDriver is an abstract class that defines the requirements for a console driver. There are currently three implementations: Terminal.Gui.CursesDriver (for Unix and Mac), Terminal.Gui.WindowsDriver , and Terminal.Gui.NetDriver that uses the .NET Console API. Inheritance System.Object ConsoleDriver 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 : Terminal.Gui Assembly : Terminal.Gui.dll Syntax public abstract class ConsoleDriver Fields BottomTee The bottom tee. Declaration public Rune BottomTee Field Value Type Description System.Rune Diamond Diamond character Declaration public Rune Diamond Field Value Type Description System.Rune HLine Horizontal line character. Declaration public Rune HLine Field Value Type Description System.Rune LeftTee Left tee Declaration public Rune LeftTee Field Value Type Description System.Rune LLCorner Lower left corner Declaration public Rune LLCorner Field Value Type Description System.Rune LRCorner Lower right corner Declaration public Rune LRCorner Field Value Type Description System.Rune RightTee Right tee Declaration public Rune RightTee Field Value Type Description System.Rune Stipple Stipple pattern Declaration public Rune Stipple Field Value Type Description System.Rune TerminalResized The handler fired when the terminal is resized. Declaration protected Action TerminalResized Field Value Type Description System.Action TopTee Top tee Declaration public Rune TopTee Field Value Type Description System.Rune ULCorner Upper left corner Declaration public Rune ULCorner Field Value Type Description System.Rune URCorner Upper right corner Declaration public Rune URCorner Field Value Type Description System.Rune VLine Vertical line character. Declaration public Rune VLine Field Value Type Description System.Rune Properties Clip Controls the current clipping region that AddRune/AddStr is subject to. Declaration public Rect Clip { get; set; } Property Value Type Description Rect The clip. Cols The current number of columns in the terminal. Declaration public abstract int Cols { get; } Property Value Type Description System.Int32 Rows The current number of rows in the terminal. Declaration public abstract int Rows { get; } Property Value Type Description System.Int32 Methods AddRune(Rune) Adds the specified rune to the display at the current cursor position Declaration public abstract void AddRune(Rune rune) Parameters Type Name Description System.Rune rune Rune to add. AddStr(ustring) Adds the specified Declaration public abstract void AddStr(ustring str) Parameters Type Name Description NStack.ustring str String. CookMouse() Enables the cooked event processing from the mouse driver Declaration public abstract void CookMouse() DrawFrame(Rect, Int32, Boolean) Draws a frame on the specified region with the specified padding around the frame. Declaration public virtual void DrawFrame(Rect region, int padding, bool fill) Parameters Type Name Description Rect region Screen relative region where the frame will be drawn. System.Int32 padding Padding to add on the sides. System.Boolean fill If set to true it will clear the contents with the current color, otherwise the contents will be left untouched. Remarks This API has been superceded by DrawWindowFrame(Rect, Int32, Int32, Int32, Int32, Boolean, Boolean) . DrawWindowFrame(Rect, Int32, Int32, Int32, Int32, Boolean, Boolean) Draws a frame for a window with padding and an optional visible border inside the padding. Declaration public virtual void DrawWindowFrame(Rect region, int paddingLeft = 0, int paddingTop = 0, int paddingRight = 0, int paddingBottom = 0, bool border = true, bool fill = false) Parameters Type Name Description Rect region Screen relative region where the frame will be drawn. System.Int32 paddingLeft Number of columns to pad on the left (if 0 the border will not appear on the left). System.Int32 paddingTop Number of rows to pad on the top (if 0 the border and title will not appear on the top). System.Int32 paddingRight Number of columns to pad on the right (if 0 the border will not appear on the right). System.Int32 paddingBottom Number of rows to pad on the bottom (if 0 the border will not appear on the bottom). System.Boolean border If set to true and any padding dimension is > 0 the border will be drawn. System.Boolean fill If set to true it will clear the content area (the area inside the padding) with the current color, otherwise the content area will be left untouched. DrawWindowTitle(Rect, ustring, Int32, Int32, Int32, Int32, TextAlignment) Draws the title for a Window-style view incorporating padding. Declaration public virtual void DrawWindowTitle(Rect region, ustring title, int paddingLeft, int paddingTop, int paddingRight, int paddingBottom, TextAlignment textAlignment = TextAlignment.Left) Parameters Type Name Description Rect region Screen relative region where the frame will be drawn. NStack.ustring title The title for the window. The title will only be drawn if title is not null or empty and paddingTop is greater than 0. System.Int32 paddingLeft Number of columns to pad on the left (if 0 the border will not appear on the left). System.Int32 paddingTop Number of rows to pad on the top (if 0 the border and title will not appear on the top). System.Int32 paddingRight Number of columns to pad on the right (if 0 the border will not appear on the right). System.Int32 paddingBottom Number of rows to pad on the bottom (if 0 the border will not appear on the bottom). TextAlignment textAlignment Not yet immplemented. End() Ends the execution of the console driver. Declaration public abstract void End() Init(Action) Initializes the driver Declaration public abstract void Init(Action terminalResized) Parameters Type Name Description System.Action terminalResized Method to invoke when the terminal is resized. MakeAttribute(Color, Color) Make the attribute for the foreground and background colors. Declaration public abstract Attribute MakeAttribute(Color fore, Color back) Parameters Type Name Description Color fore Foreground. Color back Background. Returns Type Description Attribute Move(Int32, Int32) Moves the cursor to the specified column and row. Declaration public abstract void Move(int col, int row) Parameters Type Name Description System.Int32 col Column to move the cursor to. System.Int32 row Row to move the cursor to. PrepareToRun(MainLoop, Action, Action, Action, Action) Prepare the driver and set the key and mouse events handlers. Declaration public abstract void PrepareToRun(MainLoop mainLoop, Action keyHandler, Action keyDownHandler, Action keyUpHandler, Action mouseHandler) Parameters Type Name Description MainLoop mainLoop The main loop. System.Action < KeyEvent > keyHandler The handler for ProcessKey System.Action < KeyEvent > keyDownHandler The handler for key down events System.Action < KeyEvent > keyUpHandler The handler for key up events System.Action < MouseEvent > mouseHandler The handler for mouse events Refresh() Updates the screen to reflect all the changes that have been done to the display buffer Declaration public abstract void Refresh() SetAttribute(Attribute) Selects the specified attribute as the attribute to use for future calls to AddRune, AddString. Declaration public abstract void SetAttribute(Attribute c) Parameters Type Name Description Attribute c C. SetColors(ConsoleColor, ConsoleColor) Set Colors from limit sets of colors. Declaration public abstract void SetColors(ConsoleColor foreground, ConsoleColor background) Parameters Type Name Description System.ConsoleColor foreground Foreground. System.ConsoleColor background Background. SetColors(Int16, Int16) Advanced uses - set colors to any pre-set pairs, you would need to init_color that independently with the R, G, B values. Declaration public abstract void SetColors(short foregroundColorId, short backgroundColorId) Parameters Type Name Description System.Int16 foregroundColorId Foreground color identifier. System.Int16 backgroundColorId Background color identifier. SetTerminalResized(Action) Set the handler when the terminal is resized. Declaration public void SetTerminalResized(Action terminalResized) Parameters Type Name Description System.Action terminalResized StartReportingMouseMoves() Start of mouse moves. Declaration public abstract void StartReportingMouseMoves() StopReportingMouseMoves() Stop reporting mouses moves. Declaration public abstract void StopReportingMouseMoves() Suspend() Suspend the application, typically needs to save the state, suspend the app and upon return, reset the console driver. Declaration public abstract void Suspend() UncookMouse() Disables the cooked event processing from the mouse driver. At startup, it is assumed mouse events are cooked. Declaration public abstract void UncookMouse() UpdateCursor() Updates the location of the cursor position Declaration public abstract void UpdateCursor() UpdateScreen() Redraws the physical screen with the contents that have been queued up via any of the printing commands. Declaration public abstract void UpdateScreen()" }, "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.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" + "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.MouseClick 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.DrawContent View.OnDrawContent(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.LayoutComplete View.LayoutSubviews() View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) View.OnMouseEvent(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) Method invoked when a mouse event is generated Declaration public override bool MouseEvent(MouseEvent ev) Parameters Type Name Description MouseEvent ev Returns Type Description System.Boolean true , if the event was handled, false otherwise. Overrides TextField.MouseEvent(MouseEvent) 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 TextField.ProcessKey(KeyEvent) Remarks The TextField control responds to the following keys: Keys Function Delete , Backspace Deletes the character before cursor. 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.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" + "keywords": "Class Dialog The Dialog View is a Window that by default is centered and contains one or more Button s. 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.MouseClick 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.DrawContent View.OnDrawContent(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.LayoutComplete View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) View.OnMouseEvent(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 using Absolute positioning and 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. Remarks if width and height are both 0, the Dialog will be vertically and horizontally centered in the container and the size will be 85% of the container. After initialzation use X , Y , Width , and Height to override this with a location or size. Dialog(ustring, Button[]) Initializes a new instance of the Dialog class using Computed positioning and with an optional set of Button s to display Declaration public Dialog(ustring title, params Button[] buttons) Parameters Type Name Description NStack.ustring title Title for the dialog. Button [] buttons Optional buttons to lay out at the bottom of the dialog. Remarks if width and height are both 0, the Dialog will be vertically and horizontally centered in the container and the size will be 85% of the container. After initialzation use X , Y , Width , and Height to override this with a location or size. 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() 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 override void LayoutSubviews() Overrides View.LayoutSubviews() Remarks Calls Terminal.Gui.View.OnLayoutComplete(Terminal.Gui.View.LayoutEventArgs) (which raises the LayoutComplete event) before it returns. ProcessKey(KeyEvent) If the view is focused, gives the view a chance to process the keystroke. Declaration public override bool ProcessKey(KeyEvent kb) Parameters Type Name Description KeyEvent kb Returns Type Description System.Boolean Overrides Toplevel.ProcessKey(KeyEvent) Remarks Views can override this method if they are interested in processing the given keystroke. If they consume the keystroke, they must return true to stop the keystroke from being processed by other widgets or consumed by the widget engine. If they return false, the keystroke will be passed using the ProcessColdKey method to other views to process. The View implementation does nothing but return false, so it is not necessary to call base.ProcessKey if you derive directly from View, but you should if you derive other View subclasses. Implements System.Collections.IEnumerable" }, "api/Terminal.Gui/Terminal.Gui.Dim.html": { "href": "api/Terminal.Gui/Terminal.Gui.Dim.html", @@ -77,22 +77,22 @@ "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.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" + "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.MouseClick 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.DrawContent View.OnDrawContent(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.LayoutComplete View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) View.OnMouseEvent(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() Invoked by Begin(Toplevel) as part of the Run(Toplevel, Boolean) after the views have been laid out, and before the views are drawn for the first time. 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.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" + "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.MouseClick 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.DrawContent View.OnDrawContent(Rect) 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.LayoutComplete View.LayoutSubviews() View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) View.OnMouseEvent(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) Redraws this view and its subviews; only redraws the views that have been flagged for a re-display. Declaration public override void Redraw(Rect bounds) Parameters Type Name Description Rect bounds The bounds (view-relative region) to redraw. Overrides View.Redraw(Rect) Remarks Always use Bounds (view-relative) when calling Redraw(Rect) , NOT Frame (superview-relative). 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. Overrides of Redraw(Rect) must ensure they do not set Driver.Clip to a clip region larger than the region parameter. 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.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" + "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.MouseClick 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.DrawContent View.OnDrawContent(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.LayoutComplete View.LayoutSubviews() View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) View.OnMouseEvent(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 Gets or sets the frame for the view. The frame is relative to the view's container ( SuperView ). Declaration public override Rect Frame { get; set; } Property Value Type Description Rect The frame. Overrides View.Frame Remarks Change the Frame when using the Absolute layout style to move or resize views. Altering the Frame of a view will trigger the redrawing of the view as well as the redrawing of the affected regions of the SuperView . 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() Positions the cursor in the right position based on the currently focused view in the chain. Declaration public override void PositionCursor() Overrides View.PositionCursor() ProcessKey(KeyEvent) If the view is focused, gives the view a chance to process the keystroke. Declaration public override bool ProcessKey(KeyEvent keyEvent) Parameters Type Name Description KeyEvent keyEvent Contains the details about the key that produced the event. Returns Type Description System.Boolean Overrides View.ProcessKey(KeyEvent) Remarks Views can override this method if they are interested in processing the given keystroke. If they consume the keystroke, they must return true to stop the keystroke from being processed by other widgets or consumed by the widget engine. If they return false, the keystroke will be passed using the ProcessColdKey method to other views to process. The View implementation does nothing but return false, so it is not necessary to call base.ProcessKey if you derive directly from View, but you should if you derive other View subclasses. Redraw(Rect) Redraws this view and its subviews; only redraws the views that have been flagged for a re-display. Declaration public override void Redraw(Rect bounds) Parameters Type Name Description Rect bounds The bounds (view-relative region) to redraw. Overrides View.Redraw(Rect) Remarks Always use Bounds (view-relative) when calling Redraw(Rect) , NOT Frame (superview-relative). 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. Overrides of Redraw(Rect) must ensure they do not set Driver.Clip to a clip region larger than the region parameter. Implements System.Collections.IEnumerable" }, "api/Terminal.Gui/Terminal.Gui.html": { "href": "api/Terminal.Gui/Terminal.Gui.html", "title": "Namespace Terminal.Gui", - "keywords": "Namespace Terminal.Gui Classes Application The application driver for Terminal.Gui. Application.ResizedEventArgs Event arguments for the Resized event. Application.RunState Captures the execution state for the provided Terminal.Gui.Application.RunState.Toplevel view. Button Button is a View that provides an item that invokes an System.Action when activated by the user. CheckBox The CheckBox View shows an on/off toggle that the user can set Clipboard Provides cut, copy, and paste support for the clipboard. NOTE: Currently not implemented. Colors The default ColorScheme s for the application. ColorScheme Color scheme definitions, they cover some common scenarios and are used typically in containers such as Window and FrameView to set the scheme that is used by all the views contained inside. ComboBox ComboBox control ConsoleDriver ConsoleDriver is an abstract class that defines the requirements for a console driver. There are currently three implementations: Terminal.Gui.CursesDriver (for Unix and Mac), Terminal.Gui.WindowsDriver , and Terminal.Gui.NetDriver that uses the .NET Console API. DateField Date editing View 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. Dim Dim properties of a View to control the position. FileDialog Base class for the OpenDialog and the SaveDialog FrameView The FrameView is a container frame that draws a frame around the contents. It is similar to a GroupBox in Windows. HexView An hex viewer and editor View over a System.IO.Stream KeyEvent Describes a keyboard event. Label The Label View displays a string at a given position and supports multiple lines separted by newline characters. ListView ListView View renders a scrollable list of data where each item can be activated to perform an action. ListViewItemEventArgs System.EventArgs for ListView events. ListWrapper Implements an IListDataSource that renders arbitrary System.Collections.IList instances for ListView . MainLoop Simple main loop implementation that can be used to monitor file descriptor, run timers and idle handlers. MenuBar The MenuBar provides a menu for Terminal.Gui applications. MenuBarItem A MenuBarItem contains MenuBarItem s or MenuItem s. MenuItem A MenuItem has a title, an associated help text, and an action to execute on activation. MessageBox MessageBox displays a modal message to the user, with a title, a message and a series of options that the user can choose from. OpenDialog The OpenDialog provides an interactive dialog box for users to select files or directories. Pos Describes the position of a View which can be an absolute value, a percentage, centered, or relative to the ending dimension. Integer values are implicitly convertible to an absolute Pos . These objects are created using the static methods Percent, AnchorEnd, and Center. The Pos objects can be combined with the addition and subtraction operators. ProgressBar A Progress Bar view that can indicate progress of an activity visually. RadioGroup RadioGroup shows a group of radio labels, only one of those can be selected at a given time Responder Responder base class implemented by objects that want to participate on keyboard and mouse input. SaveDialog The SaveDialog provides an interactive dialog box for users to pick a file to save. ScrollBarView ScrollBarViews are views that display a 1-character scrollbar, either horizontal or vertical ScrollView Scrollviews are views that present a window into a virtual space where children views are added. Similar to the iOS UIScrollView. 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. StatusItem StatusItem objects are contained by StatusBar View s. Each StatusItem has a title, a shortcut (hotkey), and an Action that will be invoked when the Shortcut is pressed. The Shortcut will be a global hotkey for the application in the current context of the screen. The colour of the Title will be changed after each ~. A Title set to `~F1~ Help` will render as *F1* using HotNormal and *Help* as HotNormal . TextField Single-line text entry View TextView Multi-line text editing View TimeField Time editing View Toplevel Toplevel views can be modally executed. 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. View.KeyEventEventArgs Specifies the event arguments for KeyEvent Window A Toplevel View that draws a frame around its region and has a \"ContentView\" subview where the contents are added. Structs Attribute Attributes are used as elements that contain both a foreground and a background or platform specific features MouseEvent Describes a mouse event Point Represents an ordered pair of integer x- and y-coordinates that defines a point in a two-dimensional plane. Rect Stores a set of four integers that represent the location and size of a rectangle Size Stores an ordered pair of integers, which specify a Height and Width. Interfaces IListDataSource Implement IListDataSource to provide custom rendering for a ListView . IMainLoopDriver Public interface to create your own platform specific main loop driver. Enums Color Basic colors that can be used to set the foreground and background colors in console applications. These can only be Key The Key enumeration contains special encoding for some keys, but can also encode all the unicode values that can be passed. LayoutStyle Determines the LayoutStyle for a view, if Absolute, during LayoutSubviews, the value from the Frame will be used, if the value is Computer, then the Frame will be updated from the X, Y Pos objects and the Width and Height Dim objects. MouseFlags Mouse flags reported in MouseEvent . TextAlignment Text alignment enumeration, controls how text is displayed." + "keywords": "Namespace Terminal.Gui Classes Application A static, singelton class provding the main application driver for Terminal.Gui apps. Application.ResizedEventArgs Event arguments for the Resized event. Application.RunState Captures the execution state for the provided Terminal.Gui.Application.RunState.Toplevel view. Button Button is a View that provides an item that invokes an System.Action when activated by the user. CheckBox The CheckBox View shows an on/off toggle that the user can set Clipboard Provides cut, copy, and paste support for the clipboard. NOTE: Currently not implemented. Colors The default ColorScheme s for the application. ColorScheme Color scheme definitions, they cover some common scenarios and are used typically in containers such as Window and FrameView to set the scheme that is used by all the views contained inside. ComboBox ComboBox control ConsoleDriver ConsoleDriver is an abstract class that defines the requirements for a console driver. There are currently three implementations: Terminal.Gui.CursesDriver (for Unix and Mac), Terminal.Gui.WindowsDriver , and Terminal.Gui.NetDriver that uses the .NET Console API. DateField Date editing View Dialog The Dialog View is a Window that by default is centered and contains one or more Button s. It defaults to the Dialog color scheme and has a 1 cell padding around the edges. Dim Dim properties of a View to control the position. FileDialog Base class for the OpenDialog and the SaveDialog FrameView The FrameView is a container frame that draws a frame around the contents. It is similar to a GroupBox in Windows. HexView An hex viewer and editor View over a System.IO.Stream KeyEvent Describes a keyboard event. KeyModifiers Identifies the state of the \"shift\"-keys within a event. Label The Label View displays a string at a given position and supports multiple lines separted by newline characters. ListView ListView View renders a scrollable list of data where each item can be activated to perform an action. ListViewItemEventArgs System.EventArgs for ListView events. ListWrapper Implements an IListDataSource that renders arbitrary System.Collections.IList instances for ListView . MainLoop Simple main loop implementation that can be used to monitor file descriptor, run timers and idle handlers. MenuBar The MenuBar provides a menu for Terminal.Gui applications. MenuBarItem A MenuBarItem contains MenuBarItem s or MenuItem s. MenuItem A MenuItem has a title, an associated help text, and an action to execute on activation. MessageBox MessageBox displays a modal message to the user, with a title, a message and a series of options that the user can choose from. OpenDialog The OpenDialog provides an interactive dialog box for users to select files or directories. Pos Describes the position of a View which can be an absolute value, a percentage, centered, or relative to the ending dimension. Integer values are implicitly convertible to an absolute Pos . These objects are created using the static methods Percent, AnchorEnd, and Center. The Pos objects can be combined with the addition and subtraction operators. ProgressBar A Progress Bar view that can indicate progress of an activity visually. RadioGroup RadioGroup shows a group of radio labels, only one of those can be selected at a given time Responder Responder base class implemented by objects that want to participate on keyboard and mouse input. SaveDialog The SaveDialog provides an interactive dialog box for users to pick a file to save. ScrollBarView ScrollBarViews are views that display a 1-character scrollbar, either horizontal or vertical ScrollView Scrollviews are views that present a window into a virtual space where subviews are added. Similar to the iOS UIScrollView. 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. StatusItem StatusItem objects are contained by StatusBar View s. Each StatusItem has a title, a shortcut (hotkey), and an Action that will be invoked when the Shortcut is pressed. The Shortcut will be a global hotkey for the application in the current context of the screen. The colour of the Title will be changed after each ~. A Title set to `~F1~ Help` will render as *F1* using HotNormal and *Help* as HotNormal . TextField Single-line text entry View TextView Multi-line text editing View TimeField Time editing View Toplevel Toplevel views can be modally executed. 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. View.FocusEventArgs Defines the event arguments for SetFocus(View) View.KeyEventEventArgs Defines the event arguments for KeyEvent View.LayoutEventArgs Event arguments for the LayoutComplete event. View.MouseEventEventArgs Specifies the event arguments for MouseEvent Window A Toplevel View that draws a border around its Frame with a Title at the top. Structs Attribute Attributes are used as elements that contain both a foreground and a background or platform specific features MouseEvent Describes a mouse event Point Represents an ordered pair of integer x- and y-coordinates that defines a point in a two-dimensional plane. Rect Stores a set of four integers that represent the location and size of a rectangle Size Stores an ordered pair of integers, which specify a Height and Width. Interfaces IListDataSource Implement IListDataSource to provide custom rendering for a ListView . IMainLoopDriver Public interface to create your own platform specific main loop driver. Enums Color Basic colors that can be used to set the foreground and background colors in console applications. Key The Key enumeration contains special encoding for some keys, but can also encode all the unicode values that can be passed. LayoutStyle Determines the LayoutStyle for a view, if Absolute, during LayoutSubviews, the value from the Frame will be used, if the value is Computed, then the Frame will be updated from the X, Y Pos objects and the Width and Height Dim objects. MouseFlags Mouse flags reported in MouseEvent . TextAlignment Text alignment enumeration, controls how text is displayed." }, "api/Terminal.Gui/Terminal.Gui.IListDataSource.html": { "href": "api/Terminal.Gui/Terminal.Gui.IListDataSource.html", @@ -112,22 +112,27 @@ "api/Terminal.Gui/Terminal.Gui.KeyEvent.html": { "href": "api/Terminal.Gui/Terminal.Gui.KeyEvent.html", "title": "Class KeyEvent", - "keywords": "Class KeyEvent Describes a keyboard event. Inheritance System.Object KeyEvent 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) Namespace : Terminal.Gui Assembly : Terminal.Gui.dll Syntax public class KeyEvent Constructors KeyEvent() Constructs a new KeyEvent Declaration public KeyEvent() KeyEvent(Key) Constructs a new KeyEvent from the provided Key value - can be a rune cast into a Key value Declaration public KeyEvent(Key k) Parameters Type Name Description Key k Fields Key Symb olid definition for the key. Declaration public Key Key Field Value Type Description Key Properties IsAlt Gets a value indicating whether the Alt key was pressed (real or synthesized) Declaration public bool IsAlt { get; } Property Value Type Description System.Boolean true if is alternate; otherwise, false . IsCtrl Determines whether the value is a control key (and NOT just the ctrl key) Declaration public bool IsCtrl { get; } Property Value Type Description System.Boolean true if is ctrl; otherwise, false . IsShift Gets a value indicating whether the Shift key was pressed. Declaration public bool IsShift { get; } Property Value Type Description System.Boolean true if is shift; otherwise, false . KeyValue The key value cast to an integer, you will typical use this for extracting the Unicode rune value out of a key, when none of the symbolic options are in use. Declaration public int KeyValue { get; } Property Value Type Description System.Int32 Methods ToString() Declaration public override string ToString() Returns Type Description System.String Overrides System.Object.ToString()" + "keywords": "Class KeyEvent Describes a keyboard event. Inheritance System.Object KeyEvent 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) Namespace : Terminal.Gui Assembly : Terminal.Gui.dll Syntax public class KeyEvent Constructors KeyEvent() Constructs a new KeyEvent Declaration public KeyEvent() KeyEvent(Key, KeyModifiers) Constructs a new KeyEvent from the provided Key value - can be a rune cast into a Key value Declaration public KeyEvent(Key k, KeyModifiers km) Parameters Type Name Description Key k KeyModifiers km Fields Key Symb olid definition for the key. Declaration public Key Key Field Value Type Description Key Properties IsAlt Gets a value indicating whether the Alt key was pressed (real or synthesized) Declaration public bool IsAlt { get; } Property Value Type Description System.Boolean true if is alternate; otherwise, false . IsCapslock Gets a value indicating whether the Caps lock key was pressed (real or synthesized) Declaration public bool IsCapslock { get; } Property Value Type Description System.Boolean true if is alternate; otherwise, false . IsCtrl Determines whether the value is a control key (and NOT just the ctrl key) Declaration public bool IsCtrl { get; } Property Value Type Description System.Boolean true if is ctrl; otherwise, false . IsNumlock Gets a value indicating whether the Num lock key was pressed (real or synthesized) Declaration public bool IsNumlock { get; } Property Value Type Description System.Boolean true if is alternate; otherwise, false . IsScrolllock Gets a value indicating whether the Scroll lock key was pressed (real or synthesized) Declaration public bool IsScrolllock { get; } Property Value Type Description System.Boolean true if is alternate; otherwise, false . IsShift Gets a value indicating whether the Shift key was pressed. Declaration public bool IsShift { get; } Property Value Type Description System.Boolean true if is shift; otherwise, false . KeyValue The key value cast to an integer, you will typical use this for extracting the Unicode rune value out of a key, when none of the symbolic options are in use. Declaration public int KeyValue { get; } Property Value Type Description System.Int32 Methods ToString() Pretty prints the KeyEvent Declaration public override string ToString() Returns Type Description System.String Overrides System.Object.ToString()" + }, + "api/Terminal.Gui/Terminal.Gui.KeyModifiers.html": { + "href": "api/Terminal.Gui/Terminal.Gui.KeyModifiers.html", + "title": "Class KeyModifiers", + "keywords": "Class KeyModifiers Identifies the state of the \"shift\"-keys within a event. Inheritance System.Object KeyModifiers 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 : Terminal.Gui Assembly : Terminal.Gui.dll Syntax public class KeyModifiers Fields Alt Check if the Alt key was pressed or not. Declaration public bool Alt Field Value Type Description System.Boolean Capslock Check if the Caps lock key was pressed or not. Declaration public bool Capslock Field Value Type Description System.Boolean Ctrl Check if the Ctrl key was pressed or not. Declaration public bool Ctrl Field Value Type Description System.Boolean Numlock Check if the Num lock key was pressed or not. Declaration public bool Numlock Field Value Type Description System.Boolean Scrolllock Check if the Scroll lock key was pressed or not. Declaration public bool Scrolllock Field Value Type Description System.Boolean Shift Check if the Shift key was pressed or not. Declaration public bool Shift Field Value Type Description System.Boolean" }, "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.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" + "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.MouseClick 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.DrawContent View.OnDrawContent(Rect) 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.LayoutComplete View.LayoutSubviews() View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) View.OnMouseEvent(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) Redraws this view and its subviews; only redraws the views that have been flagged for a re-display. Declaration public override void Redraw(Rect bounds) Parameters Type Name Description Rect bounds The bounds (view-relative region) to redraw. Overrides View.Redraw(Rect) Remarks Always use Bounds (view-relative) when calling Redraw(Rect) , NOT Frame (superview-relative). 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. Overrides of Redraw(Rect) must ensure they do not set Driver.Clip to a clip region larger than the region parameter. Implements System.Collections.IEnumerable" }, "api/Terminal.Gui/Terminal.Gui.LayoutStyle.html": { "href": "api/Terminal.Gui/Terminal.Gui.LayoutStyle.html", "title": "Enum LayoutStyle", - "keywords": "Enum LayoutStyle Determines the LayoutStyle for a view, if Absolute, during LayoutSubviews, the value from the Frame will be used, if the value is Computer, then the Frame will be updated from the X, Y Pos objects and the Width and Height Dim objects. Namespace : Terminal.Gui Assembly : Terminal.Gui.dll Syntax public enum LayoutStyle Fields Name Description Absolute The position and size of the view are based on the Frame value. Computed The position and size of the view will be computed based on the X, Y, Width and Height properties and set on the Frame." + "keywords": "Enum LayoutStyle Determines the LayoutStyle for a view, if Absolute, during LayoutSubviews, the value from the Frame will be used, if the value is Computed, then the Frame will be updated from the X, Y Pos objects and the Width and Height Dim objects. Namespace : Terminal.Gui Assembly : Terminal.Gui.dll Syntax public enum LayoutStyle Fields Name Description Absolute The position and size of the view are based on the Frame value. Computed The position and size of the view will be computed based on the X, Y, Width and Height properties and set on the Frame." }, "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.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" + "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.MouseClick 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.DrawContent View.OnDrawContent(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.LayoutComplete View.LayoutSubviews() View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) View.OnMouseEvent(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) Method invoked when a mouse event is generated Declaration public override bool MouseEvent(MouseEvent me) Parameters Type Name Description MouseEvent me Returns Type Description System.Boolean true , if the event was handled, false otherwise. Overrides Responder.MouseEvent(MouseEvent) 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() Positions the cursor in the right position based on the currently focused view in the chain. Declaration public override void PositionCursor() Overrides View.PositionCursor() ProcessKey(KeyEvent) If the view is focused, gives the view a chance to process the keystroke. Declaration public override bool ProcessKey(KeyEvent kb) Parameters Type Name Description KeyEvent kb Returns Type Description System.Boolean Overrides View.ProcessKey(KeyEvent) Remarks Views can override this method if they are interested in processing the given keystroke. If they consume the keystroke, they must return true to stop the keystroke from being processed by other widgets or consumed by the widget engine. If they return false, the keystroke will be passed using the ProcessColdKey method to other views to process. The View implementation does nothing but return false, so it is not necessary to call base.ProcessKey if you derive directly from View, but you should if you derive other View subclasses. Redraw(Rect) Redraws this view and its subviews; only redraws the views that have been flagged for a re-display. Declaration public override void Redraw(Rect bounds) Parameters Type Name Description Rect bounds The bounds (view-relative region) to redraw. Overrides View.Redraw(Rect) Remarks Always use Bounds (view-relative) when calling Redraw(Rect) , NOT Frame (superview-relative). 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. Overrides of Redraw(Rect) must ensure they do not set Driver.Clip to a clip region larger than the region parameter. 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", @@ -147,7 +152,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.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" + "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.MouseClick 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.DrawContent View.OnDrawContent(Rect) View.SetFocus(View) View.KeyPress View.ProcessColdKey(KeyEvent) View.KeyDown View.KeyUp View.EnsureFocus() View.FocusFirst() View.FocusLast() View.FocusPrev() View.FocusNext() View.LayoutComplete View.LayoutSubviews() View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) View.OnMouseEvent(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) Method invoked when a mouse event is generated Declaration public override bool MouseEvent(MouseEvent me) Parameters Type Name Description MouseEvent me Returns Type Description System.Boolean true , if the event was handled, false otherwise. Overrides Responder.MouseEvent(MouseEvent) 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 View.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 View.OnKeyUp(KeyEvent) OpenMenu() Opens the current Menu programatically. Declaration public void OpenMenu() PositionCursor() Positions the cursor in the right position based on the currently focused view in the chain. Declaration public override void PositionCursor() Overrides View.PositionCursor() ProcessHotKey(KeyEvent) This method can be overwritten by view that want to provide accelerator functionality (Alt-key for example). Declaration public override bool ProcessHotKey(KeyEvent kb) Parameters Type Name Description KeyEvent kb Returns Type Description System.Boolean Overrides View.ProcessHotKey(KeyEvent) Remarks Before keys are sent to the subview on the current view, all the views are processed and the key is passed to the widgets to allow some of them to process the keystroke as a hot-key. For example, if you implement a button that has a hotkey ok \"o\", you would catch the combination Alt-o here. If the event is caught, you must return true to stop the keystroke from being dispatched to other views. ProcessKey(KeyEvent) If the view is focused, gives the view a chance to process the keystroke. Declaration public override bool ProcessKey(KeyEvent kb) Parameters Type Name Description KeyEvent kb Returns Type Description System.Boolean Overrides View.ProcessKey(KeyEvent) Remarks Views can override this method if they are interested in processing the given keystroke. If they consume the keystroke, they must return true to stop the keystroke from being processed by other widgets or consumed by the widget engine. If they return false, the keystroke will be passed using the ProcessColdKey method to other views to process. The View implementation does nothing but return false, so it is not necessary to call base.ProcessKey if you derive directly from View, but you should if you derive other View subclasses. Redraw(Rect) Redraws this view and its subviews; only redraws the views that have been flagged for a re-display. Declaration public override void Redraw(Rect bounds) Parameters Type Name Description Rect bounds The bounds (view-relative region) to redraw. Overrides View.Redraw(Rect) Remarks Always use Bounds (view-relative) when calling Redraw(Rect) , NOT Frame (superview-relative). 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. Overrides of Redraw(Rect) must ensure they do not set Driver.Clip to a clip region larger than the region parameter. 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", @@ -162,7 +167,7 @@ "api/Terminal.Gui/Terminal.Gui.MessageBox.html": { "href": "api/Terminal.Gui/Terminal.Gui.MessageBox.html", "title": "Class MessageBox", - "keywords": "Class MessageBox MessageBox displays a modal message to the user, with a title, a message and a series of options that the user can choose from. Inheritance System.Object MessageBox 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 : Terminal.Gui Assembly : Terminal.Gui.dll Syntax public static class MessageBox Examples var n = MessageBox.Query (50, 7, \"Quit Demo\", \"Are you sure you want to quit this demo?\", \"Yes\", \"No\"); if (n == 0) quit = true; else quit = false; Methods ErrorQuery(Int32, Int32, String, String, String[]) Presents an error MessageBox with the specified title and message and a list of buttons to show to the user. Declaration public static int ErrorQuery(int width, int height, string title, string message, params string[] buttons) Parameters Type Name Description System.Int32 width Width for the window. System.Int32 height Height for the window. System.String title Title for the query. System.String message Message to display, might contain multiple lines. System.String [] buttons Array of buttons to add. Returns Type Description System.Int32 The index of the selected button, or -1 if the user pressed ESC to close the dialog. Query(Int32, Int32, String, String, String[]) Presents a normal MessageBox with the specified title and message and a list of buttons to show to the user. Declaration public static int Query(int width, int height, string title, string message, params string[] buttons) Parameters Type Name Description System.Int32 width Width for the window. System.Int32 height Height for the window. System.String title Title for the query. System.String message Message to display, might contain multiple lines.. System.String [] buttons Array of buttons to add. Returns Type Description System.Int32 The index of the selected button, or -1 if the user pressed ESC to close the dialog." + "keywords": "Class MessageBox MessageBox displays a modal message to the user, with a title, a message and a series of options that the user can choose from. Inheritance System.Object MessageBox 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 : Terminal.Gui Assembly : Terminal.Gui.dll Syntax public static class MessageBox Examples var n = MessageBox.Query (\"Quit Demo\", \"Are you sure you want to quit this demo?\", \"Yes\", \"No\"); if (n == 0) quit = true; else quit = false; Methods ErrorQuery(ustring, ustring, ustring[]) Presents an error MessageBox with the specified title and message and a list of buttons to show to the user. Declaration public static int ErrorQuery(ustring title, ustring message, params ustring[] buttons) Parameters Type Name Description NStack.ustring title Title for the query. NStack.ustring message Message to display, might contain multiple lines. NStack.ustring [] buttons Array of buttons to add. Returns Type Description System.Int32 The index of the selected button, or -1 if the user pressed ESC to close the dialog. Remarks The message box will be vertically and horizontally centered in the container and the size will be automatically determined from the size of the title, message. and buttons. ErrorQuery(Int32, Int32, ustring, ustring, ustring[]) Presents an error MessageBox with the specified title and message and a list of buttons to show to the user. Declaration public static int ErrorQuery(int width, int height, ustring title, ustring message, params ustring[] buttons) Parameters Type Name Description System.Int32 width Width for the window. System.Int32 height Height for the window. NStack.ustring title Title for the query. NStack.ustring message Message to display, might contain multiple lines. NStack.ustring [] buttons Array of buttons to add. Returns Type Description System.Int32 The index of the selected button, or -1 if the user pressed ESC to close the dialog. Remarks Use ErrorQuery(ustring, ustring, ustring[]) instead; it automatically sizes the MessageBox based on the contents. Query(ustring, ustring, ustring[]) Presents an error MessageBox with the specified title and message and a list of buttons to show to the user. Declaration public static int Query(ustring title, ustring message, params ustring[] buttons) Parameters Type Name Description NStack.ustring title Title for the query. NStack.ustring message Message to display, might contain multiple lines. NStack.ustring [] buttons Array of buttons to add. Returns Type Description System.Int32 The index of the selected button, or -1 if the user pressed ESC to close the dialog. Remarks The message box will be vertically and horizontally centered in the container and the size will be automatically determined from the size of the message and buttons. Query(Int32, Int32, ustring, ustring, ustring[]) Presents a normal MessageBox with the specified title and message and a list of buttons to show to the user. Declaration public static int Query(int width, int height, ustring title, ustring message, params ustring[] buttons) Parameters Type Name Description System.Int32 width Width for the window. System.Int32 height Height for the window. NStack.ustring title Title for the query. NStack.ustring message Message to display, might contain multiple lines.. NStack.ustring [] buttons Array of buttons to add. Returns Type Description System.Int32 The index of the selected button, or -1 if the user pressed ESC to close the dialog. Remarks Use Query(ustring, ustring, ustring[]) instead; it automatically sizes the MessageBox based on the contents." }, "api/Terminal.Gui/Terminal.Gui.MouseEvent.html": { "href": "api/Terminal.Gui/Terminal.Gui.MouseEvent.html", @@ -177,7 +182,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.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" + "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.MouseClick 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.DrawContent View.OnDrawContent(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.LayoutComplete View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) View.OnMouseEvent(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", @@ -187,17 +192,17 @@ "api/Terminal.Gui/Terminal.Gui.Pos.html": { "href": "api/Terminal.Gui/Terminal.Gui.Pos.html", "title": "Class Pos", - "keywords": "Class Pos Describes the position of a View which can be an absolute value, a percentage, centered, or relative to the ending dimension. Integer values are implicitly convertible to an absolute Pos . These objects are created using the static methods Percent, AnchorEnd, and Center. The Pos objects can be combined with the addition and subtraction operators. Inheritance System.Object Pos 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 : Terminal.Gui Assembly : Terminal.Gui.dll Syntax public class Pos Remarks Use the Pos objects on the X or Y properties of a view to control the position. These can be used to set the absolute position, when merely assigning an integer value (via the implicit integer to Pos conversion), and they can be combined to produce more useful layouts, like: Pos.Center - 3, which would shift the postion of the View 3 characters to the left after centering for example. It is possible to reference coordinates of another view by using the methods Left(View), Right(View), Bottom(View), Top(View). The X(View) and Y(View) are aliases to Left(View) and Top(View) respectively. Methods AnchorEnd(Int32) Creates a Pos object that is anchored to the end (right side or bottom) of the dimension, useful to flush the layout from the right or bottom. Declaration public static Pos AnchorEnd(int margin = 0) Parameters Type Name Description System.Int32 margin Optional margin to place to the right or below. Returns Type Description Pos The Pos object anchored to the end (the bottom or the right side). Examples This sample shows how align a Button to the bottom-right of a View . anchorButton.X = Pos.AnchorEnd () - (Pos.Right (anchorButton) - Pos.Left (anchorButton)); anchorButton.Y = Pos.AnchorEnd () - 1; At(Int32) Creates an Absolute Pos from the specified integer value. Declaration public static Pos At(int n) Parameters Type Name Description System.Int32 n The value to convert to the Pos . Returns Type Description Pos The Absolute Pos . Bottom(View) Returns a Pos object tracks the Bottom (Y+Height) coordinate of the specified View Declaration public static Pos Bottom(View view) Parameters Type Name Description View view The View that will be tracked. Returns Type Description Pos The Pos that depends on the other view. Center() Returns a Pos object that can be used to center the View Declaration public static Pos Center() Returns Type Description Pos The center Pos. Examples This creates a TextField that is centered horizontally, is 50% of the way down, is 30% the height, and is 80% the width of the View it added to. var textView = new TextView () { X = Pos.Center (), Y = Pos.Percent (50), Width = Dim.Percent (80), Height = Dim.Percent (30), }; Left(View) Returns a Pos object tracks the Left (X) position of the specified View . Declaration public static Pos Left(View view) Parameters Type Name Description View view The View that will be tracked. Returns Type Description Pos The Pos that depends on the other view. Percent(Single) Creates a percentage Pos object Declaration public static Pos Percent(float n) Parameters Type Name Description System.Single n A value between 0 and 100 representing the percentage. Returns Type Description Pos The percent Pos object. Examples This creates a TextField that is centered horizontally, is 50% of the way down, is 30% the height, and is 80% the width of the View it added to. var textView = new TextView () { X = Pos.Center (), Y = Pos.Percent (50), Width = Dim.Percent (80), Height = Dim.Percent (30), }; Right(View) Returns a Pos object tracks the Right (X+Width) coordinate of the specified View . Declaration public static Pos Right(View view) Parameters Type Name Description View view The View that will be tracked. Returns Type Description Pos The Pos that depends on the other view. Top(View) Returns a Pos object tracks the Top (Y) position of the specified View . Declaration public static Pos Top(View view) Parameters Type Name Description View view The View that will be tracked. Returns Type Description Pos The Pos that depends on the other view. X(View) Returns a Pos object tracks the Left (X) position of the specified View . Declaration public static Pos X(View view) Parameters Type Name Description View view The View that will be tracked. Returns Type Description Pos The Pos that depends on the other view. Y(View) Returns a Pos object tracks the Top (Y) position of the specified View . Declaration public static Pos Y(View view) Parameters Type Name Description View view The View that will be tracked. Returns Type Description Pos The Pos that depends on the other view. Operators Addition(Pos, Pos) Adds a Pos to a Pos , yielding a new Pos . Declaration public static Pos operator +(Pos left, Pos right) Parameters Type Name Description Pos left The first Pos to add. Pos right The second Pos to add. Returns Type Description Pos The Pos that is the sum of the values of left and right . Implicit(Int32 to Pos) Creates an Absolute Pos from the specified integer value. Declaration public static implicit operator Pos(int n) Parameters Type Name Description System.Int32 n The value to convert to the Pos . Returns Type Description Pos The Absolute Pos . Subtraction(Pos, Pos) Subtracts a Pos from a Pos , yielding a new Pos . Declaration public static Pos operator -(Pos left, Pos right) Parameters Type Name Description Pos left The Pos to subtract from (the minuend). Pos right The Pos to subtract (the subtrahend). Returns Type Description Pos The Pos that is the left minus right ." + "keywords": "Class Pos Describes the position of a View which can be an absolute value, a percentage, centered, or relative to the ending dimension. Integer values are implicitly convertible to an absolute Pos . These objects are created using the static methods Percent, AnchorEnd, and Center. The Pos objects can be combined with the addition and subtraction operators. Inheritance System.Object Pos 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 : Terminal.Gui Assembly : Terminal.Gui.dll Syntax public class Pos Remarks Use the Pos objects on the X or Y properties of a view to control the position. These can be used to set the absolute position, when merely assigning an integer value (via the implicit integer to Pos conversion), and they can be combined to produce more useful layouts, like: Pos.Center - 3, which would shift the postion of the View 3 characters to the left after centering for example. It is possible to reference coordinates of another view by using the methods Left(View), Right(View), Bottom(View), Top(View). The X(View) and Y(View) are aliases to Left(View) and Top(View) respectively. Methods AnchorEnd(Int32) Creates a Pos object that is anchored to the end (right side or bottom) of the dimension, useful to flush the layout from the right or bottom. Declaration public static Pos AnchorEnd(int margin = 0) Parameters Type Name Description System.Int32 margin Optional margin to place to the right or below. Returns Type Description Pos The Pos object anchored to the end (the bottom or the right side). Examples This sample shows how align a Button to the bottom-right of a View . // See Issue #502 anchorButton.X = Pos.AnchorEnd () - (Pos.Right (anchorButton) - Pos.Left (anchorButton)); anchorButton.Y = Pos.AnchorEnd (1); At(Int32) Creates an Absolute Pos from the specified integer value. Declaration public static Pos At(int n) Parameters Type Name Description System.Int32 n The value to convert to the Pos . Returns Type Description Pos The Absolute Pos . Bottom(View) Returns a Pos object tracks the Bottom (Y+Height) coordinate of the specified View Declaration public static Pos Bottom(View view) Parameters Type Name Description View view The View that will be tracked. Returns Type Description Pos The Pos that depends on the other view. Center() Returns a Pos object that can be used to center the View Declaration public static Pos Center() Returns Type Description Pos The center Pos. Examples This creates a TextField that is centered horizontally, is 50% of the way down, is 30% the height, and is 80% the width of the View it added to. var textView = new TextView () { X = Pos.Center (), Y = Pos.Percent (50), Width = Dim.Percent (80), Height = Dim.Percent (30), }; Left(View) Returns a Pos object tracks the Left (X) position of the specified View . Declaration public static Pos Left(View view) Parameters Type Name Description View view The View that will be tracked. Returns Type Description Pos The Pos that depends on the other view. Percent(Single) Creates a percentage Pos object Declaration public static Pos Percent(float n) Parameters Type Name Description System.Single n A value between 0 and 100 representing the percentage. Returns Type Description Pos The percent Pos object. Examples This creates a TextField that is centered horizontally, is 50% of the way down, is 30% the height, and is 80% the width of the View it added to. var textView = new TextView () { X = Pos.Center (), Y = Pos.Percent (50), Width = Dim.Percent (80), Height = Dim.Percent (30), }; Right(View) Returns a Pos object tracks the Right (X+Width) coordinate of the specified View . Declaration public static Pos Right(View view) Parameters Type Name Description View view The View that will be tracked. Returns Type Description Pos The Pos that depends on the other view. Top(View) Returns a Pos object tracks the Top (Y) position of the specified View . Declaration public static Pos Top(View view) Parameters Type Name Description View view The View that will be tracked. Returns Type Description Pos The Pos that depends on the other view. X(View) Returns a Pos object tracks the Left (X) position of the specified View . Declaration public static Pos X(View view) Parameters Type Name Description View view The View that will be tracked. Returns Type Description Pos The Pos that depends on the other view. Y(View) Returns a Pos object tracks the Top (Y) position of the specified View . Declaration public static Pos Y(View view) Parameters Type Name Description View view The View that will be tracked. Returns Type Description Pos The Pos that depends on the other view. Operators Addition(Pos, Pos) Adds a Pos to a Pos , yielding a new Pos . Declaration public static Pos operator +(Pos left, Pos right) Parameters Type Name Description Pos left The first Pos to add. Pos right The second Pos to add. Returns Type Description Pos The Pos that is the sum of the values of left and right . Implicit(Int32 to Pos) Creates an Absolute Pos from the specified integer value. Declaration public static implicit operator Pos(int n) Parameters Type Name Description System.Int32 n The value to convert to the Pos . Returns Type Description Pos The Absolute Pos . Subtraction(Pos, Pos) Subtracts a Pos from a Pos , yielding a new Pos . Declaration public static Pos operator -(Pos left, Pos right) Parameters Type Name Description Pos left The Pos to subtract from (the minuend). Pos right The Pos to subtract (the subtrahend). Returns Type Description Pos The Pos that is the left minus right ." }, "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.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" + "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.MouseClick 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.DrawContent View.OnDrawContent(Rect) 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.LayoutComplete View.LayoutSubviews() View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) View.OnMouseEvent(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) Redraws this view and its subviews; only redraws the views that have been flagged for a re-display. Declaration public override void Redraw(Rect region) Parameters Type Name Description Rect region Overrides View.Redraw(Rect) Remarks Always use Bounds (view-relative) when calling Redraw(Rect) , NOT Frame (superview-relative). 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. Overrides of Redraw(Rect) must ensure they do not set Driver.Clip to a clip region larger than the region parameter. 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.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" + "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.MouseClick 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.DrawContent View.OnDrawContent(Rect) 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.LayoutComplete View.LayoutSubviews() View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) View.OnMouseEvent(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 Invoked when the selected radio label has changed 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) Method invoked when a mouse event is generated Declaration public override bool MouseEvent(MouseEvent me) Parameters Type Name Description MouseEvent me Returns Type Description System.Boolean true , if the event was handled, false otherwise. Overrides Responder.MouseEvent(MouseEvent) PositionCursor() Positions the cursor in the right position based on the currently focused view in the chain. Declaration public override void PositionCursor() Overrides View.PositionCursor() ProcessColdKey(KeyEvent) This method can be overwritten by views that want to provide accelerator functionality (Alt-key for example), but without interefering with normal ProcessKey behavior. Declaration public override bool ProcessColdKey(KeyEvent kb) Parameters Type Name Description KeyEvent kb Returns Type Description System.Boolean Overrides View.ProcessColdKey(KeyEvent) Remarks After keys are sent to the subviews on the current view, all the view are processed and the key is passed to the views to allow some of them to process the keystroke as a cold-key. This functionality is used, for example, by default buttons to act on the enter key. Processing this as a hot-key would prevent non-default buttons from consuming the enter keypress when they have the focus. ProcessKey(KeyEvent) If the view is focused, gives the view a chance to process the keystroke. Declaration public override bool ProcessKey(KeyEvent kb) Parameters Type Name Description KeyEvent kb Returns Type Description System.Boolean Overrides View.ProcessKey(KeyEvent) Remarks Views can override this method if they are interested in processing the given keystroke. If they consume the keystroke, they must return true to stop the keystroke from being processed by other widgets or consumed by the widget engine. If they return false, the keystroke will be passed using the ProcessColdKey method to other views to process. The View implementation does nothing but return false, so it is not necessary to call base.ProcessKey if you derive directly from View, but you should if you derive other View subclasses. Redraw(Rect) Redraws this view and its subviews; only redraws the views that have been flagged for a re-display. Declaration public override void Redraw(Rect bounds) Parameters Type Name Description Rect bounds The bounds (view-relative region) to redraw. Overrides View.Redraw(Rect) Remarks Always use Bounds (view-relative) when calling Redraw(Rect) , NOT Frame (superview-relative). 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. Overrides of Redraw(Rect) must ensure they do not set Driver.Clip to a clip region larger than the region parameter. Implements System.Collections.IEnumerable" }, "api/Terminal.Gui/Terminal.Gui.Rect.html": { "href": "api/Terminal.Gui/Terminal.Gui.Rect.html", @@ -212,17 +217,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.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" + "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.MouseClick 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.DrawContent View.OnDrawContent(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.LayoutComplete View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) View.OnMouseEvent(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.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" + "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.MouseClick 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.DrawContent View.OnDrawContent(Rect) 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.LayoutComplete View.LayoutSubviews() View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) View.OnMouseEvent(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() Initializes a new instance of the ScrollBarView class using Computed layout. Declaration public ScrollBarView() ScrollBarView(Int32, Int32, Boolean) Initializes a new instance of the ScrollBarView class using Computed layout. Declaration public ScrollBarView(int size, int position, bool isVertical) Parameters Type Name Description 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. ScrollBarView(Rect) Initializes a new instance of the ScrollBarView class using Absolute layout. Declaration public ScrollBarView(Rect rect) Parameters Type Name Description Rect rect Frame for the scrollbar. ScrollBarView(Rect, Int32, Int32, Boolean) Initializes a new instance of the ScrollBarView class using Absolute layout. 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. Sets the Size property. System.Int32 position The position within this scrollbar. Sets the Position property. System.Boolean isVertical If set to true this is a vertical scrollbar, otherwise, the scrollbar is horizontal. Sets the IsVertical property. Properties IsVertical If set to true this is a vertical scrollbar, otherwise, the scrollbar is horizontal. Declaration public bool IsVertical { get; set; } Property Value Type Description System.Boolean Position The position, relative to Size , to set the scrollbar at. Declaration public int Position { get; set; } Property Value Type Description System.Int32 The position. Size The size of content the scrollbar represents. Declaration public int Size { get; set; } Property Value Type Description System.Int32 The size. Remarks The Size is typically the size of the virtual content. E.g. when a Scrollbar is part of a ScrollView the Size is set to the appropriate dimension of ContentSize . Methods MouseEvent(MouseEvent) Method invoked when a mouse event is generated Declaration public override bool MouseEvent(MouseEvent me) Parameters Type Name Description MouseEvent me Returns Type Description System.Boolean true , if the event was handled, false otherwise. Overrides Responder.MouseEvent(MouseEvent) Redraw(Rect) Redraws this view and its subviews; only redraws the views that have been flagged for a re-display. Declaration public override void Redraw(Rect region) Parameters Type Name Description Rect region Overrides View.Redraw(Rect) Remarks Always use Bounds (view-relative) when calling Redraw(Rect) , NOT Frame (superview-relative). 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. Overrides of Redraw(Rect) must ensure they do not set Driver.Clip to a clip region larger than the region parameter. 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.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" + "keywords": "Class ScrollView Scrollviews are views that present a window into a virtual space where subviews 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.MouseClick 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.DrawContent View.OnDrawContent(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.LayoutComplete View.LayoutSubviews() View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) View.OnMouseEvent(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 . Use the Constructors ScrollView() Initializes a new instance of the ScrollView class using Computed positioning. Declaration public ScrollView() ScrollView(Rect) Initializes a new instance of the ScrollView class using Absolute positioning. 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) Method invoked when a mouse event is generated Declaration public override bool MouseEvent(MouseEvent me) Parameters Type Name Description MouseEvent me Returns Type Description System.Boolean true , if the event was handled, false otherwise. Overrides Responder.MouseEvent(MouseEvent) PositionCursor() Positions the cursor in the right position based on the currently focused view in the chain. Declaration public override void PositionCursor() Overrides View.PositionCursor() ProcessKey(KeyEvent) If the view is focused, gives the view a chance to process the keystroke. Declaration public override bool ProcessKey(KeyEvent kb) Parameters Type Name Description KeyEvent kb Returns Type Description System.Boolean Overrides View.ProcessKey(KeyEvent) Remarks Views can override this method if they are interested in processing the given keystroke. If they consume the keystroke, they must return true to stop the keystroke from being processed by other widgets or consumed by the widget engine. If they return false, the keystroke will be passed using the ProcessColdKey method to other views to process. The View implementation does nothing but return false, so it is not necessary to call base.ProcessKey if you derive directly from View, but you should if you derive other View subclasses. Redraw(Rect) Redraws this view and its subviews; only redraws the views that have been flagged for a re-display. Declaration public override void Redraw(Rect region) Parameters Type Name Description Rect region Overrides View.Redraw(Rect) Remarks Always use Bounds (view-relative) when calling Redraw(Rect) , NOT Frame (superview-relative). 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. Overrides of Redraw(Rect) must ensure they do not set Driver.Clip to a clip region larger than the region parameter. 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", @@ -232,12 +237,12 @@ "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.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" + "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.MouseClick 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.DrawContent View.OnDrawContent(Rect) 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.LayoutComplete View.LayoutSubviews() View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) View.OnMouseEvent(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 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 MouseEvent(MouseEvent) Method invoked when a mouse event is generated Declaration public override bool MouseEvent(MouseEvent me) Parameters Type Name Description MouseEvent me Returns Type Description System.Boolean true , if the event was handled, false otherwise. Overrides Responder.MouseEvent(MouseEvent) ProcessHotKey(KeyEvent) This method can be overwritten by view that want to provide accelerator functionality (Alt-key for example). Declaration public override bool ProcessHotKey(KeyEvent kb) Parameters Type Name Description KeyEvent kb Returns Type Description System.Boolean Overrides View.ProcessHotKey(KeyEvent) Remarks Before keys are sent to the subview on the current view, all the views are processed and the key is passed to the widgets to allow some of them to process the keystroke as a hot-key. For example, if you implement a button that has a hotkey ok \"o\", you would catch the combination Alt-o here. If the event is caught, you must return true to stop the keystroke from being dispatched to other views. Redraw(Rect) Redraws this view and its subviews; only redraws the views that have been flagged for a re-display. Declaration public override void Redraw(Rect bounds) Parameters Type Name Description Rect bounds The bounds (view-relative region) to redraw. Overrides View.Redraw(Rect) Remarks Always use Bounds (view-relative) when calling Redraw(Rect) , NOT Frame (superview-relative). 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. Overrides of Redraw(Rect) must ensure they do not set Driver.Clip to a clip region larger than the region parameter. Implements System.Collections.IEnumerable" }, "api/Terminal.Gui/Terminal.Gui.StatusItem.html": { "href": "api/Terminal.Gui/Terminal.Gui.StatusItem.html", "title": "Class StatusItem", - "keywords": "Class StatusItem StatusItem objects are contained by StatusBar View s. Each StatusItem has a title, a shortcut (hotkey), and an Action that will be invoked when the Shortcut is pressed. The Shortcut will be a global hotkey for the application in the current context of the screen. The colour of the Title will be changed after each ~. A Title set to `~F1~ Help` will render as *F1* using HotNormal and *Help* as HotNormal . Inheritance System.Object StatusItem 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 : Terminal.Gui Assembly : Terminal.Gui.dll Syntax public class StatusItem Constructors StatusItem(Key, ustring, Action) Initializes a new StatusItem . Declaration public StatusItem(Key shortcut, ustring title, Action action) Parameters Type Name Description Key shortcut Shortcut to activate the StatusItem . NStack.ustring title Title for the StatusItem . System.Action action Action to invoke when the StatusItem is activated. Properties Action Gets or sets the action to be invoked when the statusbar item is triggered Declaration public Action Action { get; } Property Value Type Description System.Action Action to invoke. Shortcut Gets the global shortcut to invoke the action on the menu. Declaration public Key Shortcut { get; } Property Value Type Description Key Title Gets or sets the title. Declaration public ustring Title { get; } Property Value Type Description NStack.ustring The title. Remarks The colour of the Title will be changed after each ~. A Title set to `~F1~ Help` will render as *F1* using HotNormal and *Help* as HotNormal ." + "keywords": "Class StatusItem StatusItem objects are contained by StatusBar View s. Each StatusItem has a title, a shortcut (hotkey), and an Action that will be invoked when the Shortcut is pressed. The Shortcut will be a global hotkey for the application in the current context of the screen. The colour of the Title will be changed after each ~. A Title set to `~F1~ Help` will render as *F1* using HotNormal and *Help* as HotNormal . Inheritance System.Object StatusItem 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 : Terminal.Gui Assembly : Terminal.Gui.dll Syntax public class StatusItem Constructors StatusItem(Key, ustring, Action) Initializes a new StatusItem . Declaration public StatusItem(Key shortcut, ustring title, Action action) Parameters Type Name Description Key shortcut Shortcut to activate the StatusItem . NStack.ustring title Title for the StatusItem . System.Action action Action to invoke when the StatusItem is activated. Properties Action Gets or sets the action to be invoked when the statusbar item is triggered Declaration public Action Action { get; } Property Value Type Description System.Action Action to invoke. Shortcut Gets the global shortcut to invoke the action on the menu. Declaration public Key Shortcut { get; } Property Value Type Description Key Title Gets or sets the title. Declaration public ustring Title { get; set; } Property Value Type Description NStack.ustring The title. Remarks The colour of the Title will be changed after each ~. A Title set to `~F1~ Help` will render as *F1* using HotNormal and *Help* as HotNormal ." }, "api/Terminal.Gui/Terminal.Gui.TextAlignment.html": { "href": "api/Terminal.Gui/Terminal.Gui.TextAlignment.html", @@ -247,37 +252,52 @@ "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.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 This event is raised when the Text 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.MouseClick 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.DrawContent View.OnDrawContent(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.LayoutComplete View.LayoutSubviews() View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) View.OnMouseEvent(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 Gets or sets a value indicating whether this Responder can focus. Declaration public override bool CanFocus { get; set; } Property Value Type Description System.Boolean true if can focus; otherwise, false . Overrides Responder.CanFocus CursorPosition Sets or gets the current cursor position. Declaration public int CursorPosition { get; set; } Property Value Type Description System.Int32 Frame Gets or sets the frame for the view. The frame is relative to the view's container ( SuperView ). Declaration public override Rect Frame { get; set; } Property Value Type Description Rect The frame. Overrides View.Frame Remarks Change the Frame when using the Absolute layout style to move or resize views. Altering the Frame of a view will trigger the redrawing of the view as well as the redrawing of the affected regions of the SuperView . 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) Method invoked when a mouse event is generated Declaration public override bool MouseEvent(MouseEvent ev) Parameters Type Name Description MouseEvent ev Returns Type Description System.Boolean true , if the event was handled, false otherwise. Overrides Responder.MouseEvent(MouseEvent) OnLeave() Method invoked when a view loses focus. Declaration public override bool OnLeave() Returns Type Description System.Boolean true , if the event was handled, false otherwise. 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) Redraws this view and its subviews; only redraws the views that have been flagged for a re-display. Declaration public override void Redraw(Rect bounds) Parameters Type Name Description Rect bounds The bounds (view-relative region) to redraw. Overrides View.Redraw(Rect) Remarks Always use Bounds (view-relative) when calling Redraw(Rect) , NOT Frame (superview-relative). 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. Overrides of Redraw(Rect) must ensure they do not set Driver.Clip to a clip region larger than the region parameter. Events Changed Changed event, raised when the text has clicked. Declaration public event EventHandler Changed Event Type Type Description System.EventHandler < NStack.ustring > Remarks This event is raised when the Text 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.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" + "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.MouseClick 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.DrawContent View.OnDrawContent(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.LayoutComplete View.LayoutSubviews() View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) View.OnMouseEvent(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 Gets or sets a value indicating whether this Responder can focus. Declaration public override bool CanFocus { get; set; } Property Value Type Description System.Boolean true if can focus; otherwise, false . 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) Method invoked when a mouse event is generated Declaration public override bool MouseEvent(MouseEvent ev) Parameters Type Name Description MouseEvent ev Returns Type Description System.Boolean true , if the event was handled, false otherwise. Overrides Responder.MouseEvent(MouseEvent) PositionCursor() Positions the cursor on the current row and column Declaration public override void PositionCursor() Overrides View.PositionCursor() ProcessKey(KeyEvent) If the view is focused, gives the view a chance to process the keystroke. Declaration public override bool ProcessKey(KeyEvent kb) Parameters Type Name Description KeyEvent kb Returns Type Description System.Boolean Overrides View.ProcessKey(KeyEvent) Remarks Views can override this method if they are interested in processing the given keystroke. If they consume the keystroke, they must return true to stop the keystroke from being processed by other widgets or consumed by the widget engine. If they return false, the keystroke will be passed using the ProcessColdKey method to other views to process. The View implementation does nothing but return false, so it is not necessary to call base.ProcessKey if you derive directly from View, but you should if you derive other View subclasses. Redraw(Rect) Redraws this view and its subviews; only redraws the views that have been flagged for a re-display. Declaration public override void Redraw(Rect bounds) Parameters Type Name Description Rect bounds The bounds (view-relative region) to redraw. Overrides View.Redraw(Rect) Remarks Always use Bounds (view-relative) when calling Redraw(Rect) , NOT Frame (superview-relative). 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. Overrides of Redraw(Rect) must ensure they do not set Driver.Clip to a clip region larger than the region parameter. 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.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" + "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.MouseClick 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.DrawContent View.OnDrawContent(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.LayoutComplete View.LayoutSubviews() View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) View.OnMouseEvent(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) Method invoked when a mouse event is generated Declaration public override bool MouseEvent(MouseEvent ev) Parameters Type Name Description MouseEvent ev Returns Type Description System.Boolean true , if the event was handled, false otherwise. Overrides TextField.MouseEvent(MouseEvent) 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 TextField.ProcessKey(KeyEvent) Remarks The TextField control responds to the following keys: Keys Function Delete , Backspace Deletes the character before cursor. 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.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" + "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.MouseClick 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.DrawContent View.OnDrawContent(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.LayoutComplete View.LayoutSubviews() View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) View.OnMouseEvent(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, started by calling Run(Toplevel, Boolean) . They return control to the caller when RequestStop() has been called (which sets the Running property to false). A Toplevel is created when an application initialzies Terminal.Gui by callling Init() . The application Toplevel can be accessed via Top . Additional Toplevels can be created and run (e.g. Dialog s. To run a Toplevel, create the Toplevel and call Run(Toplevel, Boolean) . 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 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 A superview-relative rectangle specifying the location and size for the new Toplevel 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 Gets or sets the menu for this Toplevel 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. Declaration public bool Running { get; set; } Property Value Type Description System.Boolean Remarks Setting this property directly is discouraged. Use RequestStop() instead. StatusBar Gets or sets the status bar for this Toplevel Declaration public StatusBar StatusBar { get; set; } Property Value Type Description StatusBar Methods Add(View) Adds a subview (child) to this view. Declaration public override void Add(View view) Parameters Type Name Description View view Overrides View.Add(View) Remarks The Views that have been added to this view can be retrieved via the Subviews property. See also Remove(View) RemoveAll() 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) If the view is focused, gives the view a chance to process the keystroke. Declaration public override bool ProcessKey(KeyEvent keyEvent) Parameters Type Name Description KeyEvent keyEvent Contains the details about the key that produced the event. Returns Type Description System.Boolean Overrides View.ProcessKey(KeyEvent) Remarks Views can override this method if they are interested in processing the given keystroke. If they consume the keystroke, they must return true to stop the keystroke from being processed by other widgets or consumed by the widget engine. If they return false, the keystroke will be passed using the ProcessColdKey method to other views to process. The View implementation does nothing but return false, so it is not necessary to call base.ProcessKey if you derive directly from View, but you should if you derive other View subclasses. Redraw(Rect) Redraws this view and its subviews; only redraws the views that have been flagged for a re-display. Declaration public override void Redraw(Rect bounds) Parameters Type Name Description Rect bounds The bounds (view-relative region) to redraw. Overrides View.Redraw(Rect) Remarks Always use Bounds (view-relative) when calling Redraw(Rect) , NOT Frame (superview-relative). 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. Overrides of Redraw(Rect) must ensure they do not set Driver.Clip to a clip region larger than the region parameter. Remove(View) Removes a subview added via Add(View) or Add(View[]) from this View. Declaration public override void Remove(View view) Parameters Type Name Description View view Overrides View.Remove(View) Remarks RemoveAll() Removes all subviews (children) added via Add(View) or Add(View[]) from this View. Declaration public override void RemoveAll() Overrides View.RemoveAll() WillPresent() Invoked by Begin(Toplevel) as part of the Run(Toplevel, Boolean) 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.FocusEventArgs.html": { + "href": "api/Terminal.Gui/Terminal.Gui.View.FocusEventArgs.html", + "title": "Class View.FocusEventArgs", + "keywords": "Class View.FocusEventArgs Defines the event arguments for SetFocus(View) Inheritance System.Object System.EventArgs View.FocusEventArgs Inherited Members System.EventArgs.Empty 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 : Terminal.Gui Assembly : Terminal.Gui.dll Syntax public class FocusEventArgs : EventArgs Constructors FocusEventArgs() Constructs. Declaration public FocusEventArgs() Properties Handled Indicates if the current focus event has already been processed and the driver should stop notifying any other event subscriber. Its important to set this value to true specially when updating any View's layout from inside the subscriber method. Declaration public bool Handled { get; set; } Property Value Type Description System.Boolean" }, "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. 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" + "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. Views can contain one or more subviews, can respond to user input and render themselves on the screen. Views supports two layout styles: Absolute or Computed. The choice as to which layout style is used by the View is determined when the View is initizlied. To create a View using Absolute layout, call a constructor that takes a Rect parameter to specify the absolute position and size (the View. Frame )/. To create a View using Computed layout use a constructor that does not take a Rect parametr and set 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. To switch between Absolute and Computed layout, use the LayoutStyle property. Computed layout is more flexible and supports dynamic console apps where controls adjust layout as the terminal resizes or other Views change size or position. The X, Y, Width and Height properties are Dim and Pos objects that 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 views when view's frames are resized or if the terminal size changes. Absolute layout requires specifying coordiantes and sizes of Views explicitly, and the View will typcialy stay in a fixed position and size. To change the position and size use the Frame property. Subviews (child views) can be added to a View by calling the Add(View) method. The container of a View can be accessed with the SuperView property. To flag a region of the View's Bounds to be redrawn call SetNeedsDisplay(Rect) . To flag the entire view for redraw call SetNeedsDisplay() . 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. Subclasses should not rely on ColorScheme being set at construction time. If a ColorScheme is not set on a view, the view will inherit the value from its SuperView and the value might only be valid once a view has been added to a SuperView. By using ColorScheme applications 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 LayoutSubviews() method 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 Absolute , and will recompute the frames for the vies that use Computed . Constructors View() Initializes a new instance of Computed View class. Declaration public View() Remarks Use X , Y , Width , and Height properties to dynamically control the size and location of the view. View(Rect) Initializes a new instance of a Absolute View class with the absolute dimensions specified in the frame parameter. Declaration public View(Rect frame) Parameters Type Name Description Rect frame The region covered by this view. Remarks This constructor intitalize a View with a LayoutStyle of Absolute . Use View() to initialize a View with LayoutStyle of Computed Properties Bounds The bounds represent the View-relative rectangle used for this view; the area inside of the view. Declaration public Rect Bounds { get; set; } Property Value Type Description Rect The bounds. Remarks Updates to the Bounds update the Frame , and has the same side effects as updating the Frame . Because Bounds coordinates are relative to the upper-left corner of the View , the coordinates of the upper-left corner of the rectangle returned by this property are (0,0). Use this property to obtain the size and coordinates of the client area of the control for tasks such as drawing on the surface of the control. ColorScheme The color scheme for this view, if it is not defined, it returns the SuperView '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. The frame is relative to the view's container ( SuperView ). Declaration public virtual Rect Frame { get; set; } Property Value Type Description Rect The frame. Remarks Change the Frame when using the Absolute layout style to move or resize views. Altering the Frame of a view will trigger the redrawing of the view as well as the redrawing of the affected regions of the SuperView . HasFocus Gets or sets a value indicating whether this Responder has focus. Declaration public override bool HasFocus { get; } Property Value Type Description System.Boolean true if has focus; otherwise, false . Overrides Responder.HasFocus Height Gets or sets the height of the view. Only used whe LayoutStyle is Computed . 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. Remarks The id should be unique across all Views that share a SuperView. 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 the style is set to Absolute , LayoutSubviews does not change the Frame . If the style is Computed the Frame is updated using the 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 wants 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 of the view. Only used whe LayoutStyle is Computed . Declaration public Dim Width { get; set; } Property Value Type Description Dim The width. Remarks If LayoutStyle is Absolute changing this property has no effect and its value is indeterminate. X Gets or sets the X position for the view (the column). Only used whe LayoutStyle is Computed . Declaration public Pos X { get; set; } Property Value Type Description Pos The X Position. Remarks If LayoutStyle is Absolute changing this property has no effect and its value is indeterminate. Y Gets or sets the Y position for the view (the row). Only used whe LayoutStyle is Computed . Declaration public Pos Y { get; set; } Property Value Type Description Pos The y position (line). Remarks If LayoutStyle is Absolute changing this property has no effect and its value is indeterminate. Methods Add(View) Adds a subview (child) to this view. Declaration public virtual void Add(View view) Parameters Type Name Description View view Remarks The Views that have been added to this view can be retrieved via the Subviews property. See also Remove(View) RemoveAll() Add(View[]) Adds the specified views (children) 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). Remarks The Views that have been added to this view can be retrieved via the Subviews property. See also Remove(View) RemoveAll() AddRune(Int32, Int32, Rune) Displays the specified character in the specified column and row of the View. Declaration public void AddRune(int col, int row, Rune ch) Parameters Type Name Description System.Int32 col Column (view-relative). System.Int32 row Row (view-relative). 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() Indicates that any child views (in the Subviews list) need 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 region with the current color. Declaration public void Clear(Rect regionScreen) Parameters Type Name Description Rect regionScreen The screen-relative region to clear. Remarks ClearNeedsDisplay() Removes the SetNeedsDisplay() and the ChildNeedsDisplay() setting on this view. Declaration protected void ClearNeedsDisplay() ClipToBounds() Sets the ConsoleDriver '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 re-eapplied by setting Driver .Clip ( Clip ). Remarks Bounds is View-relative. DrawFrame(Rect, Int32, Boolean) Draws a frame in the current view, clipped by the boundary of this view Declaration public void DrawFrame(Rect region, int padding = 0, bool fill = false) Parameters Type Name Description Rect region View-relative region for the frame to be drawn. System.Int32 padding The padding to add around the outside of 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. Remarks The hotkey is any character following an underscore ('_') character. 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() 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() Remarks Calls Terminal.Gui.View.OnLayoutComplete(Terminal.Gui.View.LayoutEventArgs) (which raises the LayoutComplete event) before it returns. 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 (view-relative). System.Int32 row Row (view-relative). OnDrawContent(Rect) Enables overrides to draw infinitely scrolled content and/or a background behind added controls. Declaration public virtual void OnDrawContent(Rect viewport) Parameters Type Name Description Rect viewport The view-relative rectangle describing the currently visible viewport into the View Remarks This method will be called before any subviews added with Add(View) have been drawn. OnEnter() Method invoked when a view gets focus. Declaration public override bool OnEnter() Returns Type Description System.Boolean true , if the event was handled, false otherwise. 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() Method invoked when a view loses focus. Declaration public override bool OnLeave() Returns Type Description System.Boolean true , if the event was handled, false otherwise. Overrides Responder.OnLeave() OnMouseEnter(MouseEvent) Method invoked when a mouse event is generated for the first time. Declaration public override bool OnMouseEnter(MouseEvent mouseEvent) Parameters Type Name Description MouseEvent mouseEvent Returns Type Description System.Boolean true , if the event was handled, false otherwise. Overrides Responder.OnMouseEnter(MouseEvent) OnMouseEvent(MouseEvent) Method invoked when a mouse event is generated Declaration public virtual bool OnMouseEvent(MouseEvent mouseEvent) Parameters Type Name Description MouseEvent mouseEvent Returns Type Description System.Boolean true , if the event was handled, false otherwise. OnMouseLeave(MouseEvent) Method invoked when a mouse event is generated for the last time. Declaration public override bool OnMouseLeave(MouseEvent mouseEvent) Parameters Type Name Description MouseEvent mouseEvent Returns Type Description System.Boolean true , if the event was handled, false otherwise. 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) This method can be overwritten by views that want to provide accelerator functionality (Alt-key for example), but without interefering with normal ProcessKey behavior. Declaration public override bool ProcessColdKey(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.ProcessColdKey(KeyEvent) Remarks After keys are sent to the subviews on the current view, all the view are processed and the key is passed to the views to allow some of them to process the keystroke as a cold-key. This functionality is used, for example, by default buttons to act on the enter key. Processing this as a hot-key would prevent non-default buttons from consuming the enter keypress when they have the focus. ProcessHotKey(KeyEvent) This method can be overwritten by view that want to provide accelerator functionality (Alt-key for example). Declaration public override bool ProcessHotKey(KeyEvent keyEvent) Parameters Type Name Description KeyEvent keyEvent Returns Type Description System.Boolean Overrides Responder.ProcessHotKey(KeyEvent) Remarks Before keys are sent to the subview on the current view, all the views are processed and the key is passed to the widgets to allow some of them to process the keystroke as a hot-key. For example, if you implement a button that has a hotkey ok \"o\", you would catch the combination Alt-o here. If the event is caught, you must return true to stop the keystroke from being dispatched to other views. ProcessKey(KeyEvent) If the view is focused, gives the view a chance to process the keystroke. Declaration public override bool ProcessKey(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.ProcessKey(KeyEvent) Remarks Views can override this method if they are interested in processing the given keystroke. If they consume the keystroke, they must return true to stop the keystroke from being processed by other widgets or consumed by the widget engine. If they return false, the keystroke will be passed using the ProcessColdKey method to other views to process. The View implementation does nothing but return false, so it is not necessary to call base.ProcessKey if you derive directly from View, but you should if you derive other View subclasses. Redraw(Rect) Redraws this view and its subviews; only redraws the views that have been flagged for a re-display. Declaration public virtual void Redraw(Rect bounds) Parameters Type Name Description Rect bounds The bounds (view-relative region) to redraw. Remarks Always use Bounds (view-relative) when calling Redraw(Rect) , NOT Frame (superview-relative). 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. Overrides of Redraw(Rect) must ensure they do not set Driver.Clip to a clip region larger than the region parameter. Remove(View) Removes a subview added via Add(View) or Add(View[]) from this View. Declaration public virtual void Remove(View view) Parameters Type Name Description View view Remarks RemoveAll() Removes all subviews (children) added via Add(View) or Add(View[]) from this View. Declaration public virtual void RemoveAll() ScreenToView(Int32, Int32) Converts a point from screen-relative coordinates to view-relative coordinates. 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 clip region to the specified view-relative region. Declaration public Rect SetClip(Rect region) Parameters Type Name Description Rect region View-relative clip region. Returns Type Description Rect The previous screen-relative clip region. SetFocus(View) Causes the specified subview to have focus. Declaration public void SetFocus(View view) Parameters Type Name Description View view View. SetNeedsDisplay() Sets a flag indicating this view needs to be redisplayed because its state has changed. Declaration public void SetNeedsDisplay() SetNeedsDisplay(Rect) Flags the view-relative region on this View as needing to be repainted. Declaration public void SetNeedsDisplay(Rect region) Parameters Type Name Description Rect region The view-relative region that must be flagged for repaint. ToString() Pretty prints the View Declaration public override string ToString() Returns Type Description System.String Overrides System.Object.ToString() Events DrawContent Event invoked when the content area of the View is to be drawn. Declaration public event EventHandler DrawContent Event Type Type Description System.EventHandler < Rect > Remarks Will be invoked before any subviews added with Add(View) have been drawn. Rect provides the view-relative rectangle describing the currently visible viewport into the View . Enter Event fired when the view gets focus. Declaration public event EventHandler Enter Event Type Type Description System.EventHandler < View.FocusEventArgs > 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 > LayoutComplete Fired after the Views's LayoutSubviews() method has completed. Declaration public event EventHandler LayoutComplete Event Type Type Description System.EventHandler < View.LayoutEventArgs > Remarks Subscribe to this event to perform tasks when the View has been resized or the layout has otherwise changed. Leave Event fired when the view looses focus. Declaration public event EventHandler Leave Event Type Type Description System.EventHandler < View.FocusEventArgs > MouseClick Event fired when a mouse event is generated. Declaration public event EventHandler MouseClick Event Type Type Description System.EventHandler < View.MouseEventEventArgs > 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 < View.MouseEventEventArgs > MouseLeave Event fired when the view receives a mouse event for the last time. Declaration public event EventHandler MouseLeave Event Type Type Description System.EventHandler < View.MouseEventEventArgs > Implements System.Collections.IEnumerable" }, "api/Terminal.Gui/Terminal.Gui.View.KeyEventEventArgs.html": { "href": "api/Terminal.Gui/Terminal.Gui.View.KeyEventEventArgs.html", "title": "Class View.KeyEventEventArgs", - "keywords": "Class View.KeyEventEventArgs Specifies the event arguments for KeyEvent Inheritance System.Object System.EventArgs View.KeyEventEventArgs Inherited Members System.EventArgs.Empty 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 : Terminal.Gui Assembly : Terminal.Gui.dll Syntax public class KeyEventEventArgs : EventArgs Constructors KeyEventEventArgs(KeyEvent) Constructs. Declaration public KeyEventEventArgs(KeyEvent ke) Parameters Type Name Description KeyEvent ke Properties Handled Indicates if the current Key event has already been processed and the driver should stop notifying any other event subscriber. Its important to set this value to true specially when updating any View's layout from inside the subscriber method. Declaration public bool Handled { get; set; } Property Value Type Description System.Boolean KeyEvent The KeyEvent for the event. Declaration public KeyEvent KeyEvent { get; set; } Property Value Type Description KeyEvent" + "keywords": "Class View.KeyEventEventArgs Defines the event arguments for KeyEvent Inheritance System.Object System.EventArgs View.KeyEventEventArgs Inherited Members System.EventArgs.Empty 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 : Terminal.Gui Assembly : Terminal.Gui.dll Syntax public class KeyEventEventArgs : EventArgs Constructors KeyEventEventArgs(KeyEvent) Constructs. Declaration public KeyEventEventArgs(KeyEvent ke) Parameters Type Name Description KeyEvent ke Properties Handled Indicates if the current Key event has already been processed and the driver should stop notifying any other event subscriber. Its important to set this value to true specially when updating any View's layout from inside the subscriber method. Declaration public bool Handled { get; set; } Property Value Type Description System.Boolean KeyEvent The KeyEvent for the event. Declaration public KeyEvent KeyEvent { get; set; } Property Value Type Description KeyEvent" + }, + "api/Terminal.Gui/Terminal.Gui.View.LayoutEventArgs.html": { + "href": "api/Terminal.Gui/Terminal.Gui.View.LayoutEventArgs.html", + "title": "Class View.LayoutEventArgs", + "keywords": "Class View.LayoutEventArgs Event arguments for the LayoutComplete event. Inheritance System.Object System.EventArgs View.LayoutEventArgs Inherited Members System.EventArgs.Empty 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 : Terminal.Gui Assembly : Terminal.Gui.dll Syntax public class LayoutEventArgs : EventArgs Properties OldBounds The view-relative bounds of the View before it was laid out. Declaration public Rect OldBounds { get; set; } Property Value Type Description Rect" + }, + "api/Terminal.Gui/Terminal.Gui.View.MouseEventEventArgs.html": { + "href": "api/Terminal.Gui/Terminal.Gui.View.MouseEventEventArgs.html", + "title": "Class View.MouseEventEventArgs", + "keywords": "Class View.MouseEventEventArgs Specifies the event arguments for MouseEvent Inheritance System.Object System.EventArgs View.MouseEventEventArgs Inherited Members System.EventArgs.Empty 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 : Terminal.Gui Assembly : Terminal.Gui.dll Syntax public class MouseEventEventArgs : EventArgs Constructors MouseEventEventArgs(MouseEvent) Constructs. Declaration public MouseEventEventArgs(MouseEvent me) Parameters Type Name Description MouseEvent me Properties Handled Indicates if the current mouse event has already been processed and the driver should stop notifying any other event subscriber. Its important to set this value to true specially when updating any View's layout from inside the subscriber method. Declaration public bool Handled { get; set; } Property Value Type Description System.Boolean MouseEvent The MouseEvent for the event. Declaration public MouseEvent MouseEvent { get; set; } Property Value Type Description MouseEvent" }, "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.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" + "keywords": "Class Window A Toplevel View that draws a border around its Frame with a Title at the top. 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.MouseClick 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.DrawContent View.OnDrawContent(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.LayoutComplete View.LayoutSubviews() View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) View.OnMouseEvent(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 Remarks The 'client area' of a Window is a rectangle deflated by one or more rows/columns from Bounds . A this time there is no API to determine this rectangle. 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. Remarks This constructor intitalize a View with a LayoutStyle of Computed . Use X , Y , Width , and Height properties to dynamically control the size and location of the view. Window(ustring, Int32) Initializes a new instance of the Window with the specified frame for its location, with the specified border, and 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. Remarks This constructor intitalize a View with a LayoutStyle of Computed . Use X , Y , Width , and Height properties to dynamically control the size and location of the view. Window(Rect, ustring) Initializes a new instance of the Window class with an optional title using Absolute positioning. Declaration public Window(Rect frame, ustring title = null) Parameters Type Name Description Rect frame Superview-relatie rectangle specifying the location and size NStack.ustring title Title Remarks This constructor intitalizes a Window with a LayoutStyle of Absolute . Use constructors that do not take Rect parameters to initialize a Window with Computed . Window(Rect, ustring, Int32) Initializes a new instance of the Window with the specified frame for its location, with the specified border, and an optional title. Declaration public Window(Rect frame, ustring title = null, int padding = 0) Parameters Type Name Description Rect frame Superview-relatie rectangle specifying the location and size NStack.ustring title Title System.Int32 padding Number of characters to use for padding of the drawn frame. Remarks This constructor intitalizes a Window with a LayoutStyle of Absolute . Use constructors that do not take Rect parameters to initialize a Window with LayoutStyle of Computed 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) Adds a subview (child) to this view. Declaration public override void Add(View view) Parameters Type Name Description View view Overrides Toplevel.Add(View) Remarks The Views that have been added to this view can be retrieved via the Subviews property. See also Remove(View) RemoveAll() 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) Method invoked when a mouse event is generated Declaration public override bool MouseEvent(MouseEvent mouseEvent) Parameters Type Name Description MouseEvent mouseEvent Contains the details about the mouse event. Returns Type Description System.Boolean true , if the event was handled, false otherwise. Overrides Responder.MouseEvent(MouseEvent) Redraw(Rect) Redraws this view and its subviews; only redraws the views that have been flagged for a re-display. Declaration public override void Redraw(Rect bounds) Parameters Type Name Description Rect bounds The bounds (view-relative region) to redraw. Overrides Toplevel.Redraw(Rect) Remarks Always use Bounds (view-relative) when calling Redraw(Rect) , NOT Frame (superview-relative). 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. Overrides of Redraw(Rect) must ensure they do not set Driver.Clip to a clip region larger than the region parameter. Remove(View) Removes a subview added via Add(View) or Add(View[]) from this View. Declaration public override void Remove(View view) Parameters Type Name Description View view Overrides Toplevel.Remove(View) Remarks RemoveAll() Removes all subviews (children) added via Add(View) or Add(View[]) from this View. Declaration public override void RemoveAll() Overrides Toplevel.RemoveAll() Implements System.Collections.IEnumerable" }, "api/Terminal.Gui/Unix.Terminal.Curses.Event.html": { "href": "api/Terminal.Gui/Unix.Terminal.Curses.Event.html", diff --git a/docs/manifest.json b/docs/manifest.json index 356672fe24..250fa0354f 100644 --- a/docs/manifest.json +++ b/docs/manifest.json @@ -18,7 +18,7 @@ "output": { ".html": { "relative_path": "api/Terminal.Gui/Terminal.Gui.Application.ResizedEventArgs.html", - "hash": "DIFBgAr4pqubXFDt96ZYyw==" + "hash": "XsZNHIK/vi5kIdznYVz0vw==" } }, "is_incremental": false, @@ -30,7 +30,7 @@ "output": { ".html": { "relative_path": "api/Terminal.Gui/Terminal.Gui.Application.RunState.html", - "hash": "BumSbuIm0sVcT/UGEzJ6Lw==" + "hash": "UoOXkx0Su+VTEDNhCSPtCg==" } }, "is_incremental": false, @@ -42,7 +42,7 @@ "output": { ".html": { "relative_path": "api/Terminal.Gui/Terminal.Gui.Application.html", - "hash": "rBH87I0ltV6WIs6iAHB0qg==" + "hash": "yPT23nVjyZPKhFMNBFXA/Q==" } }, "is_incremental": false, @@ -54,7 +54,7 @@ "output": { ".html": { "relative_path": "api/Terminal.Gui/Terminal.Gui.Attribute.html", - "hash": "rW1cofdTMYeJbN06pg+LPw==" + "hash": "bHjnRve1VtLLtnO0sFNesQ==" } }, "is_incremental": false, @@ -66,7 +66,7 @@ "output": { ".html": { "relative_path": "api/Terminal.Gui/Terminal.Gui.Button.html", - "hash": "ME/uys1l12M6GxRIwjSFzQ==" + "hash": "Ogiqw8WWs3e+tiBkNjtoaA==" } }, "is_incremental": false, @@ -78,7 +78,7 @@ "output": { ".html": { "relative_path": "api/Terminal.Gui/Terminal.Gui.CheckBox.html", - "hash": "mjAkyC68WWpdFLCKhs3m0w==" + "hash": "auuTn/N2r9yNW5gVjlaxBQ==" } }, "is_incremental": false, @@ -90,7 +90,7 @@ "output": { ".html": { "relative_path": "api/Terminal.Gui/Terminal.Gui.Clipboard.html", - "hash": "Qgn9XOGIZ99tD+bIpvAvaw==" + "hash": "nRDT8tmFo6BntyPMWK9cYw==" } }, "is_incremental": false, @@ -102,7 +102,7 @@ "output": { ".html": { "relative_path": "api/Terminal.Gui/Terminal.Gui.Color.html", - "hash": "bEnwpwvXCpy96xa0NZsHxg==" + "hash": "xS+9tBJtgSS4tGehqt87wg==" } }, "is_incremental": false, @@ -114,7 +114,7 @@ "output": { ".html": { "relative_path": "api/Terminal.Gui/Terminal.Gui.ColorScheme.html", - "hash": "Y33DagpSxRbRXKvbf3R03A==" + "hash": "/m1p7mkCfhxfWF/1g4FKGg==" } }, "is_incremental": false, @@ -126,7 +126,7 @@ "output": { ".html": { "relative_path": "api/Terminal.Gui/Terminal.Gui.Colors.html", - "hash": "NckBPd/+W4UBBIz8xLLNzA==" + "hash": "Bx9dNWviBgnJM/d5WbDiKA==" } }, "is_incremental": false, @@ -138,7 +138,7 @@ "output": { ".html": { "relative_path": "api/Terminal.Gui/Terminal.Gui.ComboBox.html", - "hash": "sl2PLoyU7DWtQukFtNq/bA==" + "hash": "4cdRAEyCUS1eq3/oAy6x4A==" } }, "is_incremental": false, @@ -150,7 +150,7 @@ "output": { ".html": { "relative_path": "api/Terminal.Gui/Terminal.Gui.ConsoleDriver.html", - "hash": "xIAKmdNYHVdF/omxwRc0og==" + "hash": "X+nt7JANZ9ERlUPPbFhEbA==" } }, "is_incremental": false, @@ -162,7 +162,7 @@ "output": { ".html": { "relative_path": "api/Terminal.Gui/Terminal.Gui.DateField.html", - "hash": "cJftH/W9TUq1h5PFI4x1aw==" + "hash": "0ZzeifsaibVtiJrH53dOtQ==" } }, "is_incremental": false, @@ -174,7 +174,7 @@ "output": { ".html": { "relative_path": "api/Terminal.Gui/Terminal.Gui.Dialog.html", - "hash": "VnfBkDlO1Ha2AlSZnTBLQw==" + "hash": "8IkU8xj3u5Np/IOe2kBDMg==" } }, "is_incremental": false, @@ -186,7 +186,7 @@ "output": { ".html": { "relative_path": "api/Terminal.Gui/Terminal.Gui.Dim.html", - "hash": "lv4vhdwrIgjcrzl372hM/g==" + "hash": "nb5euR33IzTyX/Xp3MxRmw==" } }, "is_incremental": false, @@ -198,7 +198,7 @@ "output": { ".html": { "relative_path": "api/Terminal.Gui/Terminal.Gui.FileDialog.html", - "hash": "YbYnglzQDge8ZiwhCKk2ww==" + "hash": "id0zrYgEoIqU5dH1N5xnLA==" } }, "is_incremental": false, @@ -210,7 +210,7 @@ "output": { ".html": { "relative_path": "api/Terminal.Gui/Terminal.Gui.FrameView.html", - "hash": "PJ++eN/AAZRlytrR9fECEg==" + "hash": "4Q6FKv69/GJr9tWj2vJ2eA==" } }, "is_incremental": false, @@ -222,7 +222,7 @@ "output": { ".html": { "relative_path": "api/Terminal.Gui/Terminal.Gui.HexView.html", - "hash": "JHLWSE15nKC6pSiQyT/dag==" + "hash": "vEBheuK6RqqBCFPRz/YL9Q==" } }, "is_incremental": false, @@ -234,7 +234,7 @@ "output": { ".html": { "relative_path": "api/Terminal.Gui/Terminal.Gui.IListDataSource.html", - "hash": "zw1oqYSwSXRTWt1OB4TDMg==" + "hash": "ps7SdIZGEwpV/rtbciS83g==" } }, "is_incremental": false, @@ -246,7 +246,7 @@ "output": { ".html": { "relative_path": "api/Terminal.Gui/Terminal.Gui.IMainLoopDriver.html", - "hash": "syoUVRMJDWYd5gpzNssq0w==" + "hash": "EGIDyMq6888BbRcwRdVNPw==" } }, "is_incremental": false, @@ -258,7 +258,7 @@ "output": { ".html": { "relative_path": "api/Terminal.Gui/Terminal.Gui.Key.html", - "hash": "m9ZIpVfV3A0QJVyFan50bQ==" + "hash": "Ke4jm508JIzZs/P8gHbOUA==" } }, "is_incremental": false, @@ -270,7 +270,19 @@ "output": { ".html": { "relative_path": "api/Terminal.Gui/Terminal.Gui.KeyEvent.html", - "hash": "6BPkUvWnef/UBzKHtghRqg==" + "hash": "GgiCkNitUKNjF+//c2Ullg==" + } + }, + "is_incremental": false, + "version": "" + }, + { + "type": "ManagedReference", + "source_relative_path": "api/Terminal.Gui/Terminal.Gui.KeyModifiers.yml", + "output": { + ".html": { + "relative_path": "api/Terminal.Gui/Terminal.Gui.KeyModifiers.html", + "hash": "zOJY8hzkrDVozeEFc3SUng==" } }, "is_incremental": false, @@ -282,7 +294,7 @@ "output": { ".html": { "relative_path": "api/Terminal.Gui/Terminal.Gui.Label.html", - "hash": "bIhrh6Fw65PCSTg2XVONjw==" + "hash": "cOTYMYU6aH58f+TUm8kjZw==" } }, "is_incremental": false, @@ -294,7 +306,7 @@ "output": { ".html": { "relative_path": "api/Terminal.Gui/Terminal.Gui.LayoutStyle.html", - "hash": "HRJWaAFZ5pM0l5CZ7IIVww==" + "hash": "60Zoh3MT5ewKTd6yfVkYKA==" } }, "is_incremental": false, @@ -306,7 +318,7 @@ "output": { ".html": { "relative_path": "api/Terminal.Gui/Terminal.Gui.ListView.html", - "hash": "pfBa42qAxXw0yxtKHTfyOA==" + "hash": "0QkPauXHsAQht7uuiECH/g==" } }, "is_incremental": false, @@ -318,7 +330,7 @@ "output": { ".html": { "relative_path": "api/Terminal.Gui/Terminal.Gui.ListViewItemEventArgs.html", - "hash": "vZ9nqtb1vSEuwmYbQSjItg==" + "hash": "0nYKtkrXJ7ajjHXrL6PQ3w==" } }, "is_incremental": false, @@ -330,7 +342,7 @@ "output": { ".html": { "relative_path": "api/Terminal.Gui/Terminal.Gui.ListWrapper.html", - "hash": "8ZGN5Yr4IZd2+jPO8E+bog==" + "hash": "csFwHEfNbyDI2Z1PiRiZ4A==" } }, "is_incremental": false, @@ -342,7 +354,7 @@ "output": { ".html": { "relative_path": "api/Terminal.Gui/Terminal.Gui.MainLoop.html", - "hash": "6l6H8op2IHAY8h+D2cXo2A==" + "hash": "yYMulOjXIiO262BOf3/TBg==" } }, "is_incremental": false, @@ -354,7 +366,7 @@ "output": { ".html": { "relative_path": "api/Terminal.Gui/Terminal.Gui.MenuBar.html", - "hash": "nFfj5HgJl2dkJdYZpXsucw==" + "hash": "AMuhNj4f31WAXMYfYJfXmA==" } }, "is_incremental": false, @@ -366,7 +378,7 @@ "output": { ".html": { "relative_path": "api/Terminal.Gui/Terminal.Gui.MenuBarItem.html", - "hash": "M33dRwWnclv6FXEh13kd/A==" + "hash": "tfd6DeqkD85Ld073N5IrPQ==" } }, "is_incremental": false, @@ -378,7 +390,7 @@ "output": { ".html": { "relative_path": "api/Terminal.Gui/Terminal.Gui.MenuItem.html", - "hash": "BxWmlK3NIevYd0HdbNMUVA==" + "hash": "xjtvXspzEBQ01Okag72ieQ==" } }, "is_incremental": false, @@ -390,7 +402,7 @@ "output": { ".html": { "relative_path": "api/Terminal.Gui/Terminal.Gui.MessageBox.html", - "hash": "Djpxeu2ArtDehHEr0Q/35A==" + "hash": "IZEbMnM27mjT2qJKK2YwIA==" } }, "is_incremental": false, @@ -402,7 +414,7 @@ "output": { ".html": { "relative_path": "api/Terminal.Gui/Terminal.Gui.MouseEvent.html", - "hash": "ctEUNZhdeHifuH2HdYRWvQ==" + "hash": "IudFL9nGedo0tOs8l9GXnQ==" } }, "is_incremental": false, @@ -414,7 +426,7 @@ "output": { ".html": { "relative_path": "api/Terminal.Gui/Terminal.Gui.MouseFlags.html", - "hash": "zFIkw3eOHgvVYau4DPVjYw==" + "hash": "XVy975K1+DrBPe+QJod+xw==" } }, "is_incremental": false, @@ -426,7 +438,7 @@ "output": { ".html": { "relative_path": "api/Terminal.Gui/Terminal.Gui.OpenDialog.html", - "hash": "5V8hV/xvnfBy4NcGNV4uhA==" + "hash": "tzugxtbiVumOB/XMJdOlhQ==" } }, "is_incremental": false, @@ -438,7 +450,7 @@ "output": { ".html": { "relative_path": "api/Terminal.Gui/Terminal.Gui.Point.html", - "hash": "lyiawhlDFkAqKnIhIBiJ5g==" + "hash": "lNLxXpI7fVuMH9GGOZWurA==" } }, "is_incremental": false, @@ -450,7 +462,7 @@ "output": { ".html": { "relative_path": "api/Terminal.Gui/Terminal.Gui.Pos.html", - "hash": "tfvPqlCBOWWyKonjkNrB3w==" + "hash": "6RuVJHnUXcvHf6Io6250pg==" } }, "is_incremental": false, @@ -462,7 +474,7 @@ "output": { ".html": { "relative_path": "api/Terminal.Gui/Terminal.Gui.ProgressBar.html", - "hash": "h/P9sR7z6zAiK2hSzqPshA==" + "hash": "uV49T7u6viQ37rQhBT3Zzw==" } }, "is_incremental": false, @@ -474,7 +486,7 @@ "output": { ".html": { "relative_path": "api/Terminal.Gui/Terminal.Gui.RadioGroup.html", - "hash": "3z6xkxC1zvmDKtrW+Fgrrg==" + "hash": "/BRdhsdF75VLMpGQ343/Pw==" } }, "is_incremental": false, @@ -486,7 +498,7 @@ "output": { ".html": { "relative_path": "api/Terminal.Gui/Terminal.Gui.Rect.html", - "hash": "fkVY6S1iAQxm56j1OWsqpg==" + "hash": "Mt0EGImYw3fMA5AmgTDYsQ==" } }, "is_incremental": false, @@ -498,7 +510,7 @@ "output": { ".html": { "relative_path": "api/Terminal.Gui/Terminal.Gui.Responder.html", - "hash": "y5iIws59QZCy2lc2dwUSXw==" + "hash": "3g86uXDCZ9hTG9e8FkhbVw==" } }, "is_incremental": false, @@ -510,7 +522,7 @@ "output": { ".html": { "relative_path": "api/Terminal.Gui/Terminal.Gui.SaveDialog.html", - "hash": "DPeVeCkR7BZvw2wbe4/29A==" + "hash": "GLqBSO8BXFaL9XtwPDLFMQ==" } }, "is_incremental": false, @@ -522,7 +534,7 @@ "output": { ".html": { "relative_path": "api/Terminal.Gui/Terminal.Gui.ScrollBarView.html", - "hash": "NxxGNpgiUqWnCVXmFh5rUw==" + "hash": "DXaxZYGJtmaSfHa3Jk+gyA==" } }, "is_incremental": false, @@ -534,7 +546,7 @@ "output": { ".html": { "relative_path": "api/Terminal.Gui/Terminal.Gui.ScrollView.html", - "hash": "m7fcAU218j8cbq6xNZvnZg==" + "hash": "H/44f2Hsi78rcqL5DfzFNQ==" } }, "is_incremental": false, @@ -546,7 +558,7 @@ "output": { ".html": { "relative_path": "api/Terminal.Gui/Terminal.Gui.Size.html", - "hash": "Uyh9AUQe5/m+LdFJsl0wFw==" + "hash": "xbk+SrWPknEg7Ry/IcLl5w==" } }, "is_incremental": false, @@ -558,7 +570,7 @@ "output": { ".html": { "relative_path": "api/Terminal.Gui/Terminal.Gui.StatusBar.html", - "hash": "8JRQVV0EXUabW5uNQDGmbg==" + "hash": "aQwab8aCzg9DO76j0n0Lug==" } }, "is_incremental": false, @@ -570,7 +582,7 @@ "output": { ".html": { "relative_path": "api/Terminal.Gui/Terminal.Gui.StatusItem.html", - "hash": "CelEmO6UbHCg5GwhyJjSRA==" + "hash": "pBi3xXl8t4xzp0tkDr1o5Q==" } }, "is_incremental": false, @@ -582,7 +594,7 @@ "output": { ".html": { "relative_path": "api/Terminal.Gui/Terminal.Gui.TextAlignment.html", - "hash": "35broUZ49iC3HmaEfBi2Sg==" + "hash": "TAKaeFpTou/2UJpekEzoHQ==" } }, "is_incremental": false, @@ -594,7 +606,7 @@ "output": { ".html": { "relative_path": "api/Terminal.Gui/Terminal.Gui.TextField.html", - "hash": "FS+GzK46zbxvfjMsLT9oeA==" + "hash": "8gROGNtihilMdFc8s8+RwQ==" } }, "is_incremental": false, @@ -606,7 +618,7 @@ "output": { ".html": { "relative_path": "api/Terminal.Gui/Terminal.Gui.TextView.html", - "hash": "Em15ZceoFUWBLJIvAGwrGw==" + "hash": "m3SbJApjDnN5g23jI+i4Qg==" } }, "is_incremental": false, @@ -618,7 +630,7 @@ "output": { ".html": { "relative_path": "api/Terminal.Gui/Terminal.Gui.TimeField.html", - "hash": "eOqDmMwdZLQrDk/t5jepOQ==" + "hash": "6GP1VF2MyslnpnjVPryQ6w==" } }, "is_incremental": false, @@ -630,7 +642,19 @@ "output": { ".html": { "relative_path": "api/Terminal.Gui/Terminal.Gui.Toplevel.html", - "hash": "GaeWC/O/bVwZvOhx8bTcXg==" + "hash": "WW9db75HQNY0g8B19rcKlQ==" + } + }, + "is_incremental": false, + "version": "" + }, + { + "type": "ManagedReference", + "source_relative_path": "api/Terminal.Gui/Terminal.Gui.View.FocusEventArgs.yml", + "output": { + ".html": { + "relative_path": "api/Terminal.Gui/Terminal.Gui.View.FocusEventArgs.html", + "hash": "P6JsJnjWlxXKeSaUT8hfeQ==" } }, "is_incremental": false, @@ -642,7 +666,31 @@ "output": { ".html": { "relative_path": "api/Terminal.Gui/Terminal.Gui.View.KeyEventEventArgs.html", - "hash": "JK8zR6iA3XqTiD0OFuAJpA==" + "hash": "lSoMuKfepwOTPBQXOVfBbQ==" + } + }, + "is_incremental": false, + "version": "" + }, + { + "type": "ManagedReference", + "source_relative_path": "api/Terminal.Gui/Terminal.Gui.View.LayoutEventArgs.yml", + "output": { + ".html": { + "relative_path": "api/Terminal.Gui/Terminal.Gui.View.LayoutEventArgs.html", + "hash": "102vTZ6xJuZgFrXupCddTA==" + } + }, + "is_incremental": false, + "version": "" + }, + { + "type": "ManagedReference", + "source_relative_path": "api/Terminal.Gui/Terminal.Gui.View.MouseEventEventArgs.yml", + "output": { + ".html": { + "relative_path": "api/Terminal.Gui/Terminal.Gui.View.MouseEventEventArgs.html", + "hash": "R/fGr5MHs5ViyZLr9vWTew==" } }, "is_incremental": false, @@ -654,7 +702,7 @@ "output": { ".html": { "relative_path": "api/Terminal.Gui/Terminal.Gui.View.html", - "hash": "lJIV2T6VawIaypJL5MldoA==" + "hash": "ikbU1rHcs2278LHBdTs0fA==" } }, "is_incremental": false, @@ -666,7 +714,7 @@ "output": { ".html": { "relative_path": "api/Terminal.Gui/Terminal.Gui.Window.html", - "hash": "KiIg+evUAw1FjEYC99DgAQ==" + "hash": "zCor4GcEaC6RRQktnRbrSw==" } }, "is_incremental": false, @@ -678,7 +726,7 @@ "output": { ".html": { "relative_path": "api/Terminal.Gui/Terminal.Gui.html", - "hash": "OmsDE3+TpuS+jsy/uriDFQ==" + "hash": "wZ1rqO5BrtIBjwKdmWfilw==" } }, "is_incremental": false, @@ -690,7 +738,7 @@ "output": { ".html": { "relative_path": "api/Terminal.Gui/Unix.Terminal.Curses.Event.html", - "hash": "I2S/H5pHtk/fJa5XyFn8xA==" + "hash": "w6m5UzfNBa3HeCLJs06o8g==" } }, "is_incremental": false, @@ -702,7 +750,7 @@ "output": { ".html": { "relative_path": "api/Terminal.Gui/Unix.Terminal.Curses.MouseEvent.html", - "hash": "7kYXb0LMvTBIzKw8R1oh8Q==" + "hash": "EcPQhEc2YKA26/nJ75JO0Q==" } }, "is_incremental": false, @@ -714,7 +762,7 @@ "output": { ".html": { "relative_path": "api/Terminal.Gui/Unix.Terminal.Curses.Window.html", - "hash": "0HfuPBD5hxAbPqHHa6czlw==" + "hash": "k8E9h/BXaFro+MijJniIvQ==" } }, "is_incremental": false, @@ -726,7 +774,7 @@ "output": { ".html": { "relative_path": "api/Terminal.Gui/Unix.Terminal.Curses.html", - "hash": "FFz1FzF7eZr0ehIP28nfeA==" + "hash": "3/q0N9DF1lQcHPmb+I2CWw==" } }, "is_incremental": false, @@ -738,7 +786,7 @@ "output": { ".html": { "relative_path": "api/Terminal.Gui/Unix.Terminal.html", - "hash": "tZBFX5d+0ljs4g5SkFUaRw==" + "hash": "vB7ZYO0kX6elwHjUEpmuSA==" } }, "is_incremental": false, @@ -750,7 +798,7 @@ "output": { ".html": { "relative_path": "api/Terminal.Gui/toc.html", - "hash": "Ngpv15hGS+BaW2xzXlhgLw==" + "hash": "AeVJEcZauvo0OGUU2pTugA==" } }, "is_incremental": false, @@ -762,7 +810,7 @@ "output": { ".html": { "relative_path": "api/UICatalog/UICatalog.Scenario.ScenarioCategory.html", - "hash": "zOd6vVqZpiCGJsQHhQNljA==" + "hash": "tqyRt/FhFHuEZ7EGwC35jA==" } }, "is_incremental": false, @@ -774,7 +822,7 @@ "output": { ".html": { "relative_path": "api/UICatalog/UICatalog.Scenario.ScenarioMetadata.html", - "hash": "mccNmLh8IPz0K5GeyLpLaQ==" + "hash": "y27uoDlrRnlNCgdu+v+hSQ==" } }, "is_incremental": false, @@ -786,7 +834,7 @@ "output": { ".html": { "relative_path": "api/UICatalog/UICatalog.Scenario.html", - "hash": "iJkOvDCL2Tlu5MUxENKd/g==" + "hash": "eD4XtFKWa75qkI0x4AAPQA==" } }, "is_incremental": false, @@ -798,7 +846,7 @@ "output": { ".html": { "relative_path": "api/UICatalog/UICatalog.UICatalogApp.html", - "hash": "46os5DPxVjyRhijGX2NEog==" + "hash": "e1tUQmMLQmbsABBimSMSww==" } }, "is_incremental": false, @@ -810,7 +858,7 @@ "output": { ".html": { "relative_path": "api/UICatalog/UICatalog.html", - "hash": "qo5NZjX5e3IIMptVZvIY3w==" + "hash": "GlhimAyigvEtjpSbjREqVw==" } }, "is_incremental": false, @@ -837,7 +885,7 @@ "output": { ".html": { "relative_path": "articles/index.html", - "hash": "x8mCX8cK48attzsxbK54Sw==" + "hash": "744H11uqckc67FMnyPwuAw==" } }, "is_incremental": false, @@ -852,7 +900,7 @@ "output": { ".html": { "relative_path": "articles/keyboard.html", - "hash": "CY2rcQ2uZSFnPwVDYbKUjA==" + "hash": "rwci91qBHbt53wXWs+EpGQ==" } }, "is_incremental": false, @@ -867,7 +915,7 @@ "output": { ".html": { "relative_path": "articles/mainloop.html", - "hash": "V6r5qoSnMAugNHW9Q9jeow==" + "hash": "+Gk5WNcthHcaHkTAKlmZUA==" } }, "is_incremental": false, @@ -882,7 +930,7 @@ "output": { ".html": { "relative_path": "articles/overview.html", - "hash": "HBL/nlArVeXGHhLxPK7cXA==" + "hash": "Wy+ggJRGeJlypMRyZz1luA==" } }, "is_incremental": false, @@ -894,7 +942,7 @@ "output": { ".html": { "relative_path": "articles/views.html", - "hash": "1MuKnvdCitQq02I3G43o5A==" + "hash": "Ml/3kMWMZtOcVoyqhroX6w==" } }, "is_incremental": false, @@ -931,7 +979,7 @@ "output": { ".html": { "relative_path": "index.html", - "hash": "TlRTHfWGHTyrXUZZnWzZnQ==" + "hash": "LJXc9TSmTbQr+X1vAQ+VbA==" } }, "is_incremental": false, @@ -953,25 +1001,23 @@ "incremental_info": [ { "status": { - "can_incremental": false, - "details": "Cannot build incrementally because last build info is missing.", + "can_incremental": true, "incrementalPhase": "build", "total_file_count": 0, - "skipped_file_count": 0, - "full_build_reason_code": "NoAvailableBuildCache" + "skipped_file_count": 0 }, "processors": { "ConceptualDocumentProcessor": { - "can_incremental": false, + "can_incremental": true, "incrementalPhase": "build", "total_file_count": 6, - "skipped_file_count": 0 + "skipped_file_count": 6 }, "ManagedReferenceDocumentProcessor": { - "can_incremental": false, + "can_incremental": true, "incrementalPhase": "build", - "total_file_count": 66, - "skipped_file_count": 0 + "total_file_count": 70, + "skipped_file_count": 70 }, "ResourceDocumentProcessor": { "can_incremental": false, diff --git a/docs/styles/main.css b/docs/styles/main.css index 165a8786e1..e69de29bb2 100644 --- a/docs/styles/main.css +++ b/docs/styles/main.css @@ -1,299 +0,0 @@ -/* COLOR VARIABLES*/ -:root { - --header-bg-color: #0d47a1; - --header-ft-color: #fff; - --highlight-light: #5e92f3; - --highlight-dark: #003c8f; - --accent-dim: #eee; - --font-color: #34393e; - --card-box-shadow: 0 1px 2px 0 rgba(61, 65, 68, 0.06), 0 1px 3px 1px rgba(61, 65, 68, 0.16); - --under-box-shadow: 0 4px 4px -2px #eee; - --search-box-shadow: 0px 0px 5px 0px rgba(255,255,255,1); -} - -body { - color: var(--font-color); - font-family: "Roboto", sans-serif; - line-height: 1.5; - font-size: 16px; - -ms-text-size-adjust: 100%; - -webkit-text-size-adjust: 100%; - word-wrap: break-word; -} - -/* HIGHLIGHT COLOR */ - -button, -a { - color: var(--highlight-dark); - cursor: pointer; -} - -button:hover, -button:focus, -a:hover, -a:focus { - color: var(--highlight-light); - text-decoration: none; -} - -.toc .nav > li.active > a { - color: var(--highlight-dark); -} - -.toc .nav > li.active > a:hover, -.toc .nav > li.active > a:focus { - color: var(--highlight-light); -} - -.pagination > .active > a { - background-color: var(--header-bg-color); - border-color: var(--header-bg-color); -} - -.pagination > .active > a, -.pagination > .active > a:focus, -.pagination > .active > a:hover, -.pagination > .active > span, -.pagination > .active > span:focus, -.pagination > .active > span:hover { - background-color: var(--highlight-light); - border-color: var(--highlight-light); -} - -/* HEADINGS */ - -h1 { - font-weight: 600; - font-size: 32px; -} - -h2 { - font-weight: 600; - font-size: 24px; - line-height: 1.8; -} - -h3 { - font-weight: 600; - font-size: 20px; - line-height: 1.8; -} - -h5 { - font-size: 14px; - padding: 10px 0px; -} - -article h1, -article h2, -article h3, -article h4 { - margin-top: 35px; - margin-bottom: 15px; -} - -article h4 { - padding-bottom: 8px; - border-bottom: 2px solid #ddd; -} - -/* NAVBAR */ - -.navbar-brand > img { - color: var(--header-ft-color); -} - -.navbar { - border: none; - /* Both navbars use box-shadow */ - -webkit-box-shadow: var(--card-box-shadow); - -moz-box-shadow: var(--card-box-shadow); - box-shadow: var(--card-box-shadow); -} - -.subnav { - border-top: 1px solid #ddd; - background-color: #fff; -} - -.navbar-inverse { - background-color: var(--header-bg-color); - z-index: 100; -} - -.navbar-inverse .navbar-nav > li > a, -.navbar-inverse .navbar-text { - color: var(--header-ft-color); - background-color: var(--header-bg-color); - border-bottom: 3px solid transparent; - padding-bottom: 12px; -} - -.navbar-inverse .navbar-nav > li > a:focus, -.navbar-inverse .navbar-nav > li > a:hover { - color: var(--header-ft-color); - background-color: var(--header-bg-color); - border-bottom: 3px solid white; -} - -.navbar-inverse .navbar-nav > .active > a, -.navbar-inverse .navbar-nav > .active > a:focus, -.navbar-inverse .navbar-nav > .active > a:hover { - color: var(--header-ft-color); - background-color: var(--header-bg-color); - border-bottom: 3px solid white; -} - -.navbar-form .form-control { - border: 0; - border-radius: 0; -} - -.navbar-form .form-control:hover { - box-shadow: var(--search-box-shadow); -} - -.toc-filter > input:hover { - box-shadow: var(--under-box-shadow); -} - -/* NAVBAR TOGGLED (small screens) */ - -.navbar-inverse .navbar-collapse, .navbar-inverse .navbar-form { - border: none; -} -.navbar-inverse .navbar-toggle { - box-shadow: var(--card-box-shadow); - border: none; -} - -.navbar-inverse .navbar-toggle:focus, -.navbar-inverse .navbar-toggle:hover { - background-color: var(--header-ft-color); -} - -/* SIDEBAR */ - -.toc .level1 > li { - font-weight: 400; -} - -.toc .nav > li > a { - color: var(--font-color); -} - -.sidefilter { - background-color: #fff; - border-left: none; - border-right: none; -} - -.sidefilter { - background-color: #fff; - border-left: none; - border-right: none; -} - -.toc-filter { - padding: 10px; - margin: 0; -} - -.toc-filter > input { - border: none; - border-bottom: 2px solid var(--accent-dim); -} - -.toc-filter > .filter-icon { - display: none; -} - -.sidetoc > .toc { - background-color: #fff; - overflow-x: hidden; -} - -.sidetoc { - background-color: #fff; - border: none; -} - -/* ALERTS */ - -.alert { - padding: 0px 0px 5px 0px; - color: inherit; - background-color: inherit; - border: none; - box-shadow: var(--card-box-shadow); -} - -.alert > p { - margin-bottom: 0; - padding: 5px 10px; -} - -.alert > ul { - margin-bottom: 0; - padding: 5px 40px; -} - -.alert > h5 { - padding: 10px 15px; - margin-top: 0; - text-transform: uppercase; - font-weight: bold; - border-radius: 4px 4px 0 0; -} - -.alert-info > h5 { - color: #1976d2; - border-bottom: 4px solid #1976d2; - background-color: #e3f2fd; -} - -.alert-warning > h5 { - color: #f57f17; - border-bottom: 4px solid #f57f17; - background-color: #fff3e0; -} - -.alert-danger > h5 { - color: #d32f2f; - border-bottom: 4px solid #d32f2f; - background-color: #ffebee; -} - -/* CODE HIGHLIGHT */ -pre { - padding: 9.5px; - margin: 0 0 10px; - font-size: 13px; - word-break: break-all; - word-wrap: break-word; - background-color: #fffaef; - border-radius: 4px; - border: none; - box-shadow: var(--card-box-shadow); -} - -/* STYLE FOR IMAGES */ - -.article .small-image { - margin-top: 15px; - box-shadow: var(--card-box-shadow); - max-width: 350px; -} - -.article .medium-image { - margin-top: 15px; - box-shadow: var(--card-box-shadow); - max-width: 550px; -} - -.article .large-image { - margin-top: 15px; - box-shadow: var(--card-box-shadow); - max-width: 700px; -} \ No newline at end of file diff --git a/docs/xrefmap.yml b/docs/xrefmap.yml index b31754eb1a..80cb978192 100644 --- a/docs/xrefmap.yml +++ b/docs/xrefmap.yml @@ -580,6 +580,19 @@ references: isSpec: "True" fullName: Terminal.Gui.CheckBox.MouseEvent nameWithType: CheckBox.MouseEvent +- uid: Terminal.Gui.CheckBox.OnToggled(System.Boolean) + name: OnToggled(Boolean) + href: api/Terminal.Gui/Terminal.Gui.CheckBox.html#Terminal_Gui_CheckBox_OnToggled_System_Boolean_ + commentId: M:Terminal.Gui.CheckBox.OnToggled(System.Boolean) + fullName: Terminal.Gui.CheckBox.OnToggled(System.Boolean) + nameWithType: CheckBox.OnToggled(Boolean) +- uid: Terminal.Gui.CheckBox.OnToggled* + name: OnToggled + href: api/Terminal.Gui/Terminal.Gui.CheckBox.html#Terminal_Gui_CheckBox_OnToggled_ + commentId: Overload:Terminal.Gui.CheckBox.OnToggled + isSpec: "True" + fullName: Terminal.Gui.CheckBox.OnToggled + nameWithType: CheckBox.OnToggled - uid: Terminal.Gui.CheckBox.PositionCursor name: PositionCursor() href: api/Terminal.Gui/Terminal.Gui.CheckBox.html#Terminal_Gui_CheckBox_PositionCursor @@ -1465,6 +1478,15 @@ references: fullName.vb: Terminal.Gui.Dialog.Dialog(NStack.ustring, System.Int32, System.Int32, Terminal.Gui.Button()) nameWithType: Dialog.Dialog(ustring, Int32, Int32, Button[]) nameWithType.vb: Dialog.Dialog(ustring, Int32, Int32, Button()) +- uid: Terminal.Gui.Dialog.#ctor(NStack.ustring,Terminal.Gui.Button[]) + name: Dialog(ustring, Button[]) + href: api/Terminal.Gui/Terminal.Gui.Dialog.html#Terminal_Gui_Dialog__ctor_NStack_ustring_Terminal_Gui_Button___ + commentId: M:Terminal.Gui.Dialog.#ctor(NStack.ustring,Terminal.Gui.Button[]) + name.vb: Dialog(ustring, Button()) + fullName: Terminal.Gui.Dialog.Dialog(NStack.ustring, Terminal.Gui.Button[]) + fullName.vb: Terminal.Gui.Dialog.Dialog(NStack.ustring, Terminal.Gui.Button()) + nameWithType: Dialog.Dialog(ustring, Button[]) + nameWithType.vb: Dialog.Dialog(ustring, Button()) - uid: Terminal.Gui.Dialog.#ctor* name: Dialog href: api/Terminal.Gui/Terminal.Gui.Dialog.html#Terminal_Gui_Dialog__ctor_ @@ -2543,12 +2565,12 @@ references: commentId: M:Terminal.Gui.KeyEvent.#ctor fullName: Terminal.Gui.KeyEvent.KeyEvent() nameWithType: KeyEvent.KeyEvent() -- uid: Terminal.Gui.KeyEvent.#ctor(Terminal.Gui.Key) - name: KeyEvent(Key) - href: api/Terminal.Gui/Terminal.Gui.KeyEvent.html#Terminal_Gui_KeyEvent__ctor_Terminal_Gui_Key_ - commentId: M:Terminal.Gui.KeyEvent.#ctor(Terminal.Gui.Key) - fullName: Terminal.Gui.KeyEvent.KeyEvent(Terminal.Gui.Key) - nameWithType: KeyEvent.KeyEvent(Key) +- uid: Terminal.Gui.KeyEvent.#ctor(Terminal.Gui.Key,Terminal.Gui.KeyModifiers) + name: KeyEvent(Key, KeyModifiers) + href: api/Terminal.Gui/Terminal.Gui.KeyEvent.html#Terminal_Gui_KeyEvent__ctor_Terminal_Gui_Key_Terminal_Gui_KeyModifiers_ + commentId: M:Terminal.Gui.KeyEvent.#ctor(Terminal.Gui.Key,Terminal.Gui.KeyModifiers) + fullName: Terminal.Gui.KeyEvent.KeyEvent(Terminal.Gui.Key, Terminal.Gui.KeyModifiers) + nameWithType: KeyEvent.KeyEvent(Key, KeyModifiers) - uid: Terminal.Gui.KeyEvent.#ctor* name: KeyEvent href: api/Terminal.Gui/Terminal.Gui.KeyEvent.html#Terminal_Gui_KeyEvent__ctor_ @@ -2569,6 +2591,19 @@ references: isSpec: "True" fullName: Terminal.Gui.KeyEvent.IsAlt nameWithType: KeyEvent.IsAlt +- uid: Terminal.Gui.KeyEvent.IsCapslock + name: IsCapslock + href: api/Terminal.Gui/Terminal.Gui.KeyEvent.html#Terminal_Gui_KeyEvent_IsCapslock + commentId: P:Terminal.Gui.KeyEvent.IsCapslock + fullName: Terminal.Gui.KeyEvent.IsCapslock + nameWithType: KeyEvent.IsCapslock +- uid: Terminal.Gui.KeyEvent.IsCapslock* + name: IsCapslock + href: api/Terminal.Gui/Terminal.Gui.KeyEvent.html#Terminal_Gui_KeyEvent_IsCapslock_ + commentId: Overload:Terminal.Gui.KeyEvent.IsCapslock + isSpec: "True" + fullName: Terminal.Gui.KeyEvent.IsCapslock + nameWithType: KeyEvent.IsCapslock - uid: Terminal.Gui.KeyEvent.IsCtrl name: IsCtrl href: api/Terminal.Gui/Terminal.Gui.KeyEvent.html#Terminal_Gui_KeyEvent_IsCtrl @@ -2582,6 +2617,32 @@ references: isSpec: "True" fullName: Terminal.Gui.KeyEvent.IsCtrl nameWithType: KeyEvent.IsCtrl +- uid: Terminal.Gui.KeyEvent.IsNumlock + name: IsNumlock + href: api/Terminal.Gui/Terminal.Gui.KeyEvent.html#Terminal_Gui_KeyEvent_IsNumlock + commentId: P:Terminal.Gui.KeyEvent.IsNumlock + fullName: Terminal.Gui.KeyEvent.IsNumlock + nameWithType: KeyEvent.IsNumlock +- uid: Terminal.Gui.KeyEvent.IsNumlock* + name: IsNumlock + href: api/Terminal.Gui/Terminal.Gui.KeyEvent.html#Terminal_Gui_KeyEvent_IsNumlock_ + commentId: Overload:Terminal.Gui.KeyEvent.IsNumlock + isSpec: "True" + fullName: Terminal.Gui.KeyEvent.IsNumlock + nameWithType: KeyEvent.IsNumlock +- uid: Terminal.Gui.KeyEvent.IsScrolllock + name: IsScrolllock + href: api/Terminal.Gui/Terminal.Gui.KeyEvent.html#Terminal_Gui_KeyEvent_IsScrolllock + commentId: P:Terminal.Gui.KeyEvent.IsScrolllock + fullName: Terminal.Gui.KeyEvent.IsScrolllock + nameWithType: KeyEvent.IsScrolllock +- uid: Terminal.Gui.KeyEvent.IsScrolllock* + name: IsScrolllock + href: api/Terminal.Gui/Terminal.Gui.KeyEvent.html#Terminal_Gui_KeyEvent_IsScrolllock_ + commentId: Overload:Terminal.Gui.KeyEvent.IsScrolllock + isSpec: "True" + fullName: Terminal.Gui.KeyEvent.IsScrolllock + nameWithType: KeyEvent.IsScrolllock - uid: Terminal.Gui.KeyEvent.IsShift name: IsShift href: api/Terminal.Gui/Terminal.Gui.KeyEvent.html#Terminal_Gui_KeyEvent_IsShift @@ -2627,6 +2688,48 @@ references: isSpec: "True" fullName: Terminal.Gui.KeyEvent.ToString nameWithType: KeyEvent.ToString +- uid: Terminal.Gui.KeyModifiers + name: KeyModifiers + href: api/Terminal.Gui/Terminal.Gui.KeyModifiers.html + commentId: T:Terminal.Gui.KeyModifiers + fullName: Terminal.Gui.KeyModifiers + nameWithType: KeyModifiers +- uid: Terminal.Gui.KeyModifiers.Alt + name: Alt + href: api/Terminal.Gui/Terminal.Gui.KeyModifiers.html#Terminal_Gui_KeyModifiers_Alt + commentId: F:Terminal.Gui.KeyModifiers.Alt + fullName: Terminal.Gui.KeyModifiers.Alt + nameWithType: KeyModifiers.Alt +- uid: Terminal.Gui.KeyModifiers.Capslock + name: Capslock + href: api/Terminal.Gui/Terminal.Gui.KeyModifiers.html#Terminal_Gui_KeyModifiers_Capslock + commentId: F:Terminal.Gui.KeyModifiers.Capslock + fullName: Terminal.Gui.KeyModifiers.Capslock + nameWithType: KeyModifiers.Capslock +- uid: Terminal.Gui.KeyModifiers.Ctrl + name: Ctrl + href: api/Terminal.Gui/Terminal.Gui.KeyModifiers.html#Terminal_Gui_KeyModifiers_Ctrl + commentId: F:Terminal.Gui.KeyModifiers.Ctrl + fullName: Terminal.Gui.KeyModifiers.Ctrl + nameWithType: KeyModifiers.Ctrl +- uid: Terminal.Gui.KeyModifiers.Numlock + name: Numlock + href: api/Terminal.Gui/Terminal.Gui.KeyModifiers.html#Terminal_Gui_KeyModifiers_Numlock + commentId: F:Terminal.Gui.KeyModifiers.Numlock + fullName: Terminal.Gui.KeyModifiers.Numlock + nameWithType: KeyModifiers.Numlock +- uid: Terminal.Gui.KeyModifiers.Scrolllock + name: Scrolllock + href: api/Terminal.Gui/Terminal.Gui.KeyModifiers.html#Terminal_Gui_KeyModifiers_Scrolllock + commentId: F:Terminal.Gui.KeyModifiers.Scrolllock + fullName: Terminal.Gui.KeyModifiers.Scrolllock + nameWithType: KeyModifiers.Scrolllock +- uid: Terminal.Gui.KeyModifiers.Shift + name: Shift + href: api/Terminal.Gui/Terminal.Gui.KeyModifiers.html#Terminal_Gui_KeyModifiers_Shift + commentId: F:Terminal.Gui.KeyModifiers.Shift + fullName: Terminal.Gui.KeyModifiers.Shift + nameWithType: KeyModifiers.Shift - uid: Terminal.Gui.Label name: Label href: api/Terminal.Gui/Terminal.Gui.Label.html @@ -3742,15 +3845,24 @@ references: commentId: T:Terminal.Gui.MessageBox fullName: Terminal.Gui.MessageBox nameWithType: MessageBox -- uid: Terminal.Gui.MessageBox.ErrorQuery(System.Int32,System.Int32,System.String,System.String,System.String[]) - name: ErrorQuery(Int32, Int32, String, String, String[]) - href: api/Terminal.Gui/Terminal.Gui.MessageBox.html#Terminal_Gui_MessageBox_ErrorQuery_System_Int32_System_Int32_System_String_System_String_System_String___ - commentId: M:Terminal.Gui.MessageBox.ErrorQuery(System.Int32,System.Int32,System.String,System.String,System.String[]) - name.vb: ErrorQuery(Int32, Int32, String, String, String()) - fullName: Terminal.Gui.MessageBox.ErrorQuery(System.Int32, System.Int32, System.String, System.String, System.String[]) - fullName.vb: Terminal.Gui.MessageBox.ErrorQuery(System.Int32, System.Int32, System.String, System.String, System.String()) - nameWithType: MessageBox.ErrorQuery(Int32, Int32, String, String, String[]) - nameWithType.vb: MessageBox.ErrorQuery(Int32, Int32, String, String, String()) +- uid: Terminal.Gui.MessageBox.ErrorQuery(NStack.ustring,NStack.ustring,NStack.ustring[]) + name: ErrorQuery(ustring, ustring, ustring[]) + href: api/Terminal.Gui/Terminal.Gui.MessageBox.html#Terminal_Gui_MessageBox_ErrorQuery_NStack_ustring_NStack_ustring_NStack_ustring___ + commentId: M:Terminal.Gui.MessageBox.ErrorQuery(NStack.ustring,NStack.ustring,NStack.ustring[]) + name.vb: ErrorQuery(ustring, ustring, ustring()) + fullName: Terminal.Gui.MessageBox.ErrorQuery(NStack.ustring, NStack.ustring, NStack.ustring[]) + fullName.vb: Terminal.Gui.MessageBox.ErrorQuery(NStack.ustring, NStack.ustring, NStack.ustring()) + nameWithType: MessageBox.ErrorQuery(ustring, ustring, ustring[]) + nameWithType.vb: MessageBox.ErrorQuery(ustring, ustring, ustring()) +- uid: Terminal.Gui.MessageBox.ErrorQuery(System.Int32,System.Int32,NStack.ustring,NStack.ustring,NStack.ustring[]) + name: ErrorQuery(Int32, Int32, ustring, ustring, ustring[]) + href: api/Terminal.Gui/Terminal.Gui.MessageBox.html#Terminal_Gui_MessageBox_ErrorQuery_System_Int32_System_Int32_NStack_ustring_NStack_ustring_NStack_ustring___ + commentId: M:Terminal.Gui.MessageBox.ErrorQuery(System.Int32,System.Int32,NStack.ustring,NStack.ustring,NStack.ustring[]) + name.vb: ErrorQuery(Int32, Int32, ustring, ustring, ustring()) + fullName: Terminal.Gui.MessageBox.ErrorQuery(System.Int32, System.Int32, NStack.ustring, NStack.ustring, NStack.ustring[]) + fullName.vb: Terminal.Gui.MessageBox.ErrorQuery(System.Int32, System.Int32, NStack.ustring, NStack.ustring, NStack.ustring()) + nameWithType: MessageBox.ErrorQuery(Int32, Int32, ustring, ustring, ustring[]) + nameWithType.vb: MessageBox.ErrorQuery(Int32, Int32, ustring, ustring, ustring()) - uid: Terminal.Gui.MessageBox.ErrorQuery* name: ErrorQuery href: api/Terminal.Gui/Terminal.Gui.MessageBox.html#Terminal_Gui_MessageBox_ErrorQuery_ @@ -3758,15 +3870,24 @@ references: isSpec: "True" fullName: Terminal.Gui.MessageBox.ErrorQuery nameWithType: MessageBox.ErrorQuery -- uid: Terminal.Gui.MessageBox.Query(System.Int32,System.Int32,System.String,System.String,System.String[]) - name: Query(Int32, Int32, String, String, String[]) - href: api/Terminal.Gui/Terminal.Gui.MessageBox.html#Terminal_Gui_MessageBox_Query_System_Int32_System_Int32_System_String_System_String_System_String___ - commentId: M:Terminal.Gui.MessageBox.Query(System.Int32,System.Int32,System.String,System.String,System.String[]) - name.vb: Query(Int32, Int32, String, String, String()) - fullName: Terminal.Gui.MessageBox.Query(System.Int32, System.Int32, System.String, System.String, System.String[]) - fullName.vb: Terminal.Gui.MessageBox.Query(System.Int32, System.Int32, System.String, System.String, System.String()) - nameWithType: MessageBox.Query(Int32, Int32, String, String, String[]) - nameWithType.vb: MessageBox.Query(Int32, Int32, String, String, String()) +- uid: Terminal.Gui.MessageBox.Query(NStack.ustring,NStack.ustring,NStack.ustring[]) + name: Query(ustring, ustring, ustring[]) + href: api/Terminal.Gui/Terminal.Gui.MessageBox.html#Terminal_Gui_MessageBox_Query_NStack_ustring_NStack_ustring_NStack_ustring___ + commentId: M:Terminal.Gui.MessageBox.Query(NStack.ustring,NStack.ustring,NStack.ustring[]) + name.vb: Query(ustring, ustring, ustring()) + fullName: Terminal.Gui.MessageBox.Query(NStack.ustring, NStack.ustring, NStack.ustring[]) + fullName.vb: Terminal.Gui.MessageBox.Query(NStack.ustring, NStack.ustring, NStack.ustring()) + nameWithType: MessageBox.Query(ustring, ustring, ustring[]) + nameWithType.vb: MessageBox.Query(ustring, ustring, ustring()) +- uid: Terminal.Gui.MessageBox.Query(System.Int32,System.Int32,NStack.ustring,NStack.ustring,NStack.ustring[]) + name: Query(Int32, Int32, ustring, ustring, ustring[]) + href: api/Terminal.Gui/Terminal.Gui.MessageBox.html#Terminal_Gui_MessageBox_Query_System_Int32_System_Int32_NStack_ustring_NStack_ustring_NStack_ustring___ + commentId: M:Terminal.Gui.MessageBox.Query(System.Int32,System.Int32,NStack.ustring,NStack.ustring,NStack.ustring[]) + name.vb: Query(Int32, Int32, ustring, ustring, ustring()) + fullName: Terminal.Gui.MessageBox.Query(System.Int32, System.Int32, NStack.ustring, NStack.ustring, NStack.ustring[]) + fullName.vb: Terminal.Gui.MessageBox.Query(System.Int32, System.Int32, NStack.ustring, NStack.ustring, NStack.ustring()) + nameWithType: MessageBox.Query(Int32, Int32, ustring, ustring, ustring[]) + nameWithType.vb: MessageBox.Query(Int32, Int32, ustring, ustring, ustring()) - uid: Terminal.Gui.MessageBox.Query* name: Query href: api/Terminal.Gui/Terminal.Gui.MessageBox.html#Terminal_Gui_MessageBox_Query_ @@ -5212,6 +5333,24 @@ references: commentId: T:Terminal.Gui.ScrollBarView fullName: Terminal.Gui.ScrollBarView nameWithType: ScrollBarView +- uid: Terminal.Gui.ScrollBarView.#ctor + name: ScrollBarView() + href: api/Terminal.Gui/Terminal.Gui.ScrollBarView.html#Terminal_Gui_ScrollBarView__ctor + commentId: M:Terminal.Gui.ScrollBarView.#ctor + fullName: Terminal.Gui.ScrollBarView.ScrollBarView() + nameWithType: ScrollBarView.ScrollBarView() +- uid: Terminal.Gui.ScrollBarView.#ctor(System.Int32,System.Int32,System.Boolean) + name: ScrollBarView(Int32, Int32, Boolean) + href: api/Terminal.Gui/Terminal.Gui.ScrollBarView.html#Terminal_Gui_ScrollBarView__ctor_System_Int32_System_Int32_System_Boolean_ + commentId: M:Terminal.Gui.ScrollBarView.#ctor(System.Int32,System.Int32,System.Boolean) + fullName: Terminal.Gui.ScrollBarView.ScrollBarView(System.Int32, System.Int32, System.Boolean) + nameWithType: ScrollBarView.ScrollBarView(Int32, Int32, Boolean) +- uid: Terminal.Gui.ScrollBarView.#ctor(Terminal.Gui.Rect) + name: ScrollBarView(Rect) + href: api/Terminal.Gui/Terminal.Gui.ScrollBarView.html#Terminal_Gui_ScrollBarView__ctor_Terminal_Gui_Rect_ + commentId: M:Terminal.Gui.ScrollBarView.#ctor(Terminal.Gui.Rect) + fullName: Terminal.Gui.ScrollBarView.ScrollBarView(Terminal.Gui.Rect) + nameWithType: ScrollBarView.ScrollBarView(Rect) - uid: Terminal.Gui.ScrollBarView.#ctor(Terminal.Gui.Rect,System.Int32,System.Int32,System.Boolean) name: ScrollBarView(Rect, Int32, Int32, Boolean) href: api/Terminal.Gui/Terminal.Gui.ScrollBarView.html#Terminal_Gui_ScrollBarView__ctor_Terminal_Gui_Rect_System_Int32_System_Int32_System_Boolean_ @@ -5231,6 +5370,19 @@ references: commentId: E:Terminal.Gui.ScrollBarView.ChangedPosition fullName: Terminal.Gui.ScrollBarView.ChangedPosition nameWithType: ScrollBarView.ChangedPosition +- uid: Terminal.Gui.ScrollBarView.IsVertical + name: IsVertical + href: api/Terminal.Gui/Terminal.Gui.ScrollBarView.html#Terminal_Gui_ScrollBarView_IsVertical + commentId: P:Terminal.Gui.ScrollBarView.IsVertical + fullName: Terminal.Gui.ScrollBarView.IsVertical + nameWithType: ScrollBarView.IsVertical +- uid: Terminal.Gui.ScrollBarView.IsVertical* + name: IsVertical + href: api/Terminal.Gui/Terminal.Gui.ScrollBarView.html#Terminal_Gui_ScrollBarView_IsVertical_ + commentId: Overload:Terminal.Gui.ScrollBarView.IsVertical + isSpec: "True" + fullName: Terminal.Gui.ScrollBarView.IsVertical + nameWithType: ScrollBarView.IsVertical - uid: Terminal.Gui.ScrollBarView.MouseEvent(Terminal.Gui.MouseEvent) name: MouseEvent(MouseEvent) href: api/Terminal.Gui/Terminal.Gui.ScrollBarView.html#Terminal_Gui_ScrollBarView_MouseEvent_Terminal_Gui_MouseEvent_ @@ -5289,6 +5441,12 @@ references: commentId: T:Terminal.Gui.ScrollView fullName: Terminal.Gui.ScrollView nameWithType: ScrollView +- uid: Terminal.Gui.ScrollView.#ctor + name: ScrollView() + href: api/Terminal.Gui/Terminal.Gui.ScrollView.html#Terminal_Gui_ScrollView__ctor + commentId: M:Terminal.Gui.ScrollView.#ctor + fullName: Terminal.Gui.ScrollView.ScrollView() + nameWithType: ScrollView.ScrollView() - uid: Terminal.Gui.ScrollView.#ctor(Terminal.Gui.Rect) name: ScrollView(Rect) href: api/Terminal.Gui/Terminal.Gui.ScrollView.html#Terminal_Gui_ScrollView__ctor_Terminal_Gui_Rect_ @@ -5725,6 +5883,19 @@ references: isSpec: "True" fullName: Terminal.Gui.StatusBar.Items nameWithType: StatusBar.Items +- uid: Terminal.Gui.StatusBar.MouseEvent(Terminal.Gui.MouseEvent) + name: MouseEvent(MouseEvent) + href: api/Terminal.Gui/Terminal.Gui.StatusBar.html#Terminal_Gui_StatusBar_MouseEvent_Terminal_Gui_MouseEvent_ + commentId: M:Terminal.Gui.StatusBar.MouseEvent(Terminal.Gui.MouseEvent) + fullName: Terminal.Gui.StatusBar.MouseEvent(Terminal.Gui.MouseEvent) + nameWithType: StatusBar.MouseEvent(MouseEvent) +- uid: Terminal.Gui.StatusBar.MouseEvent* + name: MouseEvent + href: api/Terminal.Gui/Terminal.Gui.StatusBar.html#Terminal_Gui_StatusBar_MouseEvent_ + commentId: Overload:Terminal.Gui.StatusBar.MouseEvent + isSpec: "True" + fullName: Terminal.Gui.StatusBar.MouseEvent + nameWithType: StatusBar.MouseEvent - uid: Terminal.Gui.StatusBar.Parent name: Parent href: api/Terminal.Gui/Terminal.Gui.StatusBar.html#Terminal_Gui_StatusBar_Parent @@ -6770,6 +6941,12 @@ references: isSpec: "True" fullName: Terminal.Gui.View.ColorScheme nameWithType: View.ColorScheme +- uid: Terminal.Gui.View.DrawContent + name: DrawContent + href: api/Terminal.Gui/Terminal.Gui.View.html#Terminal_Gui_View_DrawContent + commentId: E:Terminal.Gui.View.DrawContent + fullName: Terminal.Gui.View.DrawContent + nameWithType: View.DrawContent - uid: Terminal.Gui.View.DrawFrame(Terminal.Gui.Rect,System.Int32,System.Boolean) name: DrawFrame(Rect, Int32, Boolean) href: api/Terminal.Gui/Terminal.Gui.View.html#Terminal_Gui_View_DrawFrame_Terminal_Gui_Rect_System_Int32_System_Boolean_ @@ -6847,6 +7024,38 @@ references: isSpec: "True" fullName: Terminal.Gui.View.Focused nameWithType: View.Focused +- uid: Terminal.Gui.View.FocusEventArgs + name: View.FocusEventArgs + href: api/Terminal.Gui/Terminal.Gui.View.FocusEventArgs.html + commentId: T:Terminal.Gui.View.FocusEventArgs + fullName: Terminal.Gui.View.FocusEventArgs + nameWithType: View.FocusEventArgs +- uid: Terminal.Gui.View.FocusEventArgs.#ctor + name: FocusEventArgs() + href: api/Terminal.Gui/Terminal.Gui.View.FocusEventArgs.html#Terminal_Gui_View_FocusEventArgs__ctor + commentId: M:Terminal.Gui.View.FocusEventArgs.#ctor + fullName: Terminal.Gui.View.FocusEventArgs.FocusEventArgs() + nameWithType: View.FocusEventArgs.FocusEventArgs() +- uid: Terminal.Gui.View.FocusEventArgs.#ctor* + name: FocusEventArgs + href: api/Terminal.Gui/Terminal.Gui.View.FocusEventArgs.html#Terminal_Gui_View_FocusEventArgs__ctor_ + commentId: Overload:Terminal.Gui.View.FocusEventArgs.#ctor + isSpec: "True" + fullName: Terminal.Gui.View.FocusEventArgs.FocusEventArgs + nameWithType: View.FocusEventArgs.FocusEventArgs +- uid: Terminal.Gui.View.FocusEventArgs.Handled + name: Handled + href: api/Terminal.Gui/Terminal.Gui.View.FocusEventArgs.html#Terminal_Gui_View_FocusEventArgs_Handled + commentId: P:Terminal.Gui.View.FocusEventArgs.Handled + fullName: Terminal.Gui.View.FocusEventArgs.Handled + nameWithType: View.FocusEventArgs.Handled +- uid: Terminal.Gui.View.FocusEventArgs.Handled* + name: Handled + href: api/Terminal.Gui/Terminal.Gui.View.FocusEventArgs.html#Terminal_Gui_View_FocusEventArgs_Handled_ + commentId: Overload:Terminal.Gui.View.FocusEventArgs.Handled + isSpec: "True" + fullName: Terminal.Gui.View.FocusEventArgs.Handled + nameWithType: View.FocusEventArgs.Handled - uid: Terminal.Gui.View.FocusFirst name: FocusFirst() href: api/Terminal.Gui/Terminal.Gui.View.html#Terminal_Gui_View_FocusFirst @@ -7040,6 +7249,31 @@ references: commentId: E:Terminal.Gui.View.KeyUp fullName: Terminal.Gui.View.KeyUp nameWithType: View.KeyUp +- uid: Terminal.Gui.View.LayoutComplete + name: LayoutComplete + href: api/Terminal.Gui/Terminal.Gui.View.html#Terminal_Gui_View_LayoutComplete + commentId: E:Terminal.Gui.View.LayoutComplete + fullName: Terminal.Gui.View.LayoutComplete + nameWithType: View.LayoutComplete +- uid: Terminal.Gui.View.LayoutEventArgs + name: View.LayoutEventArgs + href: api/Terminal.Gui/Terminal.Gui.View.LayoutEventArgs.html + commentId: T:Terminal.Gui.View.LayoutEventArgs + fullName: Terminal.Gui.View.LayoutEventArgs + nameWithType: View.LayoutEventArgs +- uid: Terminal.Gui.View.LayoutEventArgs.OldBounds + name: OldBounds + href: api/Terminal.Gui/Terminal.Gui.View.LayoutEventArgs.html#Terminal_Gui_View_LayoutEventArgs_OldBounds + commentId: P:Terminal.Gui.View.LayoutEventArgs.OldBounds + fullName: Terminal.Gui.View.LayoutEventArgs.OldBounds + nameWithType: View.LayoutEventArgs.OldBounds +- uid: Terminal.Gui.View.LayoutEventArgs.OldBounds* + name: OldBounds + href: api/Terminal.Gui/Terminal.Gui.View.LayoutEventArgs.html#Terminal_Gui_View_LayoutEventArgs_OldBounds_ + commentId: Overload:Terminal.Gui.View.LayoutEventArgs.OldBounds + isSpec: "True" + fullName: Terminal.Gui.View.LayoutEventArgs.OldBounds + nameWithType: View.LayoutEventArgs.OldBounds - uid: Terminal.Gui.View.LayoutStyle name: LayoutStyle href: api/Terminal.Gui/Terminal.Gui.View.html#Terminal_Gui_View_LayoutStyle @@ -7085,12 +7319,63 @@ references: isSpec: "True" fullName: Terminal.Gui.View.MostFocused nameWithType: View.MostFocused +- uid: Terminal.Gui.View.MouseClick + name: MouseClick + href: api/Terminal.Gui/Terminal.Gui.View.html#Terminal_Gui_View_MouseClick + commentId: E:Terminal.Gui.View.MouseClick + fullName: Terminal.Gui.View.MouseClick + nameWithType: View.MouseClick - uid: Terminal.Gui.View.MouseEnter name: MouseEnter href: api/Terminal.Gui/Terminal.Gui.View.html#Terminal_Gui_View_MouseEnter commentId: E:Terminal.Gui.View.MouseEnter fullName: Terminal.Gui.View.MouseEnter nameWithType: View.MouseEnter +- uid: Terminal.Gui.View.MouseEventEventArgs + name: View.MouseEventEventArgs + href: api/Terminal.Gui/Terminal.Gui.View.MouseEventEventArgs.html + commentId: T:Terminal.Gui.View.MouseEventEventArgs + fullName: Terminal.Gui.View.MouseEventEventArgs + nameWithType: View.MouseEventEventArgs +- uid: Terminal.Gui.View.MouseEventEventArgs.#ctor(Terminal.Gui.MouseEvent) + name: MouseEventEventArgs(MouseEvent) + href: api/Terminal.Gui/Terminal.Gui.View.MouseEventEventArgs.html#Terminal_Gui_View_MouseEventEventArgs__ctor_Terminal_Gui_MouseEvent_ + commentId: M:Terminal.Gui.View.MouseEventEventArgs.#ctor(Terminal.Gui.MouseEvent) + fullName: Terminal.Gui.View.MouseEventEventArgs.MouseEventEventArgs(Terminal.Gui.MouseEvent) + nameWithType: View.MouseEventEventArgs.MouseEventEventArgs(MouseEvent) +- uid: Terminal.Gui.View.MouseEventEventArgs.#ctor* + name: MouseEventEventArgs + href: api/Terminal.Gui/Terminal.Gui.View.MouseEventEventArgs.html#Terminal_Gui_View_MouseEventEventArgs__ctor_ + commentId: Overload:Terminal.Gui.View.MouseEventEventArgs.#ctor + isSpec: "True" + fullName: Terminal.Gui.View.MouseEventEventArgs.MouseEventEventArgs + nameWithType: View.MouseEventEventArgs.MouseEventEventArgs +- uid: Terminal.Gui.View.MouseEventEventArgs.Handled + name: Handled + href: api/Terminal.Gui/Terminal.Gui.View.MouseEventEventArgs.html#Terminal_Gui_View_MouseEventEventArgs_Handled + commentId: P:Terminal.Gui.View.MouseEventEventArgs.Handled + fullName: Terminal.Gui.View.MouseEventEventArgs.Handled + nameWithType: View.MouseEventEventArgs.Handled +- uid: Terminal.Gui.View.MouseEventEventArgs.Handled* + name: Handled + href: api/Terminal.Gui/Terminal.Gui.View.MouseEventEventArgs.html#Terminal_Gui_View_MouseEventEventArgs_Handled_ + commentId: Overload:Terminal.Gui.View.MouseEventEventArgs.Handled + isSpec: "True" + fullName: Terminal.Gui.View.MouseEventEventArgs.Handled + nameWithType: View.MouseEventEventArgs.Handled +- uid: Terminal.Gui.View.MouseEventEventArgs.MouseEvent + name: MouseEvent + href: api/Terminal.Gui/Terminal.Gui.View.MouseEventEventArgs.html#Terminal_Gui_View_MouseEventEventArgs_MouseEvent + commentId: P:Terminal.Gui.View.MouseEventEventArgs.MouseEvent + fullName: Terminal.Gui.View.MouseEventEventArgs.MouseEvent + nameWithType: View.MouseEventEventArgs.MouseEvent +- uid: Terminal.Gui.View.MouseEventEventArgs.MouseEvent* + name: MouseEvent + href: api/Terminal.Gui/Terminal.Gui.View.MouseEventEventArgs.html#Terminal_Gui_View_MouseEventEventArgs_MouseEvent_ + commentId: Overload:Terminal.Gui.View.MouseEventEventArgs.MouseEvent + isSpec: "True" + fullName: Terminal.Gui.View.MouseEventEventArgs.MouseEvent + nameWithType: View.MouseEventEventArgs.MouseEvent - uid: Terminal.Gui.View.MouseLeave name: MouseLeave href: api/Terminal.Gui/Terminal.Gui.View.html#Terminal_Gui_View_MouseLeave @@ -7110,6 +7395,19 @@ references: isSpec: "True" fullName: Terminal.Gui.View.Move nameWithType: View.Move +- uid: Terminal.Gui.View.OnDrawContent(Terminal.Gui.Rect) + name: OnDrawContent(Rect) + href: api/Terminal.Gui/Terminal.Gui.View.html#Terminal_Gui_View_OnDrawContent_Terminal_Gui_Rect_ + commentId: M:Terminal.Gui.View.OnDrawContent(Terminal.Gui.Rect) + fullName: Terminal.Gui.View.OnDrawContent(Terminal.Gui.Rect) + nameWithType: View.OnDrawContent(Rect) +- uid: Terminal.Gui.View.OnDrawContent* + name: OnDrawContent + href: api/Terminal.Gui/Terminal.Gui.View.html#Terminal_Gui_View_OnDrawContent_ + commentId: Overload:Terminal.Gui.View.OnDrawContent + isSpec: "True" + fullName: Terminal.Gui.View.OnDrawContent + nameWithType: View.OnDrawContent - uid: Terminal.Gui.View.OnEnter name: OnEnter() href: api/Terminal.Gui/Terminal.Gui.View.html#Terminal_Gui_View_OnEnter @@ -7175,6 +7473,19 @@ references: isSpec: "True" fullName: Terminal.Gui.View.OnMouseEnter nameWithType: View.OnMouseEnter +- uid: Terminal.Gui.View.OnMouseEvent(Terminal.Gui.MouseEvent) + name: OnMouseEvent(MouseEvent) + href: api/Terminal.Gui/Terminal.Gui.View.html#Terminal_Gui_View_OnMouseEvent_Terminal_Gui_MouseEvent_ + commentId: M:Terminal.Gui.View.OnMouseEvent(Terminal.Gui.MouseEvent) + fullName: Terminal.Gui.View.OnMouseEvent(Terminal.Gui.MouseEvent) + nameWithType: View.OnMouseEvent(MouseEvent) +- uid: Terminal.Gui.View.OnMouseEvent* + name: OnMouseEvent + href: api/Terminal.Gui/Terminal.Gui.View.html#Terminal_Gui_View_OnMouseEvent_ + commentId: Overload:Terminal.Gui.View.OnMouseEvent + isSpec: "True" + fullName: Terminal.Gui.View.OnMouseEvent + nameWithType: View.OnMouseEvent - uid: Terminal.Gui.View.OnMouseLeave(Terminal.Gui.MouseEvent) name: OnMouseLeave(MouseEvent) href: api/Terminal.Gui/Terminal.Gui.View.html#Terminal_Gui_View_OnMouseLeave_Terminal_Gui_MouseEvent_ From 1c6223ed852e08f668ea8cbf95f329391e56a3d4 Mon Sep 17 00:00:00 2001 From: Charlie Kindel Date: Wed, 3 Jun 2020 20:40:20 -0600 Subject: [PATCH 10/11] regen docs --- .../Terminal.Gui.Application.html | 1 + .../api/Terminal.Gui/Terminal.Gui.Button.html | 100 ++--------------- .../Terminal.Gui/Terminal.Gui.CheckBox.html | 54 +-------- .../Terminal.Gui/Terminal.Gui.ComboBox.html | 30 +---- .../Terminal.Gui/Terminal.Gui.DateField.html | 15 +-- .../api/Terminal.Gui/Terminal.Gui.Dialog.html | 33 +----- .../Terminal.Gui/Terminal.Gui.FileDialog.html | 5 +- .../Terminal.Gui/Terminal.Gui.FrameView.html | 20 +--- .../Terminal.Gui/Terminal.Gui.HexView.html | 66 ++--------- docs/api/Terminal.Gui/Terminal.Gui.Label.html | 20 +--- .../Terminal.Gui/Terminal.Gui.ListView.html | 54 +-------- .../Terminal.Gui/Terminal.Gui.MenuBar.html | 81 ++------------ .../Terminal.Gui.ProgressBar.html | 18 +-- .../Terminal.Gui/Terminal.Gui.RadioGroup.html | 77 ++----------- .../Terminal.Gui.ScrollBarView.html | 24 +--- .../Terminal.Gui/Terminal.Gui.ScrollView.html | 52 +-------- .../Terminal.Gui/Terminal.Gui.StatusBar.html | 49 +-------- .../Terminal.Gui/Terminal.Gui.TextField.html | 54 ++------- .../Terminal.Gui/Terminal.Gui.TextView.html | 56 ++-------- .../Terminal.Gui/Terminal.Gui.TimeField.html | 15 +-- .../Terminal.Gui/Terminal.Gui.Toplevel.html | 65 ++--------- docs/api/Terminal.Gui/Terminal.Gui.View.html | 104 +++--------------- .../api/Terminal.Gui/Terminal.Gui.Window.html | 47 ++------ docs/index.json | 44 ++++---- docs/manifest.json | 46 ++++---- 25 files changed, 166 insertions(+), 964 deletions(-) diff --git a/docs/api/Terminal.Gui/Terminal.Gui.Application.html b/docs/api/Terminal.Gui/Terminal.Gui.Application.html index 15685a6c11..bdc77a737a 100644 --- a/docs/api/Terminal.Gui/Terminal.Gui.Application.html +++ b/docs/api/Terminal.Gui/Terminal.Gui.Application.html @@ -639,6 +639,7 @@

          Declaration

          public static void Run<T>()
          +
               where T : Toplevel, new()
          Type Parameters
          diff --git a/docs/api/Terminal.Gui/Terminal.Gui.Button.html b/docs/api/Terminal.Gui/Terminal.Gui.Button.html index d8d9ad509f..b7ae167700 100644 --- a/docs/api/Terminal.Gui/Terminal.Gui.Button.html +++ b/docs/api/Terminal.Gui/Terminal.Gui.Button.html @@ -578,9 +578,7 @@

          Methods

          MouseEvent(MouseEvent)

          -
          -Method invoked when a mouse event is generated -
          +
          Declaration
          @@ -614,7 +612,7 @@
          Returns
          System.Boolean - true, if the event was handled, false otherwise. + @@ -624,9 +622,7 @@
          Overrides

          PositionCursor()

          -
          -Positions the cursor in the right position based on the currently focused view in the chain. -
          +
          Declaration
          @@ -638,12 +634,7 @@
          Overrides

          ProcessColdKey(KeyEvent)

          -
          -This method can be overwritten by views that -want to provide accelerator functionality -(Alt-key for example), but without -interefering with normal ProcessKey behavior. -
          +
          Declaration
          @@ -683,31 +674,11 @@
          Returns
          Overrides
          -
          Remarks
          -
          -

          - After keys are sent to the subviews on the - current view, all the view are - processed and the key is passed to the views - to allow some of them to process the keystroke - as a cold-key.

          -

          - This functionality is used, for example, by - default buttons to act on the enter key. - Processing this as a hot-key would prevent - non-default buttons from consuming the enter - keypress when they have the focus. -

          -

          ProcessHotKey(KeyEvent)

          -
          -This method can be overwritten by view that -want to provide accelerator functionality -(Alt-key for example). -
          +
          Declaration
          @@ -747,31 +718,11 @@
          Returns
          Overrides
          -
          Remarks
          -
          -

          - Before keys are sent to the subview on the - current view, all the views are - processed and the key is passed to the widgets - to allow some of them to process the keystroke - as a hot-key.

          -

          - For example, if you implement a button that - has a hotkey ok "o", you would catch the - combination Alt-o here. If the event is - caught, you must return true to stop the - keystroke from being dispatched to other - views. -

          -

          ProcessKey(KeyEvent)

          -
          -If the view is focused, gives the view a -chance to process the keystroke. -
          +
          Declaration
          @@ -811,32 +762,11 @@
          Returns
          Overrides
          -
          Remarks
          -
          -

          - Views can override this method if they are - interested in processing the given keystroke. - If they consume the keystroke, they must - return true to stop the keystroke from being - processed by other widgets or consumed by the - widget engine. If they return false, the - keystroke will be passed using the ProcessColdKey - method to other views to process. -

          -

          - The View implementation does nothing but return false, - so it is not necessary to call base.ProcessKey if you - derive directly from View, but you should if you derive - other View subclasses. -

          -

          Redraw(Rect)

          -
          -Redraws this view and its subviews; only redraws the views that have been flagged for a re-display. -
          +
          Declaration
          @@ -855,26 +785,12 @@
          Parameters
          Rect bounds - The bounds (view-relative region) to redraw. +
          Overrides
          -
          Remarks
          -
          -

          - Always use Bounds (view-relative) when calling Redraw(Rect), NOT Frame (superview-relative). -

          -

          - 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. -

          -

          - Overrides of Redraw(Rect) must ensure they do not set Driver.Clip to a clip region - larger than the region parameter. -

          -

          Implements

          System.Collections.IEnumerable diff --git a/docs/api/Terminal.Gui/Terminal.Gui.CheckBox.html b/docs/api/Terminal.Gui/Terminal.Gui.CheckBox.html index 978c65b75c..a83d0f8637 100644 --- a/docs/api/Terminal.Gui/Terminal.Gui.CheckBox.html +++ b/docs/api/Terminal.Gui/Terminal.Gui.CheckBox.html @@ -526,9 +526,7 @@

          Methods

          MouseEvent(MouseEvent)

          -
          -Method invoked when a mouse event is generated -
          +
          Declaration
          @@ -562,7 +560,7 @@
          Returns
          System.Boolean - true, if the event was handled, false otherwise. + @@ -601,9 +599,7 @@
          Parameters

          PositionCursor()

          -
          -Positions the cursor in the right position based on the currently focused view in the chain. -
          +
          Declaration
          @@ -615,10 +611,7 @@
          Overrides

          ProcessKey(KeyEvent)

          -
          -If the view is focused, gives the view a -chance to process the keystroke. -
          +
          Declaration
          @@ -658,32 +651,11 @@
          Returns
          Overrides
          -
          Remarks
          -
          -

          - Views can override this method if they are - interested in processing the given keystroke. - If they consume the keystroke, they must - return true to stop the keystroke from being - processed by other widgets or consumed by the - widget engine. If they return false, the - keystroke will be passed using the ProcessColdKey - method to other views to process. -

          -

          - The View implementation does nothing but return false, - so it is not necessary to call base.ProcessKey if you - derive directly from View, but you should if you derive - other View subclasses. -

          -

          Redraw(Rect)

          -
          -Redraws this view and its subviews; only redraws the views that have been flagged for a re-display. -
          +
          Declaration
          @@ -702,26 +674,12 @@
          Parameters
          Rect bounds - The bounds (view-relative region) to redraw. +
          Overrides
          -
          Remarks
          -
          -

          - Always use Bounds (view-relative) when calling Redraw(Rect), NOT Frame (superview-relative). -

          -

          - 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. -

          -

          - Overrides of Redraw(Rect) must ensure they do not set Driver.Clip to a clip region - larger than the region parameter. -

          -

          Events

          diff --git a/docs/api/Terminal.Gui/Terminal.Gui.ComboBox.html b/docs/api/Terminal.Gui/Terminal.Gui.ComboBox.html index c75e7ebae7..f458e8a29d 100644 --- a/docs/api/Terminal.Gui/Terminal.Gui.ComboBox.html +++ b/docs/api/Terminal.Gui/Terminal.Gui.ComboBox.html @@ -427,9 +427,7 @@

          Methods

          OnEnter()

          -
          -Method invoked when a view gets focus. -
          +
          Declaration
          @@ -446,7 +444,7 @@
          Returns
          System.Boolean - true, if the event was handled, false otherwise. + @@ -456,10 +454,7 @@
          Overrides

          ProcessKey(KeyEvent)

          -
          -If the view is focused, gives the view a -chance to process the keystroke. -
          +
          Declaration
          @@ -499,25 +494,6 @@
          Returns
          Overrides
          -
          Remarks
          -
          -

          - Views can override this method if they are - interested in processing the given keystroke. - If they consume the keystroke, they must - return true to stop the keystroke from being - processed by other widgets or consumed by the - widget engine. If they return false, the - keystroke will be passed using the ProcessColdKey - method to other views to process. -

          -

          - The View implementation does nothing but return false, - so it is not necessary to call base.ProcessKey if you - derive directly from View, but you should if you derive - other View subclasses. -

          -

          Events

          diff --git a/docs/api/Terminal.Gui/Terminal.Gui.DateField.html b/docs/api/Terminal.Gui/Terminal.Gui.DateField.html index 70a4743365..d360d1f9ff 100644 --- a/docs/api/Terminal.Gui/Terminal.Gui.DateField.html +++ b/docs/api/Terminal.Gui/Terminal.Gui.DateField.html @@ -525,9 +525,7 @@

          Methods

          MouseEvent(MouseEvent)

          -
          -Method invoked when a mouse event is generated -
          +
          Declaration
          @@ -561,7 +559,7 @@
          Returns
          System.Boolean - true, if the event was handled, false otherwise. + @@ -571,9 +569,7 @@
          Overrides

          ProcessKey(KeyEvent)

          -
          -Processes key presses for the TextField. -
          +
          Declaration
          @@ -613,11 +609,6 @@
          Returns
          Overrides
          -
          Remarks
          -
          -The TextField control responds to the following keys: -
          KeysFunction
          Delete, BackspaceDeletes the character before cursor.
          -

          Implements

          System.Collections.IEnumerable diff --git a/docs/api/Terminal.Gui/Terminal.Gui.Dialog.html b/docs/api/Terminal.Gui/Terminal.Gui.Dialog.html index 3c75f11db5..76febff175 100644 --- a/docs/api/Terminal.Gui/Terminal.Gui.Dialog.html +++ b/docs/api/Terminal.Gui/Terminal.Gui.Dialog.html @@ -504,10 +504,7 @@
          Parameters

          LayoutSubviews()

          -
          -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
          @@ -515,18 +512,11 @@
          Declaration
          Overrides
          -
          Remarks
          -
          -Calls Terminal.Gui.View.OnLayoutComplete(Terminal.Gui.View.LayoutEventArgs) (which raises the LayoutComplete event) before it returns. -

          ProcessKey(KeyEvent)

          -
          -If the view is focused, gives the view a -chance to process the keystroke. -
          +
          Declaration
          @@ -566,25 +556,6 @@
          Returns
          Overrides
          -
          Remarks
          -
          -

          - Views can override this method if they are - interested in processing the given keystroke. - If they consume the keystroke, they must - return true to stop the keystroke from being - processed by other widgets or consumed by the - widget engine. If they return false, the - keystroke will be passed using the ProcessColdKey - method to other views to process. -

          -

          - The View implementation does nothing but return false, - so it is not necessary to call base.ProcessKey if you - derive directly from View, but you should if you derive - other View subclasses. -

          -

          Implements

          System.Collections.IEnumerable diff --git a/docs/api/Terminal.Gui/Terminal.Gui.FileDialog.html b/docs/api/Terminal.Gui/Terminal.Gui.FileDialog.html index a2f29c019e..f068b12d86 100644 --- a/docs/api/Terminal.Gui/Terminal.Gui.FileDialog.html +++ b/docs/api/Terminal.Gui/Terminal.Gui.FileDialog.html @@ -700,10 +700,7 @@

          Methods

          WillPresent()

          -
          -Invoked by Begin(Toplevel) as part of the Run(Toplevel, Boolean) after -the views have been laid out, and before the views are drawn for the first time. -
          +
          Declaration
          diff --git a/docs/api/Terminal.Gui/Terminal.Gui.FrameView.html b/docs/api/Terminal.Gui/Terminal.Gui.FrameView.html index 5be278b7bb..fd679ffa40 100644 --- a/docs/api/Terminal.Gui/Terminal.Gui.FrameView.html +++ b/docs/api/Terminal.Gui/Terminal.Gui.FrameView.html @@ -509,9 +509,7 @@
          Overrides

          Redraw(Rect)

          -
          -Redraws this view and its subviews; only redraws the views that have been flagged for a re-display. -
          +
          Declaration
          @@ -530,26 +528,12 @@
          Parameters
          Rect bounds - The bounds (view-relative region) to redraw. +
          Overrides
          -
          Remarks
          -
          -

          - Always use Bounds (view-relative) when calling Redraw(Rect), NOT Frame (superview-relative). -

          -

          - 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. -

          -

          - Overrides of Redraw(Rect) must ensure they do not set Driver.Clip to a clip region - larger than the region parameter. -

          -
          diff --git a/docs/api/Terminal.Gui/Terminal.Gui.HexView.html b/docs/api/Terminal.Gui/Terminal.Gui.HexView.html index 4f48eebabf..1fdcc9b8cd 100644 --- a/docs/api/Terminal.Gui/Terminal.Gui.HexView.html +++ b/docs/api/Terminal.Gui/Terminal.Gui.HexView.html @@ -477,9 +477,7 @@
          Property Value

          Frame

          -
          -Gets or sets the frame for the view. The frame is relative to the view's container (SuperView). -
          +
          Declaration
          @@ -496,22 +494,12 @@
          Property Value
          Rect - The frame. +
          Overrides
          -
          Remarks
          -
          -

          - Change the Frame when using the Absolute layout style to move or resize views. -

          -

          - Altering the Frame of a view will trigger the redrawing of the - view as well as the redrawing of the affected regions of the SuperView. -

          -
          @@ -558,9 +546,7 @@
          Declaration

          PositionCursor()

          -
          -Positions the cursor in the right position based on the currently focused view in the chain. -
          +
          Declaration
          @@ -572,10 +558,7 @@
          Overrides

          ProcessKey(KeyEvent)

          -
          -If the view is focused, gives the view a -chance to process the keystroke. -
          +
          Declaration
          @@ -594,7 +577,7 @@
          Parameters
          KeyEvent keyEvent - Contains the details about the key that produced the event. + @@ -615,32 +598,11 @@
          Returns
          Overrides
          -
          Remarks
          -
          -

          - Views can override this method if they are - interested in processing the given keystroke. - If they consume the keystroke, they must - return true to stop the keystroke from being - processed by other widgets or consumed by the - widget engine. If they return false, the - keystroke will be passed using the ProcessColdKey - method to other views to process. -

          -

          - The View implementation does nothing but return false, - so it is not necessary to call base.ProcessKey if you - derive directly from View, but you should if you derive - other View subclasses. -

          -

          Redraw(Rect)

          -
          -Redraws this view and its subviews; only redraws the views that have been flagged for a re-display. -
          +
          Declaration
          @@ -659,26 +621,12 @@
          Parameters
          Rect bounds - The bounds (view-relative region) to redraw. +
          Overrides
          -
          Remarks
          -
          -

          - Always use Bounds (view-relative) when calling Redraw(Rect), NOT Frame (superview-relative). -

          -

          - 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. -

          -

          - Overrides of Redraw(Rect) must ensure they do not set Driver.Clip to a clip region - larger than the region parameter. -

          -

          Implements

          System.Collections.IEnumerable diff --git a/docs/api/Terminal.Gui/Terminal.Gui.Label.html b/docs/api/Terminal.Gui/Terminal.Gui.Label.html index 11bf479bf3..22a4c84519 100644 --- a/docs/api/Terminal.Gui/Terminal.Gui.Label.html +++ b/docs/api/Terminal.Gui/Terminal.Gui.Label.html @@ -640,9 +640,7 @@
          Returns

          Redraw(Rect)

          -
          -Redraws this view and its subviews; only redraws the views that have been flagged for a re-display. -
          +
          Declaration
          @@ -661,26 +659,12 @@
          Parameters
          Rect bounds - The bounds (view-relative region) to redraw. +
          Overrides
          -
          Remarks
          -
          -

          - Always use Bounds (view-relative) when calling Redraw(Rect), NOT Frame (superview-relative). -

          -

          - 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. -

          -

          - Overrides of Redraw(Rect) must ensure they do not set Driver.Clip to a clip region - larger than the region parameter. -

          -

          Implements

          System.Collections.IEnumerable diff --git a/docs/api/Terminal.Gui/Terminal.Gui.ListView.html b/docs/api/Terminal.Gui/Terminal.Gui.ListView.html index 40f559be86..816ff9e564 100644 --- a/docs/api/Terminal.Gui/Terminal.Gui.ListView.html +++ b/docs/api/Terminal.Gui/Terminal.Gui.ListView.html @@ -714,9 +714,7 @@
          Returns

          MouseEvent(MouseEvent)

          -
          -Method invoked when a mouse event is generated -
          +
          Declaration
          @@ -750,7 +748,7 @@
          Returns
          System.Boolean - true, if the event was handled, false otherwise. + @@ -922,9 +920,7 @@
          Returns

          PositionCursor()

          -
          -Positions the cursor in the right position based on the currently focused view in the chain. -
          +
          Declaration
          @@ -936,10 +932,7 @@
          Overrides

          ProcessKey(KeyEvent)

          -
          -If the view is focused, gives the view a -chance to process the keystroke. -
          +
          Declaration
          @@ -979,32 +972,11 @@
          Returns
          Overrides
          -
          Remarks
          -
          -

          - Views can override this method if they are - interested in processing the given keystroke. - If they consume the keystroke, they must - return true to stop the keystroke from being - processed by other widgets or consumed by the - widget engine. If they return false, the - keystroke will be passed using the ProcessColdKey - method to other views to process. -

          -

          - The View implementation does nothing but return false, - so it is not necessary to call base.ProcessKey if you - derive directly from View, but you should if you derive - other View subclasses. -

          -

          Redraw(Rect)

          -
          -Redraws this view and its subviews; only redraws the views that have been flagged for a re-display. -
          +
          Declaration
          @@ -1023,26 +995,12 @@
          Parameters
          Rect bounds - The bounds (view-relative region) to redraw. +
          Overrides
          -
          Remarks
          -
          -

          - Always use Bounds (view-relative) when calling Redraw(Rect), NOT Frame (superview-relative). -

          -

          - 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. -

          -

          - Overrides of Redraw(Rect) must ensure they do not set Driver.Clip to a clip region - larger than the region parameter. -

          -
          diff --git a/docs/api/Terminal.Gui/Terminal.Gui.MenuBar.html b/docs/api/Terminal.Gui/Terminal.Gui.MenuBar.html index ceb036343c..29507fde70 100644 --- a/docs/api/Terminal.Gui/Terminal.Gui.MenuBar.html +++ b/docs/api/Terminal.Gui/Terminal.Gui.MenuBar.html @@ -494,9 +494,7 @@
          Declaration

          MouseEvent(MouseEvent)

          -
          -Method invoked when a mouse event is generated -
          +
          Declaration
          @@ -530,7 +528,7 @@
          Returns
          System.Boolean - true, if the event was handled, false otherwise. + @@ -559,7 +557,7 @@
          Parameters
          KeyEvent keyEvent - Contains the details about the key that produced the event. + @@ -603,7 +601,7 @@
          Parameters
          KeyEvent keyEvent - Contains the details about the key that produced the event. + @@ -640,9 +638,7 @@
          Declaration

          PositionCursor()

          -
          -Positions the cursor in the right position based on the currently focused view in the chain. -
          +
          Declaration
          @@ -654,11 +650,7 @@
          Overrides

          ProcessHotKey(KeyEvent)

          -
          -This method can be overwritten by view that -want to provide accelerator functionality -(Alt-key for example). -
          +
          Declaration
          @@ -698,31 +690,11 @@
          Returns
          Overrides
          -
          Remarks
          -
          -

          - Before keys are sent to the subview on the - current view, all the views are - processed and the key is passed to the widgets - to allow some of them to process the keystroke - as a hot-key.

          -

          - For example, if you implement a button that - has a hotkey ok "o", you would catch the - combination Alt-o here. If the event is - caught, you must return true to stop the - keystroke from being dispatched to other - views. -

          -

          ProcessKey(KeyEvent)

          -
          -If the view is focused, gives the view a -chance to process the keystroke. -
          +
          Declaration
          @@ -762,32 +734,11 @@
          Returns
          Overrides
          -
          Remarks
          -
          -

          - Views can override this method if they are - interested in processing the given keystroke. - If they consume the keystroke, they must - return true to stop the keystroke from being - processed by other widgets or consumed by the - widget engine. If they return false, the - keystroke will be passed using the ProcessColdKey - method to other views to process. -

          -

          - The View implementation does nothing but return false, - so it is not necessary to call base.ProcessKey if you - derive directly from View, but you should if you derive - other View subclasses. -

          -

          Redraw(Rect)

          -
          -Redraws this view and its subviews; only redraws the views that have been flagged for a re-display. -
          +
          Declaration
          @@ -806,26 +757,12 @@
          Parameters
          Rect bounds - The bounds (view-relative region) to redraw. +
          Overrides
          -
          Remarks
          -
          -

          - Always use Bounds (view-relative) when calling Redraw(Rect), NOT Frame (superview-relative). -

          -

          - 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. -

          -

          - Overrides of Redraw(Rect) must ensure they do not set Driver.Clip to a clip region - larger than the region parameter. -

          -

          Events

          diff --git a/docs/api/Terminal.Gui/Terminal.Gui.ProgressBar.html b/docs/api/Terminal.Gui/Terminal.Gui.ProgressBar.html index b6c7c02982..4f86b1d9a7 100644 --- a/docs/api/Terminal.Gui/Terminal.Gui.ProgressBar.html +++ b/docs/api/Terminal.Gui/Terminal.Gui.ProgressBar.html @@ -450,9 +450,7 @@
          Remarks

          Redraw(Rect)

          -
          -Redraws this view and its subviews; only redraws the views that have been flagged for a re-display. -
          +
          Declaration
          @@ -477,20 +475,6 @@
          Parameters
          Overrides
          -
          Remarks
          -
          -

          - Always use Bounds (view-relative) when calling Redraw(Rect), NOT Frame (superview-relative). -

          -

          - 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. -

          -

          - Overrides of Redraw(Rect) must ensure they do not set Driver.Clip to a clip region - larger than the region parameter. -

          -

          Implements

          System.Collections.IEnumerable diff --git a/docs/api/Terminal.Gui/Terminal.Gui.RadioGroup.html b/docs/api/Terminal.Gui/Terminal.Gui.RadioGroup.html index 5360d92523..b63eb053db 100644 --- a/docs/api/Terminal.Gui/Terminal.Gui.RadioGroup.html +++ b/docs/api/Terminal.Gui/Terminal.Gui.RadioGroup.html @@ -573,9 +573,7 @@

          Methods

          MouseEvent(MouseEvent)

          -
          -Method invoked when a mouse event is generated -
          +
          Declaration
          @@ -609,7 +607,7 @@
          Returns
          System.Boolean - true, if the event was handled, false otherwise. + @@ -619,9 +617,7 @@
          Overrides

          PositionCursor()

          -
          -Positions the cursor in the right position based on the currently focused view in the chain. -
          +
          Declaration
          @@ -633,12 +629,7 @@
          Overrides

          ProcessColdKey(KeyEvent)

          -
          -This method can be overwritten by views that -want to provide accelerator functionality -(Alt-key for example), but without -interefering with normal ProcessKey behavior. -
          +
          Declaration
          @@ -678,30 +669,11 @@
          Returns
          Overrides
          -
          Remarks
          -
          -

          - After keys are sent to the subviews on the - current view, all the view are - processed and the key is passed to the views - to allow some of them to process the keystroke - as a cold-key.

          -

          - This functionality is used, for example, by - default buttons to act on the enter key. - Processing this as a hot-key would prevent - non-default buttons from consuming the enter - keypress when they have the focus. -

          -

          ProcessKey(KeyEvent)

          -
          -If the view is focused, gives the view a -chance to process the keystroke. -
          +
          Declaration
          @@ -741,32 +713,11 @@
          Returns
          Overrides
          -
          Remarks
          -
          -

          - Views can override this method if they are - interested in processing the given keystroke. - If they consume the keystroke, they must - return true to stop the keystroke from being - processed by other widgets or consumed by the - widget engine. If they return false, the - keystroke will be passed using the ProcessColdKey - method to other views to process. -

          -

          - The View implementation does nothing but return false, - so it is not necessary to call base.ProcessKey if you - derive directly from View, but you should if you derive - other View subclasses. -

          -

          Redraw(Rect)

          -
          -Redraws this view and its subviews; only redraws the views that have been flagged for a re-display. -
          +
          Declaration
          @@ -785,26 +736,12 @@
          Parameters
          Rect bounds - The bounds (view-relative region) to redraw. +
          Overrides
          -
          Remarks
          -
          -

          - Always use Bounds (view-relative) when calling Redraw(Rect), NOT Frame (superview-relative). -

          -

          - 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. -

          -

          - Overrides of Redraw(Rect) must ensure they do not set Driver.Clip to a clip region - larger than the region parameter. -

          -

          Implements

          System.Collections.IEnumerable diff --git a/docs/api/Terminal.Gui/Terminal.Gui.ScrollBarView.html b/docs/api/Terminal.Gui/Terminal.Gui.ScrollBarView.html index 4ee8dda9a3..a07a29d880 100644 --- a/docs/api/Terminal.Gui/Terminal.Gui.ScrollBarView.html +++ b/docs/api/Terminal.Gui/Terminal.Gui.ScrollBarView.html @@ -570,9 +570,7 @@

          Methods

          MouseEvent(MouseEvent)

          -
          -Method invoked when a mouse event is generated -
          +
          Declaration
          @@ -606,7 +604,7 @@
          Returns
          System.Boolean - true, if the event was handled, false otherwise. + @@ -616,9 +614,7 @@
          Overrides

          Redraw(Rect)

          -
          -Redraws this view and its subviews; only redraws the views that have been flagged for a re-display. -
          +
          Declaration
          @@ -643,20 +639,6 @@
          Parameters
          Overrides
          -
          Remarks
          -
          -

          - Always use Bounds (view-relative) when calling Redraw(Rect), NOT Frame (superview-relative). -

          -

          - 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. -

          -

          - Overrides of Redraw(Rect) must ensure they do not set Driver.Clip to a clip region - larger than the region parameter. -

          -

          Events

          diff --git a/docs/api/Terminal.Gui/Terminal.Gui.ScrollView.html b/docs/api/Terminal.Gui/Terminal.Gui.ScrollView.html index 6815ce4a13..77c84d48c5 100644 --- a/docs/api/Terminal.Gui/Terminal.Gui.ScrollView.html +++ b/docs/api/Terminal.Gui/Terminal.Gui.ScrollView.html @@ -530,9 +530,7 @@
          Overrides

          MouseEvent(MouseEvent)

          -
          -Method invoked when a mouse event is generated -
          +
          Declaration
          @@ -566,7 +564,7 @@
          Returns
          System.Boolean - true, if the event was handled, false otherwise. + @@ -576,9 +574,7 @@
          Overrides

          PositionCursor()

          -
          -Positions the cursor in the right position based on the currently focused view in the chain. -
          +
          Declaration
          @@ -590,10 +586,7 @@
          Overrides

          ProcessKey(KeyEvent)

          -
          -If the view is focused, gives the view a -chance to process the keystroke. -
          +
          Declaration
          @@ -633,32 +626,11 @@
          Returns
          Overrides
          -
          Remarks
          -
          -

          - Views can override this method if they are - interested in processing the given keystroke. - If they consume the keystroke, they must - return true to stop the keystroke from being - processed by other widgets or consumed by the - widget engine. If they return false, the - keystroke will be passed using the ProcessColdKey - method to other views to process. -

          -

          - The View implementation does nothing but return false, - so it is not necessary to call base.ProcessKey if you - derive directly from View, but you should if you derive - other View subclasses. -

          -

          Redraw(Rect)

          -
          -Redraws this view and its subviews; only redraws the views that have been flagged for a re-display. -
          +
          Declaration
          @@ -683,20 +655,6 @@
          Parameters
          Overrides
          -
          Remarks
          -
          -

          - Always use Bounds (view-relative) when calling Redraw(Rect), NOT Frame (superview-relative). -

          -

          - 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. -

          -

          - Overrides of Redraw(Rect) must ensure they do not set Driver.Clip to a clip region - larger than the region parameter. -

          -
          diff --git a/docs/api/Terminal.Gui/Terminal.Gui.StatusBar.html b/docs/api/Terminal.Gui/Terminal.Gui.StatusBar.html index f72a1a63fd..5cfa8e59d2 100644 --- a/docs/api/Terminal.Gui/Terminal.Gui.StatusBar.html +++ b/docs/api/Terminal.Gui/Terminal.Gui.StatusBar.html @@ -435,9 +435,7 @@

          Methods

          MouseEvent(MouseEvent)

          -
          -Method invoked when a mouse event is generated -
          +
          Declaration
          @@ -471,7 +469,7 @@
          Returns
          System.Boolean - true, if the event was handled, false otherwise. + @@ -481,11 +479,7 @@
          Overrides

          ProcessHotKey(KeyEvent)

          -
          -This method can be overwritten by view that -want to provide accelerator functionality -(Alt-key for example). -
          +
          Declaration
          @@ -525,30 +519,11 @@
          Returns
          Overrides
          -
          Remarks
          -
          -

          - Before keys are sent to the subview on the - current view, all the views are - processed and the key is passed to the widgets - to allow some of them to process the keystroke - as a hot-key.

          -

          - For example, if you implement a button that - has a hotkey ok "o", you would catch the - combination Alt-o here. If the event is - caught, you must return true to stop the - keystroke from being dispatched to other - views. -

          -

          Redraw(Rect)

          -
          -Redraws this view and its subviews; only redraws the views that have been flagged for a re-display. -
          +
          Declaration
          @@ -567,26 +542,12 @@
          Parameters
          Rect bounds - The bounds (view-relative region) to redraw. +
          Overrides
          -
          Remarks
          -
          -

          - Always use Bounds (view-relative) when calling Redraw(Rect), NOT Frame (superview-relative). -

          -

          - 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. -

          -

          - Overrides of Redraw(Rect) must ensure they do not set Driver.Clip to a clip region - larger than the region parameter. -

          -

          Implements

          System.Collections.IEnumerable diff --git a/docs/api/Terminal.Gui/Terminal.Gui.TextField.html b/docs/api/Terminal.Gui/Terminal.Gui.TextField.html index 582e47afc2..cffc0208ea 100644 --- a/docs/api/Terminal.Gui/Terminal.Gui.TextField.html +++ b/docs/api/Terminal.Gui/Terminal.Gui.TextField.html @@ -442,9 +442,7 @@

          Properties

          CanFocus

          -
          -Gets or sets a value indicating whether this Responder can focus. -
          +
          Declaration
          @@ -461,7 +459,7 @@
          Property Value
          System.Boolean - true if can focus; otherwise, false. + @@ -498,9 +496,7 @@
          Property Value

          Frame

          -
          -Gets or sets the frame for the view. The frame is relative to the view's container (SuperView). -
          +
          Declaration
          @@ -517,22 +513,12 @@
          Property Value
          Rect - The frame. +
          Overrides
          -
          Remarks
          -
          -

          - Change the Frame when using the Absolute layout style to move or resize views. -

          -

          - Altering the Frame of a view will trigger the redrawing of the - view as well as the redrawing of the affected regions of the SuperView. -

          -
          @@ -771,9 +757,7 @@
          Declaration

          MouseEvent(MouseEvent)

          -
          -Method invoked when a mouse event is generated -
          +
          Declaration
          @@ -807,7 +791,7 @@
          Returns
          System.Boolean - true, if the event was handled, false otherwise. + @@ -817,9 +801,7 @@
          Overrides

          OnLeave()

          -
          -Method invoked when a view loses focus. -
          +
          Declaration
          @@ -836,7 +818,7 @@
          Returns
          System.Boolean - true, if the event was handled, false otherwise. + @@ -923,9 +905,7 @@
          Remark

          Redraw(Rect)

          -
          -Redraws this view and its subviews; only redraws the views that have been flagged for a re-display. -
          +
          Declaration
          @@ -944,26 +924,12 @@
          Parameters
          Rect bounds - The bounds (view-relative region) to redraw. +
          Overrides
          -
          Remarks
          -
          -

          - Always use Bounds (view-relative) when calling Redraw(Rect), NOT Frame (superview-relative). -

          -

          - 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. -

          -

          - Overrides of Redraw(Rect) must ensure they do not set Driver.Clip to a clip region - larger than the region parameter. -

          -

          Events

          diff --git a/docs/api/Terminal.Gui/Terminal.Gui.TextView.html b/docs/api/Terminal.Gui/Terminal.Gui.TextView.html index 0930e4745d..8125598dfc 100644 --- a/docs/api/Terminal.Gui/Terminal.Gui.TextView.html +++ b/docs/api/Terminal.Gui/Terminal.Gui.TextView.html @@ -426,9 +426,7 @@

          Properties

          CanFocus

          -
          -Gets or sets a value indicating whether this Responder can focus. -
          +
          Declaration
          @@ -445,7 +443,7 @@
          Property Value
          System.Boolean - true if can focus; otherwise, false. + @@ -668,9 +666,7 @@
          Parameters

          MouseEvent(MouseEvent)

          -
          -Method invoked when a mouse event is generated -
          +
          Declaration
          @@ -704,7 +700,7 @@
          Returns
          System.Boolean - true, if the event was handled, false otherwise. + @@ -728,10 +724,7 @@
          Overrides

          ProcessKey(KeyEvent)

          -
          -If the view is focused, gives the view a -chance to process the keystroke. -
          +
          Declaration
          @@ -771,32 +764,11 @@
          Returns
          Overrides
          -
          Remarks
          -
          -

          - Views can override this method if they are - interested in processing the given keystroke. - If they consume the keystroke, they must - return true to stop the keystroke from being - processed by other widgets or consumed by the - widget engine. If they return false, the - keystroke will be passed using the ProcessColdKey - method to other views to process. -

          -

          - The View implementation does nothing but return false, - so it is not necessary to call base.ProcessKey if you - derive directly from View, but you should if you derive - other View subclasses. -

          -

          Redraw(Rect)

          -
          -Redraws this view and its subviews; only redraws the views that have been flagged for a re-display. -
          +
          Declaration
          @@ -815,26 +787,12 @@
          Parameters
          Rect bounds - The bounds (view-relative region) to redraw. +
          Overrides
          -
          Remarks
          -
          -

          - Always use Bounds (view-relative) when calling Redraw(Rect), NOT Frame (superview-relative). -

          -

          - 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. -

          -

          - Overrides of Redraw(Rect) must ensure they do not set Driver.Clip to a clip region - larger than the region parameter. -

          -
          diff --git a/docs/api/Terminal.Gui/Terminal.Gui.TimeField.html b/docs/api/Terminal.Gui/Terminal.Gui.TimeField.html index eb63ac94c5..4078bccc9b 100644 --- a/docs/api/Terminal.Gui/Terminal.Gui.TimeField.html +++ b/docs/api/Terminal.Gui/Terminal.Gui.TimeField.html @@ -525,9 +525,7 @@

          Methods

          MouseEvent(MouseEvent)

          -
          -Method invoked when a mouse event is generated -
          +
          Declaration
          @@ -561,7 +559,7 @@
          Returns
          System.Boolean - true, if the event was handled, false otherwise. + @@ -571,9 +569,7 @@
          Overrides

          ProcessKey(KeyEvent)

          -
          -Processes key presses for the TextField. -
          +
          Declaration
          @@ -613,11 +609,6 @@
          Returns
          Overrides
          -
          Remarks
          -
          -The TextField control responds to the following keys: -
          KeysFunction
          Delete, BackspaceDeletes the character before cursor.
          -

          Implements

          System.Collections.IEnumerable diff --git a/docs/api/Terminal.Gui/Terminal.Gui.Toplevel.html b/docs/api/Terminal.Gui/Terminal.Gui.Toplevel.html index 745890f175..7c9354a2a5 100644 --- a/docs/api/Terminal.Gui/Terminal.Gui.Toplevel.html +++ b/docs/api/Terminal.Gui/Terminal.Gui.Toplevel.html @@ -551,9 +551,7 @@

          Methods

          Add(View)

          -
          -Adds a subview (child) to this view. -
          +
          Declaration
          @@ -578,10 +576,6 @@
          Parameters
          Overrides
          -
          Remarks
          -
          -The Views that have been added to this view can be retrieved via the Subviews property. See also Remove(View) RemoveAll() -
          @@ -613,10 +607,7 @@
          Returns

          ProcessKey(KeyEvent)

          -
          -If the view is focused, gives the view a -chance to process the keystroke. -
          +
          Declaration
          @@ -635,7 +626,7 @@
          Parameters
          KeyEvent keyEvent - Contains the details about the key that produced the event. + @@ -656,32 +647,11 @@
          Returns
          Overrides
          -
          Remarks
          -
          -

          - Views can override this method if they are - interested in processing the given keystroke. - If they consume the keystroke, they must - return true to stop the keystroke from being - processed by other widgets or consumed by the - widget engine. If they return false, the - keystroke will be passed using the ProcessColdKey - method to other views to process. -

          -

          - The View implementation does nothing but return false, - so it is not necessary to call base.ProcessKey if you - derive directly from View, but you should if you derive - other View subclasses. -

          -

          Redraw(Rect)

          -
          -Redraws this view and its subviews; only redraws the views that have been flagged for a re-display. -
          +
          Declaration
          @@ -700,33 +670,17 @@
          Parameters
          Rect bounds - The bounds (view-relative region) to redraw. +
          Overrides
          -
          Remarks
          -
          -

          - Always use Bounds (view-relative) when calling Redraw(Rect), NOT Frame (superview-relative). -

          -

          - 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. -

          -

          - Overrides of Redraw(Rect) must ensure they do not set Driver.Clip to a clip region - larger than the region parameter. -

          -

          Remove(View)

          -
          -Removes a subview added via Add(View) or Add(View[]) from this View. -
          +
          Declaration
          @@ -751,16 +705,11 @@
          Parameters
          Overrides
          -
          Remarks
          -
          -

          RemoveAll()

          -
          -Removes all subviews (children) added via Add(View) or Add(View[]) from this View. -
          +
          Declaration
          diff --git a/docs/api/Terminal.Gui/Terminal.Gui.View.html b/docs/api/Terminal.Gui/Terminal.Gui.View.html index 4e0721c659..73c0b09a68 100644 --- a/docs/api/Terminal.Gui/Terminal.Gui.View.html +++ b/docs/api/Terminal.Gui/Terminal.Gui.View.html @@ -437,9 +437,7 @@
          Remarks

          HasFocus

          -
          -Gets or sets a value indicating whether this Responder has focus. -
          +
          Declaration
          @@ -456,7 +454,7 @@
          Property Value
          System.Boolean - true if has focus; otherwise, false. + @@ -1405,9 +1403,7 @@
          Remarks

          OnEnter()

          -
          -Method invoked when a view gets focus. -
          +
          Declaration
          @@ -1424,7 +1420,7 @@
          Returns
          System.Boolean - true, if the event was handled, false otherwise. + @@ -1522,9 +1518,7 @@
          Overrides

          OnLeave()

          -
          -Method invoked when a view loses focus. -
          +
          Declaration
          @@ -1541,7 +1535,7 @@
          Returns
          System.Boolean - true, if the event was handled, false otherwise. + @@ -1551,9 +1545,7 @@
          Overrides

          OnMouseEnter(MouseEvent)

          -
          -Method invoked when a mouse event is generated for the first time. -
          +
          Declaration
          @@ -1587,7 +1579,7 @@
          Returns
          System.Boolean - true, if the event was handled, false otherwise. + @@ -1641,9 +1633,7 @@
          Returns

          OnMouseLeave(MouseEvent)

          -
          -Method invoked when a mouse event is generated for the last time. -
          +
          Declaration
          @@ -1677,7 +1667,7 @@
          Returns
          System.Boolean - true, if the event was handled, false otherwise. + @@ -1699,12 +1689,7 @@
          Declaration

          ProcessColdKey(KeyEvent)

          -
          -This method can be overwritten by views that -want to provide accelerator functionality -(Alt-key for example), but without -interefering with normal ProcessKey behavior. -
          +
          Declaration
          @@ -1723,7 +1708,7 @@
          Parameters
          KeyEvent keyEvent - Contains the details about the key that produced the event. + @@ -1744,31 +1729,11 @@
          Returns
          Overrides
          -
          Remarks
          -
          -

          - After keys are sent to the subviews on the - current view, all the view are - processed and the key is passed to the views - to allow some of them to process the keystroke - as a cold-key.

          -

          - This functionality is used, for example, by - default buttons to act on the enter key. - Processing this as a hot-key would prevent - non-default buttons from consuming the enter - keypress when they have the focus. -

          -

          ProcessHotKey(KeyEvent)

          -
          -This method can be overwritten by view that -want to provide accelerator functionality -(Alt-key for example). -
          +
          Declaration
          @@ -1808,31 +1773,11 @@
          Returns
          Overrides
          -
          Remarks
          -
          -

          - Before keys are sent to the subview on the - current view, all the views are - processed and the key is passed to the widgets - to allow some of them to process the keystroke - as a hot-key.

          -

          - For example, if you implement a button that - has a hotkey ok "o", you would catch the - combination Alt-o here. If the event is - caught, you must return true to stop the - keystroke from being dispatched to other - views. -

          -

          ProcessKey(KeyEvent)

          -
          -If the view is focused, gives the view a -chance to process the keystroke. -
          +
          Declaration
          @@ -1851,7 +1796,7 @@
          Parameters
          KeyEvent keyEvent - Contains the details about the key that produced the event. + @@ -1872,25 +1817,6 @@
          Returns
          Overrides
          -
          Remarks
          -
          -

          - Views can override this method if they are - interested in processing the given keystroke. - If they consume the keystroke, they must - return true to stop the keystroke from being - processed by other widgets or consumed by the - widget engine. If they return false, the - keystroke will be passed using the ProcessColdKey - method to other views to process. -

          -

          - The View implementation does nothing but return false, - so it is not necessary to call base.ProcessKey if you - derive directly from View, but you should if you derive - other View subclasses. -

          -
          diff --git a/docs/api/Terminal.Gui/Terminal.Gui.Window.html b/docs/api/Terminal.Gui/Terminal.Gui.Window.html index 6443992a5e..a02d94bf12 100644 --- a/docs/api/Terminal.Gui/Terminal.Gui.Window.html +++ b/docs/api/Terminal.Gui/Terminal.Gui.Window.html @@ -552,9 +552,7 @@

          Methods

          Add(View)

          -
          -Adds a subview (child) to this view. -
          +
          Declaration
          @@ -579,10 +577,6 @@
          Parameters
          Overrides
          -
          Remarks
          -
          -The Views that have been added to this view can be retrieved via the Subviews property. See also Remove(View) RemoveAll() -
          @@ -614,9 +608,7 @@
          Returns

          MouseEvent(MouseEvent)

          -
          -Method invoked when a mouse event is generated -
          +
          Declaration
          @@ -635,7 +627,7 @@
          Parameters
          MouseEvent mouseEvent - Contains the details about the mouse event. + @@ -650,7 +642,7 @@
          Returns
          System.Boolean - true, if the event was handled, false otherwise. + @@ -660,9 +652,7 @@
          Overrides

          Redraw(Rect)

          -
          -Redraws this view and its subviews; only redraws the views that have been flagged for a re-display. -
          +
          Declaration
          @@ -681,33 +671,17 @@
          Parameters
          Rect bounds - The bounds (view-relative region) to redraw. +
          Overrides
          -
          Remarks
          -
          -

          - Always use Bounds (view-relative) when calling Redraw(Rect), NOT Frame (superview-relative). -

          -

          - 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. -

          -

          - Overrides of Redraw(Rect) must ensure they do not set Driver.Clip to a clip region - larger than the region parameter. -

          -

          Remove(View)

          -
          -Removes a subview added via Add(View) or Add(View[]) from this View. -
          +
          Declaration
          @@ -732,16 +706,11 @@
          Parameters
          Overrides
          -
          Remarks
          -
          -

          RemoveAll()

          -
          -Removes all subviews (children) added via Add(View) or Add(View[]) from this View. -
          +
          Declaration
          diff --git a/docs/index.json b/docs/index.json index 971413a337..fe7c5d0dd9 100644 --- a/docs/index.json +++ b/docs/index.json @@ -22,12 +22,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.MouseClick 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.DrawContent View.OnDrawContent(Rect) 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.LayoutComplete View.LayoutSubviews() View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) View.OnMouseEvent(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 using Computed layout. 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 true , a special decoration is used, and the user pressing the enter key in a Dialog will implicitly activate this button. Remarks The width of the Button is computed based on the text length. The height will always be 1. Button(Int32, Int32, ustring) Initializes a new instance of Button using Absolute layout, 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 width of the Button is computed based on the text length. The height will always be 1. Button(Int32, Int32, ustring, Boolean) Initializes a new instance of Button using Absolute layout, based on the given text. 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 true , a special decoration is used, and the user pressing the enter key in a Dialog will implicitly activate this button. Remarks The width of the Button is computed based on the text length. The height will always be 1. 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) Method invoked when a mouse event is generated Declaration public override bool MouseEvent(MouseEvent me) Parameters Type Name Description MouseEvent me Returns Type Description System.Boolean true , if the event was handled, false otherwise. Overrides Responder.MouseEvent(MouseEvent) PositionCursor() Positions the cursor in the right position based on the currently focused view in the chain. Declaration public override void PositionCursor() Overrides View.PositionCursor() ProcessColdKey(KeyEvent) This method can be overwritten by views that want to provide accelerator functionality (Alt-key for example), but without interefering with normal ProcessKey behavior. Declaration public override bool ProcessColdKey(KeyEvent kb) Parameters Type Name Description KeyEvent kb Returns Type Description System.Boolean Overrides View.ProcessColdKey(KeyEvent) Remarks After keys are sent to the subviews on the current view, all the view are processed and the key is passed to the views to allow some of them to process the keystroke as a cold-key. This functionality is used, for example, by default buttons to act on the enter key. Processing this as a hot-key would prevent non-default buttons from consuming the enter keypress when they have the focus. ProcessHotKey(KeyEvent) This method can be overwritten by view that want to provide accelerator functionality (Alt-key for example). Declaration public override bool ProcessHotKey(KeyEvent kb) Parameters Type Name Description KeyEvent kb Returns Type Description System.Boolean Overrides View.ProcessHotKey(KeyEvent) Remarks Before keys are sent to the subview on the current view, all the views are processed and the key is passed to the widgets to allow some of them to process the keystroke as a hot-key. For example, if you implement a button that has a hotkey ok \"o\", you would catch the combination Alt-o here. If the event is caught, you must return true to stop the keystroke from being dispatched to other views. ProcessKey(KeyEvent) If the view is focused, gives the view a chance to process the keystroke. Declaration public override bool ProcessKey(KeyEvent kb) Parameters Type Name Description KeyEvent kb Returns Type Description System.Boolean Overrides View.ProcessKey(KeyEvent) Remarks Views can override this method if they are interested in processing the given keystroke. If they consume the keystroke, they must return true to stop the keystroke from being processed by other widgets or consumed by the widget engine. If they return false, the keystroke will be passed using the ProcessColdKey method to other views to process. The View implementation does nothing but return false, so it is not necessary to call base.ProcessKey if you derive directly from View, but you should if you derive other View subclasses. Redraw(Rect) Redraws this view and its subviews; only redraws the views that have been flagged for a re-display. Declaration public override void Redraw(Rect bounds) Parameters Type Name Description Rect bounds The bounds (view-relative region) to redraw. Overrides View.Redraw(Rect) Remarks Always use Bounds (view-relative) when calling Redraw(Rect) , NOT Frame (superview-relative). 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. Overrides of Redraw(Rect) must ensure they do not set Driver.Clip to a clip region larger than the region parameter. 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.MouseClick 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.DrawContent View.OnDrawContent(Rect) 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.LayoutComplete View.LayoutSubviews() View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) View.OnMouseEvent(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 using Computed layout. 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 true , a special decoration is used, and the user pressing the enter key in a Dialog will implicitly activate this button. Remarks The width of the Button is computed based on the text length. The height will always be 1. Button(Int32, Int32, ustring) Initializes a new instance of Button using Absolute layout, 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 width of the Button is computed based on the text length. The height will always be 1. Button(Int32, Int32, ustring, Boolean) Initializes a new instance of Button using Absolute layout, based on the given text. 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 true , a special decoration is used, and the user pressing the enter key in a Dialog will implicitly activate this button. Remarks The width of the Button is computed based on the text length. The height will always be 1. 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 bounds) Parameters Type Name Description Rect bounds 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.MouseClick 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.DrawContent View.OnDrawContent(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.LayoutComplete View.LayoutSubviews() View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) View.OnMouseEvent(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) Method invoked when a mouse event is generated Declaration public override bool MouseEvent(MouseEvent me) Parameters Type Name Description MouseEvent me Returns Type Description System.Boolean true , if the event was handled, false otherwise. Overrides Responder.MouseEvent(MouseEvent) OnToggled(Boolean) Called when the Checked property changes. Invokes the Toggled event. Declaration public virtual void OnToggled(bool previousChecked) Parameters Type Name Description System.Boolean previousChecked PositionCursor() Positions the cursor in the right position based on the currently focused view in the chain. Declaration public override void PositionCursor() Overrides View.PositionCursor() ProcessKey(KeyEvent) If the view is focused, gives the view a chance to process the keystroke. Declaration public override bool ProcessKey(KeyEvent kb) Parameters Type Name Description KeyEvent kb Returns Type Description System.Boolean Overrides View.ProcessKey(KeyEvent) Remarks Views can override this method if they are interested in processing the given keystroke. If they consume the keystroke, they must return true to stop the keystroke from being processed by other widgets or consumed by the widget engine. If they return false, the keystroke will be passed using the ProcessColdKey method to other views to process. The View implementation does nothing but return false, so it is not necessary to call base.ProcessKey if you derive directly from View, but you should if you derive other View subclasses. Redraw(Rect) Redraws this view and its subviews; only redraws the views that have been flagged for a re-display. Declaration public override void Redraw(Rect bounds) Parameters Type Name Description Rect bounds The bounds (view-relative region) to redraw. Overrides View.Redraw(Rect) Remarks Always use Bounds (view-relative) when calling Redraw(Rect) , NOT Frame (superview-relative). 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. Overrides of Redraw(Rect) must ensure they do not set Driver.Clip to a clip region larger than the region parameter. Events Toggled Toggled event, raised when the CheckBox is toggled. Declaration public event EventHandler Toggled Event Type Type Description System.EventHandler < System.Boolean > Remarks Client code can hook up to this event, it is raised when the CheckBox is activated either with the mouse or the keyboard. The passed bool contains the previous state. 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.MouseClick 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.DrawContent View.OnDrawContent(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.LayoutComplete View.LayoutSubviews() View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) View.OnMouseEvent(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) OnToggled(Boolean) Called when the Checked property changes. Invokes the Toggled event. Declaration public virtual void OnToggled(bool previousChecked) Parameters Type Name Description System.Boolean previousChecked 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 bounds) Parameters Type Name Description Rect bounds 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 < System.Boolean > Remarks Client code can hook up to this event, it is raised when the CheckBox is activated either with the mouse or the keyboard. The passed bool contains the previous state. Implements System.Collections.IEnumerable" }, "api/Terminal.Gui/Terminal.Gui.Clipboard.html": { "href": "api/Terminal.Gui/Terminal.Gui.Clipboard.html", @@ -52,7 +52,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.MouseClick 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.DrawContent View.OnDrawContent(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.LayoutComplete View.LayoutSubviews() View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) View.OnMouseEvent(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 completion source Properties Text The currently selected list item Declaration public ustring Text { get; set; } Property Value Type Description NStack.ustring Methods OnEnter() Method invoked when a view gets focus. Declaration public override bool OnEnter() Returns Type Description System.Boolean true , if the event was handled, false otherwise. Overrides View.OnEnter() ProcessKey(KeyEvent) If the view is focused, gives the view a chance to process the keystroke. Declaration public override bool ProcessKey(KeyEvent e) Parameters Type Name Description KeyEvent e Returns Type Description System.Boolean Overrides View.ProcessKey(KeyEvent) Remarks Views can override this method if they are interested in processing the given keystroke. If they consume the keystroke, they must return true to stop the keystroke from being processed by other widgets or consumed by the widget engine. If they return false, the keystroke will be passed using the ProcessColdKey method to other views to process. The View implementation does nothing but return false, so it is not necessary to call base.ProcessKey if you derive directly from View, but you should if you derive other View subclasses. 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.MouseClick 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.DrawContent View.OnDrawContent(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.LayoutComplete View.LayoutSubviews() View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) View.OnMouseEvent(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 completion source Properties Text The currently 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", @@ -62,12 +62,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.MouseClick 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.DrawContent View.OnDrawContent(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.LayoutComplete View.LayoutSubviews() View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) View.OnMouseEvent(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) Method invoked when a mouse event is generated Declaration public override bool MouseEvent(MouseEvent ev) Parameters Type Name Description MouseEvent ev Returns Type Description System.Boolean true , if the event was handled, false otherwise. Overrides TextField.MouseEvent(MouseEvent) 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 TextField.ProcessKey(KeyEvent) Remarks The TextField control responds to the following keys: Keys Function Delete , Backspace Deletes the character before cursor. 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.MouseClick 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.DrawContent View.OnDrawContent(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.LayoutComplete View.LayoutSubviews() View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) View.OnMouseEvent(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 s. 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.MouseClick 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.DrawContent View.OnDrawContent(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.LayoutComplete View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) View.OnMouseEvent(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 using Absolute positioning and 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. Remarks if width and height are both 0, the Dialog will be vertically and horizontally centered in the container and the size will be 85% of the container. After initialzation use X , Y , Width , and Height to override this with a location or size. Dialog(ustring, Button[]) Initializes a new instance of the Dialog class using Computed positioning and with an optional set of Button s to display Declaration public Dialog(ustring title, params Button[] buttons) Parameters Type Name Description NStack.ustring title Title for the dialog. Button [] buttons Optional buttons to lay out at the bottom of the dialog. Remarks if width and height are both 0, the Dialog will be vertically and horizontally centered in the container and the size will be 85% of the container. After initialzation use X , Y , Width , and Height to override this with a location or size. 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() 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 override void LayoutSubviews() Overrides View.LayoutSubviews() Remarks Calls Terminal.Gui.View.OnLayoutComplete(Terminal.Gui.View.LayoutEventArgs) (which raises the LayoutComplete event) before it returns. ProcessKey(KeyEvent) If the view is focused, gives the view a chance to process the keystroke. Declaration public override bool ProcessKey(KeyEvent kb) Parameters Type Name Description KeyEvent kb Returns Type Description System.Boolean Overrides Toplevel.ProcessKey(KeyEvent) Remarks Views can override this method if they are interested in processing the given keystroke. If they consume the keystroke, they must return true to stop the keystroke from being processed by other widgets or consumed by the widget engine. If they return false, the keystroke will be passed using the ProcessColdKey method to other views to process. The View implementation does nothing but return false, so it is not necessary to call base.ProcessKey if you derive directly from View, but you should if you derive other View subclasses. Implements System.Collections.IEnumerable" + "keywords": "Class Dialog The Dialog View is a Window that by default is centered and contains one or more Button s. 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.MouseClick 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.DrawContent View.OnDrawContent(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.LayoutComplete View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) View.OnMouseEvent(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 using Absolute positioning and 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. Remarks if width and height are both 0, the Dialog will be vertically and horizontally centered in the container and the size will be 85% of the container. After initialzation use X , Y , Width , and Height to override this with a location or size. Dialog(ustring, Button[]) Initializes a new instance of the Dialog class using Computed positioning and with an optional set of Button s to display Declaration public Dialog(ustring title, params Button[] buttons) Parameters Type Name Description NStack.ustring title Title for the dialog. Button [] buttons Optional buttons to lay out at the bottom of the dialog. Remarks if width and height are both 0, the Dialog will be vertically and horizontally centered in the container and the size will be 85% of the container. After initialzation use X , Y , Width , and Height to override this with a location or size. 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", @@ -77,17 +77,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.MouseClick 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.DrawContent View.OnDrawContent(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.LayoutComplete View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) View.OnMouseEvent(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() Invoked by Begin(Toplevel) as part of the Run(Toplevel, Boolean) after the views have been laid out, and before the views are drawn for the first time. 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.MouseClick 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.DrawContent View.OnDrawContent(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.LayoutComplete View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) View.OnMouseEvent(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.MouseClick 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.DrawContent View.OnDrawContent(Rect) 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.LayoutComplete View.LayoutSubviews() View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) View.OnMouseEvent(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) Redraws this view and its subviews; only redraws the views that have been flagged for a re-display. Declaration public override void Redraw(Rect bounds) Parameters Type Name Description Rect bounds The bounds (view-relative region) to redraw. Overrides View.Redraw(Rect) Remarks Always use Bounds (view-relative) when calling Redraw(Rect) , NOT Frame (superview-relative). 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. Overrides of Redraw(Rect) must ensure they do not set Driver.Clip to a clip region larger than the region parameter. 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.MouseClick 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.DrawContent View.OnDrawContent(Rect) 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.LayoutComplete View.LayoutSubviews() View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) View.OnMouseEvent(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.MouseClick 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.DrawContent View.OnDrawContent(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.LayoutComplete View.LayoutSubviews() View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) View.OnMouseEvent(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 Gets or sets the frame for the view. The frame is relative to the view's container ( SuperView ). Declaration public override Rect Frame { get; set; } Property Value Type Description Rect The frame. Overrides View.Frame Remarks Change the Frame when using the Absolute layout style to move or resize views. Altering the Frame of a view will trigger the redrawing of the view as well as the redrawing of the affected regions of the SuperView . 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() Positions the cursor in the right position based on the currently focused view in the chain. Declaration public override void PositionCursor() Overrides View.PositionCursor() ProcessKey(KeyEvent) If the view is focused, gives the view a chance to process the keystroke. Declaration public override bool ProcessKey(KeyEvent keyEvent) Parameters Type Name Description KeyEvent keyEvent Contains the details about the key that produced the event. Returns Type Description System.Boolean Overrides View.ProcessKey(KeyEvent) Remarks Views can override this method if they are interested in processing the given keystroke. If they consume the keystroke, they must return true to stop the keystroke from being processed by other widgets or consumed by the widget engine. If they return false, the keystroke will be passed using the ProcessColdKey method to other views to process. The View implementation does nothing but return false, so it is not necessary to call base.ProcessKey if you derive directly from View, but you should if you derive other View subclasses. Redraw(Rect) Redraws this view and its subviews; only redraws the views that have been flagged for a re-display. Declaration public override void Redraw(Rect bounds) Parameters Type Name Description Rect bounds The bounds (view-relative region) to redraw. Overrides View.Redraw(Rect) Remarks Always use Bounds (view-relative) when calling Redraw(Rect) , NOT Frame (superview-relative). 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. Overrides of Redraw(Rect) must ensure they do not set Driver.Clip to a clip region larger than the region parameter. 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.MouseClick 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.DrawContent View.OnDrawContent(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.LayoutComplete View.LayoutSubviews() View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) View.OnMouseEvent(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 bounds) Parameters Type Name Description Rect bounds Overrides View.Redraw(Rect) Implements System.Collections.IEnumerable" }, "api/Terminal.Gui/Terminal.Gui.html": { "href": "api/Terminal.Gui/Terminal.Gui.html", @@ -122,7 +122,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.MouseClick 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.DrawContent View.OnDrawContent(Rect) 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.LayoutComplete View.LayoutSubviews() View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) View.OnMouseEvent(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) Redraws this view and its subviews; only redraws the views that have been flagged for a re-display. Declaration public override void Redraw(Rect bounds) Parameters Type Name Description Rect bounds The bounds (view-relative region) to redraw. Overrides View.Redraw(Rect) Remarks Always use Bounds (view-relative) when calling Redraw(Rect) , NOT Frame (superview-relative). 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. Overrides of Redraw(Rect) must ensure they do not set Driver.Clip to a clip region larger than the region parameter. 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.MouseClick 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.DrawContent View.OnDrawContent(Rect) 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.LayoutComplete View.LayoutSubviews() View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) View.OnMouseEvent(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 bounds) Parameters Type Name Description Rect bounds Overrides View.Redraw(Rect) Implements System.Collections.IEnumerable" }, "api/Terminal.Gui/Terminal.Gui.LayoutStyle.html": { "href": "api/Terminal.Gui/Terminal.Gui.LayoutStyle.html", @@ -132,7 +132,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.MouseClick 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.DrawContent View.OnDrawContent(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.LayoutComplete View.LayoutSubviews() View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) View.OnMouseEvent(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) Method invoked when a mouse event is generated Declaration public override bool MouseEvent(MouseEvent me) Parameters Type Name Description MouseEvent me Returns Type Description System.Boolean true , if the event was handled, false otherwise. Overrides Responder.MouseEvent(MouseEvent) 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() Positions the cursor in the right position based on the currently focused view in the chain. Declaration public override void PositionCursor() Overrides View.PositionCursor() ProcessKey(KeyEvent) If the view is focused, gives the view a chance to process the keystroke. Declaration public override bool ProcessKey(KeyEvent kb) Parameters Type Name Description KeyEvent kb Returns Type Description System.Boolean Overrides View.ProcessKey(KeyEvent) Remarks Views can override this method if they are interested in processing the given keystroke. If they consume the keystroke, they must return true to stop the keystroke from being processed by other widgets or consumed by the widget engine. If they return false, the keystroke will be passed using the ProcessColdKey method to other views to process. The View implementation does nothing but return false, so it is not necessary to call base.ProcessKey if you derive directly from View, but you should if you derive other View subclasses. Redraw(Rect) Redraws this view and its subviews; only redraws the views that have been flagged for a re-display. Declaration public override void Redraw(Rect bounds) Parameters Type Name Description Rect bounds The bounds (view-relative region) to redraw. Overrides View.Redraw(Rect) Remarks Always use Bounds (view-relative) when calling Redraw(Rect) , NOT Frame (superview-relative). 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. Overrides of Redraw(Rect) must ensure they do not set Driver.Clip to a clip region larger than the region parameter. 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.MouseClick 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.DrawContent View.OnDrawContent(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.LayoutComplete View.LayoutSubviews() View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) View.OnMouseEvent(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 bounds) Parameters Type Name Description Rect bounds 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", @@ -152,7 +152,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.MouseClick 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.DrawContent View.OnDrawContent(Rect) View.SetFocus(View) View.KeyPress View.ProcessColdKey(KeyEvent) View.KeyDown View.KeyUp View.EnsureFocus() View.FocusFirst() View.FocusLast() View.FocusPrev() View.FocusNext() View.LayoutComplete View.LayoutSubviews() View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) View.OnMouseEvent(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) Method invoked when a mouse event is generated Declaration public override bool MouseEvent(MouseEvent me) Parameters Type Name Description MouseEvent me Returns Type Description System.Boolean true , if the event was handled, false otherwise. Overrides Responder.MouseEvent(MouseEvent) 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 View.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 View.OnKeyUp(KeyEvent) OpenMenu() Opens the current Menu programatically. Declaration public void OpenMenu() PositionCursor() Positions the cursor in the right position based on the currently focused view in the chain. Declaration public override void PositionCursor() Overrides View.PositionCursor() ProcessHotKey(KeyEvent) This method can be overwritten by view that want to provide accelerator functionality (Alt-key for example). Declaration public override bool ProcessHotKey(KeyEvent kb) Parameters Type Name Description KeyEvent kb Returns Type Description System.Boolean Overrides View.ProcessHotKey(KeyEvent) Remarks Before keys are sent to the subview on the current view, all the views are processed and the key is passed to the widgets to allow some of them to process the keystroke as a hot-key. For example, if you implement a button that has a hotkey ok \"o\", you would catch the combination Alt-o here. If the event is caught, you must return true to stop the keystroke from being dispatched to other views. ProcessKey(KeyEvent) If the view is focused, gives the view a chance to process the keystroke. Declaration public override bool ProcessKey(KeyEvent kb) Parameters Type Name Description KeyEvent kb Returns Type Description System.Boolean Overrides View.ProcessKey(KeyEvent) Remarks Views can override this method if they are interested in processing the given keystroke. If they consume the keystroke, they must return true to stop the keystroke from being processed by other widgets or consumed by the widget engine. If they return false, the keystroke will be passed using the ProcessColdKey method to other views to process. The View implementation does nothing but return false, so it is not necessary to call base.ProcessKey if you derive directly from View, but you should if you derive other View subclasses. Redraw(Rect) Redraws this view and its subviews; only redraws the views that have been flagged for a re-display. Declaration public override void Redraw(Rect bounds) Parameters Type Name Description Rect bounds The bounds (view-relative region) to redraw. Overrides View.Redraw(Rect) Remarks Always use Bounds (view-relative) when calling Redraw(Rect) , NOT Frame (superview-relative). 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. Overrides of Redraw(Rect) must ensure they do not set Driver.Clip to a clip region larger than the region parameter. 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.MouseClick 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.DrawContent View.OnDrawContent(Rect) View.SetFocus(View) View.KeyPress View.ProcessColdKey(KeyEvent) View.KeyDown View.KeyUp View.EnsureFocus() View.FocusFirst() View.FocusLast() View.FocusPrev() View.FocusNext() View.LayoutComplete View.LayoutSubviews() View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) View.OnMouseEvent(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 bounds) Parameters Type Name Description Rect bounds 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,12 +197,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.MouseClick 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.DrawContent View.OnDrawContent(Rect) 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.LayoutComplete View.LayoutSubviews() View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) View.OnMouseEvent(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) Redraws this view and its subviews; only redraws the views that have been flagged for a re-display. Declaration public override void Redraw(Rect region) Parameters Type Name Description Rect region Overrides View.Redraw(Rect) Remarks Always use Bounds (view-relative) when calling Redraw(Rect) , NOT Frame (superview-relative). 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. Overrides of Redraw(Rect) must ensure they do not set Driver.Clip to a clip region larger than the region parameter. 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.MouseClick 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.DrawContent View.OnDrawContent(Rect) 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.LayoutComplete View.LayoutSubviews() View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) View.OnMouseEvent(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.MouseClick 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.DrawContent View.OnDrawContent(Rect) 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.LayoutComplete View.LayoutSubviews() View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) View.OnMouseEvent(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 Invoked when the selected radio label has changed 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) Method invoked when a mouse event is generated Declaration public override bool MouseEvent(MouseEvent me) Parameters Type Name Description MouseEvent me Returns Type Description System.Boolean true , if the event was handled, false otherwise. Overrides Responder.MouseEvent(MouseEvent) PositionCursor() Positions the cursor in the right position based on the currently focused view in the chain. Declaration public override void PositionCursor() Overrides View.PositionCursor() ProcessColdKey(KeyEvent) This method can be overwritten by views that want to provide accelerator functionality (Alt-key for example), but without interefering with normal ProcessKey behavior. Declaration public override bool ProcessColdKey(KeyEvent kb) Parameters Type Name Description KeyEvent kb Returns Type Description System.Boolean Overrides View.ProcessColdKey(KeyEvent) Remarks After keys are sent to the subviews on the current view, all the view are processed and the key is passed to the views to allow some of them to process the keystroke as a cold-key. This functionality is used, for example, by default buttons to act on the enter key. Processing this as a hot-key would prevent non-default buttons from consuming the enter keypress when they have the focus. ProcessKey(KeyEvent) If the view is focused, gives the view a chance to process the keystroke. Declaration public override bool ProcessKey(KeyEvent kb) Parameters Type Name Description KeyEvent kb Returns Type Description System.Boolean Overrides View.ProcessKey(KeyEvent) Remarks Views can override this method if they are interested in processing the given keystroke. If they consume the keystroke, they must return true to stop the keystroke from being processed by other widgets or consumed by the widget engine. If they return false, the keystroke will be passed using the ProcessColdKey method to other views to process. The View implementation does nothing but return false, so it is not necessary to call base.ProcessKey if you derive directly from View, but you should if you derive other View subclasses. Redraw(Rect) Redraws this view and its subviews; only redraws the views that have been flagged for a re-display. Declaration public override void Redraw(Rect bounds) Parameters Type Name Description Rect bounds The bounds (view-relative region) to redraw. Overrides View.Redraw(Rect) Remarks Always use Bounds (view-relative) when calling Redraw(Rect) , NOT Frame (superview-relative). 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. Overrides of Redraw(Rect) must ensure they do not set Driver.Clip to a clip region larger than the region parameter. 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.MouseClick 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.DrawContent View.OnDrawContent(Rect) 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.LayoutComplete View.LayoutSubviews() View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) View.OnMouseEvent(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 Invoked when the selected radio label has changed 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 bounds) Parameters Type Name Description Rect bounds Overrides View.Redraw(Rect) Implements System.Collections.IEnumerable" }, "api/Terminal.Gui/Terminal.Gui.Rect.html": { "href": "api/Terminal.Gui/Terminal.Gui.Rect.html", @@ -222,12 +222,12 @@ "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.MouseClick 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.DrawContent View.OnDrawContent(Rect) 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.LayoutComplete View.LayoutSubviews() View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) View.OnMouseEvent(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() Initializes a new instance of the ScrollBarView class using Computed layout. Declaration public ScrollBarView() ScrollBarView(Int32, Int32, Boolean) Initializes a new instance of the ScrollBarView class using Computed layout. Declaration public ScrollBarView(int size, int position, bool isVertical) Parameters Type Name Description 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. ScrollBarView(Rect) Initializes a new instance of the ScrollBarView class using Absolute layout. Declaration public ScrollBarView(Rect rect) Parameters Type Name Description Rect rect Frame for the scrollbar. ScrollBarView(Rect, Int32, Int32, Boolean) Initializes a new instance of the ScrollBarView class using Absolute layout. 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. Sets the Size property. System.Int32 position The position within this scrollbar. Sets the Position property. System.Boolean isVertical If set to true this is a vertical scrollbar, otherwise, the scrollbar is horizontal. Sets the IsVertical property. Properties IsVertical If set to true this is a vertical scrollbar, otherwise, the scrollbar is horizontal. Declaration public bool IsVertical { get; set; } Property Value Type Description System.Boolean Position The position, relative to Size , to set the scrollbar at. Declaration public int Position { get; set; } Property Value Type Description System.Int32 The position. Size The size of content the scrollbar represents. Declaration public int Size { get; set; } Property Value Type Description System.Int32 The size. Remarks The Size is typically the size of the virtual content. E.g. when a Scrollbar is part of a ScrollView the Size is set to the appropriate dimension of ContentSize . Methods MouseEvent(MouseEvent) Method invoked when a mouse event is generated Declaration public override bool MouseEvent(MouseEvent me) Parameters Type Name Description MouseEvent me Returns Type Description System.Boolean true , if the event was handled, false otherwise. Overrides Responder.MouseEvent(MouseEvent) Redraw(Rect) Redraws this view and its subviews; only redraws the views that have been flagged for a re-display. Declaration public override void Redraw(Rect region) Parameters Type Name Description Rect region Overrides View.Redraw(Rect) Remarks Always use Bounds (view-relative) when calling Redraw(Rect) , NOT Frame (superview-relative). 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. Overrides of Redraw(Rect) must ensure they do not set Driver.Clip to a clip region larger than the region parameter. 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.MouseClick 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.DrawContent View.OnDrawContent(Rect) 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.LayoutComplete View.LayoutSubviews() View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) View.OnMouseEvent(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() Initializes a new instance of the ScrollBarView class using Computed layout. Declaration public ScrollBarView() ScrollBarView(Int32, Int32, Boolean) Initializes a new instance of the ScrollBarView class using Computed layout. Declaration public ScrollBarView(int size, int position, bool isVertical) Parameters Type Name Description 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. ScrollBarView(Rect) Initializes a new instance of the ScrollBarView class using Absolute layout. Declaration public ScrollBarView(Rect rect) Parameters Type Name Description Rect rect Frame for the scrollbar. ScrollBarView(Rect, Int32, Int32, Boolean) Initializes a new instance of the ScrollBarView class using Absolute layout. 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. Sets the Size property. System.Int32 position The position within this scrollbar. Sets the Position property. System.Boolean isVertical If set to true this is a vertical scrollbar, otherwise, the scrollbar is horizontal. Sets the IsVertical property. Properties IsVertical If set to true this is a vertical scrollbar, otherwise, the scrollbar is horizontal. Declaration public bool IsVertical { get; set; } Property Value Type Description System.Boolean Position The position, relative to Size , to set the scrollbar at. Declaration public int Position { get; set; } Property Value Type Description System.Int32 The position. Size The size of content the scrollbar represents. Declaration public int Size { get; set; } Property Value Type Description System.Int32 The size. Remarks The Size is typically the size of the virtual content. E.g. when a Scrollbar is part of a ScrollView the Size is set to the appropriate dimension of ContentSize . 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) Declaration public override void Redraw(Rect region) Parameters Type Name Description Rect region 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 subviews 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.MouseClick 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.DrawContent View.OnDrawContent(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.LayoutComplete View.LayoutSubviews() View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) View.OnMouseEvent(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 . Use the Constructors ScrollView() Initializes a new instance of the ScrollView class using Computed positioning. Declaration public ScrollView() ScrollView(Rect) Initializes a new instance of the ScrollView class using Absolute positioning. 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) Method invoked when a mouse event is generated Declaration public override bool MouseEvent(MouseEvent me) Parameters Type Name Description MouseEvent me Returns Type Description System.Boolean true , if the event was handled, false otherwise. Overrides Responder.MouseEvent(MouseEvent) PositionCursor() Positions the cursor in the right position based on the currently focused view in the chain. Declaration public override void PositionCursor() Overrides View.PositionCursor() ProcessKey(KeyEvent) If the view is focused, gives the view a chance to process the keystroke. Declaration public override bool ProcessKey(KeyEvent kb) Parameters Type Name Description KeyEvent kb Returns Type Description System.Boolean Overrides View.ProcessKey(KeyEvent) Remarks Views can override this method if they are interested in processing the given keystroke. If they consume the keystroke, they must return true to stop the keystroke from being processed by other widgets or consumed by the widget engine. If they return false, the keystroke will be passed using the ProcessColdKey method to other views to process. The View implementation does nothing but return false, so it is not necessary to call base.ProcessKey if you derive directly from View, but you should if you derive other View subclasses. Redraw(Rect) Redraws this view and its subviews; only redraws the views that have been flagged for a re-display. Declaration public override void Redraw(Rect region) Parameters Type Name Description Rect region Overrides View.Redraw(Rect) Remarks Always use Bounds (view-relative) when calling Redraw(Rect) , NOT Frame (superview-relative). 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. Overrides of Redraw(Rect) must ensure they do not set Driver.Clip to a clip region larger than the region parameter. 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 subviews 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.MouseClick 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.DrawContent View.OnDrawContent(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.LayoutComplete View.LayoutSubviews() View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) View.OnMouseEvent(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 . Use the Constructors ScrollView() Initializes a new instance of the ScrollView class using Computed positioning. Declaration public ScrollView() ScrollView(Rect) Initializes a new instance of the ScrollView class using Absolute positioning. 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) 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", @@ -237,7 +237,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.MouseClick 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.DrawContent View.OnDrawContent(Rect) 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.LayoutComplete View.LayoutSubviews() View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) View.OnMouseEvent(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 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 MouseEvent(MouseEvent) Method invoked when a mouse event is generated Declaration public override bool MouseEvent(MouseEvent me) Parameters Type Name Description MouseEvent me Returns Type Description System.Boolean true , if the event was handled, false otherwise. Overrides Responder.MouseEvent(MouseEvent) ProcessHotKey(KeyEvent) This method can be overwritten by view that want to provide accelerator functionality (Alt-key for example). Declaration public override bool ProcessHotKey(KeyEvent kb) Parameters Type Name Description KeyEvent kb Returns Type Description System.Boolean Overrides View.ProcessHotKey(KeyEvent) Remarks Before keys are sent to the subview on the current view, all the views are processed and the key is passed to the widgets to allow some of them to process the keystroke as a hot-key. For example, if you implement a button that has a hotkey ok \"o\", you would catch the combination Alt-o here. If the event is caught, you must return true to stop the keystroke from being dispatched to other views. Redraw(Rect) Redraws this view and its subviews; only redraws the views that have been flagged for a re-display. Declaration public override void Redraw(Rect bounds) Parameters Type Name Description Rect bounds The bounds (view-relative region) to redraw. Overrides View.Redraw(Rect) Remarks Always use Bounds (view-relative) when calling Redraw(Rect) , NOT Frame (superview-relative). 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. Overrides of Redraw(Rect) must ensure they do not set Driver.Clip to a clip region larger than the region parameter. 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.MouseClick 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.DrawContent View.OnDrawContent(Rect) 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.LayoutComplete View.LayoutSubviews() View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) View.OnMouseEvent(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 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 MouseEvent(MouseEvent) Declaration public override bool MouseEvent(MouseEvent me) Parameters Type Name Description MouseEvent me Returns Type Description System.Boolean Overrides Responder.MouseEvent(MouseEvent) 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 bounds) Parameters Type Name Description Rect bounds Overrides View.Redraw(Rect) Implements System.Collections.IEnumerable" }, "api/Terminal.Gui/Terminal.Gui.StatusItem.html": { "href": "api/Terminal.Gui/Terminal.Gui.StatusItem.html", @@ -252,22 +252,22 @@ "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.MouseClick 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.DrawContent View.OnDrawContent(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.LayoutComplete View.LayoutSubviews() View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) View.OnMouseEvent(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 Gets or sets a value indicating whether this Responder can focus. Declaration public override bool CanFocus { get; set; } Property Value Type Description System.Boolean true if can focus; otherwise, false . Overrides Responder.CanFocus CursorPosition Sets or gets the current cursor position. Declaration public int CursorPosition { get; set; } Property Value Type Description System.Int32 Frame Gets or sets the frame for the view. The frame is relative to the view's container ( SuperView ). Declaration public override Rect Frame { get; set; } Property Value Type Description Rect The frame. Overrides View.Frame Remarks Change the Frame when using the Absolute layout style to move or resize views. Altering the Frame of a view will trigger the redrawing of the view as well as the redrawing of the affected regions of the SuperView . 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) Method invoked when a mouse event is generated Declaration public override bool MouseEvent(MouseEvent ev) Parameters Type Name Description MouseEvent ev Returns Type Description System.Boolean true , if the event was handled, false otherwise. Overrides Responder.MouseEvent(MouseEvent) OnLeave() Method invoked when a view loses focus. Declaration public override bool OnLeave() Returns Type Description System.Boolean true , if the event was handled, false otherwise. 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) Redraws this view and its subviews; only redraws the views that have been flagged for a re-display. Declaration public override void Redraw(Rect bounds) Parameters Type Name Description Rect bounds The bounds (view-relative region) to redraw. Overrides View.Redraw(Rect) Remarks Always use Bounds (view-relative) when calling Redraw(Rect) , NOT Frame (superview-relative). 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. Overrides of Redraw(Rect) must ensure they do not set Driver.Clip to a clip region larger than the region parameter. Events Changed Changed event, raised when the text has clicked. Declaration public event EventHandler Changed Event Type Type Description System.EventHandler < NStack.ustring > Remarks This event is raised when the Text 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.MouseClick 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.DrawContent View.OnDrawContent(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.LayoutComplete View.LayoutSubviews() View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) View.OnMouseEvent(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 bounds) Parameters Type Name Description Rect bounds 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 This event is raised when the Text 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.MouseClick 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.DrawContent View.OnDrawContent(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.LayoutComplete View.LayoutSubviews() View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) View.OnMouseEvent(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 Gets or sets a value indicating whether this Responder can focus. Declaration public override bool CanFocus { get; set; } Property Value Type Description System.Boolean true if can focus; otherwise, false . 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) Method invoked when a mouse event is generated Declaration public override bool MouseEvent(MouseEvent ev) Parameters Type Name Description MouseEvent ev Returns Type Description System.Boolean true , if the event was handled, false otherwise. Overrides Responder.MouseEvent(MouseEvent) PositionCursor() Positions the cursor on the current row and column Declaration public override void PositionCursor() Overrides View.PositionCursor() ProcessKey(KeyEvent) If the view is focused, gives the view a chance to process the keystroke. Declaration public override bool ProcessKey(KeyEvent kb) Parameters Type Name Description KeyEvent kb Returns Type Description System.Boolean Overrides View.ProcessKey(KeyEvent) Remarks Views can override this method if they are interested in processing the given keystroke. If they consume the keystroke, they must return true to stop the keystroke from being processed by other widgets or consumed by the widget engine. If they return false, the keystroke will be passed using the ProcessColdKey method to other views to process. The View implementation does nothing but return false, so it is not necessary to call base.ProcessKey if you derive directly from View, but you should if you derive other View subclasses. Redraw(Rect) Redraws this view and its subviews; only redraws the views that have been flagged for a re-display. Declaration public override void Redraw(Rect bounds) Parameters Type Name Description Rect bounds The bounds (view-relative region) to redraw. Overrides View.Redraw(Rect) Remarks Always use Bounds (view-relative) when calling Redraw(Rect) , NOT Frame (superview-relative). 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. Overrides of Redraw(Rect) must ensure they do not set Driver.Clip to a clip region larger than the region parameter. 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.MouseClick 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.DrawContent View.OnDrawContent(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.LayoutComplete View.LayoutSubviews() View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) View.OnMouseEvent(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 bounds) Parameters Type Name Description Rect bounds 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.MouseClick 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.DrawContent View.OnDrawContent(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.LayoutComplete View.LayoutSubviews() View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) View.OnMouseEvent(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) Method invoked when a mouse event is generated Declaration public override bool MouseEvent(MouseEvent ev) Parameters Type Name Description MouseEvent ev Returns Type Description System.Boolean true , if the event was handled, false otherwise. Overrides TextField.MouseEvent(MouseEvent) 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 TextField.ProcessKey(KeyEvent) Remarks The TextField control responds to the following keys: Keys Function Delete , Backspace Deletes the character before cursor. 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.MouseClick 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.DrawContent View.OnDrawContent(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.LayoutComplete View.LayoutSubviews() View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) View.OnMouseEvent(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.MouseClick 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.DrawContent View.OnDrawContent(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.LayoutComplete View.LayoutSubviews() View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) View.OnMouseEvent(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, started by calling Run(Toplevel, Boolean) . They return control to the caller when RequestStop() has been called (which sets the Running property to false). A Toplevel is created when an application initialzies Terminal.Gui by callling Init() . The application Toplevel can be accessed via Top . Additional Toplevels can be created and run (e.g. Dialog s. To run a Toplevel, create the Toplevel and call Run(Toplevel, Boolean) . 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 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 A superview-relative rectangle specifying the location and size for the new Toplevel 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 Gets or sets the menu for this Toplevel 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. Declaration public bool Running { get; set; } Property Value Type Description System.Boolean Remarks Setting this property directly is discouraged. Use RequestStop() instead. StatusBar Gets or sets the status bar for this Toplevel Declaration public StatusBar StatusBar { get; set; } Property Value Type Description StatusBar Methods Add(View) Adds a subview (child) to this view. Declaration public override void Add(View view) Parameters Type Name Description View view Overrides View.Add(View) Remarks The Views that have been added to this view can be retrieved via the Subviews property. See also Remove(View) RemoveAll() 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) If the view is focused, gives the view a chance to process the keystroke. Declaration public override bool ProcessKey(KeyEvent keyEvent) Parameters Type Name Description KeyEvent keyEvent Contains the details about the key that produced the event. Returns Type Description System.Boolean Overrides View.ProcessKey(KeyEvent) Remarks Views can override this method if they are interested in processing the given keystroke. If they consume the keystroke, they must return true to stop the keystroke from being processed by other widgets or consumed by the widget engine. If they return false, the keystroke will be passed using the ProcessColdKey method to other views to process. The View implementation does nothing but return false, so it is not necessary to call base.ProcessKey if you derive directly from View, but you should if you derive other View subclasses. Redraw(Rect) Redraws this view and its subviews; only redraws the views that have been flagged for a re-display. Declaration public override void Redraw(Rect bounds) Parameters Type Name Description Rect bounds The bounds (view-relative region) to redraw. Overrides View.Redraw(Rect) Remarks Always use Bounds (view-relative) when calling Redraw(Rect) , NOT Frame (superview-relative). 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. Overrides of Redraw(Rect) must ensure they do not set Driver.Clip to a clip region larger than the region parameter. Remove(View) Removes a subview added via Add(View) or Add(View[]) from this View. Declaration public override void Remove(View view) Parameters Type Name Description View view Overrides View.Remove(View) Remarks RemoveAll() Removes all subviews (children) added via Add(View) or Add(View[]) from this View. Declaration public override void RemoveAll() Overrides View.RemoveAll() WillPresent() Invoked by Begin(Toplevel) as part of the Run(Toplevel, Boolean) 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.MouseClick 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.DrawContent View.OnDrawContent(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.LayoutComplete View.LayoutSubviews() View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) View.OnMouseEvent(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, started by calling Run(Toplevel, Boolean) . They return control to the caller when RequestStop() has been called (which sets the Running property to false). A Toplevel is created when an application initialzies Terminal.Gui by callling Init() . The application Toplevel can be accessed via Top . Additional Toplevels can be created and run (e.g. Dialog s. To run a Toplevel, create the Toplevel and call Run(Toplevel, Boolean) . 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 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 A superview-relative rectangle specifying the location and size for the new Toplevel 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 Gets or sets the menu for this Toplevel 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. Declaration public bool Running { get; set; } Property Value Type Description System.Boolean Remarks Setting this property directly is discouraged. Use RequestStop() instead. StatusBar Gets or sets the status bar for this Toplevel 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 bounds) Parameters Type Name Description Rect bounds 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() Invoked by Begin(Toplevel) as part of the Run(Toplevel, Boolean) 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.FocusEventArgs.html": { "href": "api/Terminal.Gui/Terminal.Gui.View.FocusEventArgs.html", @@ -277,7 +277,7 @@ "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. Views can contain one or more subviews, can respond to user input and render themselves on the screen. Views supports two layout styles: Absolute or Computed. The choice as to which layout style is used by the View is determined when the View is initizlied. To create a View using Absolute layout, call a constructor that takes a Rect parameter to specify the absolute position and size (the View. Frame )/. To create a View using Computed layout use a constructor that does not take a Rect parametr and set 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. To switch between Absolute and Computed layout, use the LayoutStyle property. Computed layout is more flexible and supports dynamic console apps where controls adjust layout as the terminal resizes or other Views change size or position. The X, Y, Width and Height properties are Dim and Pos objects that 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 views when view's frames are resized or if the terminal size changes. Absolute layout requires specifying coordiantes and sizes of Views explicitly, and the View will typcialy stay in a fixed position and size. To change the position and size use the Frame property. Subviews (child views) can be added to a View by calling the Add(View) method. The container of a View can be accessed with the SuperView property. To flag a region of the View's Bounds to be redrawn call SetNeedsDisplay(Rect) . To flag the entire view for redraw call SetNeedsDisplay() . 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. Subclasses should not rely on ColorScheme being set at construction time. If a ColorScheme is not set on a view, the view will inherit the value from its SuperView and the value might only be valid once a view has been added to a SuperView. By using ColorScheme applications 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 LayoutSubviews() method 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 Absolute , and will recompute the frames for the vies that use Computed . Constructors View() Initializes a new instance of Computed View class. Declaration public View() Remarks Use X , Y , Width , and Height properties to dynamically control the size and location of the view. View(Rect) Initializes a new instance of a Absolute View class with the absolute dimensions specified in the frame parameter. Declaration public View(Rect frame) Parameters Type Name Description Rect frame The region covered by this view. Remarks This constructor intitalize a View with a LayoutStyle of Absolute . Use View() to initialize a View with LayoutStyle of Computed Properties Bounds The bounds represent the View-relative rectangle used for this view; the area inside of the view. Declaration public Rect Bounds { get; set; } Property Value Type Description Rect The bounds. Remarks Updates to the Bounds update the Frame , and has the same side effects as updating the Frame . Because Bounds coordinates are relative to the upper-left corner of the View , the coordinates of the upper-left corner of the rectangle returned by this property are (0,0). Use this property to obtain the size and coordinates of the client area of the control for tasks such as drawing on the surface of the control. ColorScheme The color scheme for this view, if it is not defined, it returns the SuperView '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. The frame is relative to the view's container ( SuperView ). Declaration public virtual Rect Frame { get; set; } Property Value Type Description Rect The frame. Remarks Change the Frame when using the Absolute layout style to move or resize views. Altering the Frame of a view will trigger the redrawing of the view as well as the redrawing of the affected regions of the SuperView . HasFocus Gets or sets a value indicating whether this Responder has focus. Declaration public override bool HasFocus { get; } Property Value Type Description System.Boolean true if has focus; otherwise, false . Overrides Responder.HasFocus Height Gets or sets the height of the view. Only used whe LayoutStyle is Computed . 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. Remarks The id should be unique across all Views that share a SuperView. 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 the style is set to Absolute , LayoutSubviews does not change the Frame . If the style is Computed the Frame is updated using the 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 wants 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 of the view. Only used whe LayoutStyle is Computed . Declaration public Dim Width { get; set; } Property Value Type Description Dim The width. Remarks If LayoutStyle is Absolute changing this property has no effect and its value is indeterminate. X Gets or sets the X position for the view (the column). Only used whe LayoutStyle is Computed . Declaration public Pos X { get; set; } Property Value Type Description Pos The X Position. Remarks If LayoutStyle is Absolute changing this property has no effect and its value is indeterminate. Y Gets or sets the Y position for the view (the row). Only used whe LayoutStyle is Computed . Declaration public Pos Y { get; set; } Property Value Type Description Pos The y position (line). Remarks If LayoutStyle is Absolute changing this property has no effect and its value is indeterminate. Methods Add(View) Adds a subview (child) to this view. Declaration public virtual void Add(View view) Parameters Type Name Description View view Remarks The Views that have been added to this view can be retrieved via the Subviews property. See also Remove(View) RemoveAll() Add(View[]) Adds the specified views (children) 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). Remarks The Views that have been added to this view can be retrieved via the Subviews property. See also Remove(View) RemoveAll() AddRune(Int32, Int32, Rune) Displays the specified character in the specified column and row of the View. Declaration public void AddRune(int col, int row, Rune ch) Parameters Type Name Description System.Int32 col Column (view-relative). System.Int32 row Row (view-relative). 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() Indicates that any child views (in the Subviews list) need 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 region with the current color. Declaration public void Clear(Rect regionScreen) Parameters Type Name Description Rect regionScreen The screen-relative region to clear. Remarks ClearNeedsDisplay() Removes the SetNeedsDisplay() and the ChildNeedsDisplay() setting on this view. Declaration protected void ClearNeedsDisplay() ClipToBounds() Sets the ConsoleDriver '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 re-eapplied by setting Driver .Clip ( Clip ). Remarks Bounds is View-relative. DrawFrame(Rect, Int32, Boolean) Draws a frame in the current view, clipped by the boundary of this view Declaration public void DrawFrame(Rect region, int padding = 0, bool fill = false) Parameters Type Name Description Rect region View-relative region for the frame to be drawn. System.Int32 padding The padding to add around the outside of 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. Remarks The hotkey is any character following an underscore ('_') character. 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() 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() Remarks Calls Terminal.Gui.View.OnLayoutComplete(Terminal.Gui.View.LayoutEventArgs) (which raises the LayoutComplete event) before it returns. 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 (view-relative). System.Int32 row Row (view-relative). OnDrawContent(Rect) Enables overrides to draw infinitely scrolled content and/or a background behind added controls. Declaration public virtual void OnDrawContent(Rect viewport) Parameters Type Name Description Rect viewport The view-relative rectangle describing the currently visible viewport into the View Remarks This method will be called before any subviews added with Add(View) have been drawn. OnEnter() Method invoked when a view gets focus. Declaration public override bool OnEnter() Returns Type Description System.Boolean true , if the event was handled, false otherwise. 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() Method invoked when a view loses focus. Declaration public override bool OnLeave() Returns Type Description System.Boolean true , if the event was handled, false otherwise. Overrides Responder.OnLeave() OnMouseEnter(MouseEvent) Method invoked when a mouse event is generated for the first time. Declaration public override bool OnMouseEnter(MouseEvent mouseEvent) Parameters Type Name Description MouseEvent mouseEvent Returns Type Description System.Boolean true , if the event was handled, false otherwise. Overrides Responder.OnMouseEnter(MouseEvent) OnMouseEvent(MouseEvent) Method invoked when a mouse event is generated Declaration public virtual bool OnMouseEvent(MouseEvent mouseEvent) Parameters Type Name Description MouseEvent mouseEvent Returns Type Description System.Boolean true , if the event was handled, false otherwise. OnMouseLeave(MouseEvent) Method invoked when a mouse event is generated for the last time. Declaration public override bool OnMouseLeave(MouseEvent mouseEvent) Parameters Type Name Description MouseEvent mouseEvent Returns Type Description System.Boolean true , if the event was handled, false otherwise. 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) This method can be overwritten by views that want to provide accelerator functionality (Alt-key for example), but without interefering with normal ProcessKey behavior. Declaration public override bool ProcessColdKey(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.ProcessColdKey(KeyEvent) Remarks After keys are sent to the subviews on the current view, all the view are processed and the key is passed to the views to allow some of them to process the keystroke as a cold-key. This functionality is used, for example, by default buttons to act on the enter key. Processing this as a hot-key would prevent non-default buttons from consuming the enter keypress when they have the focus. ProcessHotKey(KeyEvent) This method can be overwritten by view that want to provide accelerator functionality (Alt-key for example). Declaration public override bool ProcessHotKey(KeyEvent keyEvent) Parameters Type Name Description KeyEvent keyEvent Returns Type Description System.Boolean Overrides Responder.ProcessHotKey(KeyEvent) Remarks Before keys are sent to the subview on the current view, all the views are processed and the key is passed to the widgets to allow some of them to process the keystroke as a hot-key. For example, if you implement a button that has a hotkey ok \"o\", you would catch the combination Alt-o here. If the event is caught, you must return true to stop the keystroke from being dispatched to other views. ProcessKey(KeyEvent) If the view is focused, gives the view a chance to process the keystroke. Declaration public override bool ProcessKey(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.ProcessKey(KeyEvent) Remarks Views can override this method if they are interested in processing the given keystroke. If they consume the keystroke, they must return true to stop the keystroke from being processed by other widgets or consumed by the widget engine. If they return false, the keystroke will be passed using the ProcessColdKey method to other views to process. The View implementation does nothing but return false, so it is not necessary to call base.ProcessKey if you derive directly from View, but you should if you derive other View subclasses. Redraw(Rect) Redraws this view and its subviews; only redraws the views that have been flagged for a re-display. Declaration public virtual void Redraw(Rect bounds) Parameters Type Name Description Rect bounds The bounds (view-relative region) to redraw. Remarks Always use Bounds (view-relative) when calling Redraw(Rect) , NOT Frame (superview-relative). 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. Overrides of Redraw(Rect) must ensure they do not set Driver.Clip to a clip region larger than the region parameter. Remove(View) Removes a subview added via Add(View) or Add(View[]) from this View. Declaration public virtual void Remove(View view) Parameters Type Name Description View view Remarks RemoveAll() Removes all subviews (children) added via Add(View) or Add(View[]) from this View. Declaration public virtual void RemoveAll() ScreenToView(Int32, Int32) Converts a point from screen-relative coordinates to view-relative coordinates. 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 clip region to the specified view-relative region. Declaration public Rect SetClip(Rect region) Parameters Type Name Description Rect region View-relative clip region. Returns Type Description Rect The previous screen-relative clip region. SetFocus(View) Causes the specified subview to have focus. Declaration public void SetFocus(View view) Parameters Type Name Description View view View. SetNeedsDisplay() Sets a flag indicating this view needs to be redisplayed because its state has changed. Declaration public void SetNeedsDisplay() SetNeedsDisplay(Rect) Flags the view-relative region on this View as needing to be repainted. Declaration public void SetNeedsDisplay(Rect region) Parameters Type Name Description Rect region The view-relative region that must be flagged for repaint. ToString() Pretty prints the View Declaration public override string ToString() Returns Type Description System.String Overrides System.Object.ToString() Events DrawContent Event invoked when the content area of the View is to be drawn. Declaration public event EventHandler DrawContent Event Type Type Description System.EventHandler < Rect > Remarks Will be invoked before any subviews added with Add(View) have been drawn. Rect provides the view-relative rectangle describing the currently visible viewport into the View . Enter Event fired when the view gets focus. Declaration public event EventHandler Enter Event Type Type Description System.EventHandler < View.FocusEventArgs > 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 > LayoutComplete Fired after the Views's LayoutSubviews() method has completed. Declaration public event EventHandler LayoutComplete Event Type Type Description System.EventHandler < View.LayoutEventArgs > Remarks Subscribe to this event to perform tasks when the View has been resized or the layout has otherwise changed. Leave Event fired when the view looses focus. Declaration public event EventHandler Leave Event Type Type Description System.EventHandler < View.FocusEventArgs > MouseClick Event fired when a mouse event is generated. Declaration public event EventHandler MouseClick Event Type Type Description System.EventHandler < View.MouseEventEventArgs > 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 < View.MouseEventEventArgs > MouseLeave Event fired when the view receives a mouse event for the last time. Declaration public event EventHandler MouseLeave Event Type Type Description System.EventHandler < View.MouseEventEventArgs > 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. Views can contain one or more subviews, can respond to user input and render themselves on the screen. Views supports two layout styles: Absolute or Computed. The choice as to which layout style is used by the View is determined when the View is initizlied. To create a View using Absolute layout, call a constructor that takes a Rect parameter to specify the absolute position and size (the View. Frame )/. To create a View using Computed layout use a constructor that does not take a Rect parametr and set 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. To switch between Absolute and Computed layout, use the LayoutStyle property. Computed layout is more flexible and supports dynamic console apps where controls adjust layout as the terminal resizes or other Views change size or position. The X, Y, Width and Height properties are Dim and Pos objects that 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 views when view's frames are resized or if the terminal size changes. Absolute layout requires specifying coordiantes and sizes of Views explicitly, and the View will typcialy stay in a fixed position and size. To change the position and size use the Frame property. Subviews (child views) can be added to a View by calling the Add(View) method. The container of a View can be accessed with the SuperView property. To flag a region of the View's Bounds to be redrawn call SetNeedsDisplay(Rect) . To flag the entire view for redraw call SetNeedsDisplay() . 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. Subclasses should not rely on ColorScheme being set at construction time. If a ColorScheme is not set on a view, the view will inherit the value from its SuperView and the value might only be valid once a view has been added to a SuperView. By using ColorScheme applications 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 LayoutSubviews() method 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 Absolute , and will recompute the frames for the vies that use Computed . Constructors View() Initializes a new instance of Computed View class. Declaration public View() Remarks Use X , Y , Width , and Height properties to dynamically control the size and location of the view. View(Rect) Initializes a new instance of a Absolute View class with the absolute dimensions specified in the frame parameter. Declaration public View(Rect frame) Parameters Type Name Description Rect frame The region covered by this view. Remarks This constructor intitalize a View with a LayoutStyle of Absolute . Use View() to initialize a View with LayoutStyle of Computed Properties Bounds The bounds represent the View-relative rectangle used for this view; the area inside of the view. Declaration public Rect Bounds { get; set; } Property Value Type Description Rect The bounds. Remarks Updates to the Bounds update the Frame , and has the same side effects as updating the Frame . Because Bounds coordinates are relative to the upper-left corner of the View , the coordinates of the upper-left corner of the rectangle returned by this property are (0,0). Use this property to obtain the size and coordinates of the client area of the control for tasks such as drawing on the surface of the control. ColorScheme The color scheme for this view, if it is not defined, it returns the SuperView '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. The frame is relative to the view's container ( SuperView ). Declaration public virtual Rect Frame { get; set; } Property Value Type Description Rect The frame. Remarks Change the Frame when using the Absolute layout style to move or resize views. Altering the Frame of a view will trigger the redrawing of the view as well as the redrawing of the affected regions of the SuperView . HasFocus Declaration public override bool HasFocus { get; } Property Value Type Description System.Boolean Overrides Responder.HasFocus Height Gets or sets the height of the view. Only used whe LayoutStyle is Computed . 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. Remarks The id should be unique across all Views that share a SuperView. 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 the style is set to Absolute , LayoutSubviews does not change the Frame . If the style is Computed the Frame is updated using the 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 wants 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 of the view. Only used whe LayoutStyle is Computed . Declaration public Dim Width { get; set; } Property Value Type Description Dim The width. Remarks If LayoutStyle is Absolute changing this property has no effect and its value is indeterminate. X Gets or sets the X position for the view (the column). Only used whe LayoutStyle is Computed . Declaration public Pos X { get; set; } Property Value Type Description Pos The X Position. Remarks If LayoutStyle is Absolute changing this property has no effect and its value is indeterminate. Y Gets or sets the Y position for the view (the row). Only used whe LayoutStyle is Computed . Declaration public Pos Y { get; set; } Property Value Type Description Pos The y position (line). Remarks If LayoutStyle is Absolute changing this property has no effect and its value is indeterminate. Methods Add(View) Adds a subview (child) to this view. Declaration public virtual void Add(View view) Parameters Type Name Description View view Remarks The Views that have been added to this view can be retrieved via the Subviews property. See also Remove(View) RemoveAll() Add(View[]) Adds the specified views (children) 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). Remarks The Views that have been added to this view can be retrieved via the Subviews property. See also Remove(View) RemoveAll() AddRune(Int32, Int32, Rune) Displays the specified character in the specified column and row of the View. Declaration public void AddRune(int col, int row, Rune ch) Parameters Type Name Description System.Int32 col Column (view-relative). System.Int32 row Row (view-relative). 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() Indicates that any child views (in the Subviews list) need 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 region with the current color. Declaration public void Clear(Rect regionScreen) Parameters Type Name Description Rect regionScreen The screen-relative region to clear. Remarks ClearNeedsDisplay() Removes the SetNeedsDisplay() and the ChildNeedsDisplay() setting on this view. Declaration protected void ClearNeedsDisplay() ClipToBounds() Sets the ConsoleDriver '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 re-eapplied by setting Driver .Clip ( Clip ). Remarks Bounds is View-relative. DrawFrame(Rect, Int32, Boolean) Draws a frame in the current view, clipped by the boundary of this view Declaration public void DrawFrame(Rect region, int padding = 0, bool fill = false) Parameters Type Name Description Rect region View-relative region for the frame to be drawn. System.Int32 padding The padding to add around the outside of 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. Remarks The hotkey is any character following an underscore ('_') character. 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() 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() Remarks Calls Terminal.Gui.View.OnLayoutComplete(Terminal.Gui.View.LayoutEventArgs) (which raises the LayoutComplete event) before it returns. 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 (view-relative). System.Int32 row Row (view-relative). OnDrawContent(Rect) Enables overrides to draw infinitely scrolled content and/or a background behind added controls. Declaration public virtual void OnDrawContent(Rect viewport) Parameters Type Name Description Rect viewport The view-relative rectangle describing the currently visible viewport into the View Remarks This method will be called before any subviews added with Add(View) have been drawn. 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) OnMouseEvent(MouseEvent) Method invoked when a mouse event is generated Declaration public virtual bool OnMouseEvent(MouseEvent mouseEvent) Parameters Type Name Description MouseEvent mouseEvent Returns Type Description System.Boolean true , if the event was handled, false otherwise. 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) Redraws this view and its subviews; only redraws the views that have been flagged for a re-display. Declaration public virtual void Redraw(Rect bounds) Parameters Type Name Description Rect bounds The bounds (view-relative region) to redraw. Remarks Always use Bounds (view-relative) when calling Redraw(Rect) , NOT Frame (superview-relative). 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. Overrides of Redraw(Rect) must ensure they do not set Driver.Clip to a clip region larger than the region parameter. Remove(View) Removes a subview added via Add(View) or Add(View[]) from this View. Declaration public virtual void Remove(View view) Parameters Type Name Description View view Remarks RemoveAll() Removes all subviews (children) added via Add(View) or Add(View[]) from this View. Declaration public virtual void RemoveAll() ScreenToView(Int32, Int32) Converts a point from screen-relative coordinates to view-relative coordinates. 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 clip region to the specified view-relative region. Declaration public Rect SetClip(Rect region) Parameters Type Name Description Rect region View-relative clip region. Returns Type Description Rect The previous screen-relative clip region. SetFocus(View) Causes the specified subview to have focus. Declaration public void SetFocus(View view) Parameters Type Name Description View view View. SetNeedsDisplay() Sets a flag indicating this view needs to be redisplayed because its state has changed. Declaration public void SetNeedsDisplay() SetNeedsDisplay(Rect) Flags the view-relative region on this View as needing to be repainted. Declaration public void SetNeedsDisplay(Rect region) Parameters Type Name Description Rect region The view-relative region that must be flagged for repaint. ToString() Pretty prints the View Declaration public override string ToString() Returns Type Description System.String Overrides System.Object.ToString() Events DrawContent Event invoked when the content area of the View is to be drawn. Declaration public event EventHandler DrawContent Event Type Type Description System.EventHandler < Rect > Remarks Will be invoked before any subviews added with Add(View) have been drawn. Rect provides the view-relative rectangle describing the currently visible viewport into the View . Enter Event fired when the view gets focus. Declaration public event EventHandler Enter Event Type Type Description System.EventHandler < View.FocusEventArgs > 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 > LayoutComplete Fired after the Views's LayoutSubviews() method has completed. Declaration public event EventHandler LayoutComplete Event Type Type Description System.EventHandler < View.LayoutEventArgs > Remarks Subscribe to this event to perform tasks when the View has been resized or the layout has otherwise changed. Leave Event fired when the view looses focus. Declaration public event EventHandler Leave Event Type Type Description System.EventHandler < View.FocusEventArgs > MouseClick Event fired when a mouse event is generated. Declaration public event EventHandler MouseClick Event Type Type Description System.EventHandler < View.MouseEventEventArgs > 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 < View.MouseEventEventArgs > MouseLeave Event fired when the view receives a mouse event for the last time. Declaration public event EventHandler MouseLeave Event Type Type Description System.EventHandler < View.MouseEventEventArgs > Implements System.Collections.IEnumerable" }, "api/Terminal.Gui/Terminal.Gui.View.KeyEventEventArgs.html": { "href": "api/Terminal.Gui/Terminal.Gui.View.KeyEventEventArgs.html", @@ -297,7 +297,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 border around its Frame with a Title at the top. 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.MouseClick 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.DrawContent View.OnDrawContent(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.LayoutComplete View.LayoutSubviews() View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) View.OnMouseEvent(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 Remarks The 'client area' of a Window is a rectangle deflated by one or more rows/columns from Bounds . A this time there is no API to determine this rectangle. 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. Remarks This constructor intitalize a View with a LayoutStyle of Computed . Use X , Y , Width , and Height properties to dynamically control the size and location of the view. Window(ustring, Int32) Initializes a new instance of the Window with the specified frame for its location, with the specified border, and 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. Remarks This constructor intitalize a View with a LayoutStyle of Computed . Use X , Y , Width , and Height properties to dynamically control the size and location of the view. Window(Rect, ustring) Initializes a new instance of the Window class with an optional title using Absolute positioning. Declaration public Window(Rect frame, ustring title = null) Parameters Type Name Description Rect frame Superview-relatie rectangle specifying the location and size NStack.ustring title Title Remarks This constructor intitalizes a Window with a LayoutStyle of Absolute . Use constructors that do not take Rect parameters to initialize a Window with Computed . Window(Rect, ustring, Int32) Initializes a new instance of the Window with the specified frame for its location, with the specified border, and an optional title. Declaration public Window(Rect frame, ustring title = null, int padding = 0) Parameters Type Name Description Rect frame Superview-relatie rectangle specifying the location and size NStack.ustring title Title System.Int32 padding Number of characters to use for padding of the drawn frame. Remarks This constructor intitalizes a Window with a LayoutStyle of Absolute . Use constructors that do not take Rect parameters to initialize a Window with LayoutStyle of Computed 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) Adds a subview (child) to this view. Declaration public override void Add(View view) Parameters Type Name Description View view Overrides Toplevel.Add(View) Remarks The Views that have been added to this view can be retrieved via the Subviews property. See also Remove(View) RemoveAll() 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) Method invoked when a mouse event is generated Declaration public override bool MouseEvent(MouseEvent mouseEvent) Parameters Type Name Description MouseEvent mouseEvent Contains the details about the mouse event. Returns Type Description System.Boolean true , if the event was handled, false otherwise. Overrides Responder.MouseEvent(MouseEvent) Redraw(Rect) Redraws this view and its subviews; only redraws the views that have been flagged for a re-display. Declaration public override void Redraw(Rect bounds) Parameters Type Name Description Rect bounds The bounds (view-relative region) to redraw. Overrides Toplevel.Redraw(Rect) Remarks Always use Bounds (view-relative) when calling Redraw(Rect) , NOT Frame (superview-relative). 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. Overrides of Redraw(Rect) must ensure they do not set Driver.Clip to a clip region larger than the region parameter. Remove(View) Removes a subview added via Add(View) or Add(View[]) from this View. Declaration public override void Remove(View view) Parameters Type Name Description View view Overrides Toplevel.Remove(View) Remarks RemoveAll() Removes all subviews (children) added via Add(View) or Add(View[]) from this View. Declaration public override void RemoveAll() Overrides Toplevel.RemoveAll() Implements System.Collections.IEnumerable" + "keywords": "Class Window A Toplevel View that draws a border around its Frame with a Title at the top. 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.MouseClick 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.DrawContent View.OnDrawContent(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.LayoutComplete View.LayoutSubviews() View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) View.OnMouseEvent(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 Remarks The 'client area' of a Window is a rectangle deflated by one or more rows/columns from Bounds . A this time there is no API to determine this rectangle. 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. Remarks This constructor intitalize a View with a LayoutStyle of Computed . Use X , Y , Width , and Height properties to dynamically control the size and location of the view. Window(ustring, Int32) Initializes a new instance of the Window with the specified frame for its location, with the specified border, and 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. Remarks This constructor intitalize a View with a LayoutStyle of Computed . Use X , Y , Width , and Height properties to dynamically control the size and location of the view. Window(Rect, ustring) Initializes a new instance of the Window class with an optional title using Absolute positioning. Declaration public Window(Rect frame, ustring title = null) Parameters Type Name Description Rect frame Superview-relatie rectangle specifying the location and size NStack.ustring title Title Remarks This constructor intitalizes a Window with a LayoutStyle of Absolute . Use constructors that do not take Rect parameters to initialize a Window with Computed . Window(Rect, ustring, Int32) Initializes a new instance of the Window with the specified frame for its location, with the specified border, and an optional title. Declaration public Window(Rect frame, ustring title = null, int padding = 0) Parameters Type Name Description Rect frame Superview-relatie rectangle specifying the location and size NStack.ustring title Title System.Int32 padding Number of characters to use for padding of the drawn frame. Remarks This constructor intitalizes a Window with a LayoutStyle of Absolute . Use constructors that do not take Rect parameters to initialize a Window with LayoutStyle of Computed 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) Declaration public override void Add(View view) Parameters Type Name Description View view 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) Declaration public override void Remove(View view) Parameters Type Name Description View view Overrides Toplevel.Remove(View) RemoveAll() Declaration public override void RemoveAll() Overrides Toplevel.RemoveAll() Implements System.Collections.IEnumerable" }, "api/Terminal.Gui/Unix.Terminal.Curses.Event.html": { "href": "api/Terminal.Gui/Unix.Terminal.Curses.Event.html", diff --git a/docs/manifest.json b/docs/manifest.json index 250fa0354f..13bddb6e8e 100644 --- a/docs/manifest.json +++ b/docs/manifest.json @@ -42,7 +42,7 @@ "output": { ".html": { "relative_path": "api/Terminal.Gui/Terminal.Gui.Application.html", - "hash": "yPT23nVjyZPKhFMNBFXA/Q==" + "hash": "/ygpfb9k/Ho2HFeyo+cahA==" } }, "is_incremental": false, @@ -66,7 +66,7 @@ "output": { ".html": { "relative_path": "api/Terminal.Gui/Terminal.Gui.Button.html", - "hash": "Ogiqw8WWs3e+tiBkNjtoaA==" + "hash": "gaBKrB9OBMD1FRjudM/MyA==" } }, "is_incremental": false, @@ -78,7 +78,7 @@ "output": { ".html": { "relative_path": "api/Terminal.Gui/Terminal.Gui.CheckBox.html", - "hash": "auuTn/N2r9yNW5gVjlaxBQ==" + "hash": "oVTXd4rh3LkklfBHDTvDhg==" } }, "is_incremental": false, @@ -138,7 +138,7 @@ "output": { ".html": { "relative_path": "api/Terminal.Gui/Terminal.Gui.ComboBox.html", - "hash": "4cdRAEyCUS1eq3/oAy6x4A==" + "hash": "b26P7IE+pFbgTO2ZYaywKA==" } }, "is_incremental": false, @@ -162,7 +162,7 @@ "output": { ".html": { "relative_path": "api/Terminal.Gui/Terminal.Gui.DateField.html", - "hash": "0ZzeifsaibVtiJrH53dOtQ==" + "hash": "sAqKHuRHIIVLnVm+O+rWOQ==" } }, "is_incremental": false, @@ -174,7 +174,7 @@ "output": { ".html": { "relative_path": "api/Terminal.Gui/Terminal.Gui.Dialog.html", - "hash": "8IkU8xj3u5Np/IOe2kBDMg==" + "hash": "4RVcSOhFize5ZsqV4olHdw==" } }, "is_incremental": false, @@ -198,7 +198,7 @@ "output": { ".html": { "relative_path": "api/Terminal.Gui/Terminal.Gui.FileDialog.html", - "hash": "id0zrYgEoIqU5dH1N5xnLA==" + "hash": "9JG5QAHWUZo/lZScAjXjJA==" } }, "is_incremental": false, @@ -210,7 +210,7 @@ "output": { ".html": { "relative_path": "api/Terminal.Gui/Terminal.Gui.FrameView.html", - "hash": "4Q6FKv69/GJr9tWj2vJ2eA==" + "hash": "72XYYZUXq6J0/HYZ9rhpZw==" } }, "is_incremental": false, @@ -222,7 +222,7 @@ "output": { ".html": { "relative_path": "api/Terminal.Gui/Terminal.Gui.HexView.html", - "hash": "vEBheuK6RqqBCFPRz/YL9Q==" + "hash": "AEvMPIKEdNVN9lwqcByCZw==" } }, "is_incremental": false, @@ -294,7 +294,7 @@ "output": { ".html": { "relative_path": "api/Terminal.Gui/Terminal.Gui.Label.html", - "hash": "cOTYMYU6aH58f+TUm8kjZw==" + "hash": "JvhX8JF59tW1Hg51s+A6AQ==" } }, "is_incremental": false, @@ -318,7 +318,7 @@ "output": { ".html": { "relative_path": "api/Terminal.Gui/Terminal.Gui.ListView.html", - "hash": "0QkPauXHsAQht7uuiECH/g==" + "hash": "7svIIfhkkOCivVERFzHgKA==" } }, "is_incremental": false, @@ -366,7 +366,7 @@ "output": { ".html": { "relative_path": "api/Terminal.Gui/Terminal.Gui.MenuBar.html", - "hash": "AMuhNj4f31WAXMYfYJfXmA==" + "hash": "GsNO4uH7d/cnoCBFokQLdA==" } }, "is_incremental": false, @@ -474,7 +474,7 @@ "output": { ".html": { "relative_path": "api/Terminal.Gui/Terminal.Gui.ProgressBar.html", - "hash": "uV49T7u6viQ37rQhBT3Zzw==" + "hash": "urA3hKzyAQWatUXYgT5Slw==" } }, "is_incremental": false, @@ -486,7 +486,7 @@ "output": { ".html": { "relative_path": "api/Terminal.Gui/Terminal.Gui.RadioGroup.html", - "hash": "/BRdhsdF75VLMpGQ343/Pw==" + "hash": "JZPxpJnq3zQlP5Z78FlMfA==" } }, "is_incremental": false, @@ -534,7 +534,7 @@ "output": { ".html": { "relative_path": "api/Terminal.Gui/Terminal.Gui.ScrollBarView.html", - "hash": "DXaxZYGJtmaSfHa3Jk+gyA==" + "hash": "+/VIXbP9lOhnCupCTETPxA==" } }, "is_incremental": false, @@ -546,7 +546,7 @@ "output": { ".html": { "relative_path": "api/Terminal.Gui/Terminal.Gui.ScrollView.html", - "hash": "H/44f2Hsi78rcqL5DfzFNQ==" + "hash": "P20wjwoOLWuOXTbCZsi3TQ==" } }, "is_incremental": false, @@ -570,7 +570,7 @@ "output": { ".html": { "relative_path": "api/Terminal.Gui/Terminal.Gui.StatusBar.html", - "hash": "aQwab8aCzg9DO76j0n0Lug==" + "hash": "24b7wK4s1Fv70FLe/oee7Q==" } }, "is_incremental": false, @@ -606,7 +606,7 @@ "output": { ".html": { "relative_path": "api/Terminal.Gui/Terminal.Gui.TextField.html", - "hash": "8gROGNtihilMdFc8s8+RwQ==" + "hash": "mgWemu0D0xX4AYvIJ6JfqQ==" } }, "is_incremental": false, @@ -618,7 +618,7 @@ "output": { ".html": { "relative_path": "api/Terminal.Gui/Terminal.Gui.TextView.html", - "hash": "m3SbJApjDnN5g23jI+i4Qg==" + "hash": "fqCIHXEK2VtjR9smwu7Ypw==" } }, "is_incremental": false, @@ -630,7 +630,7 @@ "output": { ".html": { "relative_path": "api/Terminal.Gui/Terminal.Gui.TimeField.html", - "hash": "6GP1VF2MyslnpnjVPryQ6w==" + "hash": "bszIncXCrsuUl6SMrb5oMA==" } }, "is_incremental": false, @@ -642,7 +642,7 @@ "output": { ".html": { "relative_path": "api/Terminal.Gui/Terminal.Gui.Toplevel.html", - "hash": "WW9db75HQNY0g8B19rcKlQ==" + "hash": "vlfGbOThwlVJg1gB3k6PPw==" } }, "is_incremental": false, @@ -702,7 +702,7 @@ "output": { ".html": { "relative_path": "api/Terminal.Gui/Terminal.Gui.View.html", - "hash": "ikbU1rHcs2278LHBdTs0fA==" + "hash": "Ou87bFmeRL+thU9mZ4qVAA==" } }, "is_incremental": false, @@ -714,7 +714,7 @@ "output": { ".html": { "relative_path": "api/Terminal.Gui/Terminal.Gui.Window.html", - "hash": "zCor4GcEaC6RRQktnRbrSw==" + "hash": "rIWStvuGdohjUKyftHmM+g==" } }, "is_incremental": false, From 4d2ddcf45fea49fcd05a3173676b7d15100707ae Mon Sep 17 00:00:00 2001 From: Ross Ferguson Date: Wed, 3 Jun 2020 17:30:19 +0100 Subject: [PATCH 11/11] ComboBox. Support parameterless constructor. Update scenario demo --- Terminal.Gui/Views/ComboBox.cs | 121 +++++++++++++++++++++----- UICatalog/Scenarios/ListsAndCombos.cs | 8 +- 2 files changed, 103 insertions(+), 26 deletions(-) diff --git a/Terminal.Gui/Views/ComboBox.cs b/Terminal.Gui/Views/ComboBox.cs index 5eaad25cb6..64d62a95be 100644 --- a/Terminal.Gui/Views/ComboBox.cs +++ b/Terminal.Gui/Views/ComboBox.cs @@ -24,15 +24,28 @@ public class ComboBox : View { /// public event EventHandler Changed; - readonly IList listsource; + IList listsource; IList searchset; ustring text = ""; - readonly TextField search; - readonly ListView listview; - readonly int height; - readonly int width; + TextField search; + ListView listview; + int x; + int y; + int height; + int width; bool autoHide = true; + /// + /// Public constructor + /// + public ComboBox () : base() + { + search = new TextField ("") { LayoutStyle = LayoutStyle.Computed }; + listview = new ListView () { LayoutStyle = LayoutStyle.Computed, CanFocus = true /* why? */ }; + + Initialize (); + } + /// /// Public constructor /// @@ -41,24 +54,34 @@ public class ComboBox : View { /// The width /// The height /// Auto completion source - public ComboBox(int x, int y, int w, int h, IList source) + public ComboBox (int x, int y, int w, int h, IList source) { - listsource = new List(source); + SetSource (source); + this.x = x; + this.y = y; height = h; width = w; - search = new TextField(x, y, w, ""); - search.Changed += Search_Changed; - listview = new ListView(new Rect(x, y + 1, w, 0), listsource.ToList()) - { + search = new TextField (x, y, w, ""); + + listview = new ListView (new Rect (x, y + 1, w, 0), listsource.ToList ()) { LayoutStyle = LayoutStyle.Computed, }; + + Initialize (); + } + + private void Initialize() + { + search.Changed += Search_Changed; + listview.SelectedChanged += (object sender, ListViewItemEventArgs e) => { if(searchset.Count > 0) SetValue (searchset [listview.SelectedItem]); }; - LayoutComplete += (sender, a) => { + // TODO: LayoutComplete event breaks cursor up/down. Revert to Application.Loaded + Application.Loaded += (sender, a) => { // Determine if this view is hosted inside a dialog for (View view = this.SuperView; view != null; view = view.SuperView) { if (view is Dialog) { @@ -70,10 +93,31 @@ public ComboBox(int x, int y, int w, int h, IList source) searchset = autoHide ? new List () : listsource; // Needs to be re-applied for LayoutStyle.Computed - listview.X = x; - listview.Y = y + 1; - listview.Width = CalculateWidth(); - listview.Height = CalculatetHeight (); + // If Dim or Pos are null, these are the from the parametrized constructor + if (X == null) + listview.X = x; + + if (Y == null) + listview.Y = y + 1; + else + listview.Y = Pos.Bottom (search); + + if (Width == null) + listview.Width = CalculateWidth (); + else { + width = GetDimAsInt (Width); + listview.Width = CalculateWidth (); + } + + if (Height == null) + listview.Height = CalculatetHeight (); + else { + height = GetDimAsInt (Height); + listview.Height = CalculatetHeight (); + } + + if (this.Text != null) + Search_Changed (search, Text); if (autoHide) listview.ColorScheme = Colors.Menu; @@ -83,17 +127,24 @@ public ComboBox(int x, int y, int w, int h, IList source) search.MouseClick += Search_MouseClick; - this.Add(listview); - this.Add(search); + this.Add(listview, search); this.SetFocus(search); } + /// + /// Set search list source + /// + public void SetSource(IList source) + { + listsource = new List (source); + } + private void Search_MouseClick (object sender, MouseEventEventArgs e) { if (e.MouseEvent.Flags != MouseFlags.Button1Clicked) return; - SuperView.SetFocus (((View)sender)); + SuperView.SetFocus ((View)sender); } /// @@ -128,7 +179,7 @@ public override bool ProcessKey(KeyEvent e) Changed?.Invoke (this, text); searchset.Clear(); - listview.SetSource(new List ()); + listview.Clear (); listview.Height = 0; this.SetFocus(search); @@ -141,6 +192,9 @@ public override bool ProcessKey(KeyEvent e) return true; } + if (e.Key == Key.CursorUp && search.HasFocus) // stop odd behavior on KeyUp when search has focus + return true; + if (e.Key == Key.CursorUp && listview.HasFocus && listview.SelectedItem == 0 && searchset.Count > 0) // jump back to search { search.CursorPosition = search.Text.Length; @@ -204,6 +258,9 @@ private void Reset() private void Search_Changed (object sender, ustring text) { + if (listsource == null) // Object initialization + return; + if (string.IsNullOrEmpty (search.Text.ToString())) searchset = autoHide ? new List () : listsource; else @@ -226,12 +283,30 @@ private int CalculatetHeight () } /// - /// Internal width + /// Internal width of search list + /// + /// + private int CalculateWidth () + { + return autoHide ? Math.Max (1, width - 1) : width; + } + + /// + /// Get DimAbsolute as integer value /// + /// /// - private int CalculateWidth() + private int GetDimAsInt(Dim dim) { - return autoHide? Math.Max (1, width - 1) : width; + if (!(dim is Dim.DimAbsolute)) + throw new ArgumentException ("Dim must be an absolute value"); + + // Anchor in the case of DimAbsolute returns absolute value. No documentation on what Anchor() does so not sure if this will change in the future. + // + // TODO: Does Dim need:- + // public static implicit operator int (Dim d) + // + return dim.Anchor (0); } } } diff --git a/UICatalog/Scenarios/ListsAndCombos.cs b/UICatalog/Scenarios/ListsAndCombos.cs index 62b5f38d7d..bd41c70d5b 100644 --- a/UICatalog/Scenarios/ListsAndCombos.cs +++ b/UICatalog/Scenarios/ListsAndCombos.cs @@ -15,10 +15,9 @@ public override void Setup () List items = new List (); foreach (var dir in new [] { "/etc", @"\windows\System32" }) { if (Directory.Exists (dir)) { - items = Directory.GetFiles (dir) + items = Directory.GetFiles (dir).Union(Directory.GetDirectories(dir)) .Select (Path.GetFileName) .Where (x => char.IsLetterOrDigit (x [0])) - .Distinct () .OrderBy (x => x).ToList (); } } @@ -45,11 +44,14 @@ public override void Setup () Width = 30 }; - var comboBox = new ComboBox (0, 0, 30, 10, items) { + var comboBox = new ComboBox() { X = Pos.Right(listview) + 1 , Y = Pos.Bottom (lbListView) +1, + Height = 10, Width = 30 }; + comboBox.SetSource (items); + comboBox.Changed += (object sender, ustring text) => lbComboBox.Text = text; Win.Add (lbComboBox, comboBox); }