diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index b3d92d8ef..7f1246542 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -34,13 +34,13 @@ We welcome contributions from the community. See [Issues](https://github.com/mig ### Include API Documentation -Great care has been provided thus far in ensuring **Terminal.Gui** has great [API Documentation](https://migueldeicaza.github.io/gui.cs/api/Terminal.Gui/Terminal.Gui.html). Contributors have a responsiblity for continously improving the API Documentation. +Great care has been provided thus far in ensuring **Terminal.Gui** has great [API Documentation](https://migueldeicaza.github.io/gui.cs/api/Terminal.Gui/Terminal.Gui.html). Contributors have a responsibility for continuously improving the API Documentation. - All public APIs must have clear, concise, and complete documentation in the form of [XML Documentation](https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/xmldoc/). - Keep the `` terse. - Use `` liberally to cross-link topics. -- Use `` to add more context and explaination. -- For complex topics, provide conceptual documentation in the `docfx/articles` folder as a `.md` file. It will automatically get picked up and be added to [Conceptual Documenation](https://migueldeicaza.github.io/gui.cs/articles/index.html). +- Use `` to add more context and explanation. +- For complex topics, provide conceptual documentation in the `docfx/articles` folder as a `.md` file. It will automatically get picked up and be added to [Conceptual Documentation](https://migueldeicaza.github.io/gui.cs/articles/index.html). - Use proper English and good grammar. ### Defining Events diff --git a/README.md b/README.md index ab8f83aae..3852e7e91 100644 --- a/README.md +++ b/README.md @@ -90,7 +90,7 @@ Debates on architecture and design can be found in Issues tagged with [design](h ## Documentation * [Overview](https://migueldeicaza.github.io/gui.cs/articles/overview.html) -* [Conceptual Documenation](https://migueldeicaza.github.io/gui.cs/articles/index.html) +* [Conceptual Documentation](https://migueldeicaza.github.io/gui.cs/articles/index.html) * [API Documentation](https://migueldeicaza.github.io/gui.cs/api/Terminal.Gui/Terminal.Gui.html) ### Sample Usage diff --git a/Terminal.Gui/ConsoleDrivers/FakeDriver/FakeConsole.cs b/Terminal.Gui/ConsoleDrivers/FakeDriver/FakeConsole.cs index a336997ad..1739501cd 100644 --- a/Terminal.Gui/ConsoleDrivers/FakeDriver/FakeConsole.cs +++ b/Terminal.Gui/ConsoleDrivers/FakeDriver/FakeConsole.cs @@ -1,5 +1,5 @@ // -// FakeConsole.cs: A fake .NET Windows Console API implementaiton for unit tests. +// FakeConsole.cs: A fake .NET Windows Console API implementation for unit tests. // // Authors: // Charlie Kindel (github.com/tig) diff --git a/Terminal.Gui/Core/Application.cs b/Terminal.Gui/Core/Application.cs index 893305c93..f21ba903f 100644 --- a/Terminal.Gui/Core/Application.cs +++ b/Terminal.Gui/Core/Application.cs @@ -79,7 +79,7 @@ namespace Terminal.Gui { public static View CurrentView { get; set; } /// - /// The driver for the applicaiton + /// The driver for the application /// /// The main loop. public static MainLoop MainLoop { get; private set; } diff --git a/Terminal.Gui/Core/ConsoleDriver.cs b/Terminal.Gui/Core/ConsoleDriver.cs index 72f2be6fa..612c22c60 100644 --- a/Terminal.Gui/Core/ConsoleDriver.cs +++ b/Terminal.Gui/Core/ConsoleDriver.cs @@ -862,7 +862,7 @@ namespace Terminal.Gui { /// Padding to add on the sides. /// If set to true it will clear the contents with the current color, otherwise the contents will be left untouched. /// This API has been superceded by . - /// This API is equivlalent to calling DrawWindowFrame(Rect, p - 1, p - 1, p - 1, p - 1). In other words, + /// This API is equivalent to calling DrawWindowFrame(Rect, p - 1, p - 1, p - 1, p - 1). In other words, /// A padding value of 0 means there is actually a one cell border. /// public virtual void DrawFrame (Rect region, int padding, bool fill) diff --git a/Terminal.Gui/Core/PosDim.cs b/Terminal.Gui/Core/PosDim.cs index c364b9527..efacd12c8 100644 --- a/Terminal.Gui/Core/PosDim.cs +++ b/Terminal.Gui/Core/PosDim.cs @@ -21,7 +21,7 @@ namespace Terminal.Gui { /// /// These can be used to set the absolute position, when merely assigning an /// integer value (via the implicit integer to conversion), and they can be combined - /// to produce more useful layouts, like: Pos.Center - 3, which would shift the postion + /// to produce more useful layouts, like: Pos.Center - 3, which would shift the position /// of the 3 characters to the left after centering for example. /// /// @@ -356,7 +356,7 @@ namespace Terminal.Gui { /// /// 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 + /// to produce more useful layouts, like: Pos.Center - 3, which would shift the position /// of the 3 characters to the left after centering for example. /// /// diff --git a/Terminal.Gui/Core/TextFormatter.cs b/Terminal.Gui/Core/TextFormatter.cs index 98e58c2b8..84625e2b3 100644 --- a/Terminal.Gui/Core/TextFormatter.cs +++ b/Terminal.Gui/Core/TextFormatter.cs @@ -28,7 +28,7 @@ namespace Terminal.Gui { } /// - /// Provides text formatting capabilites for console apps. Supports, hotkeys, horizontal alignment, multille lines, and word-based line wrap. + /// Provides text formatting capabilities for console apps. Supports, hotkeys, horizontal alignment, multille lines, and word-based line wrap. /// public class TextFormatter { List lines = new List (); @@ -383,7 +383,7 @@ namespace Terminal.Gui { } /// - /// Computes the maximum width needed to render the text (single line or multple lines) given a minimium width. + /// Computes the maximum width needed to render the text (single line or multple lines) given a minimum width. /// /// Max width of lines. /// Text, may contain newlines. @@ -396,7 +396,7 @@ namespace Terminal.Gui { /// - /// Calculates the rectangle requried to hold text, assuming no word wrapping. + /// Calculates the rectangle required to hold text, assuming no word wrapping. /// /// The x location of the rectangle /// The y location of the rectangle @@ -522,7 +522,7 @@ namespace Terminal.Gui { /// /// The text to manipulate. /// The hot-key specifier (e.g. '_') to look for. - /// Returns the postion of the hot-key in the text. -1 if not found. + /// Returns the position of the hot-key in the text. -1 if not found. /// The input text with the hotkey specifier ('_') removed. public static ustring RemoveHotKeySpecifier (ustring text, int hotPos, Rune hotKeySpecifier) { diff --git a/Terminal.Gui/Core/View.cs b/Terminal.Gui/Core/View.cs index efe7b25ba..649a247f6 100644 --- a/Terminal.Gui/Core/View.cs +++ b/Terminal.Gui/Core/View.cs @@ -68,7 +68,7 @@ namespace Terminal.Gui { /// if the terminal size changes. /// /// - /// Absolute layout requires specifying coordiantes and sizes of Views explicitly, and the + /// Absolute layout requires specifying coordinates 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 /// property. /// @@ -1206,7 +1206,7 @@ namespace Terminal.Gui { /// /// /// 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. + /// the last color that was set globally on the driver. /// /// /// Overrides of must ensure they do not set Driver.Clip to a clip region diff --git a/Terminal.Gui/Core/Window.cs b/Terminal.Gui/Core/Window.cs index 21f13024c..d6592c31d 100644 --- a/Terminal.Gui/Core/Window.cs +++ b/Terminal.Gui/Core/Window.cs @@ -49,7 +49,7 @@ namespace Terminal.Gui { /// /// Initializes a new instance of the class with an optional title using positioning. /// - /// Superview-relatie rectangle specifying the location and size + /// Superview-relative rectangle specifying the location and size /// Title /// /// This constructor intitalizes a Window with a of . Use constructors @@ -81,7 +81,7 @@ namespace Terminal.Gui { /// Initializes a new instance of the using positioning with the specified frame for its location, with the specified frame padding, /// and an optional title. /// - /// Superview-relatie rectangle specifying the location and size + /// Superview-relative rectangle specifying the location and size /// Number of characters to use for padding of the drawn frame. /// Title /// diff --git a/Terminal.Gui/README.md b/Terminal.Gui/README.md index 61f411e3b..461bdd001 100644 --- a/Terminal.Gui/README.md +++ b/Terminal.Gui/README.md @@ -11,7 +11,7 @@ Contains all files required to build the **Terminal.Gui** library (and nuget pac - `ConsoleDriver` - Definition for the Console Driver API. - `Events.cs` - Defines keyboard and mouse related structs & classes. - `PosDim.cs` - Implements **Terminal-Gui's** *Computed Layout* system. These classes have deep dependencies on `View`. - - `Responder` - Base class for the windowing class heirachy. Implements support for keyboard & mouse input. + - `Responder` - Base class for the windowing class hierarchy. Implements support for keyboard & mouse input. - `View` - Derived from `Responder`, the base class for non-modal visual elements such as controls. - `Toplevel` - Drived from `View`, the base class for modal visual elements such as top-level windows and dialogs. Supports the concept of `MenuBar` and `StatusBar`. - `Window` - Drived from `TopLevel`, implements Toplevel views with a visible frame and Title. diff --git a/Terminal.Gui/Terminal.Gui.csproj b/Terminal.Gui/Terminal.Gui.csproj index 2832fd8f5..519e7abd7 100644 --- a/Terminal.Gui/Terminal.Gui.csproj +++ b/Terminal.Gui/Terminal.Gui.csproj @@ -66,7 +66,7 @@ * Added support for F11 and F12 keys. (Thanks @bdisp!) * Multiple improvements to Date/TimeField. (Thanks @bdisp!) * Fixes #409 - Invoke does not cause Wakeup #501. (Thanks @bdisp!) - * Fixed Label text alignemnt. (Thanks @bdisp!) + * Fixed Label text alignment. (Thanks @bdisp!) * Added mouse features in the Unix version. Supports xterm-1006. (Thanks @bdisp!) * Several StatusBar fixes. (Thanks @bdisp!) * Tons of mouse improvements including mouse wheel support (e.g. #404, #409). (Thanks @bdisp!) @@ -80,7 +80,7 @@ * Fixes #557 MessageBox needs to take ustrings (BREAKING CHANGE). (Thanks @tig!) * Fixes ScrollView in several key ways. (Thanks @tig!) * Now supports Computed layout and has constructors that don't require parameters. - * ScrollBarViews are now positioned using Computed layout versus error prone absoulte + * ScrollBarViews are now positioned using Computed layout versus error prone absolute * ScrollBarViews now correctly position themselves when one, either, or both are on/off. * IsVertical is now a public property that does the expected thing when changed * Mouse handling is better; there's still a bug where the mouse doesn't get grabbed by the ScrollView initially but I think this is a broader problem. I need @BDisp's help on this. diff --git a/Terminal.Gui/Views/HexView.cs b/Terminal.Gui/Views/HexView.cs index af9d55e66..435ec2cb6 100644 --- a/Terminal.Gui/Views/HexView.cs +++ b/Terminal.Gui/Views/HexView.cs @@ -16,7 +16,7 @@ namespace Terminal.Gui { /// /// /// provides a hex editor on top of a seekable with the left side showing an hex - /// dump of the values in the and the right side showing the contents (filterd to + /// dump of the values in the and the right side showing the contents (filtered to /// non-control sequence ASCII characters). /// /// diff --git a/Terminal.Gui/Views/Label.cs b/Terminal.Gui/Views/Label.cs index 63ee0e446..53e787c22 100644 --- a/Terminal.Gui/Views/Label.cs +++ b/Terminal.Gui/Views/Label.cs @@ -16,7 +16,7 @@ namespace Terminal.Gui { /// The Label displays a string at a given position and supports multiple lines separted by newline characters. Multi-line Labels support word wrap. /// /// - /// The view is functionality identical to and is included for API backwards compatibilty. + /// The view is functionality identical to and is included for API backwards compatibility. /// public class Label : View { /// diff --git a/Terminal.Gui/Views/TextView.cs b/Terminal.Gui/Views/TextView.cs index 5ed692385..c484cf802 100644 --- a/Terminal.Gui/Views/TextView.cs +++ b/Terminal.Gui/Views/TextView.cs @@ -301,7 +301,7 @@ namespace Terminal.Gui { public Action Changed; #endif /// - /// Initalizes a on the specified area, with absolute position and size. + /// Initializes a on the specified area, with absolute position and size. /// /// /// @@ -311,7 +311,7 @@ namespace Terminal.Gui { } /// - /// Initalizes a on the specified area, + /// Initializes a on the specified area, /// with dimensions controlled with the X, Y, Width and Height properties. /// public TextView () : base () diff --git a/Terminal.Gui/Windows/Dialog.cs b/Terminal.Gui/Windows/Dialog.cs index 5dc08e1fa..37ef43b56 100644 --- a/Terminal.Gui/Windows/Dialog.cs +++ b/Terminal.Gui/Windows/Dialog.cs @@ -94,7 +94,7 @@ namespace Terminal.Gui { public Dialog (ustring title, params Button [] buttons) : this (title: title, width: 0, height: 0, buttons: buttons) { } /// - /// Adds a to the , its layout will be controled by the + /// Adds a to the , its layout will be controlled by the /// /// Button to add. public void AddButton (Button button) diff --git a/UICatalog/Scenario.cs b/UICatalog/Scenario.cs index 4bd963662..4592112ae 100644 --- a/UICatalog/Scenario.cs +++ b/UICatalog/Scenario.cs @@ -156,14 +156,14 @@ namespace UICatalog { /// Static helper function to get the Name given a Type /// /// - /// Name of the catagory + /// Name of the category public static string GetName (Type t) => ((ScenarioCategory)System.Attribute.GetCustomAttributes (t) [0]).Name; /// /// Static helper function to get the Categories given a Type /// /// - /// list of catagory names + /// list of category names public static List GetCategories (Type t) => System.Attribute.GetCustomAttributes (t) .ToList () .Where (a => a is ScenarioCategory) @@ -174,7 +174,7 @@ namespace UICatalog { /// /// Helper function to get the list of categories a belongs to (defined in ) /// - /// list of catagory names + /// list of category names public List GetCategories () => ScenarioCategory.GetCategories (this.GetType ()); /// diff --git a/UICatalog/Scenarios/Scrolling.cs b/UICatalog/Scenarios/Scrolling.cs index 2ff42537b..024d5d931 100644 --- a/UICatalog/Scenarios/Scrolling.cs +++ b/UICatalog/Scenarios/Scrolling.cs @@ -169,7 +169,7 @@ namespace UICatalog { ColorScheme = Colors.Dialog }); - scrollView.Add (new TextField ("... the emergency broadcast sytem.") { + scrollView.Add (new TextField ("... the emergency broadcast system.") { X = 3, Y = 10, Width = 50, diff --git a/docs/api/Terminal.Gui/Terminal.Gui.Application.html b/docs/api/Terminal.Gui/Terminal.Gui.Application.html index 225c7eb84..f70363a31 100644 --- a/docs/api/Terminal.Gui/Terminal.Gui.Application.html +++ b/docs/api/Terminal.Gui/Terminal.Gui.Application.html @@ -375,7 +375,7 @@ TThe current View object being

MainLoop

-The MainLoop driver for the applicaiton +The MainLoop driver for the application
Declaration
diff --git a/docs/api/Terminal.Gui/Terminal.Gui.Dialog.html b/docs/api/Terminal.Gui/Terminal.Gui.Dialog.html index f2effa246..6328ea736 100644 --- a/docs/api/Terminal.Gui/Terminal.Gui.Dialog.html +++ b/docs/api/Terminal.Gui/Terminal.Gui.Dialog.html @@ -557,7 +557,7 @@ After initialzation use X, Y, Width, and

AddButton(Button)

-Adds a Button to the Dialog, its layout will be controled by the Dialog +Adds a Button to the Dialog, its layout will be controlled by the Dialog
Declaration
diff --git a/docs/api/Terminal.Gui/Terminal.Gui.Dim.html b/docs/api/Terminal.Gui/Terminal.Gui.Dim.html index b94e02c3d..c5b6699d4 100644 --- a/docs/api/Terminal.Gui/Terminal.Gui.Dim.html +++ b/docs/api/Terminal.Gui/Terminal.Gui.Dim.html @@ -124,7 +124,7 @@ Dim properties of a View to co

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 + to produce more useful layouts, like: Pos.Center - 3, which would shift the position of the View 3 characters to the left after centering for example.

diff --git a/docs/api/Terminal.Gui/Terminal.Gui.HexView.html b/docs/api/Terminal.Gui/Terminal.Gui.HexView.html index 938086d4d..e750ae460 100644 --- a/docs/api/Terminal.Gui/Terminal.Gui.HexView.html +++ b/docs/api/Terminal.Gui/Terminal.Gui.HexView.html @@ -396,7 +396,7 @@ An hex viewer and editor View

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 +dump of the values in the System.IO.Stream and the right side showing the contents (filtered to non-control sequence ASCII characters).

diff --git a/docs/api/Terminal.Gui/Terminal.Gui.Label.html b/docs/api/Terminal.Gui/Terminal.Gui.Label.html index 8d265534b..a158e8268 100644 --- a/docs/api/Terminal.Gui/Terminal.Gui.Label.html +++ b/docs/api/Terminal.Gui/Terminal.Gui.Label.html @@ -403,7 +403,7 @@ The Label View displays a stri

Remarks
-The Label view is functionality identical to View and is included for API backwards compatibilty. +The Label view is functionality identical to View and is included for API backwards compatibility.

Constructors

diff --git a/docs/api/Terminal.Gui/Terminal.Gui.Pos.html b/docs/api/Terminal.Gui/Terminal.Gui.Pos.html index 8db75159b..cc8d65a31 100644 --- a/docs/api/Terminal.Gui/Terminal.Gui.Pos.html +++ b/docs/api/Terminal.Gui/Terminal.Gui.Pos.html @@ -134,7 +134,7 @@ subtraction operators.

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 + to produce more useful layouts, like: Pos.Center - 3, which would shift the position of the View 3 characters to the left after centering for example.

diff --git a/docs/api/Terminal.Gui/Terminal.Gui.TextFormatter.html b/docs/api/Terminal.Gui/Terminal.Gui.TextFormatter.html index ab0bd8869..54dc29499 100644 --- a/docs/api/Terminal.Gui/Terminal.Gui.TextFormatter.html +++ b/docs/api/Terminal.Gui/Terminal.Gui.TextFormatter.html @@ -84,7 +84,7 @@

Class TextFormatter

-Provides text formatting capabilites for console apps. Supports, hotkeys, horizontal alignment, multille lines, and word-based line wrap. +Provides text formatting capabilities for console apps. Supports, hotkeys, horizontal alignment, multille lines, and word-based line wrap.
@@ -389,7 +389,7 @@ The text to be displayed. This text is never modified.

CalcRect(Int32, Int32, ustring)

-Calculates the rectangle requried to hold text, assuming no word wrapping. +Calculates the rectangle required to hold text, assuming no word wrapping.
Declaration
@@ -776,7 +776,7 @@ Computes the number of lines needed to render the specified text given the width

MaxWidth(ustring, Int32)

-Computes the maximum width needed to render the text (single line or multple lines) given a minimium width. +Computes the maximum width needed to render the text (single line or multple lines) given a minimum width.
Declaration
@@ -850,7 +850,7 @@ Removes the hotkey specifier from text. System.Int32 hotPos - Returns the postion of the hot-key in the text. -1 if not found. + Returns the position of the hot-key in the text. -1 if not found. System.Rune diff --git a/docs/api/Terminal.Gui/Terminal.Gui.TextView.html b/docs/api/Terminal.Gui/Terminal.Gui.TextView.html index b6e498a51..2186d633f 100644 --- a/docs/api/Terminal.Gui/Terminal.Gui.TextView.html +++ b/docs/api/Terminal.Gui/Terminal.Gui.TextView.html @@ -434,7 +434,7 @@ keys.

TextView()

-Initalizes a TextView on the specified area, +Initializes a TextView on the specified area, with dimensions controlled with the X, Y, Width and Height properties.
@@ -447,7 +447,7 @@ with dimensions controlled with the X, Y, Width and Height properties.

TextView(Rect)

-Initalizes a TextView on the specified area, with absolute position and size. +Initializes a TextView on the specified area, with absolute position and size.
Declaration
diff --git a/docs/api/Terminal.Gui/Terminal.Gui.View.html b/docs/api/Terminal.Gui/Terminal.Gui.View.html index 6ee1e669f..810be5e49 100644 --- a/docs/api/Terminal.Gui/Terminal.Gui.View.html +++ b/docs/api/Terminal.Gui/Terminal.Gui.View.html @@ -178,7 +178,7 @@ 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 + Absolute layout requires specifying coordinates 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.

@@ -2767,7 +2767,7 @@ Redraws this view and its subviews; only redraws the views that have been flagge

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. + the last color that was set coglobally on the driver.

Overrides of Redraw(Rect) must ensure they do not set Driver.Clip to a clip region diff --git a/docs/api/Terminal.Gui/Terminal.Gui.Window.html b/docs/api/Terminal.Gui/Terminal.Gui.Window.html index 6e828a93a..08895d5fb 100644 --- a/docs/api/Terminal.Gui/Terminal.Gui.Window.html +++ b/docs/api/Terminal.Gui/Terminal.Gui.Window.html @@ -521,7 +521,7 @@ Initializes a new instance of the Rect frame - Superview-relatie rectangle specifying the location and size + Superview-relative rectangle specifying the location and size NStack.ustring @@ -561,7 +561,7 @@ and an optional title. Rect frame - Superview-relatie rectangle specifying the location and size + Superview-relative rectangle specifying the location and size NStack.ustring diff --git a/docs/api/Terminal.Gui/Terminal.Gui.html b/docs/api/Terminal.Gui/Terminal.Gui.html index 1fa2092be..8b7e4a1b4 100644 --- a/docs/api/Terminal.Gui/Terminal.Gui.html +++ b/docs/api/Terminal.Gui/Terminal.Gui.html @@ -284,7 +284,7 @@ Single-line text entry View

TextFormatter

-Provides text formatting capabilites for console apps. Supports, hotkeys, horizontal alignment, multille lines, and word-based line wrap. +Provides text formatting capabilities for console apps. Supports, hotkeys, horizontal alignment, multille lines, and word-based line wrap.

TextView

diff --git a/docs/api/UICatalog/UICatalog.Scenario.ScenarioCategory.html b/docs/api/UICatalog/UICatalog.Scenario.ScenarioCategory.html index 63b1f2b5e..c23175ec8 100644 --- a/docs/api/UICatalog/UICatalog.Scenario.ScenarioCategory.html +++ b/docs/api/UICatalog/UICatalog.Scenario.ScenarioCategory.html @@ -195,7 +195,7 @@ List<System.String> -

list of catagory names

+

list of category names

@@ -239,7 +239,7 @@ System.String -

Name of the catagory

+

Name of the category

diff --git a/docs/api/UICatalog/UICatalog.Scenario.html b/docs/api/UICatalog/UICatalog.Scenario.html index 58f4265cc..e0f3fa612 100644 --- a/docs/api/UICatalog/UICatalog.Scenario.html +++ b/docs/api/UICatalog/UICatalog.Scenario.html @@ -240,7 +240,7 @@ namespace UICatalog { List<System.String> -

list of catagory names

+

list of category names

diff --git a/docs/index.json b/docs/index.json index abe4607fc..5ed60dc51 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, 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 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 Loaded This event is fired once when the application is first loaded. The dimensions of the terminal are provided. Declaration public static Action Loaded Field Value Type Description System.Action < Application.ResizedEventArgs > 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 > 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 If true , closes the application. If 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(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(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 The Toplevel tu run modally. System.Boolean closeDriver Set to to cause the MainLoop to end when End(Application.RunState, Boolean) is called, clsing the toplevels only. 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(ConsoleDriver, IMainLoopDriver) 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()" + "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 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 Loaded This event is fired once when the application is first loaded. The dimensions of the terminal are provided. Declaration public static Action Loaded Field Value Type Description System.Action < Application.ResizedEventArgs > 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 > 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 application 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 If true , closes the application. If 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(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(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 The Toplevel tu run modally. System.Boolean closeDriver Set to to cause the MainLoop to end when End(Application.RunState, Boolean) is called, clsing the toplevels only. 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(ConsoleDriver, IMainLoopDriver) 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()" }, "api/Terminal.Gui/Terminal.Gui.Application.ResizedEventArgs.html": { "href": "api/Terminal.Gui/Terminal.Gui.Application.ResizedEventArgs.html", @@ -77,12 +77,12 @@ "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.IDisposable System.ComponentModel.ISupportInitializeNotification System.ComponentModel.ISupportInitialize System.Collections.IEnumerable Inherited Members Window.Title Window.GetEnumerator() Window.Add(View) Window.Remove(View) Window.RemoveAll() Window.Redraw(Rect) Window.MouseEvent(MouseEvent) Window.Text Window.TextAlignment Toplevel.Running Toplevel.Ready Toplevel.Create() Toplevel.CanFocus Toplevel.Modal Toplevel.MenuBar Toplevel.StatusBar Toplevel.OnKeyDown(KeyEvent) Toplevel.OnKeyUp(KeyEvent) Toplevel.WillPresent() View.Added View.Removed View.Enter View.Leave View.MouseEnter View.MouseLeave View.MouseClick View.HotKey View.HotKeySpecifier View.Driver View.Subviews View.TabIndexes View.TabIndex View.TabStop 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.OnAdded(View) View.OnRemoved(View) View.OnEnter(View) View.OnLeave(View) 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.KeyUp View.EnsureFocus() View.FocusFirst() View.FocusLast() View.FocusPrev() View.FocusNext() View.LayoutStarted View.LayoutComplete View.Initialized View.LayoutSubviews() View.IsInitialized View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) View.OnMouseEvent(MouseEvent) View.Dispose(Boolean) View.BeginInit() View.EndInit() 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 Dialog : Window, IDisposable, ISupportInitializeNotification, ISupportInitialize, 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() Initializes a new instance of the Dialog class using Computed . Declaration public Dialog() Remarks Te 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. Use AddButton(Button) to add buttons to the dialog. Dialog(ustring, Int32, Int32, Button[]) Initializes a new instance of the Dialog class using Computed 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 Te 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. 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.IDisposable System.ComponentModel.ISupportInitializeNotification System.ComponentModel.ISupportInitialize 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.IDisposable System.ComponentModel.ISupportInitializeNotification System.ComponentModel.ISupportInitialize System.Collections.IEnumerable Inherited Members Window.Title Window.GetEnumerator() Window.Add(View) Window.Remove(View) Window.RemoveAll() Window.Redraw(Rect) Window.MouseEvent(MouseEvent) Window.Text Window.TextAlignment Toplevel.Running Toplevel.Ready Toplevel.Create() Toplevel.CanFocus Toplevel.Modal Toplevel.MenuBar Toplevel.StatusBar Toplevel.OnKeyDown(KeyEvent) Toplevel.OnKeyUp(KeyEvent) Toplevel.WillPresent() View.Added View.Removed View.Enter View.Leave View.MouseEnter View.MouseLeave View.MouseClick View.HotKey View.HotKeySpecifier View.Driver View.Subviews View.TabIndexes View.TabIndex View.TabStop 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.OnAdded(View) View.OnRemoved(View) View.OnEnter(View) View.OnLeave(View) 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.KeyUp View.EnsureFocus() View.FocusFirst() View.FocusLast() View.FocusPrev() View.FocusNext() View.LayoutStarted View.LayoutComplete View.Initialized View.LayoutSubviews() View.IsInitialized View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) View.OnMouseEvent(MouseEvent) View.Dispose(Boolean) View.BeginInit() View.EndInit() 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 Dialog : Window, IDisposable, ISupportInitializeNotification, ISupportInitialize, 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() Initializes a new instance of the Dialog class using Computed . Declaration public Dialog() Remarks Te 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. Use AddButton(Button) to add buttons to the dialog. Dialog(ustring, Int32, Int32, Button[]) Initializes a new instance of the Dialog class using Computed 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 Te 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 controlled by the Dialog Declaration public void AddButton(Button button) Parameters Type Name Description Button button Button to add. 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.IDisposable System.ComponentModel.ISupportInitializeNotification System.ComponentModel.ISupportInitialize System.Collections.IEnumerable" }, "api/Terminal.Gui/Terminal.Gui.Dim.html": { "href": "api/Terminal.Gui/Terminal.Gui.Dim.html", "title": "Class Dim", - "keywords": "Class Dim Dim properties of a View to control the position. Inheritance System.Object Dim Inherited Members System.Object.Equals(System.Object, System.Object) 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 Dim Remarks Use the Dim objects on the Width or Height 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. Methods Equals(Object) Determines whether the specified object is equal to the current object. Declaration public override bool Equals(object other) Parameters Type Name Description System.Object other The object to compare with the current object. Returns Type Description System.Boolean true if the specified object is equal to the current object; otherwise, false . Overrides System.Object.Equals(System.Object) Fill(Int32) Initializes a new instance of the Dim class that fills the dimension, but leaves the specified number of colums for a margin. Declaration public static Dim Fill(int margin = 0) Parameters Type Name Description System.Int32 margin Margin to use. Returns Type Description Dim The Fill dimension. GetHashCode() Serves as the default hash function. Declaration public override int GetHashCode() Returns Type Description System.Int32 A hash code for the current object. Overrides System.Object.GetHashCode() Height(View) Returns a Dim object tracks the Height of the specified View . Declaration public static Dim Height(View view) Parameters Type Name Description View view The view that will be tracked. Returns Type Description Dim The Dim of the other View . Percent(Single, Boolean) Creates a percentage Dim object Declaration public static Dim Percent(float n, bool r = false) Parameters Type Name Description System.Single n A value between 0 and 100 representing the percentage. System.Boolean r If true the Percent is computed based on the remaining space after the X/Y anchor positions. If false is computed based on the whole original space. Returns Type Description Dim The percent Dim object. Examples This initializes 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), }; Sized(Int32) Creates an Absolute Dim from the specified integer value. Declaration public static Dim Sized(int n) Parameters Type Name Description System.Int32 n The value to convert to the Dim . Returns Type Description Dim The Absolute Dim . Width(View) Returns a Dim object tracks the Width of the specified View . Declaration public static Dim Width(View view) Parameters Type Name Description View view The view that will be tracked. Returns Type Description Dim The Dim of the other View . Operators Addition(Dim, Dim) Adds a Dim to a Dim , yielding a new Dim . Declaration public static Dim operator +(Dim left, Dim right) Parameters Type Name Description Dim left The first Dim to add. Dim right The second Dim to add. Returns Type Description Dim The Dim that is the sum of the values of left and right . Implicit(Int32 to Dim) Creates an Absolute Dim from the specified integer value. Declaration public static implicit operator Dim(int n) Parameters Type Name Description System.Int32 n The value to convert to the pos. Returns Type Description Dim The Absolute Dim . Subtraction(Dim, Dim) Subtracts a Dim from a Dim , yielding a new Dim . Declaration public static Dim operator -(Dim left, Dim right) Parameters Type Name Description Dim left The Dim to subtract from (the minuend). Dim right The Dim to subtract (the subtrahend). Returns Type Description Dim The Dim that is the left minus right ." + "keywords": "Class Dim Dim properties of a View to control the position. Inheritance System.Object Dim Inherited Members System.Object.Equals(System.Object, System.Object) 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 Dim Remarks Use the Dim objects on the Width or Height 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 position of the View 3 characters to the left after centering for example. Methods Equals(Object) Determines whether the specified object is equal to the current object. Declaration public override bool Equals(object other) Parameters Type Name Description System.Object other The object to compare with the current object. Returns Type Description System.Boolean true if the specified object is equal to the current object; otherwise, false . Overrides System.Object.Equals(System.Object) Fill(Int32) Initializes a new instance of the Dim class that fills the dimension, but leaves the specified number of colums for a margin. Declaration public static Dim Fill(int margin = 0) Parameters Type Name Description System.Int32 margin Margin to use. Returns Type Description Dim The Fill dimension. GetHashCode() Serves as the default hash function. Declaration public override int GetHashCode() Returns Type Description System.Int32 A hash code for the current object. Overrides System.Object.GetHashCode() Height(View) Returns a Dim object tracks the Height of the specified View . Declaration public static Dim Height(View view) Parameters Type Name Description View view The view that will be tracked. Returns Type Description Dim The Dim of the other View . Percent(Single, Boolean) Creates a percentage Dim object Declaration public static Dim Percent(float n, bool r = false) Parameters Type Name Description System.Single n A value between 0 and 100 representing the percentage. System.Boolean r If true the Percent is computed based on the remaining space after the X/Y anchor positions. If false is computed based on the whole original space. Returns Type Description Dim The percent Dim object. Examples This initializes 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), }; Sized(Int32) Creates an Absolute Dim from the specified integer value. Declaration public static Dim Sized(int n) Parameters Type Name Description System.Int32 n The value to convert to the Dim . Returns Type Description Dim The Absolute Dim . Width(View) Returns a Dim object tracks the Width of the specified View . Declaration public static Dim Width(View view) Parameters Type Name Description View view The view that will be tracked. Returns Type Description Dim The Dim of the other View . Operators Addition(Dim, Dim) Adds a Dim to a Dim , yielding a new Dim . Declaration public static Dim operator +(Dim left, Dim right) Parameters Type Name Description Dim left The first Dim to add. Dim right The second Dim to add. Returns Type Description Dim The Dim that is the sum of the values of left and right . Implicit(Int32 to Dim) Creates an Absolute Dim from the specified integer value. Declaration public static implicit operator Dim(int n) Parameters Type Name Description System.Int32 n The value to convert to the pos. Returns Type Description Dim The Absolute Dim . Subtraction(Dim, Dim) Subtracts a Dim from a Dim , yielding a new Dim . Declaration public static Dim operator -(Dim left, Dim right) Parameters Type Name Description Dim left The Dim to subtract from (the minuend). Dim right The Dim to subtract (the subtrahend). Returns Type Description Dim The Dim that is the left minus right ." }, "api/Terminal.Gui/Terminal.Gui.FakeConsole.html": { "href": "api/Terminal.Gui/Terminal.Gui.FakeConsole.html", @@ -107,12 +107,12 @@ "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.IDisposable System.Collections.IEnumerable System.ComponentModel.ISupportInitializeNotification System.ComponentModel.ISupportInitialize Inherited Members View.Added View.Removed View.Enter View.Leave View.MouseEnter View.MouseLeave View.MouseClick View.HotKey View.HotKeySpecifier View.Driver View.Subviews View.TabIndexes View.TabIndex View.TabStop View.CanFocus 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.OnAdded(View) View.OnRemoved(View) View.OnEnter(View) View.OnLeave(View) 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.LayoutStarted View.LayoutComplete View.Initialized View.LayoutSubviews() View.Text View.TextAlignment View.IsInitialized View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) View.OnMouseEvent(MouseEvent) View.Dispose(Boolean) View.BeginInit() View.EndInit() Responder.MouseEvent(MouseEvent) 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 HexView : View, IDisposable, IEnumerable, ISupportInitializeNotification, ISupportInitialize 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() Initialzies a HexView class using Computed layout. Declaration public HexView() HexView(Stream) Initialzies a HexView class using Computed layout. 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.IDisposable System.Collections.IEnumerable System.ComponentModel.ISupportInitializeNotification System.ComponentModel.ISupportInitialize" + "keywords": "Class HexView An hex viewer and editor View over a System.IO.Stream Inheritance System.Object Responder View HexView Implements System.IDisposable System.Collections.IEnumerable System.ComponentModel.ISupportInitializeNotification System.ComponentModel.ISupportInitialize Inherited Members View.Added View.Removed View.Enter View.Leave View.MouseEnter View.MouseLeave View.MouseClick View.HotKey View.HotKeySpecifier View.Driver View.Subviews View.TabIndexes View.TabIndex View.TabStop View.CanFocus 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.OnAdded(View) View.OnRemoved(View) View.OnEnter(View) View.OnLeave(View) 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.LayoutStarted View.LayoutComplete View.Initialized View.LayoutSubviews() View.Text View.TextAlignment View.IsInitialized View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) View.OnMouseEvent(MouseEvent) View.Dispose(Boolean) View.BeginInit() View.EndInit() Responder.MouseEvent(MouseEvent) 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 HexView : View, IDisposable, IEnumerable, ISupportInitializeNotification, ISupportInitialize 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 (filtered 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() Initialzies a HexView class using Computed layout. Declaration public HexView() HexView(Stream) Initialzies a HexView class using Computed layout. 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.IDisposable System.Collections.IEnumerable System.ComponentModel.ISupportInitializeNotification System.ComponentModel.ISupportInitialize" }, "api/Terminal.Gui/Terminal.Gui.html": { "href": "api/Terminal.Gui/Terminal.Gui.html", "title": "Namespace Terminal.Gui", - "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 Simple Date editing View DateTimeEventArgs Defines the event arguments for DateChanged and TimeChanged events. 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. FakeConsole FakeDriver Implements a mock ConsoleDriver for unit testing 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. Multi-line Labels support word wrap. 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. NetMainLoop Mainloop intended to be used with the .NET System.Console API, and can be used on Windows and Unix, it is cross platform but lacks things like file descriptor monitoring. 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 RadioGroup.SelectedItemChangedArgs Event arguments for the SelectedItemChagned event. 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 TextFormatter Provides text formatting capabilites for console apps. Supports, hotkeys, horizontal alignment, multille lines, and word-based line wrap. 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.MouseEventArgs 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. ConsoleDriver.DiagnosticFlags Enables diagnostic funcions 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. MenuItemCheckStyle Specifies how a MenuItem shows selection state. 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 Simple Date editing View DateTimeEventArgs Defines the event arguments for DateChanged and TimeChanged events. 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. FakeConsole FakeDriver Implements a mock ConsoleDriver for unit testing 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. Multi-line Labels support word wrap. 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. NetMainLoop Mainloop intended to be used with the .NET System.Console API, and can be used on Windows and Unix, it is cross platform but lacks things like file descriptor monitoring. 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 RadioGroup.SelectedItemChangedArgs Event arguments for the SelectedItemChagned event. 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 TextFormatter Provides text formatting capabilities for console apps. Supports, hotkeys, horizontal alignment, multille lines, and word-based line wrap. 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.MouseEventArgs 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. ConsoleDriver.DiagnosticFlags Enables diagnostic funcions 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. MenuItemCheckStyle Specifies how a MenuItem shows selection state. 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", @@ -142,7 +142,7 @@ "api/Terminal.Gui/Terminal.Gui.Label.html": { "href": "api/Terminal.Gui/Terminal.Gui.Label.html", "title": "Class Label", - "keywords": "Class Label The Label View displays a string at a given position and supports multiple lines separted by newline characters. Multi-line Labels support word wrap. Inheritance System.Object Responder View Label Implements System.IDisposable System.Collections.IEnumerable System.ComponentModel.ISupportInitializeNotification System.ComponentModel.ISupportInitialize Inherited Members View.Added View.Removed View.Enter View.Leave View.MouseEnter View.MouseLeave View.MouseClick View.HotKey View.HotKeySpecifier View.Driver View.Subviews View.TabIndexes View.TabIndex View.TabStop View.CanFocus 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.OnAdded(View) View.OnRemoved(View) View.OnEnter(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.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.LayoutStarted View.LayoutComplete View.Initialized View.LayoutSubviews() View.Text View.TextAlignment View.IsInitialized View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) View.Dispose(Boolean) View.BeginInit() View.EndInit() Responder.MouseEvent(MouseEvent) 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 Label : View, IDisposable, IEnumerable, ISupportInitializeNotification, ISupportInitialize Remarks The Label view is functionality identical to View and is included for API backwards compatibilty. Constructors Label() Declaration public Label() Label(ustring) Declaration public Label(ustring text) Parameters Type Name Description NStack.ustring text Label(Int32, Int32, ustring) Declaration public Label(int x, int y, ustring text) Parameters Type Name Description System.Int32 x System.Int32 y NStack.ustring text Label(Rect) Declaration public Label(Rect frame) Parameters Type Name Description Rect frame Label(Rect, ustring) Declaration public Label(Rect rect, ustring text) Parameters Type Name Description Rect rect NStack.ustring text Fields 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 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. Methods OnMouseEvent(MouseEvent) Method invoked when a mouse event is generated Declaration public override bool OnMouseEvent(MouseEvent mouseEvent) Parameters Type Name Description MouseEvent mouseEvent Returns Type Description System.Boolean true , if the event was handled, false otherwise. Overrides View.OnMouseEvent(MouseEvent) Implements System.IDisposable System.Collections.IEnumerable System.ComponentModel.ISupportInitializeNotification System.ComponentModel.ISupportInitialize" + "keywords": "Class Label The Label View displays a string at a given position and supports multiple lines separted by newline characters. Multi-line Labels support word wrap. Inheritance System.Object Responder View Label Implements System.IDisposable System.Collections.IEnumerable System.ComponentModel.ISupportInitializeNotification System.ComponentModel.ISupportInitialize Inherited Members View.Added View.Removed View.Enter View.Leave View.MouseEnter View.MouseLeave View.MouseClick View.HotKey View.HotKeySpecifier View.Driver View.Subviews View.TabIndexes View.TabIndex View.TabStop View.CanFocus 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.OnAdded(View) View.OnRemoved(View) View.OnEnter(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.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.LayoutStarted View.LayoutComplete View.Initialized View.LayoutSubviews() View.Text View.TextAlignment View.IsInitialized View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) View.Dispose(Boolean) View.BeginInit() View.EndInit() Responder.MouseEvent(MouseEvent) 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 Label : View, IDisposable, IEnumerable, ISupportInitializeNotification, ISupportInitialize Remarks The Label view is functionality identical to View and is included for API backwards compatibility. Constructors Label() Declaration public Label() Label(ustring) Declaration public Label(ustring text) Parameters Type Name Description NStack.ustring text Label(Int32, Int32, ustring) Declaration public Label(int x, int y, ustring text) Parameters Type Name Description System.Int32 x System.Int32 y NStack.ustring text Label(Rect) Declaration public Label(Rect frame) Parameters Type Name Description Rect frame Label(Rect, ustring) Declaration public Label(Rect rect, ustring text) Parameters Type Name Description Rect rect NStack.ustring text Fields 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 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. Methods OnMouseEvent(MouseEvent) Method invoked when a mouse event is generated Declaration public override bool OnMouseEvent(MouseEvent mouseEvent) Parameters Type Name Description MouseEvent mouseEvent Returns Type Description System.Boolean true , if the event was handled, false otherwise. Overrides View.OnMouseEvent(MouseEvent) Implements System.IDisposable System.Collections.IEnumerable System.ComponentModel.ISupportInitializeNotification System.ComponentModel.ISupportInitialize" }, "api/Terminal.Gui/Terminal.Gui.LayoutStyle.html": { "href": "api/Terminal.Gui/Terminal.Gui.LayoutStyle.html", @@ -222,7 +222,7 @@ "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 . // 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 ." + "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 position 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", @@ -292,12 +292,12 @@ "api/Terminal.Gui/Terminal.Gui.TextFormatter.html": { "href": "api/Terminal.Gui/Terminal.Gui.TextFormatter.html", "title": "Class TextFormatter", - "keywords": "Class TextFormatter Provides text formatting capabilites for console apps. Supports, hotkeys, horizontal alignment, multille lines, and word-based line wrap. Inheritance System.Object TextFormatter 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 TextFormatter Properties Alignment Controls the horizontal text-alignment property. Declaration public TextAlignment Alignment { get; set; } Property Value Type Description TextAlignment The text alignment. HotKey Gets the hotkey. Will be an upper case letter or digit. Declaration public Key HotKey { get; } Property Value Type Description Key HotKeyPos The position in the text of the hotkey. The hotkey will be rendered using the hot color. Declaration public int HotKeyPos { get; set; } Property Value Type Description System.Int32 HotKeySpecifier The specifier character for the hotkey (e.g. '_'). Set to '\\xffff' to disable hotkey support for this View instance. The default is '\\xffff'. Declaration public Rune HotKeySpecifier { get; set; } Property Value Type Description System.Rune HotKeyTagMask Specifies the mask to apply to the hotkey to tag it as the hotkey. The default value of 0x100000 causes the underlying Rune to be identified as a \"private use\" Unicode character. Declaration public uint HotKeyTagMask { get; set; } Property Value Type Description System.UInt32 Lines Gets the formatted lines. Declaration public List Lines { get; } Property Value Type Description System.Collections.Generic.List < NStack.ustring > Remarks Upon a 'get' of this property, if the text needs to be formatted (if NeedsFormat is true ) Format(ustring, Int32, TextAlignment, Boolean) will be called internally. NeedsFormat Gets or sets whether the TextFormatter needs to format the text when Draw(Rect, Attribute, Attribute) is called. If it is false when Draw is called, the Draw call will be faster. Declaration public bool NeedsFormat { get; set; } Property Value Type Description System.Boolean Remarks This is set to true when the properties of TextFormatter are set. Size Gets or sets the size of the area the text will be constrainted to when formatted. Declaration public Size Size { get; set; } Property Value Type Description Size Text The text to be displayed. This text is never modified. Declaration public virtual ustring Text { get; set; } Property Value Type Description NStack.ustring Methods CalcRect(Int32, Int32, ustring) Calculates the rectangle requried to hold text, assuming no word wrapping. Declaration public static Rect CalcRect(int x, int y, ustring text) Parameters Type Name Description System.Int32 x The x location of the rectangle System.Int32 y The y location of the rectangle NStack.ustring text The text to measure Returns Type Description Rect ClipAndJustify(ustring, Int32, TextAlignment) Justifies text within a specified width. Declaration public static ustring ClipAndJustify(ustring text, int width, TextAlignment talign) Parameters Type Name Description NStack.ustring text The text to justify. System.Int32 width If the text length is greater that width it will be clipped. TextAlignment talign Alignment. Returns Type Description NStack.ustring Justified and clipped text. Draw(Rect, Attribute, Attribute) Draws the text held by TextFormatter to Driver using the colors specified. Declaration public void Draw(Rect bounds, Attribute normalColor, Attribute hotColor) Parameters Type Name Description Rect bounds Specifies the screen-relative location and maximum size for drawing the text. Attribute normalColor The color to use for all text except the hotkey Attribute hotColor The color to use to draw the hotkey FindHotKey(ustring, Rune, Boolean, out Int32, out Key) Finds the hotkey and its location in text. Declaration public static bool FindHotKey(ustring text, Rune hotKeySpecifier, bool firstUpperCase, out int hotPos, out Key hotKey) Parameters Type Name Description NStack.ustring text The text to look in. System.Rune hotKeySpecifier The hotkey specifier (e.g. '_') to look for. System.Boolean firstUpperCase If true the legacy behavior of identifying the first upper case character as the hotkey will be eanbled. Regardless of the value of this parameter, hotKeySpecifier takes precidence. System.Int32 hotPos Outputs the Rune index into text . Key hotKey Outputs the hotKey. Returns Type Description System.Boolean true if a hotkey was found; false otherwise. Format(ustring, Int32, TextAlignment, Boolean) Reformats text into lines, applying text alignment and optionally wrapping text to new lines on word boundaries. Declaration public static List Format(ustring text, int width, TextAlignment talign, bool wordWrap) Parameters Type Name Description NStack.ustring text System.Int32 width The width to bound the text to for word wrapping and clipping. TextAlignment talign Specifies how the text will be aligned horizontally. System.Boolean wordWrap If true , the text will be wrapped to new lines as need. If false , forces text to fit a single line. Line breaks are converted to spaces. The text will be clipped to width Returns Type Description System.Collections.Generic.List < NStack.ustring > A list of word wrapped lines. Remarks An empty text string will result in one empty line. If width is 0, a single, empty line will be returned. If width is int.MaxValue, the text will be formatted to the maximum width possible. Justify(ustring, Int32, Char) Justifies the text to fill the width provided. Space will be added between words (demarked by spaces and tabs) to make the text just fit width . Spaces will not be added to the ends. Declaration public static ustring Justify(ustring text, int width, char spaceChar = ' ') Parameters Type Name Description NStack.ustring text System.Int32 width System.Char spaceChar Character to replace whitespace and pad with. For debugging purposes. Returns Type Description NStack.ustring The justifed text. MaxLines(ustring, Int32) Computes the number of lines needed to render the specified text given the width. Declaration public static int MaxLines(ustring text, int width) Parameters Type Name Description NStack.ustring text Text, may contain newlines. System.Int32 width The minimum width for the text. Returns Type Description System.Int32 Number of lines. MaxWidth(ustring, Int32) Computes the maximum width needed to render the text (single line or multple lines) given a minimium width. Declaration public static int MaxWidth(ustring text, int width) Parameters Type Name Description NStack.ustring text Text, may contain newlines. System.Int32 width The minimum width for the text. Returns Type Description System.Int32 Max width of lines. RemoveHotKeySpecifier(ustring, Int32, Rune) Removes the hotkey specifier from text. Declaration public static ustring RemoveHotKeySpecifier(ustring text, int hotPos, Rune hotKeySpecifier) Parameters Type Name Description NStack.ustring text The text to manipulate. System.Int32 hotPos Returns the postion of the hot-key in the text. -1 if not found. System.Rune hotKeySpecifier The hot-key specifier (e.g. '_') to look for. Returns Type Description NStack.ustring The input text with the hotkey specifier ('_') removed. ReplaceHotKeyWithTag(ustring, Int32) Replaces the Rune at the index specfiied by the hotPos parameter with a tag identifying it as the hotkey. Declaration public ustring ReplaceHotKeyWithTag(ustring text, int hotPos) Parameters Type Name Description NStack.ustring text The text to tag the hotkey in. System.Int32 hotPos The Rune index of the hotkey in text . Returns Type Description NStack.ustring The text with the hotkey tagged. Remarks The returned string will not render correctly without first un-doing the tag. To undo the tag, search for Runes with a bitmask of otKeyTagMask and remove that bitmask. WordWrap(ustring, Int32) Formats the provided text to fit within the width provided using word wrapping. Declaration public static List WordWrap(ustring text, int width) Parameters Type Name Description NStack.ustring text The text to word wrap System.Int32 width The width to contrain the text to Returns Type Description System.Collections.Generic.List < NStack.ustring > Returns a list of word wrapped lines. Remarks This method does not do any justification. This method strips Newline ('\\n' and '\\r\\n') sequences before processing." + "keywords": "Class TextFormatter Provides text formatting capabilities for console apps. Supports, hotkeys, horizontal alignment, multille lines, and word-based line wrap. Inheritance System.Object TextFormatter 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 TextFormatter Properties Alignment Controls the horizontal text-alignment property. Declaration public TextAlignment Alignment { get; set; } Property Value Type Description TextAlignment The text alignment. HotKey Gets the hotkey. Will be an upper case letter or digit. Declaration public Key HotKey { get; } Property Value Type Description Key HotKeyPos The position in the text of the hotkey. The hotkey will be rendered using the hot color. Declaration public int HotKeyPos { get; set; } Property Value Type Description System.Int32 HotKeySpecifier The specifier character for the hotkey (e.g. '_'). Set to '\\xffff' to disable hotkey support for this View instance. The default is '\\xffff'. Declaration public Rune HotKeySpecifier { get; set; } Property Value Type Description System.Rune HotKeyTagMask Specifies the mask to apply to the hotkey to tag it as the hotkey. The default value of 0x100000 causes the underlying Rune to be identified as a \"private use\" Unicode character. Declaration public uint HotKeyTagMask { get; set; } Property Value Type Description System.UInt32 Lines Gets the formatted lines. Declaration public List Lines { get; } Property Value Type Description System.Collections.Generic.List < NStack.ustring > Remarks Upon a 'get' of this property, if the text needs to be formatted (if NeedsFormat is true ) Format(ustring, Int32, TextAlignment, Boolean) will be called internally. NeedsFormat Gets or sets whether the TextFormatter needs to format the text when Draw(Rect, Attribute, Attribute) is called. If it is false when Draw is called, the Draw call will be faster. Declaration public bool NeedsFormat { get; set; } Property Value Type Description System.Boolean Remarks This is set to true when the properties of TextFormatter are set. Size Gets or sets the size of the area the text will be constrainted to when formatted. Declaration public Size Size { get; set; } Property Value Type Description Size Text The text to be displayed. This text is never modified. Declaration public virtual ustring Text { get; set; } Property Value Type Description NStack.ustring Methods CalcRect(Int32, Int32, ustring) Calculates the rectangle required to hold text, assuming no word wrapping. Declaration public static Rect CalcRect(int x, int y, ustring text) Parameters Type Name Description System.Int32 x The x location of the rectangle System.Int32 y The y location of the rectangle NStack.ustring text The text to measure Returns Type Description Rect ClipAndJustify(ustring, Int32, TextAlignment) Justifies text within a specified width. Declaration public static ustring ClipAndJustify(ustring text, int width, TextAlignment talign) Parameters Type Name Description NStack.ustring text The text to justify. System.Int32 width If the text length is greater that width it will be clipped. TextAlignment talign Alignment. Returns Type Description NStack.ustring Justified and clipped text. Draw(Rect, Attribute, Attribute) Draws the text held by TextFormatter to Driver using the colors specified. Declaration public void Draw(Rect bounds, Attribute normalColor, Attribute hotColor) Parameters Type Name Description Rect bounds Specifies the screen-relative location and maximum size for drawing the text. Attribute normalColor The color to use for all text except the hotkey Attribute hotColor The color to use to draw the hotkey FindHotKey(ustring, Rune, Boolean, out Int32, out Key) Finds the hotkey and its location in text. Declaration public static bool FindHotKey(ustring text, Rune hotKeySpecifier, bool firstUpperCase, out int hotPos, out Key hotKey) Parameters Type Name Description NStack.ustring text The text to look in. System.Rune hotKeySpecifier The hotkey specifier (e.g. '_') to look for. System.Boolean firstUpperCase If true the legacy behavior of identifying the first upper case character as the hotkey will be eanbled. Regardless of the value of this parameter, hotKeySpecifier takes precidence. System.Int32 hotPos Outputs the Rune index into text . Key hotKey Outputs the hotKey. Returns Type Description System.Boolean true if a hotkey was found; false otherwise. Format(ustring, Int32, TextAlignment, Boolean) Reformats text into lines, applying text alignment and optionally wrapping text to new lines on word boundaries. Declaration public static List Format(ustring text, int width, TextAlignment talign, bool wordWrap) Parameters Type Name Description NStack.ustring text System.Int32 width The width to bound the text to for word wrapping and clipping. TextAlignment talign Specifies how the text will be aligned horizontally. System.Boolean wordWrap If true , the text will be wrapped to new lines as need. If false , forces text to fit a single line. Line breaks are converted to spaces. The text will be clipped to width Returns Type Description System.Collections.Generic.List < NStack.ustring > A list of word wrapped lines. Remarks An empty text string will result in one empty line. If width is 0, a single, empty line will be returned. If width is int.MaxValue, the text will be formatted to the maximum width possible. Justify(ustring, Int32, Char) Justifies the text to fill the width provided. Space will be added between words (demarked by spaces and tabs) to make the text just fit width . Spaces will not be added to the ends. Declaration public static ustring Justify(ustring text, int width, char spaceChar = ' ') Parameters Type Name Description NStack.ustring text System.Int32 width System.Char spaceChar Character to replace whitespace and pad with. For debugging purposes. Returns Type Description NStack.ustring The justifed text. MaxLines(ustring, Int32) Computes the number of lines needed to render the specified text given the width. Declaration public static int MaxLines(ustring text, int width) Parameters Type Name Description NStack.ustring text Text, may contain newlines. System.Int32 width The minimum width for the text. Returns Type Description System.Int32 Number of lines. MaxWidth(ustring, Int32) Computes the maximum width needed to render the text (single line or multple lines) given a minimum width. Declaration public static int MaxWidth(ustring text, int width) Parameters Type Name Description NStack.ustring text Text, may contain newlines. System.Int32 width The minimum width for the text. Returns Type Description System.Int32 Max width of lines. RemoveHotKeySpecifier(ustring, Int32, Rune) Removes the hotkey specifier from text. Declaration public static ustring RemoveHotKeySpecifier(ustring text, int hotPos, Rune hotKeySpecifier) Parameters Type Name Description NStack.ustring text The text to manipulate. System.Int32 hotPos Returns the position of the hot-key in the text. -1 if not found. System.Rune hotKeySpecifier The hot-key specifier (e.g. '_') to look for. Returns Type Description NStack.ustring The input text with the hotkey specifier ('_') removed. ReplaceHotKeyWithTag(ustring, Int32) Replaces the Rune at the index specfiied by the hotPos parameter with a tag identifying it as the hotkey. Declaration public ustring ReplaceHotKeyWithTag(ustring text, int hotPos) Parameters Type Name Description NStack.ustring text The text to tag the hotkey in. System.Int32 hotPos The Rune index of the hotkey in text . Returns Type Description NStack.ustring The text with the hotkey tagged. Remarks The returned string will not render correctly without first un-doing the tag. To undo the tag, search for Runes with a bitmask of otKeyTagMask and remove that bitmask. WordWrap(ustring, Int32) Formats the provided text to fit within the width provided using word wrapping. Declaration public static List WordWrap(ustring text, int width) Parameters Type Name Description NStack.ustring text The text to word wrap System.Int32 width The width to contrain the text to Returns Type Description System.Collections.Generic.List < NStack.ustring > Returns a list of word wrapped lines. Remarks This method does not do any justification. This method strips Newline ('\\n' and '\\r\\n') sequences before processing." }, "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.IDisposable System.Collections.IEnumerable System.ComponentModel.ISupportInitializeNotification System.ComponentModel.ISupportInitialize Inherited Members View.Added View.Removed View.Enter View.Leave View.MouseEnter View.MouseLeave View.MouseClick View.HotKey View.HotKeySpecifier View.Driver View.Subviews View.TabIndexes View.TabIndex View.TabStop 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.OnAdded(View) View.OnRemoved(View) View.OnEnter(View) View.OnLeave(View) 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.LayoutStarted View.LayoutComplete View.Initialized View.LayoutSubviews() View.TextAlignment View.IsInitialized View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) View.OnMouseEvent(MouseEvent) View.Dispose(Boolean) View.BeginInit() View.EndInit() 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 TextView : View, IDisposable, IEnumerable, ISupportInitializeNotification, ISupportInitialize 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 Fields TextChanged Raised when the Text of the TextView changes. Declaration public Action TextChanged Field Value Type Description System.Action Properties CanFocus Declaration public override bool CanFocus { get; set; } Property Value Type Description System.Boolean Overrides View.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 override ustring Text { get; set; } Property Value Type Description NStack.ustring Overrides View.Text 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 Implements System.IDisposable System.Collections.IEnumerable System.ComponentModel.ISupportInitializeNotification System.ComponentModel.ISupportInitialize" + "keywords": "Class TextView Multi-line text editing View Inheritance System.Object Responder View TextView Implements System.IDisposable System.Collections.IEnumerable System.ComponentModel.ISupportInitializeNotification System.ComponentModel.ISupportInitialize Inherited Members View.Added View.Removed View.Enter View.Leave View.MouseEnter View.MouseLeave View.MouseClick View.HotKey View.HotKeySpecifier View.Driver View.Subviews View.TabIndexes View.TabIndex View.TabStop 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.OnAdded(View) View.OnRemoved(View) View.OnEnter(View) View.OnLeave(View) 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.LayoutStarted View.LayoutComplete View.Initialized View.LayoutSubviews() View.TextAlignment View.IsInitialized View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) View.OnMouseEvent(MouseEvent) View.Dispose(Boolean) View.BeginInit() View.EndInit() 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 TextView : View, IDisposable, IEnumerable, ISupportInitializeNotification, ISupportInitialize 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() Initializes a TextView on the specified area, with dimensions controlled with the X, Y, Width and Height properties. Declaration public TextView() TextView(Rect) Initializes a TextView on the specified area, with absolute position and size. Declaration public TextView(Rect frame) Parameters Type Name Description Rect frame Remarks Fields TextChanged Raised when the Text of the TextView changes. Declaration public Action TextChanged Field Value Type Description System.Action Properties CanFocus Declaration public override bool CanFocus { get; set; } Property Value Type Description System.Boolean Overrides View.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 override ustring Text { get; set; } Property Value Type Description NStack.ustring Overrides View.Text 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 Implements System.IDisposable System.Collections.IEnumerable System.ComponentModel.ISupportInitializeNotification System.ComponentModel.ISupportInitialize" }, "api/Terminal.Gui/Terminal.Gui.TimeField.html": { "href": "api/Terminal.Gui/Terminal.Gui.TimeField.html", @@ -317,7 +317,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.IDisposable System.Collections.IEnumerable System.ComponentModel.ISupportInitializeNotification System.ComponentModel.ISupportInitialize Inherited Members Responder.MouseEvent(MouseEvent) 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 View : Responder, IDisposable, IEnumerable, ISupportInitializeNotification, ISupportInitialize 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 View using Computed layout. Declaration public View() Remarks Use X , Y , Width , and Height properties to dynamically control the size and location of the view. The Label will be created using Computed coordinates. The initial size ( Frame will be adjusted to fit the contents of Text , including newlines ('\\n') for multiple lines. If Height is greater than one, word wrapping is provided. 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. View(ustring) Initializes a new instance of View using Computed layout. Declaration public View(ustring text) Parameters Type Name Description NStack.ustring text text to initialize the Text property with. Remarks The View will be created using Computed coordinates with the given string. The initial size ( Frame will be adjusted to fit the contents of Text , including newlines ('\\n') for multiple lines. If Height is greater than one, word wrapping is provided. View(Int32, Int32, ustring) Initializes a new instance of View using Absolute layout. Declaration public View(int x, int y, ustring text) Parameters Type Name Description System.Int32 x column to locate the Label. System.Int32 y row to locate the Label. NStack.ustring text text to initialize the Text property with. Remarks The View will be created at the given coordinates with the given string. The size ( Frame will be adjusted to fit the contents of Text , including newlines ('\\n') for multiple lines. No line wrapping is provided. 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 View(Rect, ustring) Initializes a new instance of View using Absolute layout. Declaration public View(Rect rect, ustring text) Parameters Type Name Description Rect rect Location. NStack.ustring text text to initialize the Text property with. Remarks The View will be created at the given coordinates with the given string. The initial size ( Frame will be adjusted to fit the contents of Text , including newlines ('\\n') for multiple lines. If rect.Height is greater than one, word wrapping is provided. Fields Added Event fired when a subview is being added to this view. Declaration public Action Added Field Value Type Description System.Action < View > DrawContent Event invoked when the content area of the View is to be drawn. Declaration public Action DrawContent Field Value Type Description System.Action < 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 Action Enter Field Value Type Description System.Action < View.FocusEventArgs > KeyDown Invoked when a key is pressed Declaration public Action KeyDown Field Value Type Description System.Action < View.KeyEventEventArgs > KeyPress Invoked when a character key is pressed and occurs after the key up event. Declaration public Action KeyPress Field Value Type Description System.Action < View.KeyEventEventArgs > KeyUp Invoked when a key is released Declaration public Action KeyUp Field Value Type Description System.Action < View.KeyEventEventArgs > LayoutComplete Fired after the Views's LayoutSubviews() method has completed. Declaration public Action LayoutComplete Field Value Type Description System.Action < View.LayoutEventArgs > Remarks Subscribe to this event to perform tasks when the View has been resized or the layout has otherwise changed. LayoutStarted Fired after the Views's LayoutSubviews() method has completed. Declaration public Action LayoutStarted Field Value Type Description System.Action < 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 Action Leave Field Value Type Description System.Action < View.FocusEventArgs > MouseClick Event fired when a mouse event is generated. Declaration public Action MouseClick Field Value Type Description System.Action < View.MouseEventArgs > MouseEnter Event fired when the view receives the mouse event for the first time. Declaration public Action MouseEnter Field Value Type Description System.Action < View.MouseEventArgs > MouseLeave Event fired when the view receives a mouse event for the last time. Declaration public Action MouseLeave Field Value Type Description System.Action < View.MouseEventArgs > Removed Event fired when a subview is being removed from this view. Declaration public Action Removed Field Value Type Description System.Action < View > 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. CanFocus Declaration public override bool CanFocus { get; set; } Property Value Type Description System.Boolean Overrides Responder.CanFocus 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. HotKey Gets or sets the HotKey defined for this view. A user pressing HotKey on the keyboard while this view has focus will cause the Clicked event to fire. Declaration public Key HotKey { get; set; } Property Value Type Description Key HotKeySpecifier Gets or sets the specifier character for the hotkey (e.g. '_'). Set to '\\xffff' to disable hotkey support for this View instance. The default is '\\xffff'. Declaration public Rune HotKeySpecifier { get; set; } Property Value Type Description System.Rune 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 IsInitialized Get or sets if the View was already initialized. This derived from System.ComponentModel.ISupportInitializeNotification to allow notify all the views that are being initialized. Declaration public bool IsInitialized { get; set; } 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. TabIndex Indicates the index of the current View from the TabIndexes list. Declaration public int TabIndex { get; set; } Property Value Type Description System.Int32 TabIndexes This returns a tab index list of the subviews contained by this view. Declaration public IList TabIndexes { get; } Property Value Type Description System.Collections.Generic.IList < View > The tabIndexes. TabStop This only be true if the CanFocus is also true and the focus can be avoided by setting this to false Declaration public bool TabStop { get; set; } Property Value Type Description System.Boolean Text The text displayed by the View . Declaration public virtual ustring Text { get; set; } Property Value Type Description NStack.ustring Remarks If provided, the text will be drawn before any subviews are drawn. The text will be drawn starting at the view origin (0, 0) and will be formatted according to the TextAlignment property. If the view's height is greater than 1, the text will word-wrap to additional lines if it does not fit horizontally. If the view's height is 1, the text will be clipped. Set the HotKeySpecifier to enable hotkey support. To disable hotkey support set HotKeySpecifier to (Rune)0xffff . TextAlignment Gets or sets how the View's Text is aligned horizontally when drawn. Changing this property will redisplay the View . Declaration public virtual TextAlignment TextAlignment { get; set; } Property Value Type Description TextAlignment The text alignment. 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. BeginInit() This derived from System.ComponentModel.ISupportInitializeNotification to allow notify all the views that are beginning initialized. Declaration public void BeginInit() 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. Dispose(Boolean) Declaration protected override void Dispose(bool disposing) Parameters Type Name Description System.Boolean disposing Overrides Responder.Dispose(Boolean) 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 hotkey specifier 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 the hotkey specifier, which is the underscore ('_') character by default. The hotkey specifier can be changed via HotKeySpecifier EndInit() This derived from System.ComponentModel.ISupportInitializeNotification to allow notify all the views that are ending initialized. Declaration public void EndInit() 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. System.Int32 row Row. OnAdded(View) Method invoked when a subview is being added to this view. Declaration public virtual void OnAdded(View view) Parameters Type Name Description View view The subview being added. 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(View) Declaration public override bool OnEnter(View view) Parameters Type Name Description View view Returns Type Description System.Boolean Overrides Responder.OnEnter(View) 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(View) Declaration public override bool OnLeave(View view) Parameters Type Name Description View view Returns Type Description System.Boolean Overrides Responder.OnLeave(View) 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) OnRemoved(View) Method invoked when a subview is being removed from this view. Declaration public virtual void OnRemoved(View view) Parameters Type Name Description View view The subview being removed. 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 Initialized Event called only once when the View is being initialized for the first time. Allows configurations and assignments to be performed before the View being shown. This derived from System.ComponentModel.ISupportInitializeNotification to allow notify all the views that are being initialized. Declaration public event EventHandler Initialized Event Type Type Description System.EventHandler Implements System.IDisposable System.Collections.IEnumerable System.ComponentModel.ISupportInitializeNotification System.ComponentModel.ISupportInitialize" + "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.IDisposable System.Collections.IEnumerable System.ComponentModel.ISupportInitializeNotification System.ComponentModel.ISupportInitialize Inherited Members Responder.MouseEvent(MouseEvent) 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 View : Responder, IDisposable, IEnumerable, ISupportInitializeNotification, ISupportInitialize 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 coordinates 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 View using Computed layout. Declaration public View() Remarks Use X , Y , Width , and Height properties to dynamically control the size and location of the view. The Label will be created using Computed coordinates. The initial size ( Frame will be adjusted to fit the contents of Text , including newlines ('\\n') for multiple lines. If Height is greater than one, word wrapping is provided. 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. View(ustring) Initializes a new instance of View using Computed layout. Declaration public View(ustring text) Parameters Type Name Description NStack.ustring text text to initialize the Text property with. Remarks The View will be created using Computed coordinates with the given string. The initial size ( Frame will be adjusted to fit the contents of Text , including newlines ('\\n') for multiple lines. If Height is greater than one, word wrapping is provided. View(Int32, Int32, ustring) Initializes a new instance of View using Absolute layout. Declaration public View(int x, int y, ustring text) Parameters Type Name Description System.Int32 x column to locate the Label. System.Int32 y row to locate the Label. NStack.ustring text text to initialize the Text property with. Remarks The View will be created at the given coordinates with the given string. The size ( Frame will be adjusted to fit the contents of Text , including newlines ('\\n') for multiple lines. No line wrapping is provided. 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 View(Rect, ustring) Initializes a new instance of View using Absolute layout. Declaration public View(Rect rect, ustring text) Parameters Type Name Description Rect rect Location. NStack.ustring text text to initialize the Text property with. Remarks The View will be created at the given coordinates with the given string. The initial size ( Frame will be adjusted to fit the contents of Text , including newlines ('\\n') for multiple lines. If rect.Height is greater than one, word wrapping is provided. Fields Added Event fired when a subview is being added to this view. Declaration public Action Added Field Value Type Description System.Action < View > DrawContent Event invoked when the content area of the View is to be drawn. Declaration public Action DrawContent Field Value Type Description System.Action < 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 Action Enter Field Value Type Description System.Action < View.FocusEventArgs > KeyDown Invoked when a key is pressed Declaration public Action KeyDown Field Value Type Description System.Action < View.KeyEventEventArgs > KeyPress Invoked when a character key is pressed and occurs after the key up event. Declaration public Action KeyPress Field Value Type Description System.Action < View.KeyEventEventArgs > KeyUp Invoked when a key is released Declaration public Action KeyUp Field Value Type Description System.Action < View.KeyEventEventArgs > LayoutComplete Fired after the Views's LayoutSubviews() method has completed. Declaration public Action LayoutComplete Field Value Type Description System.Action < View.LayoutEventArgs > Remarks Subscribe to this event to perform tasks when the View has been resized or the layout has otherwise changed. LayoutStarted Fired after the Views's LayoutSubviews() method has completed. Declaration public Action LayoutStarted Field Value Type Description System.Action < 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 Action Leave Field Value Type Description System.Action < View.FocusEventArgs > MouseClick Event fired when a mouse event is generated. Declaration public Action MouseClick Field Value Type Description System.Action < View.MouseEventArgs > MouseEnter Event fired when the view receives the mouse event for the first time. Declaration public Action MouseEnter Field Value Type Description System.Action < View.MouseEventArgs > MouseLeave Event fired when the view receives a mouse event for the last time. Declaration public Action MouseLeave Field Value Type Description System.Action < View.MouseEventArgs > Removed Event fired when a subview is being removed from this view. Declaration public Action Removed Field Value Type Description System.Action < View > 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. CanFocus Declaration public override bool CanFocus { get; set; } Property Value Type Description System.Boolean Overrides Responder.CanFocus 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. HotKey Gets or sets the HotKey defined for this view. A user pressing HotKey on the keyboard while this view has focus will cause the Clicked event to fire. Declaration public Key HotKey { get; set; } Property Value Type Description Key HotKeySpecifier Gets or sets the specifier character for the hotkey (e.g. '_'). Set to '\\xffff' to disable hotkey support for this View instance. The default is '\\xffff'. Declaration public Rune HotKeySpecifier { get; set; } Property Value Type Description System.Rune 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 IsInitialized Get or sets if the View was already initialized. This derived from System.ComponentModel.ISupportInitializeNotification to allow notify all the views that are being initialized. Declaration public bool IsInitialized { get; set; } 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. TabIndex Indicates the index of the current View from the TabIndexes list. Declaration public int TabIndex { get; set; } Property Value Type Description System.Int32 TabIndexes This returns a tab index list of the subviews contained by this view. Declaration public IList TabIndexes { get; } Property Value Type Description System.Collections.Generic.IList < View > The tabIndexes. TabStop This only be true if the CanFocus is also true and the focus can be avoided by setting this to false Declaration public bool TabStop { get; set; } Property Value Type Description System.Boolean Text The text displayed by the View . Declaration public virtual ustring Text { get; set; } Property Value Type Description NStack.ustring Remarks If provided, the text will be drawn before any subviews are drawn. The text will be drawn starting at the view origin (0, 0) and will be formatted according to the TextAlignment property. If the view's height is greater than 1, the text will word-wrap to additional lines if it does not fit horizontally. If the view's height is 1, the text will be clipped. Set the HotKeySpecifier to enable hotkey support. To disable hotkey support set HotKeySpecifier to (Rune)0xffff . TextAlignment Gets or sets how the View's Text is aligned horizontally when drawn. Changing this property will redisplay the View . Declaration public virtual TextAlignment TextAlignment { get; set; } Property Value Type Description TextAlignment The text alignment. 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. BeginInit() This derived from System.ComponentModel.ISupportInitializeNotification to allow notify all the views that are beginning initialized. Declaration public void BeginInit() 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. Dispose(Boolean) Declaration protected override void Dispose(bool disposing) Parameters Type Name Description System.Boolean disposing Overrides Responder.Dispose(Boolean) 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 hotkey specifier 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 the hotkey specifier, which is the underscore ('_') character by default. The hotkey specifier can be changed via HotKeySpecifier EndInit() This derived from System.ComponentModel.ISupportInitializeNotification to allow notify all the views that are ending initialized. Declaration public void EndInit() 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. System.Int32 row Row. OnAdded(View) Method invoked when a subview is being added to this view. Declaration public virtual void OnAdded(View view) Parameters Type Name Description View view The subview being added. 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(View) Declaration public override bool OnEnter(View view) Parameters Type Name Description View view Returns Type Description System.Boolean Overrides Responder.OnEnter(View) 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(View) Declaration public override bool OnLeave(View view) Parameters Type Name Description View view Returns Type Description System.Boolean Overrides Responder.OnLeave(View) 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) OnRemoved(View) Method invoked when a subview is being removed from this view. Declaration public virtual void OnRemoved(View view) Parameters Type Name Description View view The subview being removed. 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 coglobally 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 Initialized Event called only once when the View is being initialized for the first time. Allows configurations and assignments to be performed before the View being shown. This derived from System.ComponentModel.ISupportInitializeNotification to allow notify all the views that are being initialized. Declaration public event EventHandler Initialized Event Type Type Description System.EventHandler Implements System.IDisposable System.Collections.IEnumerable System.ComponentModel.ISupportInitializeNotification System.ComponentModel.ISupportInitialize" }, "api/Terminal.Gui/Terminal.Gui.View.KeyEventEventArgs.html": { "href": "api/Terminal.Gui/Terminal.Gui.View.KeyEventEventArgs.html", @@ -337,7 +337,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.IDisposable System.ComponentModel.ISupportInitializeNotification System.ComponentModel.ISupportInitialize System.Collections.IEnumerable Inherited Members Toplevel.Running Toplevel.Ready Toplevel.Create() Toplevel.CanFocus Toplevel.Modal Toplevel.MenuBar Toplevel.StatusBar Toplevel.OnKeyDown(KeyEvent) Toplevel.OnKeyUp(KeyEvent) Toplevel.ProcessKey(KeyEvent) Toplevel.WillPresent() View.Added View.Removed View.Enter View.Leave View.MouseEnter View.MouseLeave View.MouseClick View.HotKey View.HotKeySpecifier View.Driver View.Subviews View.TabIndexes View.TabIndex View.TabStop 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.OnAdded(View) View.OnRemoved(View) View.OnEnter(View) View.OnLeave(View) 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.KeyUp View.EnsureFocus() View.FocusFirst() View.FocusLast() View.FocusPrev() View.FocusNext() View.LayoutStarted View.LayoutComplete View.Initialized View.LayoutSubviews() View.IsInitialized View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) View.OnMouseEvent(MouseEvent) View.Dispose(Boolean) View.BeginInit() View.EndInit() 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 Window : Toplevel, IDisposable, ISupportInitializeNotification, ISupportInitialize, 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() Initializes a new instance of the Window class using Computed positioning. Declaration public Window() Window(ustring) Initializes a new instance of the Window class with an optional title using Computed positioning. 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 using Absolute positioning with the specified frame for its location, with the specified frame padding, 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 using Absolute positioning with the specified frame for its location, with the specified frame padding, 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 Text The text displayed by the Label . Declaration public override ustring Text { get; set; } Property Value Type Description NStack.ustring Overrides View.Text TextAlignment Controls the text-alignment property of the label, changing it will redisplay the Label . Declaration public override TextAlignment TextAlignment { get; set; } Property Value Type Description TextAlignment The text alignment. Overrides View.TextAlignment 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.IDisposable System.ComponentModel.ISupportInitializeNotification System.ComponentModel.ISupportInitialize 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.IDisposable System.ComponentModel.ISupportInitializeNotification System.ComponentModel.ISupportInitialize System.Collections.IEnumerable Inherited Members Toplevel.Running Toplevel.Ready Toplevel.Create() Toplevel.CanFocus Toplevel.Modal Toplevel.MenuBar Toplevel.StatusBar Toplevel.OnKeyDown(KeyEvent) Toplevel.OnKeyUp(KeyEvent) Toplevel.ProcessKey(KeyEvent) Toplevel.WillPresent() View.Added View.Removed View.Enter View.Leave View.MouseEnter View.MouseLeave View.MouseClick View.HotKey View.HotKeySpecifier View.Driver View.Subviews View.TabIndexes View.TabIndex View.TabStop 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.OnAdded(View) View.OnRemoved(View) View.OnEnter(View) View.OnLeave(View) 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.KeyUp View.EnsureFocus() View.FocusFirst() View.FocusLast() View.FocusPrev() View.FocusNext() View.LayoutStarted View.LayoutComplete View.Initialized View.LayoutSubviews() View.IsInitialized View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) View.OnMouseEvent(MouseEvent) View.Dispose(Boolean) View.BeginInit() View.EndInit() 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 Window : Toplevel, IDisposable, ISupportInitializeNotification, ISupportInitialize, 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() Initializes a new instance of the Window class using Computed positioning. Declaration public Window() Window(ustring) Initializes a new instance of the Window class with an optional title using Computed positioning. 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 using Absolute positioning with the specified frame for its location, with the specified frame padding, 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-relative 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 using Absolute positioning with the specified frame for its location, with the specified frame padding, and an optional title. Declaration public Window(Rect frame, ustring title = null, int padding = 0) Parameters Type Name Description Rect frame Superview-relative 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 Text The text displayed by the Label . Declaration public override ustring Text { get; set; } Property Value Type Description NStack.ustring Overrides View.Text TextAlignment Controls the text-alignment property of the label, changing it will redisplay the Label . Declaration public override TextAlignment TextAlignment { get; set; } Property Value Type Description TextAlignment The text alignment. Overrides View.TextAlignment 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.IDisposable System.ComponentModel.ISupportInitializeNotification System.ComponentModel.ISupportInitialize System.Collections.IEnumerable" }, "api/Terminal.Gui/Unix.Terminal.Curses.Event.html": { "href": "api/Terminal.Gui/Unix.Terminal.Curses.Event.html", @@ -372,12 +372,12 @@ "api/UICatalog/UICatalog.Scenario.html": { "href": "api/UICatalog/UICatalog.Scenario.html", "title": "Class Scenario", - "keywords": "Class Scenario Base class for each demo/scenario. To define a new scenario: Create a new .cs file in the Scenarios directory that derives from Scenario . Annotate the Scenario derived class with a attribute specifying the scenario's name and description. Add one or more Scenario.ScenarioCategory attributes to the class specifying which categories the sceanrio belongs to. If you don't specify a category the sceanrio will show up in \"All\". Implement the Setup() override which will be called when a user selects the scenario to run. Optionally, implement the and/or Run() overrides to provide a custom implementation. The UI Catalog program uses reflection to find all scenarios and adds them to the ListViews. Press ENTER to run the selected scenario. Press CTRL-Q to exit it. / Inheritance System.Object Scenario Namespace : UICatalog Assembly : UICatalog.dll Syntax public class Scenario : IDisposable Examples The example below is provided in the Scenarios directory as a generic sample that can be copied and re-named: using Terminal.Gui; namespace UICatalog { [ScenarioMetadata (Name: \"Generic\", Description: \"Generic sample - A template for creating new Scenarios\")] [ScenarioCategory (\"Controls\")] class MyScenario : Scenario { public override void Setup () { // Put your scenario code here, e.g. Win.Add (new Button (\"Press me!\") { X = Pos.Center (), Y = Pos.Center (), Clicked = () => MessageBox.Query (20, 7, \"Hi\", \"Neat?\", \"Yes\", \"No\") }); } } } Properties Top The Top level for the Scenario . This should be set to Top in most cases. Declaration public Toplevel Top { get; set; } Property Value Type Description Toplevel Win The Window for the Scenario . This should be set within the Top in most cases. Declaration public Window Win { get; set; } Property Value Type Description Window Methods Dispose() Declaration public void Dispose() Dispose(Boolean) Declaration protected virtual void Dispose(bool disposing) Parameters Type Name Description System.Boolean disposing GetCategories() Helper function to get the list of categories a Scenario belongs to (defined in Scenario.ScenarioCategory ) Declaration public List GetCategories() Returns Type Description List < System.String > list of catagory names GetDerivedClasses() Returns an instance of each Scenario defined in the project. https://stackoverflow.com/questions/5411694/get-all-inherited-classes-of-an-abstract-class Declaration public static List GetDerivedClasses() Returns Type Description List < Type > Type Parameters Name Description T GetDescription() Helper to get the Scenario Description (defined in Scenario.ScenarioMetadata ) Declaration public string GetDescription() Returns Type Description System.String GetName() Helper to get the Scenario Name (defined in Scenario.ScenarioMetadata ) Declaration public string GetName() Returns Type Description System.String Init(Toplevel, ColorScheme) Helper that provides the default Window implementation with a frame and label showing the name of the Scenario and logic to exit back to the Scenario picker UI. Override to provide any Toplevel behavior needed. Declaration public virtual void Init(Toplevel top, ColorScheme colorScheme) Parameters Type Name Description Toplevel top The Toplevel created by the UI Catalog host. ColorScheme colorScheme The colorscheme to use. Remarks Thg base implementation calls Init(ConsoleDriver, IMainLoopDriver) , sets Top to the passed in Toplevel , creates a Window for Win and adds it to Top . Overrides that do not call the base. Run() , must call Init(ConsoleDriver, IMainLoopDriver) before creating any views or calling other Terminal.Gui APIs. RequestStop() Stops the scenario. Override to change shutdown behavior for the Scenario . Declaration public virtual void RequestStop() Run() Runs the Scenario . Override to start the Scenario using a Toplevel different than Top . Declaration public virtual void Run() Remarks Overrides that do not call the base. Run() , must call Shutdown(Boolean) before returning. Setup() Override this to implement the Scenario setup logic (create controls, etc...). Declaration public virtual void Setup() Remarks This is typically the best place to put scenario logic code. ToString() Declaration public override string ToString() Returns Type Description System.String" + "keywords": "Class Scenario Base class for each demo/scenario. To define a new scenario: Create a new .cs file in the Scenarios directory that derives from Scenario . Annotate the Scenario derived class with a attribute specifying the scenario's name and description. Add one or more Scenario.ScenarioCategory attributes to the class specifying which categories the sceanrio belongs to. If you don't specify a category the sceanrio will show up in \"All\". Implement the Setup() override which will be called when a user selects the scenario to run. Optionally, implement the and/or Run() overrides to provide a custom implementation. The UI Catalog program uses reflection to find all scenarios and adds them to the ListViews. Press ENTER to run the selected scenario. Press CTRL-Q to exit it. / Inheritance System.Object Scenario Namespace : UICatalog Assembly : UICatalog.dll Syntax public class Scenario : IDisposable Examples The example below is provided in the Scenarios directory as a generic sample that can be copied and re-named: using Terminal.Gui; namespace UICatalog { [ScenarioMetadata (Name: \"Generic\", Description: \"Generic sample - A template for creating new Scenarios\")] [ScenarioCategory (\"Controls\")] class MyScenario : Scenario { public override void Setup () { // Put your scenario code here, e.g. Win.Add (new Button (\"Press me!\") { X = Pos.Center (), Y = Pos.Center (), Clicked = () => MessageBox.Query (20, 7, \"Hi\", \"Neat?\", \"Yes\", \"No\") }); } } } Properties Top The Top level for the Scenario . This should be set to Top in most cases. Declaration public Toplevel Top { get; set; } Property Value Type Description Toplevel Win The Window for the Scenario . This should be set within the Top in most cases. Declaration public Window Win { get; set; } Property Value Type Description Window Methods Dispose() Declaration public void Dispose() Dispose(Boolean) Declaration protected virtual void Dispose(bool disposing) Parameters Type Name Description System.Boolean disposing GetCategories() Helper function to get the list of categories a Scenario belongs to (defined in Scenario.ScenarioCategory ) Declaration public List GetCategories() Returns Type Description List < System.String > list of category names GetDerivedClasses() Returns an instance of each Scenario defined in the project. https://stackoverflow.com/questions/5411694/get-all-inherited-classes-of-an-abstract-class Declaration public static List GetDerivedClasses() Returns Type Description List < Type > Type Parameters Name Description T GetDescription() Helper to get the Scenario Description (defined in Scenario.ScenarioMetadata ) Declaration public string GetDescription() Returns Type Description System.String GetName() Helper to get the Scenario Name (defined in Scenario.ScenarioMetadata ) Declaration public string GetName() Returns Type Description System.String Init(Toplevel, ColorScheme) Helper that provides the default Window implementation with a frame and label showing the name of the Scenario and logic to exit back to the Scenario picker UI. Override to provide any Toplevel behavior needed. Declaration public virtual void Init(Toplevel top, ColorScheme colorScheme) Parameters Type Name Description Toplevel top The Toplevel created by the UI Catalog host. ColorScheme colorScheme The colorscheme to use. Remarks Thg base implementation calls Init(ConsoleDriver, IMainLoopDriver) , sets Top to the passed in Toplevel , creates a Window for Win and adds it to Top . Overrides that do not call the base. Run() , must call Init(ConsoleDriver, IMainLoopDriver) before creating any views or calling other Terminal.Gui APIs. RequestStop() Stops the scenario. Override to change shutdown behavior for the Scenario . Declaration public virtual void RequestStop() Run() Runs the Scenario . Override to start the Scenario using a Toplevel different than Top . Declaration public virtual void Run() Remarks Overrides that do not call the base. Run() , must call Shutdown(Boolean) before returning. Setup() Override this to implement the Scenario setup logic (create controls, etc...). Declaration public virtual void Setup() Remarks This is typically the best place to put scenario logic code. ToString() Declaration public override string ToString() Returns Type Description System.String" }, "api/UICatalog/UICatalog.Scenario.ScenarioCategory.html": { "href": "api/UICatalog/UICatalog.Scenario.ScenarioCategory.html", "title": "Class Scenario.ScenarioCategory", - "keywords": "Class Scenario.ScenarioCategory Defines the category names used to catagorize a Scenario Inheritance System.Object Scenario.ScenarioCategory Namespace : UICatalog Assembly : UICatalog.dll Syntax public class ScenarioCategory : System.Attribute Constructors ScenarioCategory(String) Declaration public ScenarioCategory(string Name) Parameters Type Name Description System.String Name Properties Name Category Name Declaration public string Name { get; set; } Property Value Type Description System.String Methods GetCategories(Type) Static helper function to get the Scenario Categories given a Type Declaration public static List GetCategories(Type t) Parameters Type Name Description Type t Returns Type Description List < System.String > list of catagory names GetName(Type) Static helper function to get the Scenario Name given a Type Declaration public static string GetName(Type t) Parameters Type Name Description Type t Returns Type Description System.String Name of the catagory" + "keywords": "Class Scenario.ScenarioCategory Defines the category names used to catagorize a Scenario Inheritance System.Object Scenario.ScenarioCategory Namespace : UICatalog Assembly : UICatalog.dll Syntax public class ScenarioCategory : System.Attribute Constructors ScenarioCategory(String) Declaration public ScenarioCategory(string Name) Parameters Type Name Description System.String Name Properties Name Category Name Declaration public string Name { get; set; } Property Value Type Description System.String Methods GetCategories(Type) Static helper function to get the Scenario Categories given a Type Declaration public static List GetCategories(Type t) Parameters Type Name Description Type t Returns Type Description List < System.String > list of category names GetName(Type) Static helper function to get the Scenario Name given a Type Declaration public static string GetName(Type t) Parameters Type Name Description Type t Returns Type Description System.String Name of the category" }, "api/UICatalog/UICatalog.Scenario.ScenarioMetadata.html": { "href": "api/UICatalog/UICatalog.Scenario.ScenarioMetadata.html", diff --git a/docs/styles/docfx.js b/docs/styles/docfx.js index 7eeb0da80..6a0726e12 100644 --- a/docs/styles/docfx.js +++ b/docs/styles/docfx.js @@ -1053,7 +1053,7 @@ $(function () { function getAbsolutePath(href) { // Use anchor to normalize href var anchor = $('')[0]; - // Ignore protocal, remove search and query + // Ignore protocol, remove search and query return anchor.host + anchor.pathname; } diff --git a/docs/styles/lunr.js b/docs/styles/lunr.js index 35dae2fbf..6fbb453dd 100644 --- a/docs/styles/lunr.js +++ b/docs/styles/lunr.js @@ -2905,7 +2905,7 @@ lunr.QueryParser.parseBoost = function (parser) { } else if (typeof exports === 'object') { /** * Node. Does not work with strict CommonJS, but - * only CommonJS-like enviroments that support module.exports, + * only CommonJS-like environments that support module.exports, * like Node. */ module.exports = factory()