+Returns the object in the tree list that is currently visible
+at the provided row. Returns null if no object is at that location.
+
+
+If you have screen coordinates then use ScreenToView(Int32, Int32)
+to translate these into the client area of the TreeView<T>.
+
The object currently displayed on this row or null
+
+
+
+
+
GetObjectRow(T)
+
+
+Returns the Y coordinate within the Bounds of the
+tree at which toFind would be displayed or null if
+it is not currently exposed (e.g. its parent is collapsed).
+
+
+Note that the returned value can be negative if the TreeView is scrolled
+down and the toFind object is off the top of the view.
+
diff --git a/docs/articles/index.html b/docs/articles/index.html
index d3b0869de..37aad5d7d 100644
--- a/docs/articles/index.html
+++ b/docs/articles/index.html
@@ -8,7 +8,7 @@
Conceptual Documentation
-
+
diff --git a/docs/articles/keyboard.html b/docs/articles/keyboard.html
index e4b5291c4..83020e430 100644
--- a/docs/articles/keyboard.html
+++ b/docs/articles/keyboard.html
@@ -8,7 +8,7 @@
Keyboard Event Processing
-
+
diff --git a/docs/articles/mainloop.html b/docs/articles/mainloop.html
index 6ee2787e9..478caece3 100644
--- a/docs/articles/mainloop.html
+++ b/docs/articles/mainloop.html
@@ -8,7 +8,7 @@
Event Processing and the Application Main Loop
-
+
diff --git a/docs/articles/overview.html b/docs/articles/overview.html
index f6f2cd381..0a89a814d 100644
--- a/docs/articles/overview.html
+++ b/docs/articles/overview.html
@@ -8,7 +8,7 @@
Terminal.Gui API Overview
-
+
diff --git a/docs/articles/tableview.html b/docs/articles/tableview.html
index 82b4dbed0..2e0bdc40a 100644
--- a/docs/articles/tableview.html
+++ b/docs/articles/tableview.html
@@ -8,7 +8,7 @@
Table View
-
+
diff --git a/docs/articles/treeview.html b/docs/articles/treeview.html
index deed2311c..6b09df9a2 100644
--- a/docs/articles/treeview.html
+++ b/docs/articles/treeview.html
@@ -8,7 +8,7 @@
Tree View
-
+
diff --git a/docs/articles/views.html b/docs/articles/views.html
index 6b27a2ff5..3cdc91b70 100644
--- a/docs/articles/views.html
+++ b/docs/articles/views.html
@@ -8,7 +8,7 @@
Views
-
+
diff --git a/docs/index.html b/docs/index.html
index ec513810f..68efafe07 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -8,7 +8,7 @@
Terminal.Gui - Terminal UI toolkit for .NET
-
+
diff --git a/docs/index.json b/docs/index.json
index 186efee4c..2fde0e500 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 A static, singleton class providing 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 Iteration This event is raised on each iteration of the MainLoop Declaration public static Action Iteration Field Value Type Description System.Action Remarks See also System.Threading.Timeout Resized Invoked when the terminal was resized. The new size of the terminal is provided. Declaration public static Action Resized Field Value Type Description System.Action < Application.ResizedEventArgs > RootKeyEvent Called for new KeyPress events before any processing is performed or views evaluate. Use for global key handling and/or debugging. Return true to suppress the KeyPress event Declaration public static Func RootKeyEvent Field Value Type Description System.Func < KeyEvent , System.Boolean > 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 AlternateBackwardKey Alternative key to navigate backwards through all views. Shift+Ctrl+Tab is always used. Declaration public static Key AlternateBackwardKey { get; set; } Property Value Type Description Key AlternateForwardKey Alternative key to navigate forwards through all views. Ctrl+Tab is always used. Declaration public static Key AlternateForwardKey { get; set; } Property Value Type Description Key AlwaysSetPosition Used only by Terminal.Gui.NetDriver to forcing always moving the cursor position when writing to the screen. Declaration public static bool AlwaysSetPosition { get; set; } Property Value Type Description System.Boolean Current The current Toplevel object. This is updated when Run(Func) enters and leaves to point to the current Toplevel . Declaration public static Toplevel Current { get; } Property Value Type Description Toplevel The current. HeightAsBuffer The current HeightAsBuffer used in the terminal. Declaration public static bool HeightAsBuffer { get; set; } Property Value Type Description System.Boolean IsMouseDisabled Disable or enable the mouse in this Application Declaration public static bool IsMouseDisabled { get; set; } Property Value Type Description System.Boolean MainLoop The MainLoop driver for the application Declaration public static MainLoop MainLoop { get; } Property Value Type Description MainLoop The main loop. MdiChildes Gets all the Mdi childes which represent all the not modal Toplevel from the MdiTop . Declaration public static List MdiChildes { get; } Property Value Type Description System.Collections.Generic.List < Toplevel > MdiTop The Toplevel object used for the application on startup which IsMdiContainer is true. Declaration public static Toplevel MdiTop { get; } Property Value Type Description Toplevel QuitKey Gets or sets the key to quit the application. Declaration public static Key QuitKey { get; set; } Property Value Type Description Key SupportedCultures Gets all supported cultures by the application without the invariant language. Declaration public static List SupportedCultures { get; } Property Value Type Description System.Collections.Generic.List < System.Globalization.CultureInfo > 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) 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) method upon termination which will undo these changes. DoEvents() Wakes up the mainloop that might be waiting on input, must be thread safe. Declaration public static void DoEvents() End(Application.RunState) Building block API: completes the execution of a Toplevel that was started with Begin(Toplevel) . Declaration public static void End(Application.RunState runState) Parameters Type Name Description Application.RunState runState The runstate returned by the Begin(Toplevel) method. EnsuresTopOnFront() Ensures that the superview of the most focused view is on front. Declaration public static void EnsuresTopOnFront() 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(ConsoleDriver, IMainLoopDriver) Initializes a new instance of Terminal.Gui Application. Declaration public static void Init(ConsoleDriver driver = null, IMainLoopDriver mainLoopDriver = null) Parameters Type Name Description ConsoleDriver driver IMainLoopDriver mainLoopDriver Remarks Call this method once per instance (or after Shutdown() has been called). Loads the right ConsoleDriver for the platform. Creates a Toplevel and assigns it to Top 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. MoveNext() Move to the next Mdi child from the MdiTop . Declaration public static void MoveNext() MovePrevious() Move to the previous Mdi child from the MdiTop . Declaration public static void MovePrevious() Refresh() Triggers a refresh of the entire display. Declaration public static void Refresh() RequestStop(Toplevel) Stops running the most recent Toplevel or the top if provided. Declaration public static void RequestStop(Toplevel top = null) Parameters Type Name Description Toplevel top The toplevel to request stop. Remarks This will cause Run(Func) to return. Calling RequestStop(Toplevel) is equivalent to setting the Running property on the currently running Toplevel to false. Run(Func) Runs the application by calling Run(Toplevel, Func) with the value of Top Declaration public static void Run(Func errorHandler = null) Parameters Type Name Description System.Func < System.Exception , System.Boolean > errorHandler Run(Toplevel, Func) Runs the main loop on the given Toplevel container. Declaration public static void Run(Toplevel view, Func errorHandler = null) Parameters Type Name Description Toplevel view The Toplevel to run modally. System.Func < System.Exception , System.Boolean > errorHandler Handler for any unhandled exceptions (resumes when returns true, rethrows when null). 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, Func) stop execution, call RequestStop(Toplevel) . Calling Run(Toplevel, Func) is equivalent to calling Begin(Toplevel) , followed by RunLoop(Application.RunState, Boolean) , and then calling End(Application.RunState) . 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. When errorHandler is null the exception is rethrown, when it returns true the application is resumed and when false method exits gracefully. Run(Func) Runs the application by calling Run(Toplevel, Func) with a new instance of the specified Toplevel -derived class Declaration public static void Run(Func errorHandler = null) where T : Toplevel, new() Parameters Type Name Description System.Func < System.Exception , System.Boolean > errorHandler 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() Shutdown an application initialized with Init(ConsoleDriver, IMainLoopDriver) Declaration public static void Shutdown() UngrabMouse() Releases the mouse grab, so mouse events will be routed to the view on which the mouse is. Declaration public static void UngrabMouse()"
+ "keywords": "Class Application A static, singleton class providing 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 Iteration This event is raised on each iteration of the MainLoop Declaration public static Action Iteration Field Value Type Description System.Action Remarks See also System.Threading.Timeout Resized Invoked when the terminal was resized. The new size of the terminal is provided. Declaration public static Action Resized Field Value Type Description System.Action < Application.ResizedEventArgs > RootKeyEvent Called for new KeyPress events before any processing is performed or views evaluate. Use for global key handling and/or debugging. Return true to suppress the KeyPress event Declaration public static Func RootKeyEvent Field Value Type Description System.Func < KeyEvent , System.Boolean > 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 AlternateBackwardKey Alternative key to navigate backwards through all views. Shift+Ctrl+Tab is always used. Declaration public static Key AlternateBackwardKey { get; set; } Property Value Type Description Key AlternateForwardKey Alternative key to navigate forwards through all views. Ctrl+Tab is always used. Declaration public static Key AlternateForwardKey { get; set; } Property Value Type Description Key Current The current Toplevel object. This is updated when Run(Func) enters and leaves to point to the current Toplevel . Declaration public static Toplevel Current { get; } Property Value Type Description Toplevel The current. HeightAsBuffer The current HeightAsBuffer used in the terminal. Declaration public static bool HeightAsBuffer { get; set; } Property Value Type Description System.Boolean IsMouseDisabled Disable or enable the mouse in this Application Declaration public static bool IsMouseDisabled { get; set; } Property Value Type Description System.Boolean MainLoop The MainLoop driver for the application Declaration public static MainLoop MainLoop { get; } Property Value Type Description MainLoop The main loop. MdiChildes Gets all the Mdi childes which represent all the not modal Toplevel from the MdiTop . Declaration public static List MdiChildes { get; } Property Value Type Description System.Collections.Generic.List < Toplevel > MdiTop The Toplevel object used for the application on startup which IsMdiContainer is true. Declaration public static Toplevel MdiTop { get; } Property Value Type Description Toplevel QuitKey Gets or sets the key to quit the application. Declaration public static Key QuitKey { get; set; } Property Value Type Description Key SupportedCultures Gets all supported cultures by the application without the invariant language. Declaration public static List SupportedCultures { get; } Property Value Type Description System.Collections.Generic.List < System.Globalization.CultureInfo > 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) 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) method upon termination which will undo these changes. DoEvents() Wakes up the mainloop that might be waiting on input, must be thread safe. Declaration public static void DoEvents() End(Application.RunState) Building block API: completes the execution of a Toplevel that was started with Begin(Toplevel) . Declaration public static void End(Application.RunState runState) Parameters Type Name Description Application.RunState runState The runstate returned by the Begin(Toplevel) method. EnsuresTopOnFront() Ensures that the superview of the most focused view is on front. Declaration public static void EnsuresTopOnFront() 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(ConsoleDriver, IMainLoopDriver) Initializes a new instance of Terminal.Gui Application. Declaration public static void Init(ConsoleDriver driver = null, IMainLoopDriver mainLoopDriver = null) Parameters Type Name Description ConsoleDriver driver IMainLoopDriver mainLoopDriver Remarks Call this method once per instance (or after Shutdown() has been called). Loads the right ConsoleDriver for the platform. Creates a Toplevel and assigns it to Top 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. MoveNext() Move to the next Mdi child from the MdiTop . Declaration public static void MoveNext() MovePrevious() Move to the previous Mdi child from the MdiTop . Declaration public static void MovePrevious() Refresh() Triggers a refresh of the entire display. Declaration public static void Refresh() RequestStop(Toplevel) Stops running the most recent Toplevel or the top if provided. Declaration public static void RequestStop(Toplevel top = null) Parameters Type Name Description Toplevel top The toplevel to request stop. Remarks This will cause Run(Func) to return. Calling RequestStop(Toplevel) is equivalent to setting the Running property on the currently running Toplevel to false. Run(Func) Runs the application by calling Run(Toplevel, Func) with the value of Top Declaration public static void Run(Func errorHandler = null) Parameters Type Name Description System.Func < System.Exception , System.Boolean > errorHandler Run(Toplevel, Func) Runs the main loop on the given Toplevel container. Declaration public static void Run(Toplevel view, Func errorHandler = null) Parameters Type Name Description Toplevel view The Toplevel to run modally. System.Func < System.Exception , System.Boolean > errorHandler Handler for any unhandled exceptions (resumes when returns true, rethrows when null). 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, Func) stop execution, call RequestStop(Toplevel) . Calling Run(Toplevel, Func) is equivalent to calling Begin(Toplevel) , followed by RunLoop(Application.RunState, Boolean) , and then calling End(Application.RunState) . 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. When errorHandler is null the exception is rethrown, when it returns true the application is resumed and when false method exits gracefully. Run(Func) Runs the application by calling Run(Toplevel, Func) with a new instance of the specified Toplevel -derived class Declaration public static void Run(Func errorHandler = null) where T : Toplevel, new() Parameters Type Name Description System.Func < System.Exception , System.Boolean > errorHandler 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() Shutdown an application initialized with Init(ConsoleDriver, IMainLoopDriver) Declaration public static void Shutdown() UngrabMouse() Releases the mouse grab, so mouse events will be routed to the view on which the mouse is. Declaration public static void UngrabMouse()"
},
"api/Terminal.Gui/Terminal.Gui.Application.ResizedEventArgs.html": {
"href": "api/Terminal.Gui/Terminal.Gui.Application.ResizedEventArgs.html",
@@ -42,7 +42,7 @@
"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.IDisposable System.ComponentModel.ISupportInitializeNotification System.ComponentModel.ISupportInitialize Inherited Members View.Added View.Removed View.Enter View.Leave View.MouseEnter View.MouseLeave View.MouseClick View.CanFocusChanged View.EnabledChanged View.VisibleChanged View.HotKeyChanged View.Shortcut View.ShortcutTag View.ShortcutAction View.Data View.Driver View.Subviews View.TabIndexes View.TabIndex View.TabStop View.CanFocus View.Id View.IsCurrentTop View.WantMousePositionReports View.WantContinuousButtonPressed View.Frame View.LayoutStyle View.Bounds View.X View.Y View.Width View.Height View.TextFormatter View.SuperView View.SetNeedsDisplay() View.ClearLayoutNeeded() View.SetNeedsDisplay(Rect) View.SetChildNeedsDisplay() View.Add(View) View.Add(View[]) View.RemoveAll() View.Remove(View) View.BringSubviewToFront(View) View.SendSubviewToBack(View) View.SendSubviewBackwards(View) View.BringSubviewForward(View) View.Clear() View.Clear(Rect) View.ScreenToView(Int32, Int32) View.ClipToBounds() View.SetClip(Rect) View.DrawFrame(Rect, Int32, Boolean) View.DrawHotString(ustring, Attribute, Attribute) View.DrawHotString(ustring, Boolean, ColorScheme) View.Move(Int32, Int32, Boolean) View.HasFocus View.OnAdded(View) View.OnRemoved(View) View.OnLeave(View) View.Focused View.MostFocused View.ColorScheme View.AddRune(Int32, Int32, Rune) View.ClearNeedsDisplay() View.DrawContent View.OnDrawContent(Rect) View.DrawContentComplete View.OnDrawContentComplete(Rect) View.SetFocus() View.KeyPress View.InvokeKeybindings(KeyEvent) View.AddKeyBinding(Key, Command) View.ReplaceKeyBinding(Key, Key) View.ContainsKeyBinding(Key) View.ClearKeybindings() View.ClearKeybinding(Key) View.ClearKeybinding(Command) View.AddCommand(Command, Func>) View.GetSupportedCommands() View.GetKeyFromCommand(Command) View.KeyDown View.OnKeyDown(KeyEvent) View.KeyUp View.OnKeyUp(KeyEvent) View.EnsureFocus() View.FocusFirst() View.FocusLast() View.FocusPrev() View.FocusNext() View.LayoutStarted View.LayoutComplete View.Initialized View.LayoutSubviews() View.TextAlignment View.VerticalTextAlignment View.TextDirection View.IsInitialized View.Enabled View.Visible View.Border View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) View.OnMouseEvent(MouseEvent) View.OnMouseClick(View.MouseEventArgs) View.OnCanFocusChanged() View.OnEnabledChanged() View.OnVisibleChanged() View.Dispose(Boolean) View.BeginInit() View.EndInit() View.SetWidth(Int32, Int32) View.SetHeight(Int32, Int32) View.GetCurrentWidth(Int32) View.GetCurrentHeight(Int32) View.GetNormalColor() View.GetTopSuperView() Responder.Dispose() 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, IDisposable, ISupportInitializeNotification, ISupportInitialize 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 the first letter or digit following the first underscore ('_') in the button text. Use HotKeySpecifier to change the hotkey specifier from the default of ('_'). If no hotkey specifier is found, the first uppercase letter encountered will be used as the hotkey. 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() Initializes a new instance of Button using Computed layout. Declaration public Button() Remarks The width of the Button is computed based on the text length. The height will always be 1. 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. Properties AutoSize Declaration public override bool AutoSize { get; set; } Property Value Type Description System.Boolean Overrides View.AutoSize HotKey Declaration public override Key HotKey { get; set; } Property Value Type Description Key Overrides View.HotKey HotKeySpecifier Declaration public override Rune HotKeySpecifier { get; set; } Property Value Type Description System.Rune Overrides View.HotKeySpecifier 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 Declaration public override ustring Text { get; set; } Property Value Type Description NStack.ustring Overrides View.Text 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) OnClicked() Virtual method to invoke the Clicked event. Declaration public virtual void OnClicked() OnEnter(View) Declaration public override bool OnEnter(View view) Parameters Type Name Description View view Returns Type Description System.Boolean Overrides View.OnEnter(View) 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) Events Clicked Clicked System.Action , raised when the user clicks the primary mouse button within the Bounds of this View or if the user presses the action key while this view is focused. (TODO: IsDefault) Declaration public event Action Clicked Event Type 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. Implements System.IDisposable System.ComponentModel.ISupportInitializeNotification System.ComponentModel.ISupportInitialize"
+ "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.IDisposable System.ComponentModel.ISupportInitializeNotification System.ComponentModel.ISupportInitialize Inherited Members View.Added View.Removed View.Enter View.Leave View.MouseEnter View.MouseLeave View.MouseClick View.CanFocusChanged View.EnabledChanged View.VisibleChanged View.HotKeyChanged View.Shortcut View.ShortcutTag View.ShortcutAction View.Data View.Driver View.Subviews View.TabIndexes View.TabIndex View.TabStop View.CanFocus View.Id View.IsCurrentTop View.WantMousePositionReports View.WantContinuousButtonPressed View.Frame View.LayoutStyle View.Bounds View.X View.Y View.Width View.Height View.TextFormatter View.SuperView View.SetNeedsDisplay() View.ClearLayoutNeeded() View.SetNeedsDisplay(Rect) View.SetChildNeedsDisplay() View.Add(View) View.Add(View[]) View.RemoveAll() View.Remove(View) View.BringSubviewToFront(View) View.SendSubviewToBack(View) View.SendSubviewBackwards(View) View.BringSubviewForward(View) View.Clear() View.Clear(Rect) View.ScreenToView(Int32, Int32) View.ClipToBounds() View.SetClip(Rect) View.DrawFrame(Rect, Int32, Boolean) View.DrawHotString(ustring, Attribute, Attribute) View.DrawHotString(ustring, Boolean, ColorScheme) View.Move(Int32, Int32, Boolean) View.HasFocus View.OnAdded(View) View.OnRemoved(View) View.OnLeave(View) View.Focused View.MostFocused View.ColorScheme View.AddRune(Int32, Int32, Rune) View.ClearNeedsDisplay() View.Redraw(Rect) View.DrawContent View.OnDrawContent(Rect) View.DrawContentComplete View.OnDrawContentComplete(Rect) View.SetFocus() View.KeyPress View.InvokeKeybindings(KeyEvent) View.AddKeyBinding(Key, Command) View.ReplaceKeyBinding(Key, Key) View.ContainsKeyBinding(Key) View.ClearKeybindings() View.ClearKeybinding(Key) View.ClearKeybinding(Command) View.AddCommand(Command, Func>) View.GetSupportedCommands() View.GetKeyFromCommand(Command) View.KeyDown View.OnKeyDown(KeyEvent) View.KeyUp View.OnKeyUp(KeyEvent) View.EnsureFocus() View.FocusFirst() View.FocusLast() View.FocusPrev() View.FocusNext() View.LayoutStarted View.LayoutComplete View.Initialized View.LayoutSubviews() View.TextAlignment View.VerticalTextAlignment View.TextDirection View.IsInitialized View.Enabled View.Visible View.Border View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) View.OnMouseEvent(MouseEvent) View.OnMouseClick(View.MouseEventArgs) View.OnCanFocusChanged() View.OnEnabledChanged() View.OnVisibleChanged() View.Dispose(Boolean) View.BeginInit() View.EndInit() View.SetWidth(Int32, Int32) View.SetHeight(Int32, Int32) View.GetCurrentWidth(Int32) View.GetCurrentHeight(Int32) View.GetNormalColor() View.GetTopSuperView() Responder.Dispose() 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, IDisposable, ISupportInitializeNotification, ISupportInitialize 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 the first letter or digit following the first underscore ('_') in the button text. Use HotKeySpecifier to change the hotkey specifier from the default of ('_'). If no hotkey specifier is found, the first uppercase letter encountered will be used as the hotkey. 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() Initializes a new instance of Button using Computed layout. Declaration public Button() Remarks The width of the Button is computed based on the text length. The height will always be 1. 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. Properties AutoSize Declaration public override bool AutoSize { get; set; } Property Value Type Description System.Boolean Overrides View.AutoSize HotKey Declaration public override Key HotKey { get; set; } Property Value Type Description Key Overrides View.HotKey HotKeySpecifier Declaration public override Rune HotKeySpecifier { get; set; } Property Value Type Description System.Rune Overrides View.HotKeySpecifier 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 Declaration public override ustring Text { get; set; } Property Value Type Description NStack.ustring Overrides View.Text 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) OnClicked() Virtual method to invoke the Clicked event. Declaration public virtual void OnClicked() OnEnter(View) Declaration public override bool OnEnter(View view) Parameters Type Name Description View view Returns Type Description System.Boolean Overrides View.OnEnter(View) 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) Events Clicked Clicked System.Action , raised when the user clicks the primary mouse button within the Bounds of this View or if the user presses the action key while this view is focused. (TODO: IsDefault) Declaration public event Action Clicked Event Type 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. Implements System.IDisposable System.ComponentModel.ISupportInitializeNotification System.ComponentModel.ISupportInitialize"
},
"api/Terminal.Gui/Terminal.Gui.CheckBox.html": {
"href": "api/Terminal.Gui/Terminal.Gui.CheckBox.html",
@@ -732,12 +732,12 @@
"api/Terminal.Gui/Terminal.Gui.TreeView.html": {
"href": "api/Terminal.Gui/Terminal.Gui.TreeView.html",
"title": "Class TreeView",
- "keywords": "Class TreeView Convenience implementation of generic TreeView for any tree were all nodes implement ITreeNode . See TreeView Deep Dive for more information . Inheritance System.Object Responder View TreeView < ITreeNode > TreeView Implements System.IDisposable System.ComponentModel.ISupportInitializeNotification System.ComponentModel.ISupportInitialize ITreeView Inherited Members TreeView.TreeBuilder TreeView.Style TreeView.MultiSelect TreeView.AllowLetterBasedNavigation TreeView.SelectedObject TreeView.ObjectActivated TreeView.ObjectActivationKey TreeView.ObjectActivationButton TreeView.ColorGetter TreeView.NoBuilderError TreeView.SelectionChanged TreeView.Objects TreeView.ScrollOffsetVertical TreeView.ScrollOffsetHorizontal TreeView.ContentHeight TreeView.AspectGetter TreeView.DesiredCursorVisibility TreeView.OnEnter(View) TreeView.AddObject(ITreeNode) TreeView.ClearObjects() TreeView.Remove(ITreeNode) TreeView.AddObjects(IEnumerable) TreeView.RefreshObject(ITreeNode, Boolean) TreeView.RebuildTree() TreeView.GetChildren(ITreeNode) TreeView.GetParent(ITreeNode) TreeView.Redraw(Rect) TreeView.GetScrollOffsetOf(ITreeNode) TreeView.GetContentWidth(Boolean) TreeView.ProcessKey(KeyEvent) TreeView.ActivateSelectedObjectIfAny() TreeView.AdjustSelectionToNextItemBeginningWith(Char, StringComparison) TreeView.MovePageUp(Boolean) TreeView.MovePageDown(Boolean) TreeView.ScrollDown() TreeView.ScrollUp() TreeView.OnObjectActivated(ObjectActivatedEventArgs) TreeView.MouseEvent(MouseEvent) TreeView.PositionCursor() TreeView.CursorLeft(Boolean) TreeView.GoToFirst() TreeView.GoToEnd() TreeView.GoTo(ITreeNode) TreeView.AdjustSelection(Int32, Boolean) TreeView.AdjustSelectionToBranchStart() TreeView.AdjustSelectionToBranchEnd() TreeView.EnsureVisible(ITreeNode) TreeView.Expand() TreeView.Expand(ITreeNode) TreeView.ExpandAll(ITreeNode) TreeView.ExpandAll() TreeView.CanExpand(ITreeNode) TreeView.IsExpanded(ITreeNode) TreeView.Collapse() TreeView.Collapse(ITreeNode) TreeView.CollapseAll(ITreeNode) TreeView.CollapseAll() TreeView.CollapseImpl(ITreeNode, Boolean) TreeView.InvalidateLineMap() TreeView.IsSelected(ITreeNode) TreeView.GetAllSelectedObjects() TreeView.SelectAll() TreeView.OnSelectionChanged(SelectionChangedEventArgs) View.Added View.Removed View.Enter View.Leave View.MouseEnter View.MouseLeave View.MouseClick View.CanFocusChanged View.EnabledChanged View.VisibleChanged View.HotKeyChanged View.HotKey View.HotKeySpecifier View.Shortcut View.ShortcutTag View.ShortcutAction View.Data View.Driver View.Subviews View.TabIndexes View.TabIndex View.TabStop View.CanFocus View.Id View.IsCurrentTop View.WantMousePositionReports View.WantContinuousButtonPressed View.Frame View.LayoutStyle View.Bounds View.X View.Y View.Width View.Height View.TextFormatter View.SuperView View.SetNeedsDisplay() View.ClearLayoutNeeded() View.SetNeedsDisplay(Rect) View.SetChildNeedsDisplay() View.Add(View) View.Add(View[]) View.RemoveAll() View.Remove(View) View.BringSubviewToFront(View) View.SendSubviewToBack(View) View.SendSubviewBackwards(View) View.BringSubviewForward(View) View.Clear() View.Clear(Rect) View.ScreenToView(Int32, Int32) View.ClipToBounds() View.SetClip(Rect) View.DrawFrame(Rect, Int32, Boolean) View.DrawHotString(ustring, Attribute, Attribute) View.DrawHotString(ustring, Boolean, ColorScheme) View.Move(Int32, Int32, Boolean) View.HasFocus View.OnAdded(View) View.OnRemoved(View) View.OnLeave(View) View.Focused View.MostFocused View.ColorScheme View.AddRune(Int32, Int32, Rune) View.ClearNeedsDisplay() View.DrawContent View.OnDrawContent(Rect) View.DrawContentComplete View.OnDrawContentComplete(Rect) View.SetFocus() View.KeyPress View.InvokeKeybindings(KeyEvent) View.AddKeyBinding(Key, Command) View.ReplaceKeyBinding(Key, Key) View.ContainsKeyBinding(Key) View.ClearKeybindings() View.ClearKeybinding(Key) View.ClearKeybinding(Command) View.AddCommand(Command, Func>) View.GetSupportedCommands() View.GetKeyFromCommand(Command) 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.LayoutStarted View.LayoutComplete View.Initialized View.LayoutSubviews() View.Text View.AutoSize View.TextAlignment View.VerticalTextAlignment View.TextDirection View.IsInitialized View.Enabled View.Visible View.Border View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) View.OnMouseEvent(MouseEvent) View.OnMouseClick(View.MouseEventArgs) View.OnCanFocusChanged() View.OnEnabledChanged() View.OnVisibleChanged() View.Dispose(Boolean) View.BeginInit() View.EndInit() View.SetWidth(Int32, Int32) View.SetHeight(Int32, Int32) View.GetCurrentWidth(Int32) View.GetCurrentHeight(Int32) View.GetNormalColor() View.GetTopSuperView() Responder.Dispose() 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 TreeView : TreeView, IDisposable, ISupportInitializeNotification, ISupportInitialize, ITreeView Constructors TreeView() Creates a new instance of the tree control with absolute positioning and initialises TreeBuilder with default ITreeNode based builder Declaration public TreeView() Implements System.IDisposable System.ComponentModel.ISupportInitializeNotification System.ComponentModel.ISupportInitialize ITreeView"
+ "keywords": "Class TreeView Convenience implementation of generic TreeView for any tree were all nodes implement ITreeNode . See TreeView Deep Dive for more information . Inheritance System.Object Responder View TreeView < ITreeNode > TreeView Implements System.IDisposable System.ComponentModel.ISupportInitializeNotification System.ComponentModel.ISupportInitialize ITreeView Inherited Members TreeView.TreeBuilder TreeView.Style TreeView.MultiSelect TreeView.AllowLetterBasedNavigation TreeView.SelectedObject TreeView.ObjectActivated TreeView.ObjectActivationKey TreeView.ObjectActivationButton TreeView.ColorGetter TreeView.NoBuilderError TreeView.SelectionChanged TreeView.Objects TreeView.ScrollOffsetVertical TreeView.ScrollOffsetHorizontal TreeView.ContentHeight TreeView.AspectGetter TreeView.DesiredCursorVisibility TreeView.OnEnter(View) TreeView.AddObject(ITreeNode) TreeView.ClearObjects() TreeView.Remove(ITreeNode) TreeView.AddObjects(IEnumerable) TreeView.RefreshObject(ITreeNode, Boolean) TreeView.RebuildTree() TreeView.GetChildren(ITreeNode) TreeView.GetParent(ITreeNode) TreeView.Redraw(Rect) TreeView.GetScrollOffsetOf(ITreeNode) TreeView.GetContentWidth(Boolean) TreeView.ProcessKey(KeyEvent) TreeView.ActivateSelectedObjectIfAny() TreeView.GetObjectRow(ITreeNode) TreeView.AdjustSelectionToNextItemBeginningWith(Char, StringComparison) TreeView.MovePageUp(Boolean) TreeView.MovePageDown(Boolean) TreeView.ScrollDown() TreeView.ScrollUp() TreeView.OnObjectActivated(ObjectActivatedEventArgs) TreeView.GetObjectOnRow(Int32) TreeView.MouseEvent(MouseEvent) TreeView.PositionCursor() TreeView.CursorLeft(Boolean) TreeView.GoToFirst() TreeView.GoToEnd() TreeView.GoTo(ITreeNode) TreeView.AdjustSelection(Int32, Boolean) TreeView.AdjustSelectionToBranchStart() TreeView.AdjustSelectionToBranchEnd() TreeView.EnsureVisible(ITreeNode) TreeView.Expand() TreeView.Expand(ITreeNode) TreeView.ExpandAll(ITreeNode) TreeView.ExpandAll() TreeView.CanExpand(ITreeNode) TreeView.IsExpanded(ITreeNode) TreeView.Collapse() TreeView.Collapse(ITreeNode) TreeView.CollapseAll(ITreeNode) TreeView.CollapseAll() TreeView.CollapseImpl(ITreeNode, Boolean) TreeView.InvalidateLineMap() TreeView.IsSelected(ITreeNode) TreeView.GetAllSelectedObjects() TreeView.SelectAll() TreeView.OnSelectionChanged(SelectionChangedEventArgs) View.Added View.Removed View.Enter View.Leave View.MouseEnter View.MouseLeave View.MouseClick View.CanFocusChanged View.EnabledChanged View.VisibleChanged View.HotKeyChanged View.HotKey View.HotKeySpecifier View.Shortcut View.ShortcutTag View.ShortcutAction View.Data View.Driver View.Subviews View.TabIndexes View.TabIndex View.TabStop View.CanFocus View.Id View.IsCurrentTop View.WantMousePositionReports View.WantContinuousButtonPressed View.Frame View.LayoutStyle View.Bounds View.X View.Y View.Width View.Height View.TextFormatter View.SuperView View.SetNeedsDisplay() View.ClearLayoutNeeded() View.SetNeedsDisplay(Rect) View.SetChildNeedsDisplay() View.Add(View) View.Add(View[]) View.RemoveAll() View.Remove(View) View.BringSubviewToFront(View) View.SendSubviewToBack(View) View.SendSubviewBackwards(View) View.BringSubviewForward(View) View.Clear() View.Clear(Rect) View.ScreenToView(Int32, Int32) View.ClipToBounds() View.SetClip(Rect) View.DrawFrame(Rect, Int32, Boolean) View.DrawHotString(ustring, Attribute, Attribute) View.DrawHotString(ustring, Boolean, ColorScheme) View.Move(Int32, Int32, Boolean) View.HasFocus View.OnAdded(View) View.OnRemoved(View) View.OnLeave(View) View.Focused View.MostFocused View.ColorScheme View.AddRune(Int32, Int32, Rune) View.ClearNeedsDisplay() View.DrawContent View.OnDrawContent(Rect) View.DrawContentComplete View.OnDrawContentComplete(Rect) View.SetFocus() View.KeyPress View.InvokeKeybindings(KeyEvent) View.AddKeyBinding(Key, Command) View.ReplaceKeyBinding(Key, Key) View.ContainsKeyBinding(Key) View.ClearKeybindings() View.ClearKeybinding(Key) View.ClearKeybinding(Command) View.AddCommand(Command, Func>) View.GetSupportedCommands() View.GetKeyFromCommand(Command) 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.LayoutStarted View.LayoutComplete View.Initialized View.LayoutSubviews() View.Text View.AutoSize View.TextAlignment View.VerticalTextAlignment View.TextDirection View.IsInitialized View.Enabled View.Visible View.Border View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) View.OnMouseEvent(MouseEvent) View.OnMouseClick(View.MouseEventArgs) View.OnCanFocusChanged() View.OnEnabledChanged() View.OnVisibleChanged() View.Dispose(Boolean) View.BeginInit() View.EndInit() View.SetWidth(Int32, Int32) View.SetHeight(Int32, Int32) View.GetCurrentWidth(Int32) View.GetCurrentHeight(Int32) View.GetNormalColor() View.GetTopSuperView() Responder.Dispose() 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 TreeView : TreeView, IDisposable, ISupportInitializeNotification, ISupportInitialize, ITreeView Constructors TreeView() Creates a new instance of the tree control with absolute positioning and initialises TreeBuilder with default ITreeNode based builder Declaration public TreeView() Implements System.IDisposable System.ComponentModel.ISupportInitializeNotification System.ComponentModel.ISupportInitialize ITreeView"
},
"api/Terminal.Gui/Terminal.Gui.TreeView-1.html": {
"href": "api/Terminal.Gui/Terminal.Gui.TreeView-1.html",
"title": "Class TreeView",
- "keywords": "Class TreeView Hierarchical tree view with expandable branches. Branch objects are dynamically determined when expanded using a user defined ITreeBuilder See TreeView Deep Dive for more information . Inheritance System.Object Responder View TreeView TreeView Implements System.IDisposable System.ComponentModel.ISupportInitializeNotification System.ComponentModel.ISupportInitialize ITreeView Inherited Members View.Added View.Removed View.Enter View.Leave View.MouseEnter View.MouseLeave View.MouseClick View.CanFocusChanged View.EnabledChanged View.VisibleChanged View.HotKeyChanged View.HotKey View.HotKeySpecifier View.Shortcut View.ShortcutTag View.ShortcutAction View.Data View.Driver View.Subviews View.TabIndexes View.TabIndex View.TabStop View.CanFocus View.Id View.IsCurrentTop View.WantMousePositionReports View.WantContinuousButtonPressed View.Frame View.LayoutStyle View.Bounds View.X View.Y View.Width View.Height View.TextFormatter View.SuperView View.SetNeedsDisplay() View.ClearLayoutNeeded() View.SetNeedsDisplay(Rect) View.SetChildNeedsDisplay() View.Add(View) View.Add(View[]) View.RemoveAll() View.Remove(View) View.BringSubviewToFront(View) View.SendSubviewToBack(View) View.SendSubviewBackwards(View) View.BringSubviewForward(View) View.Clear() View.Clear(Rect) View.ScreenToView(Int32, Int32) View.ClipToBounds() View.SetClip(Rect) View.DrawFrame(Rect, Int32, Boolean) View.DrawHotString(ustring, Attribute, Attribute) View.DrawHotString(ustring, Boolean, ColorScheme) View.Move(Int32, Int32, Boolean) View.HasFocus View.OnAdded(View) View.OnRemoved(View) View.OnLeave(View) View.Focused View.MostFocused View.ColorScheme View.AddRune(Int32, Int32, Rune) View.ClearNeedsDisplay() View.DrawContent View.OnDrawContent(Rect) View.DrawContentComplete View.OnDrawContentComplete(Rect) View.SetFocus() View.KeyPress View.InvokeKeybindings(KeyEvent) View.AddKeyBinding(Key, Command) View.ReplaceKeyBinding(Key, Key) View.ContainsKeyBinding(Key) View.ClearKeybindings() View.ClearKeybinding(Key) View.ClearKeybinding(Command) View.AddCommand(Command, Func>) View.GetSupportedCommands() View.GetKeyFromCommand(Command) 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.LayoutStarted View.LayoutComplete View.Initialized View.LayoutSubviews() View.Text View.AutoSize View.TextAlignment View.VerticalTextAlignment View.TextDirection View.IsInitialized View.Enabled View.Visible View.Border View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) View.OnMouseEvent(MouseEvent) View.OnMouseClick(View.MouseEventArgs) View.OnCanFocusChanged() View.OnEnabledChanged() View.OnVisibleChanged() View.Dispose(Boolean) View.BeginInit() View.EndInit() View.SetWidth(Int32, Int32) View.SetHeight(Int32, Int32) View.GetCurrentWidth(Int32) View.GetCurrentHeight(Int32) View.GetNormalColor() View.GetTopSuperView() Responder.Dispose() 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 TreeView : View, IDisposable, ISupportInitializeNotification, ISupportInitialize, ITreeView where T : class Type Parameters Name Description T Constructors TreeView() Creates a new tree view with absolute positioning. Use AddObjects(IEnumerable) to set set root objects for the tree. Children will not be rendered until you set TreeBuilder Declaration public TreeView() TreeView(ITreeBuilder) Initialises TreeBuilder .Creates a new tree view with absolute positioning. Use AddObjects(IEnumerable) to set set root objects for the tree. Declaration public TreeView(ITreeBuilder builder) Parameters Type Name Description ITreeBuilder builder Fields NoBuilderError Error message to display when the control is not properly initialized at draw time (nodes added but no tree builder set) Declaration public static ustring NoBuilderError Field Value Type Description NStack.ustring Properties AllowLetterBasedNavigation True makes a letter key press navigate to the next visible branch that begins with that letter/digit Declaration public bool AllowLetterBasedNavigation { get; set; } Property Value Type Description System.Boolean AspectGetter Returns the string representation of model objects hosted in the tree. Default implementation is to call System.Object.ToString() Declaration public AspectGetterDelegate AspectGetter { get; set; } Property Value Type Description AspectGetterDelegate ColorGetter Delegate for multi colored tree views. Return the ColorScheme to use for each passed object or null to use the default. Declaration public Func ColorGetter { get; set; } Property Value Type Description System.Func ContentHeight The current number of rows in the tree (ignoring the controls bounds) Declaration public int ContentHeight { get; } Property Value Type Description System.Int32 DesiredCursorVisibility Get / Set the wished cursor when the tree is focused Declaration public CursorVisibility DesiredCursorVisibility { get; set; } Property Value Type Description CursorVisibility MultiSelect True to allow multiple objects to be selected at once Declaration public bool MultiSelect { get; set; } Property Value Type Description System.Boolean ObjectActivationButton Mouse event to trigger ObjectActivated . Defaults to double click ( Button1DoubleClicked ). Set to null to disable this feature. Declaration public MouseFlags? ObjectActivationButton { get; set; } Property Value Type Description System.Nullable < MouseFlags > ObjectActivationKey Key which when pressed triggers ObjectActivated . Defaults to Enter Declaration public Key ObjectActivationKey { get; set; } Property Value Type Description Key Objects The root objects in the tree, note that this collection is of root objects only Declaration public IEnumerable Objects { get; } Property Value Type Description System.Collections.Generic.IEnumerable ScrollOffsetHorizontal The amount of tree view that has been scrolled to the right (horizontally) Declaration public int ScrollOffsetHorizontal { get; set; } Property Value Type Description System.Int32 Remarks Setting a value of less than 0 will result in a offset of 0. To see changes in the UI call SetNeedsDisplay() ScrollOffsetVertical The amount of tree view that has been scrolled off the top of the screen (by the user scrolling down) Declaration public int ScrollOffsetVertical { get; set; } Property Value Type Description System.Int32 Remarks Setting a value of less than 0 will result in a offset of 0. To see changes in the UI call SetNeedsDisplay() SelectedObject The currently selected object in the tree. When MultiSelect is true this is the object at which the cursor is at Declaration public T SelectedObject { get; set; } Property Value Type Description T Style Contains options for changing how the tree is rendered Declaration public TreeStyle Style { get; set; } Property Value Type Description TreeStyle TreeBuilder Determines how sub branches of the tree are dynamically built at runtime as the user expands root nodes Declaration public ITreeBuilder TreeBuilder { get; set; } Property Value Type Description ITreeBuilder Methods ActivateSelectedObjectIfAny() Triggers the ObjectActivated event with the SelectedObject . This method also ensures that the selected object is visible Declaration public void ActivateSelectedObjectIfAny() AddObject(T) Adds a new root level object unless it is already a root of the tree Declaration public void AddObject(T o) Parameters Type Name Description T o AddObjects(IEnumerable) Adds many new root level objects. Objects that are already root objects are ignored Declaration public void AddObjects(IEnumerable collection) Parameters Type Name Description System.Collections.Generic.IEnumerable collection Objects to add as new root level objects AdjustSelection(Int32, Boolean) The number of screen lines to move the currently selected object by. Supports negative offset . Each branch occupies 1 line on screen Declaration public void AdjustSelection(int offset, bool expandSelection = false) Parameters Type Name Description System.Int32 offset Positive to move the selection down the screen, negative to move it up System.Boolean expandSelection True to expand the selection (assuming MultiSelect is enabled). False to replace Remarks If nothing is currently selected or the selected object is no longer in the tree then the first object in the tree is selected instead AdjustSelectionToBranchEnd() Moves the selection to the last child in the currently selected level Declaration public void AdjustSelectionToBranchEnd() AdjustSelectionToBranchStart() Moves the selection to the first child in the currently selected level Declaration public void AdjustSelectionToBranchStart() AdjustSelectionToNextItemBeginningWith(Char, StringComparison) Moves the SelectedObject to the next item that begins with character This method will loop back to the start of the tree if reaching the end without finding a match Declaration public void AdjustSelectionToNextItemBeginningWith(char character, StringComparison caseSensitivity = StringComparison.CurrentCultureIgnoreCase) Parameters Type Name Description System.Char character The first character of the next item you want selected System.StringComparison caseSensitivity Case sensitivity of the search CanExpand(T) Returns true if the given object o is exposed in the tree and can be expanded otherwise false Declaration public bool CanExpand(T o) Parameters Type Name Description T o Returns Type Description System.Boolean ClearObjects() Removes all objects from the tree and clears SelectedObject Declaration public void ClearObjects() Collapse() Collapses the SelectedObject Declaration public void Collapse() Collapse(T) Collapses the supplied object if it is currently expanded Declaration public void Collapse(T toCollapse) Parameters Type Name Description T toCollapse The object to collapse CollapseAll() Collapses all root nodes in the tree Declaration public void CollapseAll() CollapseAll(T) Collapses the supplied object if it is currently expanded. Also collapses all children branches (this will only become apparent when/if the user expands it again) Declaration public void CollapseAll(T toCollapse) Parameters Type Name Description T toCollapse The object to collapse CollapseImpl(T, Boolean) Implementation of Collapse(T) and CollapseAll(T) . Performs operation and updates selection if disapeared Declaration protected void CollapseImpl(T toCollapse, bool all) Parameters Type Name Description T toCollapse System.Boolean all CursorLeft(Boolean) Determines systems behaviour when the left arrow key is pressed. Default behaviour is to collapse the current tree node if possible otherwise changes selection to current branches parent Declaration protected virtual void CursorLeft(bool ctrl) Parameters Type Name Description System.Boolean ctrl EnsureVisible(T) Adjusts the ScrollOffsetVertical to ensure the given model is visible. Has no effect if already visible Declaration public void EnsureVisible(T model) Parameters Type Name Description T model Expand() Expands the currently SelectedObject Declaration public void Expand() Expand(T) Expands the supplied object if it is contained in the tree (either as a root object or as an exposed branch object) Declaration public void Expand(T toExpand) Parameters Type Name Description T toExpand The object to expand ExpandAll() Fully expands all nodes in the tree, if the tree is very big and built dynamically this may take a while (e.g. for file system) Declaration public void ExpandAll() ExpandAll(T) Expands the supplied object and all child objects Declaration public void ExpandAll(T toExpand) Parameters Type Name Description T toExpand The object to expand GetAllSelectedObjects() Returns SelectedObject (if not null) and all multi selected objects if MultiSelect is true Declaration public IEnumerable GetAllSelectedObjects() Returns Type Description System.Collections.Generic.IEnumerable GetChildren(T) Returns the currently expanded children of the passed object. Returns an empty collection if the branch is not exposed or not expanded Declaration public IEnumerable GetChildren(T o) Parameters Type Name Description T o An object in the tree Returns Type Description System.Collections.Generic.IEnumerable GetContentWidth(Boolean) Returns the maximum width line in the tree including prefix and expansion symbols Declaration public int GetContentWidth(bool visible) Parameters Type Name Description System.Boolean visible True to consider only rows currently visible (based on window bounds and ScrollOffsetVertical . False to calculate the width of every exposed branch in the tree Returns Type Description System.Int32 GetParent(T) Returns the parent object of o in the tree. Returns null if the object is not exposed in the tree Declaration public T GetParent(T o) Parameters Type Name Description T o An object in the tree Returns Type Description T GetScrollOffsetOf(T) Returns the index of the object o if it is currently exposed (it's parent(s) have been expanded). This can be used with ScrollOffsetVertical and SetNeedsDisplay() to scroll to a specific object Declaration public int GetScrollOffsetOf(T o) Parameters Type Name Description T o An object that appears in your tree and is currently exposed Returns Type Description System.Int32 The index the object was found at or -1 if it is not currently revealed or not in the tree at all Remarks Uses the Equals method and returns the first index at which the object is found or -1 if it is not found GoTo(T) Changes the SelectedObject to toSelect and scrolls to ensure it is visible. Has no effect if toSelect is not exposed in the tree (e.g. its parents are collapsed) Declaration public void GoTo(T toSelect) Parameters Type Name Description T toSelect GoToEnd() Changes the SelectedObject to the last object in the tree and scrolls so that it is visible Declaration public void GoToEnd() GoToFirst() Changes the SelectedObject to the first root object and resets the ScrollOffsetVertical to 0 Declaration public void GoToFirst() InvalidateLineMap() Clears any cached results of Terminal.Gui.TreeView`1.BuildLineMap Declaration protected void InvalidateLineMap() IsExpanded(T) Returns true if the given object o is exposed in the tree and expanded otherwise false Declaration public bool IsExpanded(T o) Parameters Type Name Description T o Returns Type Description System.Boolean IsSelected(T) Returns true if the model is either the SelectedObject or part of a MultiSelect Declaration public bool IsSelected(T model) Parameters Type Name Description T model 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) MovePageDown(Boolean) Moves the selection down by the height of the control (1 page). Declaration public void MovePageDown(bool expandSelection = false) Parameters Type Name Description System.Boolean expandSelection True if the navigation should add the covered nodes to the selected current selection Exceptions Type Condition System.NotImplementedException MovePageUp(Boolean) Moves the selection up by the height of the control (1 page). Declaration public void MovePageUp(bool expandSelection = false) Parameters Type Name Description System.Boolean expandSelection True if the navigation should add the covered nodes to the selected current selection Exceptions Type Condition System.NotImplementedException OnEnter(View) Declaration public override bool OnEnter(View view) Parameters Type Name Description View view Returns Type Description System.Boolean Overrides View.OnEnter(View) OnObjectActivated(ObjectActivatedEventArgs) Raises the ObjectActivated event Declaration protected virtual void OnObjectActivated(ObjectActivatedEventArgs e) Parameters Type Name Description ObjectActivatedEventArgs e OnSelectionChanged(SelectionChangedEventArgs) Raises the SelectionChanged event Declaration protected virtual void OnSelectionChanged(SelectionChangedEventArgs e) Parameters Type Name Description SelectionChangedEventArgs e PositionCursor() Positions the cursor at the start of the selected objects line (if visible) 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) RebuildTree() Rebuilds the tree structure for all exposed objects starting with the root objects. Call this method when you know there are changes to the tree but don't know which objects have changed (otherwise use RefreshObject(T, Boolean) ) Declaration public void RebuildTree() Redraw(Rect) Declaration public override void Redraw(Rect bounds) Parameters Type Name Description Rect bounds Overrides View.Redraw(Rect) RefreshObject(T, Boolean) Refreshes the state of the object o in the tree. This will recompute children, string representation etc Declaration public void RefreshObject(T o, bool startAtTop = false) Parameters Type Name Description T o System.Boolean startAtTop True to also refresh all ancestors of the objects branch (starting with the root). False to refresh only the passed node Remarks This has no effect if the object is not exposed in the tree. Remove(T) Removes the given root object from the tree Declaration public void Remove(T o) Parameters Type Name Description T o Remarks If o is the currently SelectedObject then the selection is cleared ScrollDown() Scrolls the view area down a single line without changing the current selection Declaration public void ScrollDown() ScrollUp() Scrolls the view area up a single line without changing the current selection Declaration public void ScrollUp() SelectAll() Selects all objects in the tree when MultiSelect is enabled otherwise does nothing Declaration public void SelectAll() Events ObjectActivated This event is raised when an object is activated e.g. by double clicking or pressing ObjectActivationKey Declaration public event Action> ObjectActivated Event Type Type Description System.Action < ObjectActivatedEventArgs > SelectionChanged Called when the SelectedObject changes Declaration public event EventHandler> SelectionChanged Event Type Type Description System.EventHandler < SelectionChangedEventArgs > Implements System.IDisposable System.ComponentModel.ISupportInitializeNotification System.ComponentModel.ISupportInitialize ITreeView"
+ "keywords": "Class TreeView Hierarchical tree view with expandable branches. Branch objects are dynamically determined when expanded using a user defined ITreeBuilder See TreeView Deep Dive for more information . Inheritance System.Object Responder View TreeView TreeView Implements System.IDisposable System.ComponentModel.ISupportInitializeNotification System.ComponentModel.ISupportInitialize ITreeView Inherited Members View.Added View.Removed View.Enter View.Leave View.MouseEnter View.MouseLeave View.MouseClick View.CanFocusChanged View.EnabledChanged View.VisibleChanged View.HotKeyChanged View.HotKey View.HotKeySpecifier View.Shortcut View.ShortcutTag View.ShortcutAction View.Data View.Driver View.Subviews View.TabIndexes View.TabIndex View.TabStop View.CanFocus View.Id View.IsCurrentTop View.WantMousePositionReports View.WantContinuousButtonPressed View.Frame View.LayoutStyle View.Bounds View.X View.Y View.Width View.Height View.TextFormatter View.SuperView View.SetNeedsDisplay() View.ClearLayoutNeeded() View.SetNeedsDisplay(Rect) View.SetChildNeedsDisplay() View.Add(View) View.Add(View[]) View.RemoveAll() View.Remove(View) View.BringSubviewToFront(View) View.SendSubviewToBack(View) View.SendSubviewBackwards(View) View.BringSubviewForward(View) View.Clear() View.Clear(Rect) View.ScreenToView(Int32, Int32) View.ClipToBounds() View.SetClip(Rect) View.DrawFrame(Rect, Int32, Boolean) View.DrawHotString(ustring, Attribute, Attribute) View.DrawHotString(ustring, Boolean, ColorScheme) View.Move(Int32, Int32, Boolean) View.HasFocus View.OnAdded(View) View.OnRemoved(View) View.OnLeave(View) View.Focused View.MostFocused View.ColorScheme View.AddRune(Int32, Int32, Rune) View.ClearNeedsDisplay() View.DrawContent View.OnDrawContent(Rect) View.DrawContentComplete View.OnDrawContentComplete(Rect) View.SetFocus() View.KeyPress View.InvokeKeybindings(KeyEvent) View.AddKeyBinding(Key, Command) View.ReplaceKeyBinding(Key, Key) View.ContainsKeyBinding(Key) View.ClearKeybindings() View.ClearKeybinding(Key) View.ClearKeybinding(Command) View.AddCommand(Command, Func>) View.GetSupportedCommands() View.GetKeyFromCommand(Command) 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.LayoutStarted View.LayoutComplete View.Initialized View.LayoutSubviews() View.Text View.AutoSize View.TextAlignment View.VerticalTextAlignment View.TextDirection View.IsInitialized View.Enabled View.Visible View.Border View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) View.OnMouseEvent(MouseEvent) View.OnMouseClick(View.MouseEventArgs) View.OnCanFocusChanged() View.OnEnabledChanged() View.OnVisibleChanged() View.Dispose(Boolean) View.BeginInit() View.EndInit() View.SetWidth(Int32, Int32) View.SetHeight(Int32, Int32) View.GetCurrentWidth(Int32) View.GetCurrentHeight(Int32) View.GetNormalColor() View.GetTopSuperView() Responder.Dispose() 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 TreeView : View, IDisposable, ISupportInitializeNotification, ISupportInitialize, ITreeView where T : class Type Parameters Name Description T Constructors TreeView() Creates a new tree view with absolute positioning. Use AddObjects(IEnumerable) to set set root objects for the tree. Children will not be rendered until you set TreeBuilder Declaration public TreeView() TreeView(ITreeBuilder) Initialises TreeBuilder .Creates a new tree view with absolute positioning. Use AddObjects(IEnumerable) to set set root objects for the tree. Declaration public TreeView(ITreeBuilder builder) Parameters Type Name Description ITreeBuilder builder Fields NoBuilderError Error message to display when the control is not properly initialized at draw time (nodes added but no tree builder set) Declaration public static ustring NoBuilderError Field Value Type Description NStack.ustring Properties AllowLetterBasedNavigation True makes a letter key press navigate to the next visible branch that begins with that letter/digit Declaration public bool AllowLetterBasedNavigation { get; set; } Property Value Type Description System.Boolean AspectGetter Returns the string representation of model objects hosted in the tree. Default implementation is to call System.Object.ToString() Declaration public AspectGetterDelegate AspectGetter { get; set; } Property Value Type Description AspectGetterDelegate ColorGetter Delegate for multi colored tree views. Return the ColorScheme to use for each passed object or null to use the default. Declaration public Func ColorGetter { get; set; } Property Value Type Description System.Func ContentHeight The current number of rows in the tree (ignoring the controls bounds) Declaration public int ContentHeight { get; } Property Value Type Description System.Int32 DesiredCursorVisibility Get / Set the wished cursor when the tree is focused Declaration public CursorVisibility DesiredCursorVisibility { get; set; } Property Value Type Description CursorVisibility MultiSelect True to allow multiple objects to be selected at once Declaration public bool MultiSelect { get; set; } Property Value Type Description System.Boolean ObjectActivationButton Mouse event to trigger ObjectActivated . Defaults to double click ( Button1DoubleClicked ). Set to null to disable this feature. Declaration public MouseFlags? ObjectActivationButton { get; set; } Property Value Type Description System.Nullable < MouseFlags > ObjectActivationKey Key which when pressed triggers ObjectActivated . Defaults to Enter Declaration public Key ObjectActivationKey { get; set; } Property Value Type Description Key Objects The root objects in the tree, note that this collection is of root objects only Declaration public IEnumerable Objects { get; } Property Value Type Description System.Collections.Generic.IEnumerable ScrollOffsetHorizontal The amount of tree view that has been scrolled to the right (horizontally) Declaration public int ScrollOffsetHorizontal { get; set; } Property Value Type Description System.Int32 Remarks Setting a value of less than 0 will result in a offset of 0. To see changes in the UI call SetNeedsDisplay() ScrollOffsetVertical The amount of tree view that has been scrolled off the top of the screen (by the user scrolling down) Declaration public int ScrollOffsetVertical { get; set; } Property Value Type Description System.Int32 Remarks Setting a value of less than 0 will result in a offset of 0. To see changes in the UI call SetNeedsDisplay() SelectedObject The currently selected object in the tree. When MultiSelect is true this is the object at which the cursor is at Declaration public T SelectedObject { get; set; } Property Value Type Description T Style Contains options for changing how the tree is rendered Declaration public TreeStyle Style { get; set; } Property Value Type Description TreeStyle TreeBuilder Determines how sub branches of the tree are dynamically built at runtime as the user expands root nodes Declaration public ITreeBuilder TreeBuilder { get; set; } Property Value Type Description ITreeBuilder Methods ActivateSelectedObjectIfAny() Triggers the ObjectActivated event with the SelectedObject . This method also ensures that the selected object is visible Declaration public void ActivateSelectedObjectIfAny() AddObject(T) Adds a new root level object unless it is already a root of the tree Declaration public void AddObject(T o) Parameters Type Name Description T o AddObjects(IEnumerable) Adds many new root level objects. Objects that are already root objects are ignored Declaration public void AddObjects(IEnumerable collection) Parameters Type Name Description System.Collections.Generic.IEnumerable collection Objects to add as new root level objects AdjustSelection(Int32, Boolean) The number of screen lines to move the currently selected object by. Supports negative offset . Each branch occupies 1 line on screen Declaration public void AdjustSelection(int offset, bool expandSelection = false) Parameters Type Name Description System.Int32 offset Positive to move the selection down the screen, negative to move it up System.Boolean expandSelection True to expand the selection (assuming MultiSelect is enabled). False to replace Remarks If nothing is currently selected or the selected object is no longer in the tree then the first object in the tree is selected instead AdjustSelectionToBranchEnd() Moves the selection to the last child in the currently selected level Declaration public void AdjustSelectionToBranchEnd() AdjustSelectionToBranchStart() Moves the selection to the first child in the currently selected level Declaration public void AdjustSelectionToBranchStart() AdjustSelectionToNextItemBeginningWith(Char, StringComparison) Moves the SelectedObject to the next item that begins with character This method will loop back to the start of the tree if reaching the end without finding a match Declaration public void AdjustSelectionToNextItemBeginningWith(char character, StringComparison caseSensitivity = StringComparison.CurrentCultureIgnoreCase) Parameters Type Name Description System.Char character The first character of the next item you want selected System.StringComparison caseSensitivity Case sensitivity of the search CanExpand(T) Returns true if the given object o is exposed in the tree and can be expanded otherwise false Declaration public bool CanExpand(T o) Parameters Type Name Description T o Returns Type Description System.Boolean ClearObjects() Removes all objects from the tree and clears SelectedObject Declaration public void ClearObjects() Collapse() Collapses the SelectedObject Declaration public void Collapse() Collapse(T) Collapses the supplied object if it is currently expanded Declaration public void Collapse(T toCollapse) Parameters Type Name Description T toCollapse The object to collapse CollapseAll() Collapses all root nodes in the tree Declaration public void CollapseAll() CollapseAll(T) Collapses the supplied object if it is currently expanded. Also collapses all children branches (this will only become apparent when/if the user expands it again) Declaration public void CollapseAll(T toCollapse) Parameters Type Name Description T toCollapse The object to collapse CollapseImpl(T, Boolean) Implementation of Collapse(T) and CollapseAll(T) . Performs operation and updates selection if disapeared Declaration protected void CollapseImpl(T toCollapse, bool all) Parameters Type Name Description T toCollapse System.Boolean all CursorLeft(Boolean) Determines systems behaviour when the left arrow key is pressed. Default behaviour is to collapse the current tree node if possible otherwise changes selection to current branches parent Declaration protected virtual void CursorLeft(bool ctrl) Parameters Type Name Description System.Boolean ctrl EnsureVisible(T) Adjusts the ScrollOffsetVertical to ensure the given model is visible. Has no effect if already visible Declaration public void EnsureVisible(T model) Parameters Type Name Description T model Expand() Expands the currently SelectedObject Declaration public void Expand() Expand(T) Expands the supplied object if it is contained in the tree (either as a root object or as an exposed branch object) Declaration public void Expand(T toExpand) Parameters Type Name Description T toExpand The object to expand ExpandAll() Fully expands all nodes in the tree, if the tree is very big and built dynamically this may take a while (e.g. for file system) Declaration public void ExpandAll() ExpandAll(T) Expands the supplied object and all child objects Declaration public void ExpandAll(T toExpand) Parameters Type Name Description T toExpand The object to expand GetAllSelectedObjects() Returns SelectedObject (if not null) and all multi selected objects if MultiSelect is true Declaration public IEnumerable GetAllSelectedObjects() Returns Type Description System.Collections.Generic.IEnumerable GetChildren(T) Returns the currently expanded children of the passed object. Returns an empty collection if the branch is not exposed or not expanded Declaration public IEnumerable GetChildren(T o) Parameters Type Name Description T o An object in the tree Returns Type Description System.Collections.Generic.IEnumerable GetContentWidth(Boolean) Returns the maximum width line in the tree including prefix and expansion symbols Declaration public int GetContentWidth(bool visible) Parameters Type Name Description System.Boolean visible True to consider only rows currently visible (based on window bounds and ScrollOffsetVertical . False to calculate the width of every exposed branch in the tree Returns Type Description System.Int32 GetObjectOnRow(Int32) Returns the object in the tree list that is currently visible at the provided row. Returns null if no object is at that location. If you have screen coordinates then use ScreenToView(Int32, Int32) to translate these into the client area of the TreeView . Declaration public T GetObjectOnRow(int row) Parameters Type Name Description System.Int32 row The row of the Bounds of the TreeView Returns Type Description T The object currently displayed on this row or null GetObjectRow(T) Returns the Y coordinate within the Bounds of the tree at which toFind would be displayed or null if it is not currently exposed (e.g. its parent is collapsed). Note that the returned value can be negative if the TreeView is scrolled down and the toFind object is off the top of the view. Declaration public int? GetObjectRow(T toFind) Parameters Type Name Description T toFind Returns Type Description System.Nullable < System.Int32 > GetParent(T) Returns the parent object of o in the tree. Returns null if the object is not exposed in the tree Declaration public T GetParent(T o) Parameters Type Name Description T o An object in the tree Returns Type Description T GetScrollOffsetOf(T) Returns the index of the object o if it is currently exposed (it's parent(s) have been expanded). This can be used with ScrollOffsetVertical and SetNeedsDisplay() to scroll to a specific object Declaration public int GetScrollOffsetOf(T o) Parameters Type Name Description T o An object that appears in your tree and is currently exposed Returns Type Description System.Int32 The index the object was found at or -1 if it is not currently revealed or not in the tree at all Remarks Uses the Equals method and returns the first index at which the object is found or -1 if it is not found GoTo(T) Changes the SelectedObject to toSelect and scrolls to ensure it is visible. Has no effect if toSelect is not exposed in the tree (e.g. its parents are collapsed) Declaration public void GoTo(T toSelect) Parameters Type Name Description T toSelect GoToEnd() Changes the SelectedObject to the last object in the tree and scrolls so that it is visible Declaration public void GoToEnd() GoToFirst() Changes the SelectedObject to the first root object and resets the ScrollOffsetVertical to 0 Declaration public void GoToFirst() InvalidateLineMap() Clears any cached results of Terminal.Gui.TreeView`1.BuildLineMap Declaration protected void InvalidateLineMap() IsExpanded(T) Returns true if the given object o is exposed in the tree and expanded otherwise false Declaration public bool IsExpanded(T o) Parameters Type Name Description T o Returns Type Description System.Boolean IsSelected(T) Returns true if the model is either the SelectedObject or part of a MultiSelect Declaration public bool IsSelected(T model) Parameters Type Name Description T model 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) MovePageDown(Boolean) Moves the selection down by the height of the control (1 page). Declaration public void MovePageDown(bool expandSelection = false) Parameters Type Name Description System.Boolean expandSelection True if the navigation should add the covered nodes to the selected current selection Exceptions Type Condition System.NotImplementedException MovePageUp(Boolean) Moves the selection up by the height of the control (1 page). Declaration public void MovePageUp(bool expandSelection = false) Parameters Type Name Description System.Boolean expandSelection True if the navigation should add the covered nodes to the selected current selection Exceptions Type Condition System.NotImplementedException OnEnter(View) Declaration public override bool OnEnter(View view) Parameters Type Name Description View view Returns Type Description System.Boolean Overrides View.OnEnter(View) OnObjectActivated(ObjectActivatedEventArgs) Raises the ObjectActivated event Declaration protected virtual void OnObjectActivated(ObjectActivatedEventArgs e) Parameters Type Name Description ObjectActivatedEventArgs e OnSelectionChanged(SelectionChangedEventArgs) Raises the SelectionChanged event Declaration protected virtual void OnSelectionChanged(SelectionChangedEventArgs e) Parameters Type Name Description SelectionChangedEventArgs e PositionCursor() Positions the cursor at the start of the selected objects line (if visible) 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) RebuildTree() Rebuilds the tree structure for all exposed objects starting with the root objects. Call this method when you know there are changes to the tree but don't know which objects have changed (otherwise use RefreshObject(T, Boolean) ) Declaration public void RebuildTree() Redraw(Rect) Declaration public override void Redraw(Rect bounds) Parameters Type Name Description Rect bounds Overrides View.Redraw(Rect) RefreshObject(T, Boolean) Refreshes the state of the object o in the tree. This will recompute children, string representation etc Declaration public void RefreshObject(T o, bool startAtTop = false) Parameters Type Name Description T o System.Boolean startAtTop True to also refresh all ancestors of the objects branch (starting with the root). False to refresh only the passed node Remarks This has no effect if the object is not exposed in the tree. Remove(T) Removes the given root object from the tree Declaration public void Remove(T o) Parameters Type Name Description T o Remarks If o is the currently SelectedObject then the selection is cleared ScrollDown() Scrolls the view area down a single line without changing the current selection Declaration public void ScrollDown() ScrollUp() Scrolls the view area up a single line without changing the current selection Declaration public void ScrollUp() SelectAll() Selects all objects in the tree when MultiSelect is enabled otherwise does nothing Declaration public void SelectAll() Events ObjectActivated This event is raised when an object is activated e.g. by double clicking or pressing ObjectActivationKey Declaration public event Action> ObjectActivated Event Type Type Description System.Action < ObjectActivatedEventArgs > SelectionChanged Called when the SelectedObject changes Declaration public event EventHandler