{ "api/Terminal.Gui/Terminal.Gui.Application.html": { "href": "api/Terminal.Gui/Terminal.Gui.Application.html", "title": "Class Application", "keywords": "Class Application The application driver for Terminal.Gui. Inheritance System.Object Application Inherited Members System.Object.Equals(System.Object) System.Object.Equals(System.Object, System.Object) System.Object.GetHashCode() System.Object.GetType() System.Object.MemberwiseClone() System.Object.ReferenceEquals(System.Object, System.Object) System.Object.ToString() Namespace : Terminal.Gui Assembly : Terminal.Gui.dll Syntax public static class Application Remarks You can hook up to the Iteration event to have your method invoked on each iteration of the MainLoop . Creates a instance of MainLoop to process input events, handle timers and other sources of data. It is accessible via the MainLoop property. When invoked sets the SynchronizationContext to one that is tied to the mainloop, allowing user code to use async/await. Fields Driver The current ConsoleDriver in use. Declaration public static ConsoleDriver Driver Field Value Type Description ConsoleDriver RootMouseEvent Merely a debugging aid to see the raw mouse events Declaration public static Action RootMouseEvent Field Value Type Description System.Action < MouseEvent > UseSystemConsole If set, it forces the use of the System.Console-based driver. Declaration public static bool UseSystemConsole Field Value Type Description System.Boolean Properties Current The current Toplevel object. This is updated when Run() enters and leaves to point to the current Toplevel . Declaration public static Toplevel Current { get; } Property Value Type Description Toplevel The current. CurrentView TThe current View object being redrawn. Declaration public static View CurrentView { get; set; } Property Value Type Description View The current. MainLoop The MainLoop driver for the applicaiton Declaration public static MainLoop MainLoop { get; } Property Value Type Description MainLoop The main loop. Top The Toplevel object used for the application on startup ( Top ) Declaration public static Toplevel Top { get; } Property Value Type Description Toplevel The top. Methods Begin(Toplevel) Building block API: Prepares the provided Toplevel for execution. Declaration public static Application.RunState Begin(Toplevel toplevel) Parameters Type Name Description Toplevel toplevel Toplevel to prepare execution for. Returns Type Description Application.RunState The runstate handle that needs to be passed to the End(Application.RunState, Boolean) method upon completion. Remarks This method prepares the provided toplevel for running with the focus, it adds this to the list of toplevels, sets up the mainloop to process the event, lays out the subviews, focuses the first element, and draws the toplevel in the screen. This is usually followed by executing the RunLoop(Application.RunState, Boolean) method, and then the End(Application.RunState, Boolean) method upon termination which will undo these changes. End(Application.RunState, Boolean) Building block API: completes the execution of a Toplevel that was started with Begin(Toplevel) . Declaration public static void End(Application.RunState runState, bool closeDriver = true) Parameters Type Name Description Application.RunState runState The runstate returned by the Begin(Toplevel) method. System.Boolean closeDriver true Closes the application. false Closes the toplevels only. GrabMouse(View) Grabs the mouse, forcing all mouse events to be routed to the specified view until UngrabMouse is called. Declaration public static void GrabMouse(View view) Parameters Type Name Description View view View that will receive all mouse events until UngrabMouse is invoked. Init() Initializes a new instance of Terminal.Gui Application. Declaration public static void Init() Remarks Call this method once per instance (or after Shutdown(Boolean) has been called). Loads the right ConsoleDriver for the platform. Creates a Toplevel and assigns it to Top and CurrentView MakeCenteredRect(Size) Returns a rectangle that is centered in the screen for the provided size. Declaration public static Rect MakeCenteredRect(Size size) Parameters Type Name Description Size size Size for the rectangle. Returns Type Description Rect The centered rect. Refresh() Triggers a refresh of the entire display. Declaration public static void Refresh() RequestStop() Stops running the most recent Toplevel . Declaration public static void RequestStop() Remarks This will cause Run() to return. Calling RequestStop() is equivalent to setting the Running property on the curently running Toplevel to false. Run() Runs the application by calling Run(Toplevel, Boolean) with the value of Top Declaration public static void Run() Run(Toplevel, Boolean) Runs the main loop on the given Toplevel container. Declaration public static void Run(Toplevel view, bool closeDriver = true) Parameters Type Name Description Toplevel view System.Boolean closeDriver Remarks This method is used to start processing events for the main application, but it is also used to run other modal View s such as Dialog boxes. To make a Run(Toplevel, Boolean) stop execution, call RequestStop() . Calling Run(Toplevel, Boolean) is equivalent to calling Begin(Toplevel) , followed by RunLoop(Application.RunState, Boolean) , and then calling End(Application.RunState, Boolean) . Alternatively, to have a program control the main loop and process events manually, call Begin(Toplevel) to set things up manually and then repeatedly call RunLoop(Application.RunState, Boolean) with the wait parameter set to false. By doing this the RunLoop(Application.RunState, Boolean) method will only process any pending events, timers, idle handlers and then return control immediately. Run() Runs the application by calling Run(Toplevel, Boolean) with a new instance of the specified Toplevel -derived class Declaration public static void Run() where T : Toplevel, new() Type Parameters Name Description T RunLoop(Application.RunState, Boolean) Building block API: Runs the main loop for the created dialog Declaration public static void RunLoop(Application.RunState state, bool wait = true) Parameters Type Name Description Application.RunState state The state returned by the Begin method. System.Boolean wait By default this is true which will execute the runloop waiting for events, if you pass false, you can use this method to run a single iteration of the events. Remarks Use the wait parameter to control whether this is a blocking or non-blocking call. Shutdown(Boolean) Shutdown an application initialized with Init() Declaration public static void Shutdown(bool closeDriver = true) Parameters Type Name Description System.Boolean closeDriver true Closes the application. false Closes toplevels only. UngrabMouse() Releases the mouse grab, so mouse events will be routed to the view on which the mouse is. Declaration public static void UngrabMouse() Events Iteration This event is raised on each iteration of the MainLoop Declaration public static event EventHandler Iteration Event Type Type Description System.EventHandler Remarks See also System.Threading.Timeout Loaded This event is fired once when the application is first loaded. The dimensions of the terminal are provided. Declaration public static event EventHandler Loaded Event Type Type Description System.EventHandler < Application.ResizedEventArgs > Resized Invoked when the terminal was resized. The new size of the terminal is provided. Declaration public static event EventHandler Resized Event Type Type Description System.EventHandler < Application.ResizedEventArgs >" }, "api/Terminal.Gui/Terminal.Gui.Application.ResizedEventArgs.html": { "href": "api/Terminal.Gui/Terminal.Gui.Application.ResizedEventArgs.html", "title": "Class Application.ResizedEventArgs", "keywords": "Class Application.ResizedEventArgs Event arguments for the Resized event. Inheritance System.Object System.EventArgs Application.ResizedEventArgs Inherited Members System.EventArgs.Empty System.Object.Equals(System.Object) System.Object.Equals(System.Object, System.Object) System.Object.GetHashCode() System.Object.GetType() System.Object.MemberwiseClone() System.Object.ReferenceEquals(System.Object, System.Object) System.Object.ToString() Namespace : Terminal.Gui Assembly : Terminal.Gui.dll Syntax public class ResizedEventArgs : EventArgs Properties Cols The number of columns in the resized terminal. Declaration public int Cols { get; set; } Property Value Type Description System.Int32 Rows The number of rows in the resized terminal. Declaration public int Rows { get; set; } Property Value Type Description System.Int32" }, "api/Terminal.Gui/Terminal.Gui.Application.RunState.html": { "href": "api/Terminal.Gui/Terminal.Gui.Application.RunState.html", "title": "Class Application.RunState", "keywords": "Class Application.RunState Captures the execution state for the provided Terminal.Gui.Application.RunState.Toplevel view. Inheritance System.Object Application.RunState Implements System.IDisposable 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 RunState : IDisposable Methods Dispose() Releases alTop = l resource used by the Application.RunState object. Declaration public void Dispose() Remarks Call Dispose() when you are finished using the Application.RunState . The Dispose() method leaves the Application.RunState in an unusable state. After calling Dispose() , you must release all references to the Application.RunState so the garbage collector can reclaim the memory that the Application.RunState was occupying. Dispose(Boolean) Dispose the specified disposing. Declaration protected virtual void Dispose(bool disposing) Parameters Type Name Description System.Boolean disposing If set to true disposing. Implements System.IDisposable" }, "api/Terminal.Gui/Terminal.Gui.Attribute.html": { "href": "api/Terminal.Gui/Terminal.Gui.Attribute.html", "title": "Struct Attribute", "keywords": "Struct Attribute Attributes are used as elements that contain both a foreground and a background or platform specific features Inherited Members System.ValueType.Equals(System.Object) System.ValueType.GetHashCode() System.ValueType.ToString() System.Object.Equals(System.Object, System.Object) System.Object.GetType() System.Object.ReferenceEquals(System.Object, System.Object) Namespace : Terminal.Gui Assembly : Terminal.Gui.dll Syntax public struct Attribute Remarks Attribute s are needed to map colors to terminal capabilities that might lack colors, on color scenarios, they encode both the foreground and the background color and are used in the ColorScheme class to define color schemes that can be used in your application. Constructors Attribute(Int32, Color, Color) Initializes a new instance of the Attribute struct. Declaration public Attribute(int value, Color foreground = Color.Black, Color background = Color.Black) Parameters Type Name Description System.Int32 value Value. Color foreground Foreground Color background Background Attribute(Color, Color) Initializes a new instance of the Attribute struct. Declaration public Attribute(Color foreground = Color.Black, Color background = Color.Black) Parameters Type Name Description Color foreground Foreground Color background Background Methods Make(Color, Color) Creates an Attribute from the specified foreground and background. Declaration public static Attribute Make(Color foreground, Color background) Parameters Type Name Description Color foreground Foreground color to use. Color background Background color to use. Returns Type Description Attribute The make. Operators Implicit(Int32 to Attribute) Implicitly convert an integer value into an Attribute Declaration public static implicit operator Attribute(int v) Parameters Type Name Description System.Int32 v value Returns Type Description Attribute An attribute with the specified integer value. Implicit(Attribute to Int32) Implicit conversion from an Attribute to the underlying Int32 representation Declaration public static implicit operator int (Attribute c) Parameters Type Name Description Attribute c The attribute to convert Returns Type Description System.Int32 The integer value stored in the attribute." }, "api/Terminal.Gui/Terminal.Gui.Button.html": { "href": "api/Terminal.Gui/Terminal.Gui.Button.html", "title": "Class Button", "keywords": "Class Button Button is a View that provides an item that invokes an System.Action when activated by the user. Inheritance System.Object Responder View Button Implements System.Collections.IEnumerable Inherited Members View.Enter View.Leave View.MouseEnter View.MouseLeave View.Driver View.Subviews View.Id View.IsCurrentTop View.WantMousePositionReports View.WantContinuousButtonPressed View.Frame View.GetEnumerator() View.LayoutStyle View.Bounds View.X View.Y View.Width View.Height View.SuperView View.SetNeedsDisplay() View.SetNeedsDisplay(Rect) View.ChildNeedsDisplay() View.Add(View) View.Add(View[]) View.RemoveAll() View.Remove(View) View.BringSubviewToFront(View) View.SendSubviewToBack(View) View.SendSubviewBackwards(View) View.BringSubviewForward(View) View.Clear() View.Clear(Rect) View.ScreenToView(Int32, Int32) View.ClipToBounds() View.SetClip(Rect) View.DrawFrame(Rect, Int32, Boolean) View.DrawHotString(ustring, Attribute, Attribute) View.DrawHotString(ustring, Boolean, ColorScheme) View.Move(Int32, Int32) View.HasFocus View.OnEnter() View.OnLeave() View.Focused View.MostFocused View.ColorScheme View.AddRune(Int32, Int32, Rune) View.ClearNeedsDisplay() View.SetFocus(View) View.KeyPress View.KeyDown View.OnKeyDown(KeyEvent) View.KeyUp View.OnKeyUp(KeyEvent) View.EnsureFocus() View.FocusFirst() View.FocusLast() View.FocusPrev() View.FocusNext() View.LayoutSubviews() View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) Responder.CanFocus System.Object.Equals(System.Object) System.Object.Equals(System.Object, System.Object) System.Object.GetHashCode() System.Object.GetType() System.Object.MemberwiseClone() System.Object.ReferenceEquals(System.Object, System.Object) Namespace : Terminal.Gui Assembly : Terminal.Gui.dll Syntax public class Button : View, IEnumerable Remarks Provides a button showing text invokes an System.Action when clicked on with a mouse or when the user presses SPACE, ENTER, or hotkey. The hotkey is specified by the first uppercase letter in the button. When the button is configured as the default ( IsDefault ) and the user presses the ENTER key, if no other View processes the KeyEvent , the Button 's System.Action will be invoked. Constructors Button(ustring, Boolean) Initializes a new instance of Button based on the given text at position 0,0 Declaration public Button(ustring text, bool is_default = false) Parameters Type Name Description NStack.ustring text The button's text System.Boolean is_default If set, this makes the button the default button in the current view. IsDefault Remarks The size of the Button is computed based on the text length. Button(Int32, Int32, ustring) Initializes a new instance of Button at the given coordinates, based on the given text Declaration public Button(int x, int y, ustring text) Parameters Type Name Description System.Int32 x X position where the button will be shown. System.Int32 y Y position where the button will be shown. NStack.ustring text The button's text Remarks The size of the Button is computed based on the text length. Button(Int32, Int32, ustring, Boolean) Initializes a new instance of Button at the given coordinates, based on the given text, and with the specified IsDefault value Declaration public Button(int x, int y, ustring text, bool is_default) Parameters Type Name Description System.Int32 x X position where the button will be shown. System.Int32 y Y position where the button will be shown. NStack.ustring text The button's text System.Boolean is_default If set, this makes the button the default button in the current view, which means that if the user presses return on a view that does not handle return, it will be treated as if he had clicked on the button Remarks If the value for is_default is true, a special decoration is used, and the enter key on a dialog would implicitly activate this button. Fields Clicked Clicked System.Action , raised when the button is clicked. Declaration public Action Clicked Field Value Type Description System.Action Remarks Client code can hook up to this event, it is raised when the button is activated either with the mouse or the keyboard. Properties IsDefault Gets or sets whether the Button is the default action to activate in a dialog. Declaration public bool IsDefault { get; set; } Property Value Type Description System.Boolean true if is default; otherwise, false . Text The text displayed by this Button . Declaration public ustring Text { get; set; } Property Value Type Description NStack.ustring Methods MouseEvent(MouseEvent) Declaration public override bool MouseEvent(MouseEvent me) Parameters Type Name Description MouseEvent me Returns Type Description System.Boolean Overrides Responder.MouseEvent(MouseEvent) PositionCursor() Declaration public override void PositionCursor() Overrides View.PositionCursor() ProcessColdKey(KeyEvent) Declaration public override bool ProcessColdKey(KeyEvent kb) Parameters Type Name Description KeyEvent kb Returns Type Description System.Boolean Overrides View.ProcessColdKey(KeyEvent) ProcessHotKey(KeyEvent) Declaration public override bool ProcessHotKey(KeyEvent kb) Parameters Type Name Description KeyEvent kb Returns Type Description System.Boolean Overrides View.ProcessHotKey(KeyEvent) ProcessKey(KeyEvent) Declaration public override bool ProcessKey(KeyEvent kb) Parameters Type Name Description KeyEvent kb Returns Type Description System.Boolean Overrides View.ProcessKey(KeyEvent) Redraw(Rect) Declaration public override void Redraw(Rect region) Parameters Type Name Description Rect region Overrides View.Redraw(Rect) Implements System.Collections.IEnumerable" }, "api/Terminal.Gui/Terminal.Gui.CheckBox.html": { "href": "api/Terminal.Gui/Terminal.Gui.CheckBox.html", "title": "Class CheckBox", "keywords": "Class CheckBox The CheckBox View shows an on/off toggle that the user can set Inheritance System.Object Responder View CheckBox Implements System.Collections.IEnumerable Inherited Members View.Enter View.Leave View.MouseEnter View.MouseLeave View.Driver View.Subviews View.Id View.IsCurrentTop View.WantMousePositionReports View.WantContinuousButtonPressed View.Frame View.GetEnumerator() View.LayoutStyle View.Bounds View.X View.Y View.Width View.Height View.SuperView View.SetNeedsDisplay() View.SetNeedsDisplay(Rect) View.ChildNeedsDisplay() View.Add(View) View.Add(View[]) View.RemoveAll() View.Remove(View) View.BringSubviewToFront(View) View.SendSubviewToBack(View) View.SendSubviewBackwards(View) View.BringSubviewForward(View) View.Clear() View.Clear(Rect) View.ScreenToView(Int32, Int32) View.ClipToBounds() View.SetClip(Rect) View.DrawFrame(Rect, Int32, Boolean) View.DrawHotString(ustring, Attribute, Attribute) View.DrawHotString(ustring, Boolean, ColorScheme) View.Move(Int32, Int32) View.HasFocus View.OnEnter() View.OnLeave() View.Focused View.MostFocused View.ColorScheme View.AddRune(Int32, Int32, Rune) View.ClearNeedsDisplay() View.SetFocus(View) View.KeyPress View.ProcessHotKey(KeyEvent) View.ProcessColdKey(KeyEvent) View.KeyDown View.OnKeyDown(KeyEvent) View.KeyUp View.OnKeyUp(KeyEvent) View.EnsureFocus() View.FocusFirst() View.FocusLast() View.FocusPrev() View.FocusNext() View.LayoutSubviews() View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) Responder.CanFocus System.Object.Equals(System.Object) System.Object.Equals(System.Object, System.Object) System.Object.GetHashCode() System.Object.GetType() System.Object.MemberwiseClone() System.Object.ReferenceEquals(System.Object, System.Object) Namespace : Terminal.Gui Assembly : Terminal.Gui.dll Syntax public class CheckBox : View, IEnumerable Constructors CheckBox(ustring, Boolean) Initializes a new instance of CheckBox based on the given text, uses Computed layout and sets the height and width. Declaration public CheckBox(ustring s, bool is_checked = false) Parameters Type Name Description NStack.ustring s S. System.Boolean is_checked If set to true is checked. CheckBox(Int32, Int32, ustring) Initializes a new instance of CheckBox based on the given text at the given position and a state. Declaration public CheckBox(int x, int y, ustring s) Parameters Type Name Description System.Int32 x System.Int32 y NStack.ustring s Remarks The size of CheckBox is computed based on the text length. This CheckBox is not toggled. CheckBox(Int32, Int32, ustring, Boolean) Initializes a new instance of CheckBox based on the given text at the given position and a state. Declaration public CheckBox(int x, int y, ustring s, bool is_checked) Parameters Type Name Description System.Int32 x System.Int32 y NStack.ustring s System.Boolean is_checked Remarks The size of CheckBox is computed based on the text length. Properties Checked The state of the CheckBox Declaration public bool Checked { get; set; } Property Value Type Description System.Boolean Text The text displayed by this CheckBox Declaration public ustring Text { get; set; } Property Value Type Description NStack.ustring Methods MouseEvent(MouseEvent) Declaration public override bool MouseEvent(MouseEvent me) Parameters Type Name Description MouseEvent me Returns Type Description System.Boolean Overrides Responder.MouseEvent(MouseEvent) PositionCursor() Declaration public override void PositionCursor() Overrides View.PositionCursor() ProcessKey(KeyEvent) Declaration public override bool ProcessKey(KeyEvent kb) Parameters Type Name Description KeyEvent kb Returns Type Description System.Boolean Overrides View.ProcessKey(KeyEvent) Redraw(Rect) Declaration public override void Redraw(Rect region) Parameters Type Name Description Rect region Overrides View.Redraw(Rect) Events Toggled Toggled event, raised when the CheckBox is toggled. Declaration public event EventHandler Toggled Event Type Type Description System.EventHandler Remarks Client code can hook up to this event, it is raised when the CheckBox is activated either with the mouse or the keyboard. Implements System.Collections.IEnumerable" }, "api/Terminal.Gui/Terminal.Gui.Clipboard.html": { "href": "api/Terminal.Gui/Terminal.Gui.Clipboard.html", "title": "Class Clipboard", "keywords": "Class Clipboard Provides cut, copy, and paste support for the clipboard. NOTE: Currently not implemented. Inheritance System.Object Clipboard 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 Clipboard Properties Contents Declaration public static ustring Contents { get; set; } Property Value Type Description NStack.ustring" }, "api/Terminal.Gui/Terminal.Gui.Color.html": { "href": "api/Terminal.Gui/Terminal.Gui.Color.html", "title": "Enum Color", "keywords": "Enum Color Basic colors that can be used to set the foreground and background colors in console applications. These can only be Namespace : Terminal.Gui Assembly : Terminal.Gui.dll Syntax public enum Color Fields Name Description Black The black color. Blue The blue color. BrighCyan The brigh cyan color. BrightBlue The bright bBlue color. BrightGreen The bright green color. BrightMagenta The bright magenta color. BrightRed The bright red color. BrightYellow The bright yellow color. Brown The brown color. Cyan The cyan color. DarkGray The dark gray color. Gray The gray color. Green The green color. Magenta The magenta color. Red The red color. White The White color." }, "api/Terminal.Gui/Terminal.Gui.Colors.html": { "href": "api/Terminal.Gui/Terminal.Gui.Colors.html", "title": "Class Colors", "keywords": "Class Colors The default ColorScheme s for the application. Inheritance System.Object Colors 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 Colors Properties Base The base color scheme, for the default toplevel views. Declaration public static ColorScheme Base { get; set; } Property Value Type Description ColorScheme Dialog The dialog color scheme, for standard popup dialog boxes Declaration public static ColorScheme Dialog { get; set; } Property Value Type Description ColorScheme Error The color scheme for showing errors. Declaration public static ColorScheme Error { get; set; } Property Value Type Description ColorScheme Menu The menu bar color Declaration public static ColorScheme Menu { get; set; } Property Value Type Description ColorScheme TopLevel The application toplevel color scheme, for the default toplevel views. Declaration public static ColorScheme TopLevel { get; set; } Property Value Type Description ColorScheme" }, "api/Terminal.Gui/Terminal.Gui.ColorScheme.html": { "href": "api/Terminal.Gui/Terminal.Gui.ColorScheme.html", "title": "Class ColorScheme", "keywords": "Class 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. Inheritance System.Object ColorScheme 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 ColorScheme Properties Disabled The default color for text, when the view is disabled. Declaration public Attribute Disabled { get; set; } Property Value Type Description Attribute Focus The color for text when the view has the focus. Declaration public Attribute Focus { get; set; } Property Value Type Description Attribute HotFocus The color for the hotkey when the view is focused. Declaration public Attribute HotFocus { get; set; } Property Value Type Description Attribute HotNormal The color for the hotkey when a view is not focused Declaration public Attribute HotNormal { get; set; } Property Value Type Description Attribute Normal The default color for text, when the view is not focused. Declaration public Attribute Normal { get; set; } Property Value Type Description Attribute" }, "api/Terminal.Gui/Terminal.Gui.ComboBox.html": { "href": "api/Terminal.Gui/Terminal.Gui.ComboBox.html", "title": "Class ComboBox", "keywords": "Class ComboBox ComboBox control Inheritance System.Object Responder View ComboBox Implements System.Collections.IEnumerable Inherited Members View.Enter View.Leave View.MouseEnter View.MouseLeave View.Driver View.Subviews View.Id View.IsCurrentTop View.WantMousePositionReports View.WantContinuousButtonPressed View.Frame View.GetEnumerator() View.LayoutStyle View.Bounds View.X View.Y View.Width View.Height View.SuperView View.SetNeedsDisplay() View.SetNeedsDisplay(Rect) View.ChildNeedsDisplay() View.Add(View) View.Add(View[]) View.RemoveAll() View.Remove(View) View.BringSubviewToFront(View) View.SendSubviewToBack(View) View.SendSubviewBackwards(View) View.BringSubviewForward(View) View.Clear() View.Clear(Rect) View.ScreenToView(Int32, Int32) View.ClipToBounds() View.SetClip(Rect) View.DrawFrame(Rect, Int32, Boolean) View.DrawHotString(ustring, Attribute, Attribute) View.DrawHotString(ustring, Boolean, ColorScheme) View.Move(Int32, Int32) View.PositionCursor() View.HasFocus View.OnLeave() View.Focused View.MostFocused View.ColorScheme View.AddRune(Int32, Int32, Rune) View.ClearNeedsDisplay() View.Redraw(Rect) View.SetFocus(View) View.KeyPress View.ProcessHotKey(KeyEvent) View.ProcessColdKey(KeyEvent) View.KeyDown View.OnKeyDown(KeyEvent) View.KeyUp View.OnKeyUp(KeyEvent) View.EnsureFocus() View.FocusFirst() View.FocusLast() View.FocusPrev() View.FocusNext() View.LayoutSubviews() View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) Responder.CanFocus Responder.MouseEvent(MouseEvent) System.Object.Equals(System.Object) System.Object.Equals(System.Object, System.Object) System.Object.GetHashCode() System.Object.GetType() System.Object.MemberwiseClone() System.Object.ReferenceEquals(System.Object, System.Object) Namespace : Terminal.Gui Assembly : Terminal.Gui.dll Syntax public class ComboBox : View, IEnumerable Constructors ComboBox(Int32, Int32, Int32, Int32, IList) Public constructor Declaration public ComboBox(int x, int y, int w, int h, IList source) Parameters Type Name Description System.Int32 x The x coordinate System.Int32 y The y coordinate System.Int32 w The width System.Int32 h The height System.Collections.Generic.IList < System.String > source Auto completetion source Properties Text The currenlty selected list item Declaration public ustring Text { get; set; } Property Value Type Description NStack.ustring Methods OnEnter() Declaration public override bool OnEnter() Returns Type Description System.Boolean Overrides View.OnEnter() ProcessKey(KeyEvent) Declaration public override bool ProcessKey(KeyEvent e) Parameters Type Name Description KeyEvent e Returns Type Description System.Boolean Overrides View.ProcessKey(KeyEvent) Events Changed Changed event, raised when the selection has been confirmed. Declaration public event EventHandler Changed Event Type Type Description System.EventHandler < NStack.ustring > Remarks Client code can hook up to this event, it is raised when the selection has been confirmed. Implements System.Collections.IEnumerable" }, "api/Terminal.Gui/Terminal.Gui.ConsoleDriver.html": { "href": "api/Terminal.Gui/Terminal.Gui.ConsoleDriver.html", "title": "Class ConsoleDriver", "keywords": "Class ConsoleDriver ConsoleDriver is an abstract class that defines the requirements for a console driver. There are currently three implementations: Terminal.Gui.CursesDriver (for Unix and Mac), Terminal.Gui.WindowsDriver , and Terminal.Gui.NetDriver that uses the .NET Console API. Inheritance System.Object ConsoleDriver Inherited Members System.Object.Equals(System.Object) System.Object.Equals(System.Object, System.Object) System.Object.GetHashCode() System.Object.GetType() System.Object.MemberwiseClone() System.Object.ReferenceEquals(System.Object, System.Object) System.Object.ToString() Namespace : Terminal.Gui Assembly : Terminal.Gui.dll Syntax public abstract class ConsoleDriver Fields BottomTee The bottom tee. Declaration public Rune BottomTee Field Value Type Description System.Rune Diamond Diamond character Declaration public Rune Diamond Field Value Type Description System.Rune HLine Horizontal line character. Declaration public Rune HLine Field Value Type Description System.Rune LeftTee Left tee Declaration public Rune LeftTee Field Value Type Description System.Rune LLCorner Lower left corner Declaration public Rune LLCorner Field Value Type Description System.Rune LRCorner Lower right corner Declaration public Rune LRCorner Field Value Type Description System.Rune RightTee Right tee Declaration public Rune RightTee Field Value Type Description System.Rune Stipple Stipple pattern Declaration public Rune Stipple Field Value Type Description System.Rune TerminalResized The handler fired when the terminal is resized. Declaration protected Action TerminalResized Field Value Type Description System.Action TopTee Top tee Declaration public Rune TopTee Field Value Type Description System.Rune ULCorner Upper left corner Declaration public Rune ULCorner Field Value Type Description System.Rune URCorner Upper right corner Declaration public Rune URCorner Field Value Type Description System.Rune VLine Vertical line character. Declaration public Rune VLine Field Value Type Description System.Rune Properties Clip Controls the current clipping region that AddRune/AddStr is subject to. Declaration public Rect Clip { get; set; } Property Value Type Description Rect The clip. Cols The current number of columns in the terminal. Declaration public abstract int Cols { get; } Property Value Type Description System.Int32 Rows The current number of rows in the terminal. Declaration public abstract int Rows { get; } Property Value Type Description System.Int32 Methods AddRune(Rune) Adds the specified rune to the display at the current cursor position Declaration public abstract void AddRune(Rune rune) Parameters Type Name Description System.Rune rune Rune to add. AddStr(ustring) Adds the specified Declaration public abstract void AddStr(ustring str) Parameters Type Name Description NStack.ustring str String. CookMouse() Enables the cooked event processing from the mouse driver Declaration public abstract void CookMouse() DrawFrame(Rect, Int32, Boolean) Draws a frame on the specified region with the specified padding around the frame. Declaration public virtual void DrawFrame(Rect region, int padding, bool fill) Parameters Type Name Description Rect region Region where the frame will be drawn.. System.Int32 padding Padding to add on the sides. System.Boolean fill If set to true it will clear the contents with the current color, otherwise the contents will be left untouched. Remarks This is a legacy/depcrecated API. Use DrawWindowFrame(Rect, Int32, Int32, Int32, Int32, Boolean, Boolean) . DrawWindowFrame(Rect, Int32, Int32, Int32, Int32, Boolean, Boolean) Draws a frame for a window with padding aand n optional visible border inside the padding. Declaration public virtual void DrawWindowFrame(Rect region, int paddingLeft = 0, int paddingTop = 0, int paddingRight = 0, int paddingBottom = 0, bool border = true, bool fill = false) Parameters Type Name Description Rect region Screen relative region where the frame will be drawn. System.Int32 paddingLeft Number of columns to pad on the left (if 0 the border will not appear on the left). System.Int32 paddingTop Number of rows to pad on the top (if 0 the border and title will not appear on the top). System.Int32 paddingRight Number of columns to pad on the right (if 0 the border will not appear on the right). System.Int32 paddingBottom Number of rows to pad on the bottom (if 0 the border will not appear on the bottom). System.Boolean border If set to true and any padding dimension is > 0 the border will be drawn. System.Boolean fill If set to true it will clear the content area (the area inside the padding) with the current color, otherwise the content area will be left untouched. DrawWindowTitle(Rect, ustring, Int32, Int32, Int32, Int32, TextAlignment) Draws the title for a Window-style view incorporating padding. Declaration public virtual void DrawWindowTitle(Rect region, ustring title, int paddingLeft, int paddingTop, int paddingRight, int paddingBottom, TextAlignment textAlignment = TextAlignment.Left) Parameters Type Name Description Rect region Screen relative region where the frame will be drawn. NStack.ustring title The title for the window. The title will only be drawn if title is not null or empty and paddingTop is greater than 0. System.Int32 paddingLeft Number of columns to pad on the left (if 0 the border will not appear on the left). System.Int32 paddingTop Number of rows to pad on the top (if 0 the border and title will not appear on the top). System.Int32 paddingRight Number of columns to pad on the right (if 0 the border will not appear on the right). System.Int32 paddingBottom Number of rows to pad on the bottom (if 0 the border will not appear on the bottom). TextAlignment textAlignment Not yet immplemented. End() Ends the execution of the console driver. Declaration public abstract void End() Init(Action) Initializes the driver Declaration public abstract void Init(Action terminalResized) Parameters Type Name Description System.Action terminalResized Method to invoke when the terminal is resized. MakeAttribute(Color, Color) Make the attribute for the foreground and background colors. Declaration public abstract Attribute MakeAttribute(Color fore, Color back) Parameters Type Name Description Color fore Foreground. Color back Background. Returns Type Description Attribute Move(Int32, Int32) Moves the cursor to the specified column and row. Declaration public abstract void Move(int col, int row) Parameters Type Name Description System.Int32 col Column to move the cursor to. System.Int32 row Row to move the cursor to. PrepareToRun(MainLoop, Action, Action, Action, Action) Prepare the driver and set the key and mouse events handlers. Declaration public abstract void PrepareToRun(MainLoop mainLoop, Action keyHandler, Action keyDownHandler, Action keyUpHandler, Action mouseHandler) Parameters Type Name Description MainLoop mainLoop The main loop. System.Action < KeyEvent > keyHandler The handler for ProcessKey System.Action < KeyEvent > keyDownHandler The handler for key down events System.Action < KeyEvent > keyUpHandler The handler for key up events System.Action < MouseEvent > mouseHandler The handler for mouse events Refresh() Updates the screen to reflect all the changes that have been done to the display buffer Declaration public abstract void Refresh() SetAttribute(Attribute) Selects the specified attribute as the attribute to use for future calls to AddRune, AddString. Declaration public abstract void SetAttribute(Attribute c) Parameters Type Name Description Attribute c C. SetColors(ConsoleColor, ConsoleColor) Set Colors from limit sets of colors. Declaration public abstract void SetColors(ConsoleColor foreground, ConsoleColor background) Parameters Type Name Description System.ConsoleColor foreground Foreground. System.ConsoleColor background Background. SetColors(Int16, Int16) Advanced uses - set colors to any pre-set pairs, you would need to init_color that independently with the R, G, B values. Declaration public abstract void SetColors(short foregroundColorId, short backgroundColorId) Parameters Type Name Description System.Int16 foregroundColorId Foreground color identifier. System.Int16 backgroundColorId Background color identifier. SetTerminalResized(Action) Set the handler when the terminal is resized. Declaration public void SetTerminalResized(Action terminalResized) Parameters Type Name Description System.Action terminalResized StartReportingMouseMoves() Start of mouse moves. Declaration public abstract void StartReportingMouseMoves() StopReportingMouseMoves() Stop reporting mouses moves. Declaration public abstract void StopReportingMouseMoves() Suspend() Suspend the application, typically needs to save the state, suspend the app and upon return, reset the console driver. Declaration public abstract void Suspend() UncookMouse() Disables the cooked event processing from the mouse driver. At startup, it is assumed mouse events are cooked. Declaration public abstract void UncookMouse() UpdateCursor() Updates the location of the cursor position Declaration public abstract void UpdateCursor() UpdateScreen() Redraws the physical screen with the contents that have been queued up via any of the printing commands. Declaration public abstract void UpdateScreen()" }, "api/Terminal.Gui/Terminal.Gui.DateField.html": { "href": "api/Terminal.Gui/Terminal.Gui.DateField.html", "title": "Class DateField", "keywords": "Class DateField Date editing View Inheritance System.Object Responder View TextField DateField Implements System.Collections.IEnumerable Inherited Members TextField.Used TextField.ReadOnly TextField.Changed TextField.OnLeave() TextField.Frame TextField.Text TextField.Secret TextField.CursorPosition TextField.PositionCursor() TextField.Redraw(Rect) TextField.CanFocus TextField.SelectedStart TextField.SelectedLength TextField.SelectedText TextField.ClearAllSelection() TextField.Copy() TextField.Cut() TextField.Paste() View.Enter View.Leave View.MouseEnter View.MouseLeave View.Driver View.Subviews View.Id View.IsCurrentTop View.WantMousePositionReports View.WantContinuousButtonPressed View.GetEnumerator() View.LayoutStyle View.Bounds View.X View.Y View.Width View.Height View.SuperView View.SetNeedsDisplay() View.SetNeedsDisplay(Rect) View.ChildNeedsDisplay() View.Add(View) View.Add(View[]) View.RemoveAll() View.Remove(View) View.BringSubviewToFront(View) View.SendSubviewToBack(View) View.SendSubviewBackwards(View) View.BringSubviewForward(View) View.Clear() View.Clear(Rect) View.ScreenToView(Int32, Int32) View.ClipToBounds() View.SetClip(Rect) View.DrawFrame(Rect, Int32, Boolean) View.DrawHotString(ustring, Attribute, Attribute) View.DrawHotString(ustring, Boolean, ColorScheme) View.Move(Int32, Int32) View.HasFocus View.OnEnter() View.Focused View.MostFocused View.ColorScheme View.AddRune(Int32, Int32, Rune) View.ClearNeedsDisplay() View.SetFocus(View) View.KeyPress View.ProcessHotKey(KeyEvent) View.ProcessColdKey(KeyEvent) View.KeyDown View.OnKeyDown(KeyEvent) View.KeyUp View.OnKeyUp(KeyEvent) View.EnsureFocus() View.FocusFirst() View.FocusLast() View.FocusPrev() View.FocusNext() View.LayoutSubviews() View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) System.Object.Equals(System.Object) System.Object.Equals(System.Object, System.Object) System.Object.GetHashCode() System.Object.GetType() System.Object.MemberwiseClone() System.Object.ReferenceEquals(System.Object, System.Object) Namespace : Terminal.Gui Assembly : Terminal.Gui.dll Syntax public class DateField : TextField, IEnumerable Remarks The DateField View provides date editing functionality with mouse support. Constructors DateField(DateTime) Initializes a new instance of DateField Declaration public DateField(DateTime date) Parameters Type Name Description System.DateTime date DateField(Int32, Int32, DateTime, Boolean) Initializes a new instance of DateField at an absolute position and fixed size. Declaration public DateField(int x, int y, DateTime date, bool isShort = false) Parameters Type Name Description System.Int32 x The x coordinate. System.Int32 y The y coordinate. System.DateTime date Initial date contents. System.Boolean isShort If true, shows only two digits for the year. Properties Date Gets or sets the date of the DateField . Declaration public DateTime Date { get; set; } Property Value Type Description System.DateTime Remarks IsShortFormat Get or set the data format for the widget. Declaration public bool IsShortFormat { get; set; } Property Value Type Description System.Boolean Methods MouseEvent(MouseEvent) Declaration public override bool MouseEvent(MouseEvent ev) Parameters Type Name Description MouseEvent ev Returns Type Description System.Boolean Overrides TextField.MouseEvent(MouseEvent) ProcessKey(KeyEvent) Declaration public override bool ProcessKey(KeyEvent kb) Parameters Type Name Description KeyEvent kb Returns Type Description System.Boolean Overrides TextField.ProcessKey(KeyEvent) Implements System.Collections.IEnumerable" }, "api/Terminal.Gui/Terminal.Gui.Dialog.html": { "href": "api/Terminal.Gui/Terminal.Gui.Dialog.html", "title": "Class Dialog", "keywords": "Class Dialog The Dialog View is a Window that by default is centered and contains one or more Button . It defaults to the Dialog color scheme and has a 1 cell padding around the edges. Inheritance System.Object Responder View Toplevel Window Dialog FileDialog Implements System.Collections.IEnumerable Inherited Members Window.Title Window.GetEnumerator() Window.Add(View) Window.Remove(View) Window.RemoveAll() Window.Redraw(Rect) Window.MouseEvent(MouseEvent) Toplevel.Running Toplevel.Ready Toplevel.Create() Toplevel.CanFocus Toplevel.Modal Toplevel.MenuBar Toplevel.StatusBar Toplevel.WillPresent() View.Enter View.Leave View.MouseEnter View.MouseLeave View.Driver View.Subviews View.Id View.IsCurrentTop View.WantMousePositionReports View.WantContinuousButtonPressed View.Frame View.LayoutStyle View.Bounds View.X View.Y View.Width View.Height View.SuperView View.SetNeedsDisplay() View.SetNeedsDisplay(Rect) View.ChildNeedsDisplay() View.Add(View[]) View.BringSubviewToFront(View) View.SendSubviewToBack(View) View.SendSubviewBackwards(View) View.BringSubviewForward(View) View.Clear() View.Clear(Rect) View.ScreenToView(Int32, Int32) View.ClipToBounds() View.SetClip(Rect) View.DrawFrame(Rect, Int32, Boolean) View.DrawHotString(ustring, Attribute, Attribute) View.DrawHotString(ustring, Boolean, ColorScheme) View.Move(Int32, Int32) View.PositionCursor() View.HasFocus View.OnEnter() View.OnLeave() View.Focused View.MostFocused View.ColorScheme View.AddRune(Int32, Int32, Rune) View.ClearNeedsDisplay() View.SetFocus(View) View.KeyPress View.ProcessHotKey(KeyEvent) View.ProcessColdKey(KeyEvent) View.KeyDown View.OnKeyDown(KeyEvent) View.KeyUp View.OnKeyUp(KeyEvent) View.EnsureFocus() View.FocusFirst() View.FocusLast() View.FocusPrev() View.FocusNext() View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) System.Object.Equals(System.Object) System.Object.Equals(System.Object, System.Object) System.Object.GetHashCode() System.Object.GetType() System.Object.MemberwiseClone() System.Object.ReferenceEquals(System.Object, System.Object) Namespace : Terminal.Gui Assembly : Terminal.Gui.dll Syntax public class Dialog : Window, IEnumerable Remarks To run the Dialog modally, create the Dialog , and pass it to Run() . This will execute the dialog until it terminates via the [ESC] or [CTRL-Q] key, or when one of the views or buttons added to the dialog calls RequestStop() . Constructors Dialog(ustring, Int32, Int32, Button[]) Initializes a new instance of the Dialog class with an optional set of Button s to display Declaration public Dialog(ustring title, int width, int height, params Button[] buttons) Parameters Type Name Description NStack.ustring title Title for the dialog. System.Int32 width Width for the dialog. System.Int32 height Height for the dialog. Button [] buttons Optional buttons to lay out at the bottom of the dialog. Methods AddButton(Button) Adds a Button to the Dialog , its layout will be controled by the Dialog Declaration public void AddButton(Button button) Parameters Type Name Description Button button Button to add. LayoutSubviews() Declaration public override void LayoutSubviews() Overrides View.LayoutSubviews() ProcessKey(KeyEvent) Declaration public override bool ProcessKey(KeyEvent kb) Parameters Type Name Description KeyEvent kb Returns Type Description System.Boolean Overrides Toplevel.ProcessKey(KeyEvent) Implements System.Collections.IEnumerable" }, "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.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 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 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. 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) Creates a percentage Dim object Declaration public static Dim Percent(float n) Parameters Type Name Description System.Single n A value between 0 and 100 representing the percentage. 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.FileDialog.html": { "href": "api/Terminal.Gui/Terminal.Gui.FileDialog.html", "title": "Class FileDialog", "keywords": "Class FileDialog Base class for the OpenDialog and the SaveDialog Inheritance System.Object Responder View Toplevel Window Dialog FileDialog OpenDialog SaveDialog Implements System.Collections.IEnumerable Inherited Members Dialog.AddButton(Button) Dialog.LayoutSubviews() Dialog.ProcessKey(KeyEvent) Window.Title Window.GetEnumerator() Window.Add(View) Window.Remove(View) Window.RemoveAll() Window.Redraw(Rect) Window.MouseEvent(MouseEvent) Toplevel.Running Toplevel.Ready Toplevel.Create() Toplevel.CanFocus Toplevel.Modal Toplevel.MenuBar Toplevel.StatusBar View.Enter View.Leave View.MouseEnter View.MouseLeave View.Driver View.Subviews View.Id View.IsCurrentTop View.WantMousePositionReports View.WantContinuousButtonPressed View.Frame View.LayoutStyle View.Bounds View.X View.Y View.Width View.Height View.SuperView View.SetNeedsDisplay() View.SetNeedsDisplay(Rect) View.ChildNeedsDisplay() View.Add(View[]) View.BringSubviewToFront(View) View.SendSubviewToBack(View) View.SendSubviewBackwards(View) View.BringSubviewForward(View) View.Clear() View.Clear(Rect) View.ScreenToView(Int32, Int32) View.ClipToBounds() View.SetClip(Rect) View.DrawFrame(Rect, Int32, Boolean) View.DrawHotString(ustring, Attribute, Attribute) View.DrawHotString(ustring, Boolean, ColorScheme) View.Move(Int32, Int32) View.PositionCursor() View.HasFocus View.OnEnter() View.OnLeave() View.Focused View.MostFocused View.ColorScheme View.AddRune(Int32, Int32, Rune) View.ClearNeedsDisplay() View.SetFocus(View) View.KeyPress View.ProcessHotKey(KeyEvent) View.ProcessColdKey(KeyEvent) View.KeyDown View.OnKeyDown(KeyEvent) View.KeyUp View.OnKeyUp(KeyEvent) View.EnsureFocus() View.FocusFirst() View.FocusLast() View.FocusPrev() View.FocusNext() View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) System.Object.Equals(System.Object) System.Object.Equals(System.Object, System.Object) System.Object.GetHashCode() System.Object.GetType() System.Object.MemberwiseClone() System.Object.ReferenceEquals(System.Object, System.Object) Namespace : Terminal.Gui Assembly : Terminal.Gui.dll Syntax public class FileDialog : Dialog, IEnumerable Constructors FileDialog(ustring, ustring, ustring, ustring) Initializes a new instance of FileDialog Declaration public FileDialog(ustring title, ustring prompt, ustring nameFieldLabel, ustring message) Parameters Type Name Description NStack.ustring title The title. NStack.ustring prompt The prompt. NStack.ustring nameFieldLabel The name field label. NStack.ustring message The message. Properties AllowedFileTypes The array of filename extensions allowed, or null if all file extensions are allowed. Declaration public string[] AllowedFileTypes { get; set; } Property Value Type Description System.String [] The allowed file types. AllowsOtherFileTypes Gets or sets a value indicating whether this FileDialog allows the file to be saved with a different extension Declaration public bool AllowsOtherFileTypes { get; set; } Property Value Type Description System.Boolean true if allows other file types; otherwise, false . Canceled Check if the dialog was or not canceled. Declaration public bool Canceled { get; } Property Value Type Description System.Boolean CanCreateDirectories Gets or sets a value indicating whether this FileDialog can create directories. Declaration public bool CanCreateDirectories { get; set; } Property Value Type Description System.Boolean true if can create directories; otherwise, false . DirectoryPath Gets or sets the directory path for this panel Declaration public ustring DirectoryPath { get; set; } Property Value Type Description NStack.ustring The directory path. FilePath The File path that is currently shown on the panel Declaration public ustring FilePath { get; set; } Property Value Type Description NStack.ustring The absolute file path for the file path entered. IsExtensionHidden Gets or sets a value indicating whether this FileDialog is extension hidden. Declaration public bool IsExtensionHidden { get; set; } Property Value Type Description System.Boolean true if is extension hidden; otherwise, false . Message Gets or sets the message displayed to the user, defaults to nothing Declaration public ustring Message { get; set; } Property Value Type Description NStack.ustring The message. NameFieldLabel Gets or sets the name field label. Declaration public ustring NameFieldLabel { get; set; } Property Value Type Description NStack.ustring The name field label. Prompt Gets or sets the prompt label for the Button displayed to the user Declaration public ustring Prompt { get; set; } Property Value Type Description NStack.ustring The prompt. Methods WillPresent() Declaration public override void WillPresent() Overrides Toplevel.WillPresent() Implements System.Collections.IEnumerable" }, "api/Terminal.Gui/Terminal.Gui.FrameView.html": { "href": "api/Terminal.Gui/Terminal.Gui.FrameView.html", "title": "Class FrameView", "keywords": "Class FrameView The FrameView is a container frame that draws a frame around the contents. It is similar to a GroupBox in Windows. Inheritance System.Object Responder View FrameView Implements System.Collections.IEnumerable Inherited Members View.Enter View.Leave View.MouseEnter View.MouseLeave View.Driver View.Subviews View.Id View.IsCurrentTop View.WantMousePositionReports View.WantContinuousButtonPressed View.Frame View.GetEnumerator() View.LayoutStyle View.Bounds View.X View.Y View.Width View.Height View.SuperView View.SetNeedsDisplay() View.SetNeedsDisplay(Rect) View.ChildNeedsDisplay() View.Add(View[]) View.BringSubviewToFront(View) View.SendSubviewToBack(View) View.SendSubviewBackwards(View) View.BringSubviewForward(View) View.Clear() View.Clear(Rect) View.ScreenToView(Int32, Int32) View.ClipToBounds() View.SetClip(Rect) View.DrawFrame(Rect, Int32, Boolean) View.DrawHotString(ustring, Attribute, Attribute) View.DrawHotString(ustring, Boolean, ColorScheme) View.Move(Int32, Int32) View.PositionCursor() View.HasFocus View.OnEnter() View.OnLeave() View.Focused View.MostFocused View.ColorScheme View.AddRune(Int32, Int32, Rune) View.ClearNeedsDisplay() View.SetFocus(View) View.KeyPress View.ProcessKey(KeyEvent) View.ProcessHotKey(KeyEvent) View.ProcessColdKey(KeyEvent) View.KeyDown View.OnKeyDown(KeyEvent) View.KeyUp View.OnKeyUp(KeyEvent) View.EnsureFocus() View.FocusFirst() View.FocusLast() View.FocusPrev() View.FocusNext() View.LayoutSubviews() View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) Responder.CanFocus Responder.MouseEvent(MouseEvent) System.Object.Equals(System.Object) System.Object.Equals(System.Object, System.Object) System.Object.GetHashCode() System.Object.GetType() System.Object.MemberwiseClone() System.Object.ReferenceEquals(System.Object, System.Object) Namespace : Terminal.Gui Assembly : Terminal.Gui.dll Syntax public class FrameView : View, IEnumerable Constructors FrameView(ustring) Initializes a new instance of the FrameView class with a title and the result is suitable to have its X, Y, Width and Height properties computed. Declaration public FrameView(ustring title) Parameters Type Name Description NStack.ustring title Title. FrameView(Rect, ustring) Initializes a new instance of the FrameView class with an absolute position and a title. Declaration public FrameView(Rect frame, ustring title) Parameters Type Name Description Rect frame Frame. NStack.ustring title Title. FrameView(Rect, ustring, View[]) Initializes a new instance of the FrameView class with an absolute position, a title and View s. Declaration public FrameView(Rect frame, ustring title, View[] views) Parameters Type Name Description Rect frame Frame. NStack.ustring title Title. View [] views Views. Properties Title The title to be displayed for this FrameView . Declaration public ustring Title { get; set; } Property Value Type Description NStack.ustring The title. Methods Add(View) Add the specified View to this container. Declaration public override void Add(View view) Parameters Type Name Description View view View to add to this container Overrides View.Add(View) Redraw(Rect) Declaration public override void Redraw(Rect bounds) Parameters Type Name Description Rect bounds Overrides View.Redraw(Rect) Remove(View) Removes a View from this container. Declaration public override void Remove(View view) Parameters Type Name Description View view Overrides View.Remove(View) Remarks RemoveAll() Removes all View s from this container. Declaration public override void RemoveAll() Overrides View.RemoveAll() Remarks Implements System.Collections.IEnumerable" }, "api/Terminal.Gui/Terminal.Gui.HexView.html": { "href": "api/Terminal.Gui/Terminal.Gui.HexView.html", "title": "Class HexView", "keywords": "Class HexView An hex viewer and editor View over a System.IO.Stream Inheritance System.Object Responder View HexView Implements System.Collections.IEnumerable Inherited Members View.Enter View.Leave View.MouseEnter View.MouseLeave View.Driver View.Subviews View.Id View.IsCurrentTop View.WantMousePositionReports View.WantContinuousButtonPressed View.GetEnumerator() View.LayoutStyle View.Bounds View.X View.Y View.Width View.Height View.SuperView View.SetNeedsDisplay() View.SetNeedsDisplay(Rect) View.ChildNeedsDisplay() View.Add(View) View.Add(View[]) View.RemoveAll() View.Remove(View) View.BringSubviewToFront(View) View.SendSubviewToBack(View) View.SendSubviewBackwards(View) View.BringSubviewForward(View) View.Clear() View.Clear(Rect) View.ScreenToView(Int32, Int32) View.ClipToBounds() View.SetClip(Rect) View.DrawFrame(Rect, Int32, Boolean) View.DrawHotString(ustring, Attribute, Attribute) View.DrawHotString(ustring, Boolean, ColorScheme) View.Move(Int32, Int32) View.HasFocus View.OnEnter() View.OnLeave() View.Focused View.MostFocused View.ColorScheme View.AddRune(Int32, Int32, Rune) View.ClearNeedsDisplay() View.SetFocus(View) View.KeyPress View.ProcessHotKey(KeyEvent) View.ProcessColdKey(KeyEvent) View.KeyDown View.OnKeyDown(KeyEvent) View.KeyUp View.OnKeyUp(KeyEvent) View.EnsureFocus() View.FocusFirst() View.FocusLast() View.FocusPrev() View.FocusNext() View.LayoutSubviews() View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) Responder.CanFocus Responder.MouseEvent(MouseEvent) System.Object.Equals(System.Object) System.Object.Equals(System.Object, System.Object) System.Object.GetHashCode() System.Object.GetType() System.Object.MemberwiseClone() System.Object.ReferenceEquals(System.Object, System.Object) Namespace : Terminal.Gui Assembly : Terminal.Gui.dll Syntax public class HexView : View, IEnumerable Remarks HexView provides a hex editor on top of a seekable System.IO.Stream with the left side showing an hex dump of the values in the System.IO.Stream and the right side showing the contents (filterd to non-control sequence ASCII characters). Users can switch from one side to the other by using the tab key. To enable editing, set AllowEdits to true. When AllowEdits is true the user can make changes to the hexadecimal values of the System.IO.Stream . Any changes are tracked in the Edits property (a System.Collections.Generic.SortedDictionary`2 ) indicating the position where the changes were made and the new values. A convenience method, ApplyEdits() will apply the edits to the System.IO.Stream . Control the first byte shown by setting the DisplayStart property to an offset in the stream. Constructors HexView(Stream) Initialzies a HexView Declaration public HexView(Stream source) Parameters Type Name Description System.IO.Stream source The System.IO.Stream to view and edit as hex, this System.IO.Stream must support seeking, or an exception will be thrown. Properties AllowEdits Gets or sets whether this HexView allow editing of the System.IO.Stream of the underlying System.IO.Stream . Declaration public bool AllowEdits { get; set; } Property Value Type Description System.Boolean true if allow edits; otherwise, false . DisplayStart Sets or gets the offset into the System.IO.Stream that will displayed at the top of the HexView Declaration public long DisplayStart { get; set; } Property Value Type Description System.Int64 The display start. Edits Gets a System.Collections.Generic.SortedDictionary`2 describing the edits done to the HexView . Each Key indicates an offset where an edit was made and the Value is the changed byte. Declaration public IReadOnlyDictionary Edits { get; } Property Value Type Description System.Collections.Generic.IReadOnlyDictionary < System.Int64 , System.Byte > The edits. Frame Declaration public override Rect Frame { get; set; } Property Value Type Description Rect Overrides View.Frame Source Sets or gets the System.IO.Stream the HexView is operating on; the stream must support seeking ( System.IO.Stream.CanSeek == true). Declaration public Stream Source { get; set; } Property Value Type Description System.IO.Stream The source. Methods ApplyEdits() This method applies andy edits made to the System.IO.Stream and resets the contents of the Edits property Declaration public void ApplyEdits() PositionCursor() Declaration public override void PositionCursor() Overrides View.PositionCursor() ProcessKey(KeyEvent) Declaration public override bool ProcessKey(KeyEvent keyEvent) Parameters Type Name Description KeyEvent keyEvent Returns Type Description System.Boolean Overrides View.ProcessKey(KeyEvent) Redraw(Rect) Declaration public override void Redraw(Rect region) Parameters Type Name Description Rect region Overrides View.Redraw(Rect) Implements System.Collections.IEnumerable" }, "api/Terminal.Gui/Terminal.Gui.html": { "href": "api/Terminal.Gui/Terminal.Gui.html", "title": "Namespace Terminal.Gui", "keywords": "Namespace Terminal.Gui Classes Application The application driver for Terminal.Gui. Application.ResizedEventArgs Event arguments for the Resized event. Application.RunState Captures the execution state for the provided Terminal.Gui.Application.RunState.Toplevel view. Button Button is a View that provides an item that invokes an System.Action when activated by the user. CheckBox The CheckBox View shows an on/off toggle that the user can set Clipboard Provides cut, copy, and paste support for the clipboard. NOTE: Currently not implemented. Colors The default ColorScheme s for the application. ColorScheme Color scheme definitions, they cover some common scenarios and are used typically in containers such as Window and FrameView to set the scheme that is used by all the views contained inside. ComboBox ComboBox control ConsoleDriver ConsoleDriver is an abstract class that defines the requirements for a console driver. There are currently three implementations: Terminal.Gui.CursesDriver (for Unix and Mac), Terminal.Gui.WindowsDriver , and Terminal.Gui.NetDriver that uses the .NET Console API. DateField Date editing View Dialog The Dialog View is a Window that by default is centered and contains one or more Button . It defaults to the Dialog color scheme and has a 1 cell padding around the edges. Dim Dim properties of a View to control the position. FileDialog Base class for the OpenDialog and the SaveDialog FrameView The FrameView is a container frame that draws a frame around the contents. It is similar to a GroupBox in Windows. HexView An hex viewer and editor View over a System.IO.Stream KeyEvent Describes a keyboard event. Label The Label View displays a string at a given position and supports multiple lines separted by newline characters. ListView ListView View renders a scrollable list of data where each item can be activated to perform an action. ListViewItemEventArgs System.EventArgs for ListView events. ListWrapper Implements an IListDataSource that renders arbitrary System.Collections.IList instances for ListView . MainLoop Simple main loop implementation that can be used to monitor file descriptor, run timers and idle handlers. MenuBar The MenuBar provides a menu for Terminal.Gui applications. MenuBarItem A MenuBarItem contains MenuBarItem s or MenuItem s. MenuItem A MenuItem has a title, an associated help text, and an action to execute on activation. MessageBox MessageBox displays a modal message to the user, with a title, a message and a series of options that the user can choose from. OpenDialog The OpenDialog provides an interactive dialog box for users to select files or directories. Pos Describes the position of a View which can be an absolute value, a percentage, centered, or relative to the ending dimension. Integer values are implicitly convertible to an absolute Pos . These objects are created using the static methods Percent, AnchorEnd, and Center. The Pos objects can be combined with the addition and subtraction operators. ProgressBar A Progress Bar view that can indicate progress of an activity visually. RadioGroup RadioGroup shows a group of radio labels, only one of those can be selected at a given time Responder Responder base class implemented by objects that want to participate on keyboard and mouse input. SaveDialog The SaveDialog provides an interactive dialog box for users to pick a file to save. ScrollBarView ScrollBarViews are views that display a 1-character scrollbar, either horizontal or vertical ScrollView Scrollviews are views that present a window into a virtual space where children views are added. Similar to the iOS UIScrollView. StatusBar A status bar is a View that snaps to the bottom of a Toplevel displaying set of StatusItem s. The StatusBar should be context sensitive. This means, if the main menu and an open text editor are visible, the items probably shown will be ~F1~ Help ~F2~ Save ~F3~ Load. While a dialog to ask a file to load is executed, the remaining commands will probably be ~F1~ Help. So for each context must be a new instance of a statusbar. StatusItem StatusItem objects are contained by StatusBar View s. Each StatusItem has a title, a shortcut (hotkey), and an Action that will be invoked when the Shortcut is pressed. The Shortcut will be a global hotkey for the application in the current context of the screen. The colour of the Title will be changed after each ~. A Title set to `~F1~ Help` will render as *F1* using HotNormal and *Help* as HotNormal . TextField Single-line text entry View TextView Multi-line text editing View TimeField Time editing View Toplevel Toplevel views can be modally executed. View View is the base class for all views on the screen and represents a visible element that can render itself and contains zero or more nested views. View.KeyEventEventArgs Specifies the event arguments for KeyEvent Window A Toplevel View that draws a frame around its region and has a \"ContentView\" subview where the contents are added. Structs Attribute Attributes are used as elements that contain both a foreground and a background or platform specific features MouseEvent Describes a mouse event Point Represents an ordered pair of integer x- and y-coordinates that defines a point in a two-dimensional plane. Rect Stores a set of four integers that represent the location and size of a rectangle Size Stores an ordered pair of integers, which specify a Height and Width. Interfaces IListDataSource Implement IListDataSource to provide custom rendering for a ListView . IMainLoopDriver Public interface to create your own platform specific main loop driver. Enums Color Basic colors that can be used to set the foreground and background colors in console applications. These can only be Key The Key enumeration contains special encoding for some keys, but can also encode all the unicode values that can be passed. LayoutStyle Determines the LayoutStyle for a view, if Absolute, during LayoutSubviews, the value from the Frame will be used, if the value is Computer, then the Frame will be updated from the X, Y Pos objects and the Width and Height Dim objects. MouseFlags Mouse flags reported in MouseEvent . TextAlignment Text alignment enumeration, controls how text is displayed." }, "api/Terminal.Gui/Terminal.Gui.IListDataSource.html": { "href": "api/Terminal.Gui/Terminal.Gui.IListDataSource.html", "title": "Interface IListDataSource", "keywords": "Interface IListDataSource Implement IListDataSource to provide custom rendering for a ListView . Namespace : Terminal.Gui Assembly : Terminal.Gui.dll Syntax public interface IListDataSource Properties Count Returns the number of elements to display Declaration int Count { get; } Property Value Type Description System.Int32 Methods IsMarked(Int32) Should return whether the specified item is currently marked. Declaration bool IsMarked(int item) Parameters Type Name Description System.Int32 item Item index. Returns Type Description System.Boolean true , if marked, false otherwise. Render(ListView, ConsoleDriver, Boolean, Int32, Int32, Int32, Int32) This method is invoked to render a specified item, the method should cover the entire provided width. Declaration void Render(ListView container, ConsoleDriver driver, bool selected, int item, int col, int line, int width) Parameters Type Name Description ListView container The list view to render. ConsoleDriver driver The console driver to render. System.Boolean selected Describes whether the item being rendered is currently selected by the user. System.Int32 item The index of the item to render, zero for the first item and so on. System.Int32 col The column where the rendering will start System.Int32 line The line where the rendering will be done. System.Int32 width The width that must be filled out. Remarks The default color will be set before this method is invoked, and will be based on whether the item is selected or not. SetMark(Int32, Boolean) Flags the item as marked. Declaration void SetMark(int item, bool value) Parameters Type Name Description System.Int32 item Item index. System.Boolean value If set to true value. ToList() Return the source as IList. Declaration IList ToList() Returns Type Description System.Collections.IList" }, "api/Terminal.Gui/Terminal.Gui.IMainLoopDriver.html": { "href": "api/Terminal.Gui/Terminal.Gui.IMainLoopDriver.html", "title": "Interface IMainLoopDriver", "keywords": "Interface IMainLoopDriver Public interface to create your own platform specific main loop driver. Namespace : Terminal.Gui Assembly : Terminal.Gui.dll Syntax public interface IMainLoopDriver Methods EventsPending(Boolean) Must report whether there are any events pending, or even block waiting for events. Declaration bool EventsPending(bool wait) Parameters Type Name Description System.Boolean wait If set to true wait until an event is available, otherwise return immediately. Returns Type Description System.Boolean true , if there were pending events, false otherwise. MainIteration() The interation function. Declaration void MainIteration() Setup(MainLoop) Initializes the main loop driver, gets the calling main loop for the initialization. Declaration void Setup(MainLoop mainLoop) Parameters Type Name Description MainLoop mainLoop Main loop. Wakeup() Wakes up the mainloop that might be waiting on input, must be thread safe. Declaration void Wakeup()" }, "api/Terminal.Gui/Terminal.Gui.Key.html": { "href": "api/Terminal.Gui/Terminal.Gui.Key.html", "title": "Enum Key", "keywords": "Enum Key The Key enumeration contains special encoding for some keys, but can also encode all the unicode values that can be passed. Namespace : Terminal.Gui Assembly : Terminal.Gui.dll Syntax [Flags] public enum Key : uint Remarks If the SpecialMask is set, then the value is that of the special mask, otherwise, the value is the one of the lower bits (as extracted by CharMask ) Control keys are the values between 1 and 26 corresponding to Control-A to Control-Z Unicode runes are also stored here, the letter 'A\" for example is encoded as a value 65 (not surfaced in the enum). Fields Name Description AltMask When this value is set, the Key encodes the sequence Alt-KeyValue. And the actual value must be extracted by removing the AltMask. Backspace Backspace key. BackTab Shift-tab key (backwards tab key). CharMask Mask that indicates that this is a character value, values outside this range indicate special characters like Alt-key combinations or special keys on the keyboard like function keys, arrows keys and so on. ControlA The key code for the user pressing Control-A ControlB The key code for the user pressing Control-B ControlC The key code for the user pressing Control-C ControlD The key code for the user pressing Control-D ControlE The key code for the user pressing Control-E ControlF The key code for the user pressing Control-F ControlG The key code for the user pressing Control-G ControlH The key code for the user pressing Control-H ControlI The key code for the user pressing Control-I (same as the tab key). ControlJ The key code for the user pressing Control-J ControlK The key code for the user pressing Control-K ControlL The key code for the user pressing Control-L ControlM The key code for the user pressing Control-M ControlN The key code for the user pressing Control-N (same as the return key). ControlO The key code for the user pressing Control-O ControlP The key code for the user pressing Control-P ControlQ The key code for the user pressing Control-Q ControlR The key code for the user pressing Control-R ControlS The key code for the user pressing Control-S ControlSpace The key code for the user pressing Control-spacebar ControlT The key code for the user pressing Control-T ControlU The key code for the user pressing Control-U ControlV The key code for the user pressing Control-V ControlW The key code for the user pressing Control-W ControlX The key code for the user pressing Control-X ControlY The key code for the user pressing Control-Y ControlZ The key code for the user pressing Control-Z CtrlMask When this value is set, the Key encodes the sequence Ctrl-KeyValue. And the actual value must be extracted by removing the CtrlMask. CursorDown Cursor down key. CursorLeft Cursor left key. CursorRight Cursor right key. CursorUp Cursor up key Delete The key code for the user pressing the delete key. DeleteChar Delete character key End End key Enter The key code for the user pressing the return key. Esc The key code for the user pressing the escape key F1 F1 key. F10 F10 key. F11 F11 key. F12 F12 key. F2 F2 key. F3 F3 key. F4 F4 key. F5 F5 key. F6 F6 key. F7 F7 key. F8 F8 key. F9 F9 key. Home Home key InsertChar Insert character key PageDown Page Down key. PageUp Page Up key. ShiftMask When this value is set, the Key encodes the sequence Shift-KeyValue. Space The key code for the user pressing the space bar SpecialMask If the SpecialMask is set, then the value is that of the special mask, otherwise, the value is the one of the lower bits (as extracted by CharMask ). Tab The key code for the user pressing the tab key (forwards tab key). Unknown A key with an unknown mapping was raised." }, "api/Terminal.Gui/Terminal.Gui.KeyEvent.html": { "href": "api/Terminal.Gui/Terminal.Gui.KeyEvent.html", "title": "Class KeyEvent", "keywords": "Class KeyEvent Describes a keyboard event. Inheritance System.Object KeyEvent Inherited Members System.Object.Equals(System.Object) System.Object.Equals(System.Object, System.Object) System.Object.GetHashCode() System.Object.GetType() System.Object.MemberwiseClone() System.Object.ReferenceEquals(System.Object, System.Object) Namespace : Terminal.Gui Assembly : Terminal.Gui.dll Syntax public class KeyEvent Constructors KeyEvent() Constructs a new KeyEvent Declaration public KeyEvent() KeyEvent(Key) Constructs a new KeyEvent from the provided Key value - can be a rune cast into a Key value Declaration public KeyEvent(Key k) Parameters Type Name Description Key k Fields Key Symb olid definition for the key. Declaration public Key Key Field Value Type Description Key Properties IsAlt Gets a value indicating whether the Alt key was pressed (real or synthesized) Declaration public bool IsAlt { get; } Property Value Type Description System.Boolean true if is alternate; otherwise, false . IsCtrl Determines whether the value is a control key (and NOT just the ctrl key) Declaration public bool IsCtrl { get; } Property Value Type Description System.Boolean true if is ctrl; otherwise, false . IsShift Gets a value indicating whether the Shift key was pressed. Declaration public bool IsShift { get; } Property Value Type Description System.Boolean true if is shift; otherwise, false . KeyValue The key value cast to an integer, you will typical use this for extracting the Unicode rune value out of a key, when none of the symbolic options are in use. Declaration public int KeyValue { get; } Property Value Type Description System.Int32 Methods ToString() Declaration public override string ToString() Returns Type Description System.String Overrides System.Object.ToString()" }, "api/Terminal.Gui/Terminal.Gui.Label.html": { "href": "api/Terminal.Gui/Terminal.Gui.Label.html", "title": "Class Label", "keywords": "Class Label The Label View displays a string at a given position and supports multiple lines separted by newline characters. Inheritance System.Object Responder View Label Implements System.Collections.IEnumerable Inherited Members View.Enter View.Leave View.MouseEnter View.MouseLeave View.Driver View.Subviews View.Id View.IsCurrentTop View.WantMousePositionReports View.WantContinuousButtonPressed View.Frame View.GetEnumerator() View.LayoutStyle View.Bounds View.X View.Y View.Width View.Height View.SuperView View.SetNeedsDisplay() View.SetNeedsDisplay(Rect) View.ChildNeedsDisplay() View.Add(View) View.Add(View[]) View.RemoveAll() View.Remove(View) View.BringSubviewToFront(View) View.SendSubviewToBack(View) View.SendSubviewBackwards(View) View.BringSubviewForward(View) View.Clear() View.Clear(Rect) View.ScreenToView(Int32, Int32) View.ClipToBounds() View.SetClip(Rect) View.DrawFrame(Rect, Int32, Boolean) View.DrawHotString(ustring, Attribute, Attribute) View.DrawHotString(ustring, Boolean, ColorScheme) View.Move(Int32, Int32) View.PositionCursor() View.HasFocus View.OnEnter() View.OnLeave() View.Focused View.MostFocused View.ColorScheme View.AddRune(Int32, Int32, Rune) View.ClearNeedsDisplay() View.SetFocus(View) View.KeyPress View.ProcessKey(KeyEvent) View.ProcessHotKey(KeyEvent) View.ProcessColdKey(KeyEvent) View.KeyDown View.OnKeyDown(KeyEvent) View.KeyUp View.OnKeyUp(KeyEvent) View.EnsureFocus() View.FocusFirst() View.FocusLast() View.FocusPrev() View.FocusNext() View.LayoutSubviews() View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) Responder.CanFocus Responder.MouseEvent(MouseEvent) System.Object.Equals(System.Object) System.Object.Equals(System.Object, System.Object) System.Object.GetHashCode() System.Object.GetType() System.Object.MemberwiseClone() System.Object.ReferenceEquals(System.Object, System.Object) Namespace : Terminal.Gui Assembly : Terminal.Gui.dll Syntax public class Label : View, IEnumerable Constructors Label(ustring) Initializes a new instance of Label and configures the default Width and Height based on the text, the result is suitable for Computed layout. Declaration public Label(ustring text) Parameters Type Name Description NStack.ustring text Text. Label(Int32, Int32, ustring) Initializes a new instance of Label at the given coordinate with the given string, computes the bounding box based on the size of the string, assumes that the string contains newlines for multiple lines, no special breaking rules are used. Declaration public Label(int x, int y, ustring text) Parameters Type Name Description System.Int32 x System.Int32 y NStack.ustring text Label(Rect, ustring) Initializes a new instance of Label at the given coordinate with the given string and uses the specified frame for the string. Declaration public Label(Rect rect, ustring text) Parameters Type Name Description Rect rect NStack.ustring text Properties Text The text displayed by the Label . Declaration public virtual ustring Text { get; set; } Property Value Type Description NStack.ustring TextAlignment Controls the text-alignemtn property of the label, changing it will redisplay the Label . Declaration public TextAlignment TextAlignment { get; set; } Property Value Type Description TextAlignment The text alignment. TextColor The color used for the Label . Declaration public Attribute TextColor { get; set; } Property Value Type Description Attribute Methods MaxWidth(ustring, Int32) Computes the the max width of a line or multilines needed to render by the Label control Declaration public static int MaxWidth(ustring text, int width) Parameters Type Name Description NStack.ustring text Text, may contain newlines. System.Int32 width The width for the text. Returns Type Description System.Int32 Max width of lines. MeasureLines(ustring, Int32) Computes the number of lines needed to render the specified text by the Label view Declaration public static int MeasureLines(ustring text, int width) Parameters Type Name Description NStack.ustring text Text, may contain newlines. System.Int32 width The width for the text. Returns Type Description System.Int32 Number of lines. Redraw(Rect) Declaration public override void Redraw(Rect region) Parameters Type Name Description Rect region Overrides View.Redraw(Rect) Implements System.Collections.IEnumerable" }, "api/Terminal.Gui/Terminal.Gui.LayoutStyle.html": { "href": "api/Terminal.Gui/Terminal.Gui.LayoutStyle.html", "title": "Enum LayoutStyle", "keywords": "Enum LayoutStyle Determines the LayoutStyle for a view, if Absolute, during LayoutSubviews, the value from the Frame will be used, if the value is Computer, then the Frame will be updated from the X, Y Pos objects and the Width and Height Dim objects. Namespace : Terminal.Gui Assembly : Terminal.Gui.dll Syntax public enum LayoutStyle Fields Name Description Absolute The position and size of the view are based on the Frame value. Computed The position and size of the view will be computed based on the X, Y, Width and Height properties and set on the Frame." }, "api/Terminal.Gui/Terminal.Gui.ListView.html": { "href": "api/Terminal.Gui/Terminal.Gui.ListView.html", "title": "Class ListView", "keywords": "Class ListView ListView View renders a scrollable list of data where each item can be activated to perform an action. Inheritance System.Object Responder View ListView Implements System.Collections.IEnumerable Inherited Members View.Enter View.Leave View.MouseEnter View.MouseLeave View.Driver View.Subviews View.Id View.IsCurrentTop View.WantMousePositionReports View.WantContinuousButtonPressed View.Frame View.GetEnumerator() View.LayoutStyle View.Bounds View.X View.Y View.Width View.Height View.SuperView View.SetNeedsDisplay() View.SetNeedsDisplay(Rect) View.ChildNeedsDisplay() View.Add(View) View.Add(View[]) View.RemoveAll() View.Remove(View) View.BringSubviewToFront(View) View.SendSubviewToBack(View) View.SendSubviewBackwards(View) View.BringSubviewForward(View) View.Clear() View.Clear(Rect) View.ScreenToView(Int32, Int32) View.ClipToBounds() View.SetClip(Rect) View.DrawFrame(Rect, Int32, Boolean) View.DrawHotString(ustring, Attribute, Attribute) View.DrawHotString(ustring, Boolean, ColorScheme) View.Move(Int32, Int32) View.HasFocus View.OnEnter() View.OnLeave() View.Focused View.MostFocused View.ColorScheme View.AddRune(Int32, Int32, Rune) View.ClearNeedsDisplay() View.SetFocus(View) View.KeyPress View.ProcessHotKey(KeyEvent) View.ProcessColdKey(KeyEvent) View.KeyDown View.OnKeyDown(KeyEvent) View.KeyUp View.OnKeyUp(KeyEvent) View.EnsureFocus() View.FocusFirst() View.FocusLast() View.FocusPrev() View.FocusNext() View.LayoutSubviews() View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) Responder.CanFocus System.Object.Equals(System.Object) System.Object.Equals(System.Object, System.Object) System.Object.GetHashCode() System.Object.GetType() System.Object.MemberwiseClone() System.Object.ReferenceEquals(System.Object, System.Object) Namespace : Terminal.Gui Assembly : Terminal.Gui.dll Syntax public class ListView : View, IEnumerable Remarks The ListView displays lists of data and allows the user to scroll through the data. Items in the can be activated firing an event (with the ENTER key or a mouse double-click). If the AllowsMarking property is true, elements of the list can be marked by the user. By default ListView uses System.Object.ToString() to render the items of any System.Collections.IList object (e.g. arrays, System.Collections.Generic.List , and other collections). Alternatively, an object that implements the IListDataSource interface can be provided giving full control of what is rendered. ListView can display any object that implements the System.Collections.IList interface. System.String values are converted into NStack.ustring values before rendering, and other values are converted into System.String by calling System.Object.ToString() and then converting to NStack.ustring . To change the contents of the ListView, set the Source property (when providing custom rendering via IListDataSource ) or call SetSource(IList) an System.Collections.IList is being used. When AllowsMarking is set to true the rendering will prefix the rendered items with [x] or [ ] and bind the SPACE key to toggle the selection. To implement a different marking style set AllowsMarking to false and implement custom rendering. Constructors ListView() Initializes a new instance of ListView . Set the Source property to display something. Declaration public ListView() ListView(IList) Initializes a new instance of ListView that will display the contents of the object implementing the System.Collections.IList interface, with relative positioning. Declaration public ListView(IList source) Parameters Type Name Description System.Collections.IList source An System.Collections.IList data source, if the elements are strings or ustrings, the string is rendered, otherwise the ToString() method is invoked on the result. ListView(IListDataSource) Initializes a new instance of ListView that will display the provided data source, using relative positioning. Declaration public ListView(IListDataSource source) Parameters Type Name Description IListDataSource source IListDataSource object that provides a mechanism to render the data. The number of elements on the collection should not change, if you must change, set the \"Source\" property to reset the internal settings of the ListView. ListView(Rect, IList) Initializes a new instance of ListView that will display the contents of the object implementing the System.Collections.IList interface with an absolute position. Declaration public ListView(Rect rect, IList source) Parameters Type Name Description Rect rect Frame for the listview. System.Collections.IList source An IList data source, if the elements of the IList are strings or ustrings, the string is rendered, otherwise the ToString() method is invoked on the result. ListView(Rect, IListDataSource) Initializes a new instance of ListView with the provided data source and an absolute position Declaration public ListView(Rect rect, IListDataSource source) Parameters Type Name Description Rect rect Frame for the listview. IListDataSource source IListDataSource object that provides a mechanism to render the data. The number of elements on the collection should not change, if you must change, set the \"Source\" property to reset the internal settings of the ListView. Properties AllowsMarking Gets or sets whether this ListView allows items to be marked. Declaration public bool AllowsMarking { get; set; } Property Value Type Description System.Boolean true if allows marking elements of the list; otherwise, false . Remarks If set to true, ListView will render items marked items with \"[x]\", and unmarked items with \"[ ]\" spaces. SPACE key will toggle marking. AllowsMultipleSelection If set to true allows more than one item to be selected. If false only allow one item selected. Declaration public bool AllowsMultipleSelection { get; set; } Property Value Type Description System.Boolean SelectedItem Gets or sets the index of the currently selected item. Declaration public int SelectedItem { get; set; } Property Value Type Description System.Int32 The selected item. Source Gets or sets the IListDataSource backing this ListView , enabling custom rendering. Declaration public IListDataSource Source { get; set; } Property Value Type Description IListDataSource The source. Remarks Use SetSource(IList) to set a new System.Collections.IList source. TopItem Gets or sets the item that is displayed at the top of the ListView . Declaration public int TopItem { get; set; } Property Value Type Description System.Int32 The top item. Methods AllowsAll() Prevents marking if it's not allowed mark and if it's not allows multiple selection. Declaration public virtual bool AllowsAll() Returns Type Description System.Boolean MarkUnmarkRow() Marks an unmarked row. Declaration public virtual bool MarkUnmarkRow() Returns Type Description System.Boolean MouseEvent(MouseEvent) Declaration public override bool MouseEvent(MouseEvent me) Parameters Type Name Description MouseEvent me Returns Type Description System.Boolean Overrides Responder.MouseEvent(MouseEvent) MoveDown() Moves the selected item index to the next row. Declaration public virtual bool MoveDown() Returns Type Description System.Boolean MovePageDown() Moves the selected item index to the previous page. Declaration public virtual bool MovePageDown() Returns Type Description System.Boolean MovePageUp() Moves the selected item index to the next page. Declaration public virtual bool MovePageUp() Returns Type Description System.Boolean MoveUp() Moves the selected item index to the previous row. Declaration public virtual bool MoveUp() Returns Type Description System.Boolean OnOpenSelectedItem() Invokes the OnOpenSelectedItem event if it is defined. Declaration public virtual bool OnOpenSelectedItem() Returns Type Description System.Boolean OnSelectedChanged() Invokes the SelectedChanged event if it is defined. Declaration public virtual bool OnSelectedChanged() Returns Type Description System.Boolean PositionCursor() Declaration public override void PositionCursor() Overrides View.PositionCursor() ProcessKey(KeyEvent) Declaration public override bool ProcessKey(KeyEvent kb) Parameters Type Name Description KeyEvent kb Returns Type Description System.Boolean Overrides View.ProcessKey(KeyEvent) Redraw(Rect) Declaration public override void Redraw(Rect region) Parameters Type Name Description Rect region Overrides View.Redraw(Rect) SetSource(IList) Sets the source of the ListView to an System.Collections.IList . Declaration public void SetSource(IList source) Parameters Type Name Description System.Collections.IList source Remarks Use the Source property to set a new IListDataSource source and use custome rendering. SetSourceAsync(IList) Sets the source to an System.Collections.IList value asynchronously. Declaration public Task SetSourceAsync(IList source) Parameters Type Name Description System.Collections.IList source Returns Type Description System.Threading.Tasks.Task An item implementing the IList interface. Remarks Use the Source property to set a new IListDataSource source and use custome rendering. Events OpenSelectedItem This event is raised when the user Double Clicks on an item or presses ENTER to open the selected item. Declaration public event EventHandler OpenSelectedItem Event Type Type Description System.EventHandler < ListViewItemEventArgs > SelectedChanged This event is raised when the selected item in the ListView has changed. Declaration public event EventHandler SelectedChanged Event Type Type Description System.EventHandler < ListViewItemEventArgs > Implements System.Collections.IEnumerable" }, "api/Terminal.Gui/Terminal.Gui.ListViewItemEventArgs.html": { "href": "api/Terminal.Gui/Terminal.Gui.ListViewItemEventArgs.html", "title": "Class ListViewItemEventArgs", "keywords": "Class ListViewItemEventArgs System.EventArgs for ListView events. Inheritance System.Object System.EventArgs ListViewItemEventArgs Inherited Members System.EventArgs.Empty System.Object.Equals(System.Object) System.Object.Equals(System.Object, System.Object) System.Object.GetHashCode() System.Object.GetType() System.Object.MemberwiseClone() System.Object.ReferenceEquals(System.Object, System.Object) System.Object.ToString() Namespace : Terminal.Gui Assembly : Terminal.Gui.dll Syntax public class ListViewItemEventArgs : EventArgs Constructors ListViewItemEventArgs(Int32, Object) Initializes a new instance of ListViewItemEventArgs Declaration public ListViewItemEventArgs(int item, object value) Parameters Type Name Description System.Int32 item The index of the the ListView item. System.Object value The ListView item Properties Item The index of the ListView item. Declaration public int Item { get; } Property Value Type Description System.Int32 Value The the ListView item. Declaration public object Value { get; } Property Value Type Description System.Object" }, "api/Terminal.Gui/Terminal.Gui.ListWrapper.html": { "href": "api/Terminal.Gui/Terminal.Gui.ListWrapper.html", "title": "Class ListWrapper", "keywords": "Class ListWrapper Implements an IListDataSource that renders arbitrary System.Collections.IList instances for ListView . Inheritance System.Object ListWrapper Implements IListDataSource 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 ListWrapper : IListDataSource Remarks Implements support for rendering marked items. Constructors ListWrapper(IList) Initializes a new instance of ListWrapper given an System.Collections.IList Declaration public ListWrapper(IList source) Parameters Type Name Description System.Collections.IList source Properties Count Gets the number of items in the System.Collections.IList . Declaration public int Count { get; } Property Value Type Description System.Int32 Methods IsMarked(Int32) Returns true if the item is marked, false otherwise. Declaration public bool IsMarked(int item) Parameters Type Name Description System.Int32 item The item. Returns Type Description System.Boolean true If is marked. false otherwise. Render(ListView, ConsoleDriver, Boolean, Int32, Int32, Int32, Int32) Renders a ListView item to the appropriate type. Declaration public void Render(ListView container, ConsoleDriver driver, bool marked, int item, int col, int line, int width) Parameters Type Name Description ListView container The ListView. ConsoleDriver driver The driver used by the caller. System.Boolean marked Informs if it's marked or not. System.Int32 item The item. System.Int32 col The col where to move. System.Int32 line The line where to move. System.Int32 width The item width. SetMark(Int32, Boolean) Sets the item as marked or unmarked based on the value is true or false, respectively. Declaration public void SetMark(int item, bool value) Parameters Type Name Description System.Int32 item The item System.Boolean value Marks the item. Unmarked the item. The value. ToList() Returns the source as IList. Declaration public IList ToList() Returns Type Description System.Collections.IList Implements IListDataSource" }, "api/Terminal.Gui/Terminal.Gui.MainLoop.html": { "href": "api/Terminal.Gui/Terminal.Gui.MainLoop.html", "title": "Class MainLoop", "keywords": "Class MainLoop Simple main loop implementation that can be used to monitor file descriptor, run timers and idle handlers. Inheritance System.Object MainLoop 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 MainLoop Remarks Monitoring of file descriptors is only available on Unix, there does not seem to be a way of supporting this on Windows. Constructors MainLoop(IMainLoopDriver) Creates a new Mainloop, to run it you must provide a driver, and choose one of the implementations UnixMainLoop, NetMainLoop or WindowsMainLoop. Declaration public MainLoop(IMainLoopDriver driver) Parameters Type Name Description IMainLoopDriver driver Properties Driver The current IMainLoopDriver in use. Declaration public IMainLoopDriver Driver { get; } Property Value Type Description IMainLoopDriver The driver. Methods AddIdle(Func) Executes the specified @idleHandler on the idle loop. The return value is a token to remove it. Declaration public Func AddIdle(Func idleHandler) Parameters Type Name Description System.Func < System.Boolean > idleHandler Returns Type Description System.Func < System.Boolean > AddTimeout(TimeSpan, Func) Adds a timeout to the mainloop. Declaration public object AddTimeout(TimeSpan time, Func callback) Parameters Type Name Description System.TimeSpan time System.Func < MainLoop , System.Boolean > callback Returns Type Description System.Object Remarks When time time specified passes, the callback will be invoked. If the callback returns true, the timeout will be reset, repeating the invocation. If it returns false, the timeout will stop. The returned value is a token that can be used to stop the timeout by calling RemoveTimeout. EventsPending(Boolean) Determines whether there are pending events to be processed. Declaration public bool EventsPending(bool wait = false) Parameters Type Name Description System.Boolean wait Returns Type Description System.Boolean Remarks You can use this method if you want to probe if events are pending. Typically used if you need to flush the input queue while still running some of your own code in your main thread. Invoke(Action) Runs @action on the thread that is processing events Declaration public void Invoke(Action action) Parameters Type Name Description System.Action action MainIteration() Runs one iteration of timers and file watches Declaration public void MainIteration() Remarks You use this to process all pending events (timers, idle handlers and file watches). You can use it like this: while (main.EvensPending ()) MainIteration (); RemoveIdle(Func) Removes the specified idleHandler from processing. Declaration public void RemoveIdle(Func idleHandler) Parameters Type Name Description System.Func < System.Boolean > idleHandler RemoveTimeout(Object) Removes a previously scheduled timeout Declaration public void RemoveTimeout(object token) Parameters Type Name Description System.Object token Remarks The token parameter is the value returned by AddTimeout. Run() Runs the mainloop. Declaration public void Run() Stop() Stops the mainloop. Declaration public void Stop()" }, "api/Terminal.Gui/Terminal.Gui.MenuBar.html": { "href": "api/Terminal.Gui/Terminal.Gui.MenuBar.html", "title": "Class MenuBar", "keywords": "Class MenuBar The MenuBar provides a menu for Terminal.Gui applications. Inheritance System.Object Responder View MenuBar Implements System.Collections.IEnumerable Inherited Members View.Enter View.Leave View.MouseEnter View.MouseLeave View.Driver View.Subviews View.Id View.IsCurrentTop View.WantMousePositionReports View.WantContinuousButtonPressed View.Frame View.GetEnumerator() View.LayoutStyle View.Bounds View.X View.Y View.Width View.Height View.SuperView View.SetNeedsDisplay() View.SetNeedsDisplay(Rect) View.ChildNeedsDisplay() View.Add(View) View.Add(View[]) View.RemoveAll() View.Remove(View) View.BringSubviewToFront(View) View.SendSubviewToBack(View) View.SendSubviewBackwards(View) View.BringSubviewForward(View) View.Clear() View.Clear(Rect) View.ScreenToView(Int32, Int32) View.ClipToBounds() View.SetClip(Rect) View.DrawFrame(Rect, Int32, Boolean) View.DrawHotString(ustring, Attribute, Attribute) View.DrawHotString(ustring, Boolean, ColorScheme) View.Move(Int32, Int32) View.HasFocus View.OnEnter() View.OnLeave() View.Focused View.MostFocused View.ColorScheme View.AddRune(Int32, Int32, Rune) View.ClearNeedsDisplay() View.SetFocus(View) View.KeyPress View.ProcessColdKey(KeyEvent) View.KeyDown View.KeyUp View.EnsureFocus() View.FocusFirst() View.FocusLast() View.FocusPrev() View.FocusNext() View.LayoutSubviews() View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) Responder.CanFocus System.Object.Equals(System.Object) System.Object.Equals(System.Object, System.Object) System.Object.GetHashCode() System.Object.GetType() System.Object.MemberwiseClone() System.Object.ReferenceEquals(System.Object, System.Object) Namespace : Terminal.Gui Assembly : Terminal.Gui.dll Syntax public class MenuBar : View, IEnumerable Remarks The MenuBar appears on the first row of the terminal. The MenuBar provides global hotkeys for the application. Constructors MenuBar(MenuBarItem[]) Initializes a new instance of the MenuBar class with the specified set of toplevel menu items. Declaration public MenuBar(MenuBarItem[] menus) Parameters Type Name Description MenuBarItem [] menus Individual menu items; a null item will result in a separator being drawn. Properties IsMenuOpen True if the menu is open; otherwise false. Declaration public bool IsMenuOpen { get; protected set; } Property Value Type Description System.Boolean LastFocused Get the lasted focused view before open the menu. Declaration public View LastFocused { get; } Property Value Type Description View Menus Gets or sets the array of MenuBarItem s for the menu. Only set this when the MenuBar is vislble. Declaration public MenuBarItem[] Menus { get; set; } Property Value Type Description MenuBarItem [] The menu array. UseKeysUpDownAsKeysLeftRight Used for change the navigation key style. Declaration public bool UseKeysUpDownAsKeysLeftRight { get; set; } Property Value Type Description System.Boolean Methods CloseMenu() Closes the current Menu programatically, if open. Declaration public void CloseMenu() MouseEvent(MouseEvent) Declaration public override bool MouseEvent(MouseEvent me) Parameters Type Name Description MouseEvent me Returns Type Description System.Boolean Overrides Responder.MouseEvent(MouseEvent) OnKeyDown(KeyEvent) Declaration public override bool OnKeyDown(KeyEvent keyEvent) Parameters Type Name Description KeyEvent keyEvent Returns Type Description System.Boolean Overrides View.OnKeyDown(KeyEvent) OnKeyUp(KeyEvent) Declaration public override bool OnKeyUp(KeyEvent keyEvent) Parameters Type Name Description KeyEvent keyEvent Returns Type Description System.Boolean Overrides View.OnKeyUp(KeyEvent) OpenMenu() Opens the current Menu programatically. Declaration public void OpenMenu() PositionCursor() Declaration public override void PositionCursor() Overrides View.PositionCursor() ProcessHotKey(KeyEvent) Declaration public override bool ProcessHotKey(KeyEvent kb) Parameters Type Name Description KeyEvent kb Returns Type Description System.Boolean Overrides View.ProcessHotKey(KeyEvent) ProcessKey(KeyEvent) Declaration public override bool ProcessKey(KeyEvent kb) Parameters Type Name Description KeyEvent kb Returns Type Description System.Boolean Overrides View.ProcessKey(KeyEvent) Redraw(Rect) Declaration public override void Redraw(Rect region) Parameters Type Name Description Rect region Overrides View.Redraw(Rect) Events OnCloseMenu Raised when a menu is closing. Declaration public event EventHandler OnCloseMenu Event Type Type Description System.EventHandler OnOpenMenu Raised as a menu is opened. Declaration public event EventHandler OnOpenMenu Event Type Type Description System.EventHandler Implements System.Collections.IEnumerable" }, "api/Terminal.Gui/Terminal.Gui.MenuBarItem.html": { "href": "api/Terminal.Gui/Terminal.Gui.MenuBarItem.html", "title": "Class MenuBarItem", "keywords": "Class MenuBarItem A MenuBarItem contains MenuBarItem s or MenuItem s. Inheritance System.Object MenuItem MenuBarItem Inherited Members MenuItem.HotKey MenuItem.ShortCut MenuItem.Title MenuItem.Help MenuItem.Action MenuItem.CanExecute MenuItem.IsEnabled() MenuItem.GetMenuItem() MenuItem.GetMenuBarItem() 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 MenuBarItem : MenuItem Constructors MenuBarItem(ustring, String, Action, Func) Initializes a new MenuBarItem as a MenuItem . Declaration public MenuBarItem(ustring title, string help, Action action, Func canExecute = null) Parameters Type Name Description NStack.ustring title Title for the menu item. System.String help Help text to display. System.Action action Action to invoke when the menu item is activated. System.Func < System.Boolean > canExecute Function to determine if the action can currently be executred. MenuBarItem(ustring, MenuItem[]) Initializes a new MenuBarItem . Declaration public MenuBarItem(ustring title, MenuItem[] children) Parameters Type Name Description NStack.ustring title Title for the menu item. MenuItem [] children The items in the current menu. MenuBarItem(MenuItem[]) Initializes a new MenuBarItem . Declaration public MenuBarItem(MenuItem[] children) Parameters Type Name Description MenuItem [] children The items in the current menu. Properties Children Gets or sets an array of MenuItem objects that are the children of this MenuBarItem Declaration public MenuItem[] Children { get; set; } Property Value Type Description MenuItem [] The children." }, "api/Terminal.Gui/Terminal.Gui.MenuItem.html": { "href": "api/Terminal.Gui/Terminal.Gui.MenuItem.html", "title": "Class MenuItem", "keywords": "Class MenuItem A MenuItem has a title, an associated help text, and an action to execute on activation. Inheritance System.Object MenuItem MenuBarItem 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 MenuItem Constructors MenuItem() Initializes a new instance of MenuItem Declaration public MenuItem() MenuItem(ustring, String, Action, Func) Initializes a new instance of MenuItem . Declaration public MenuItem(ustring title, string help, Action action, Func canExecute = null) Parameters Type Name Description NStack.ustring title Title for the menu item. System.String help Help text to display. System.Action action Action to invoke when the menu item is activated. System.Func < System.Boolean > canExecute Function to determine if the action can currently be executred. MenuItem(ustring, MenuBarItem) Initializes a new instance of MenuItem Declaration public MenuItem(ustring title, MenuBarItem subMenu) Parameters Type Name Description NStack.ustring title Title for the menu item. MenuBarItem subMenu The menu sub-menu. Fields HotKey The HotKey is used when the menu is active, the shortcut can be triggered when the menu is not active. For example HotKey would be \"N\" when the File Menu is open (assuming there is a \"_New\" entry if the ShortCut is set to \"Control-N\", this would be a global hotkey that would trigger as well Declaration public Rune HotKey Field Value Type Description System.Rune ShortCut This is the global setting that can be used as a global shortcut to invoke the action on the menu. Declaration public Key ShortCut Field Value Type Description Key Properties Action Gets or sets the action to be invoked when the menu is triggered Declaration public Action Action { get; set; } Property Value Type Description System.Action Method to invoke. CanExecute Gets or sets the action to be invoked if the menu can be triggered Declaration public Func CanExecute { get; set; } Property Value Type Description System.Func < System.Boolean > Function to determine if action is ready to be executed. Help Gets or sets the help text for the menu item. Declaration public ustring Help { get; set; } Property Value Type Description NStack.ustring The help text. Title Gets or sets the title. Declaration public ustring Title { get; set; } Property Value Type Description NStack.ustring The title. Methods GetMenuBarItem() Merely a debugging aid to see the interaction with main Declaration public bool GetMenuBarItem() Returns Type Description System.Boolean GetMenuItem() Merely a debugging aid to see the interaction with main Declaration public MenuItem GetMenuItem() Returns Type Description MenuItem IsEnabled() Shortcut to check if the menu item is enabled Declaration public bool IsEnabled() Returns Type Description System.Boolean" }, "api/Terminal.Gui/Terminal.Gui.MessageBox.html": { "href": "api/Terminal.Gui/Terminal.Gui.MessageBox.html", "title": "Class MessageBox", "keywords": "Class MessageBox MessageBox displays a modal message to the user, with a title, a message and a series of options that the user can choose from. Inheritance System.Object MessageBox Inherited Members System.Object.Equals(System.Object) System.Object.Equals(System.Object, System.Object) System.Object.GetHashCode() System.Object.GetType() System.Object.MemberwiseClone() System.Object.ReferenceEquals(System.Object, System.Object) System.Object.ToString() Namespace : Terminal.Gui Assembly : Terminal.Gui.dll Syntax public static class MessageBox Examples var n = MessageBox.Query (50, 7, \"Quit Demo\", \"Are you sure you want to quit this demo?\", \"Yes\", \"No\"); if (n == 0) quit = true; else quit = false; Methods ErrorQuery(Int32, Int32, String, String, String[]) Presents an error MessageBox with the specified title and message and a list of buttons to show to the user. Declaration public static int ErrorQuery(int width, int height, string title, string message, params string[] buttons) Parameters Type Name Description System.Int32 width Width for the window. System.Int32 height Height for the window. System.String title Title for the query. System.String message Message to display, might contain multiple lines. System.String [] buttons Array of buttons to add. Returns Type Description System.Int32 The index of the selected button, or -1 if the user pressed ESC to close the dialog. Query(Int32, Int32, String, String, String[]) Presents a normal MessageBox with the specified title and message and a list of buttons to show to the user. Declaration public static int Query(int width, int height, string title, string message, params string[] buttons) Parameters Type Name Description System.Int32 width Width for the window. System.Int32 height Height for the window. System.String title Title for the query. System.String message Message to display, might contain multiple lines.. System.String [] buttons Array of buttons to add. Returns Type Description System.Int32 The index of the selected button, or -1 if the user pressed ESC to close the dialog." }, "api/Terminal.Gui/Terminal.Gui.MouseEvent.html": { "href": "api/Terminal.Gui/Terminal.Gui.MouseEvent.html", "title": "Struct MouseEvent", "keywords": "Struct MouseEvent Describes a mouse event Inherited Members System.ValueType.Equals(System.Object) System.ValueType.GetHashCode() System.Object.Equals(System.Object, System.Object) System.Object.GetType() System.Object.ReferenceEquals(System.Object, System.Object) Namespace : Terminal.Gui Assembly : Terminal.Gui.dll Syntax public struct MouseEvent Fields Flags Flags indicating the kind of mouse event that is being posted. Declaration public MouseFlags Flags Field Value Type Description MouseFlags OfX The offset X (column) location for the mouse event. Declaration public int OfX Field Value Type Description System.Int32 OfY The offset Y (column) location for the mouse event. Declaration public int OfY Field Value Type Description System.Int32 View The current view at the location for the mouse event. Declaration public View View Field Value Type Description View X The X (column) location for the mouse event. Declaration public int X Field Value Type Description System.Int32 Y The Y (column) location for the mouse event. Declaration public int Y Field Value Type Description System.Int32 Methods ToString() Returns a System.String that represents the current MouseEvent . Declaration public override string ToString() Returns Type Description System.String A System.String that represents the current MouseEvent . Overrides System.ValueType.ToString()" }, "api/Terminal.Gui/Terminal.Gui.MouseFlags.html": { "href": "api/Terminal.Gui/Terminal.Gui.MouseFlags.html", "title": "Enum MouseFlags", "keywords": "Enum MouseFlags Mouse flags reported in MouseEvent . Namespace : Terminal.Gui Assembly : Terminal.Gui.dll Syntax [Flags] public enum MouseFlags Remarks They just happen to map to the ncurses ones. Fields Name Description AllEvents Mask that captures all the events. Button1Clicked The first mouse button was clicked (press+release). Button1DoubleClicked The first mouse button was double-clicked. Button1Pressed The first mouse button was pressed. Button1Released The first mouse button was released. Button1TripleClicked The first mouse button was triple-clicked. Button2Clicked The second mouse button was clicked (press+release). Button2DoubleClicked The second mouse button was double-clicked. Button2Pressed The second mouse button was pressed. Button2Released The second mouse button was released. Button2TripleClicked The second mouse button was triple-clicked. Button3Clicked The third mouse button was clicked (press+release). Button3DoubleClicked The third mouse button was double-clicked. Button3Pressed The third mouse button was pressed. Button3Released The third mouse button was released. Button3TripleClicked The third mouse button was triple-clicked. Button4Clicked The fourth button was clicked (press+release). Button4DoubleClicked The fourth button was double-clicked. Button4Pressed The fourth mouse button was pressed. Button4Released The fourth mouse button was released. Button4TripleClicked The fourth button was triple-clicked. ButtonAlt Flag: the alt key was pressed when the mouse button took place. ButtonCtrl Flag: the ctrl key was pressed when the mouse button took place. ButtonShift Flag: the shift key was pressed when the mouse button took place. ReportMousePosition The mouse position is being reported in this event. WheeledDown Vertical button wheeled up. WheeledUp Vertical button wheeled up." }, "api/Terminal.Gui/Terminal.Gui.OpenDialog.html": { "href": "api/Terminal.Gui/Terminal.Gui.OpenDialog.html", "title": "Class OpenDialog", "keywords": "Class OpenDialog The OpenDialog provides an interactive dialog box for users to select files or directories. Inheritance System.Object Responder View Toplevel Window Dialog FileDialog OpenDialog Implements System.Collections.IEnumerable Inherited Members FileDialog.WillPresent() FileDialog.Prompt FileDialog.NameFieldLabel FileDialog.Message FileDialog.CanCreateDirectories FileDialog.IsExtensionHidden FileDialog.DirectoryPath FileDialog.AllowedFileTypes FileDialog.AllowsOtherFileTypes FileDialog.FilePath FileDialog.Canceled Dialog.AddButton(Button) Dialog.LayoutSubviews() Dialog.ProcessKey(KeyEvent) Window.Title Window.GetEnumerator() Window.Add(View) Window.Remove(View) Window.RemoveAll() Window.Redraw(Rect) Window.MouseEvent(MouseEvent) Toplevel.Running Toplevel.Ready Toplevel.Create() Toplevel.CanFocus Toplevel.Modal Toplevel.MenuBar Toplevel.StatusBar View.Enter View.Leave View.MouseEnter View.MouseLeave View.Driver View.Subviews View.Id View.IsCurrentTop View.WantMousePositionReports View.WantContinuousButtonPressed View.Frame View.LayoutStyle View.Bounds View.X View.Y View.Width View.Height View.SuperView View.SetNeedsDisplay() View.SetNeedsDisplay(Rect) View.ChildNeedsDisplay() View.Add(View[]) View.BringSubviewToFront(View) View.SendSubviewToBack(View) View.SendSubviewBackwards(View) View.BringSubviewForward(View) View.Clear() View.Clear(Rect) View.ScreenToView(Int32, Int32) View.ClipToBounds() View.SetClip(Rect) View.DrawFrame(Rect, Int32, Boolean) View.DrawHotString(ustring, Attribute, Attribute) View.DrawHotString(ustring, Boolean, ColorScheme) View.Move(Int32, Int32) View.PositionCursor() View.HasFocus View.OnEnter() View.OnLeave() View.Focused View.MostFocused View.ColorScheme View.AddRune(Int32, Int32, Rune) View.ClearNeedsDisplay() View.SetFocus(View) View.KeyPress View.ProcessHotKey(KeyEvent) View.ProcessColdKey(KeyEvent) View.KeyDown View.OnKeyDown(KeyEvent) View.KeyUp View.OnKeyUp(KeyEvent) View.EnsureFocus() View.FocusFirst() View.FocusLast() View.FocusPrev() View.FocusNext() View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) System.Object.Equals(System.Object) System.Object.Equals(System.Object, System.Object) System.Object.GetHashCode() System.Object.GetType() System.Object.MemberwiseClone() System.Object.ReferenceEquals(System.Object, System.Object) Namespace : Terminal.Gui Assembly : Terminal.Gui.dll Syntax public class OpenDialog : FileDialog, IEnumerable Remarks The open dialog can be used to select files for opening, it can be configured to allow multiple items to be selected (based on the AllowsMultipleSelection) variable and you can control whether this should allow files or directories to be selected. To use, create an instance of OpenDialog , and pass it to Run() . This will run the dialog modally, and when this returns, the list of filds will be available on the FilePaths property. To select more than one file, users can use the spacebar, or control-t. Constructors OpenDialog(ustring, ustring) Initializes a new OpenDialog Declaration public OpenDialog(ustring title, ustring message) Parameters Type Name Description NStack.ustring title NStack.ustring message Properties AllowsMultipleSelection Gets or sets a value indicating whether this OpenDialog allows multiple selection. Declaration public bool AllowsMultipleSelection { get; set; } Property Value Type Description System.Boolean true if allows multiple selection; otherwise, false , defaults to false. CanChooseDirectories Gets or sets a value indicating whether this OpenDialog can choose directories. Declaration public bool CanChooseDirectories { get; set; } Property Value Type Description System.Boolean true if can choose directories; otherwise, false defaults to false . CanChooseFiles Gets or sets a value indicating whether this OpenDialog can choose files. Declaration public bool CanChooseFiles { get; set; } Property Value Type Description System.Boolean true if can choose files; otherwise, false . Defaults to true FilePaths Returns the selected files, or an empty list if nothing has been selected Declaration public IReadOnlyList FilePaths { get; } Property Value Type Description System.Collections.Generic.IReadOnlyList < System.String > The file paths. Implements System.Collections.IEnumerable" }, "api/Terminal.Gui/Terminal.Gui.Point.html": { "href": "api/Terminal.Gui/Terminal.Gui.Point.html", "title": "Struct Point", "keywords": "Struct Point Represents an ordered pair of integer x- and y-coordinates that defines a point in a two-dimensional plane. Inherited Members System.Object.Equals(System.Object, System.Object) System.Object.GetType() System.Object.ReferenceEquals(System.Object, System.Object) Namespace : Terminal.Gui Assembly : Terminal.Gui.dll Syntax public struct Point Constructors Point(Int32, Int32) Point Constructor Declaration public Point(int x, int y) Parameters Type Name Description System.Int32 x System.Int32 y Remarks Creates a Point from a specified x,y coordinate pair. Point(Size) Point Constructor Declaration public Point(Size sz) Parameters Type Name Description Size sz Remarks Creates a Point from a Size value. Fields Empty Empty Shared Field Declaration public static readonly Point Empty Field Value Type Description Point Remarks An uninitialized Point Structure. X Gets or sets the x-coordinate of this Point. Declaration public int X Field Value Type Description System.Int32 Y Gets or sets the y-coordinate of this Point. Declaration public int Y Field Value Type Description System.Int32 Properties IsEmpty IsEmpty Property Declaration public bool IsEmpty { get; } Property Value Type Description System.Boolean Remarks Indicates if both X and Y are zero. Methods Add(Point, Size) Adds the specified Size to the specified Point. Declaration public static Point Add(Point pt, Size sz) Parameters Type Name Description Point pt The Point to add. Size sz The Size to add. Returns Type Description Point The Point that is the result of the addition operation. Equals(Object) Equals Method Declaration public override bool Equals(object obj) Parameters Type Name Description System.Object obj Returns Type Description System.Boolean Overrides System.ValueType.Equals(System.Object) Remarks Checks equivalence of this Point and another object. GetHashCode() GetHashCode Method Declaration public override int GetHashCode() Returns Type Description System.Int32 Overrides System.ValueType.GetHashCode() Remarks Calculates a hashing value. Offset(Int32, Int32) Offset Method Declaration public void Offset(int dx, int dy) Parameters Type Name Description System.Int32 dx System.Int32 dy Remarks Moves the Point a specified distance. Offset(Point) Translates this Point by the specified Point. Declaration public void Offset(Point p) Parameters Type Name Description Point p The Point used offset this Point. Subtract(Point, Size) Returns the result of subtracting specified Size from the specified Point. Declaration public static Point Subtract(Point pt, Size sz) Parameters Type Name Description Point pt The Point to be subtracted from. Size sz The Size to subtract from the Point. Returns Type Description Point The Point that is the result of the subtraction operation. ToString() ToString Method Declaration public override string ToString() Returns Type Description System.String Overrides System.ValueType.ToString() Remarks Formats the Point as a string in coordinate notation. Operators Addition(Point, Size) Addition Operator Declaration public static Point operator +(Point pt, Size sz) Parameters Type Name Description Point pt Size sz Returns Type Description Point Remarks Translates a Point using the Width and Height properties of the given Size . Equality(Point, Point) Equality Operator Declaration public static bool operator ==(Point left, Point right) Parameters Type Name Description Point left Point right Returns Type Description System.Boolean Remarks Compares two Point objects. The return value is based on the equivalence of the X and Y properties of the two points. Explicit(Point to Size) Point to Size Conversion Declaration public static explicit operator Size(Point p) Parameters Type Name Description Point p Returns Type Description Size Remarks Returns a Size based on the Coordinates of a given Point. Requires explicit cast. Inequality(Point, Point) Inequality Operator Declaration public static bool operator !=(Point left, Point right) Parameters Type Name Description Point left Point right Returns Type Description System.Boolean Remarks Compares two Point objects. The return value is based on the equivalence of the X and Y properties of the two points. Subtraction(Point, Size) Subtraction Operator Declaration public static Point operator -(Point pt, Size sz) Parameters Type Name Description Point pt Size sz Returns Type Description Point Remarks Translates a Point using the negation of the Width and Height properties of the given Size." }, "api/Terminal.Gui/Terminal.Gui.Pos.html": { "href": "api/Terminal.Gui/Terminal.Gui.Pos.html", "title": "Class Pos", "keywords": "Class Pos Describes the position of a View which can be an absolute value, a percentage, centered, or relative to the ending dimension. Integer values are implicitly convertible to an absolute Pos . These objects are created using the static methods Percent, AnchorEnd, and Center. The Pos objects can be combined with the addition and subtraction operators. Inheritance System.Object Pos Inherited Members System.Object.Equals(System.Object) System.Object.Equals(System.Object, System.Object) System.Object.GetHashCode() System.Object.GetType() System.Object.MemberwiseClone() System.Object.ReferenceEquals(System.Object, System.Object) System.Object.ToString() Namespace : Terminal.Gui Assembly : Terminal.Gui.dll Syntax public class Pos Remarks Use the Pos objects on the X or Y properties of a view to control the position. These can be used to set the absolute position, when merely assigning an integer value (via the implicit integer to Pos conversion), and they can be combined to produce more useful layouts, like: Pos.Center - 3, which would shift the postion of the View 3 characters to the left after centering for example. It is possible to reference coordinates of another view by using the methods Left(View), Right(View), Bottom(View), Top(View). The X(View) and Y(View) are aliases to Left(View) and Top(View) respectively. Methods AnchorEnd(Int32) Creates a Pos object that is anchored to the end (right side or bottom) of the dimension, useful to flush the layout from the right or bottom. Declaration public static Pos AnchorEnd(int margin = 0) Parameters Type Name Description System.Int32 margin Optional margin to place to the right or below. Returns Type Description Pos The Pos object anchored to the end (the bottom or the right side). Examples This sample shows how align a Button to the bottom-right of a View . anchorButton.X = Pos.AnchorEnd () - (Pos.Right (anchorButton) - Pos.Left (anchorButton)); anchorButton.Y = Pos.AnchorEnd () - 1; At(Int32) Creates an Absolute Pos from the specified integer value. Declaration public static Pos At(int n) Parameters Type Name Description System.Int32 n The value to convert to the Pos . Returns Type Description Pos The Absolute Pos . Bottom(View) Returns a Pos object tracks the Bottom (Y+Height) coordinate of the specified View Declaration public static Pos Bottom(View view) Parameters Type Name Description View view The View that will be tracked. Returns Type Description Pos The Pos that depends on the other view. Center() Returns a Pos object that can be used to center the View Declaration public static Pos Center() Returns Type Description Pos The center Pos. Examples This creates a TextField that is centered horizontally, is 50% of the way down, is 30% the height, and is 80% the width of the View it added to. var textView = new TextView () { X = Pos.Center (), Y = Pos.Percent (50), Width = Dim.Percent (80), Height = Dim.Percent (30), }; Left(View) Returns a Pos object tracks the Left (X) position of the specified View . Declaration public static Pos Left(View view) Parameters Type Name Description View view The View that will be tracked. Returns Type Description Pos The Pos that depends on the other view. Percent(Single) Creates a percentage Pos object Declaration public static Pos Percent(float n) Parameters Type Name Description System.Single n A value between 0 and 100 representing the percentage. Returns Type Description Pos The percent Pos object. Examples This creates a TextField that is centered horizontally, is 50% of the way down, is 30% the height, and is 80% the width of the View it added to. var textView = new TextView () { X = Pos.Center (), Y = Pos.Percent (50), Width = Dim.Percent (80), Height = Dim.Percent (30), }; Right(View) Returns a Pos object tracks the Right (X+Width) coordinate of the specified View . Declaration public static Pos Right(View view) Parameters Type Name Description View view The View that will be tracked. Returns Type Description Pos The Pos that depends on the other view. Top(View) Returns a Pos object tracks the Top (Y) position of the specified View . Declaration public static Pos Top(View view) Parameters Type Name Description View view The View that will be tracked. Returns Type Description Pos The Pos that depends on the other view. X(View) Returns a Pos object tracks the Left (X) position of the specified View . Declaration public static Pos X(View view) Parameters Type Name Description View view The View that will be tracked. Returns Type Description Pos The Pos that depends on the other view. Y(View) Returns a Pos object tracks the Top (Y) position of the specified View . Declaration public static Pos Y(View view) Parameters Type Name Description View view The View that will be tracked. Returns Type Description Pos The Pos that depends on the other view. Operators Addition(Pos, Pos) Adds a Pos to a Pos , yielding a new Pos . Declaration public static Pos operator +(Pos left, Pos right) Parameters Type Name Description Pos left The first Pos to add. Pos right The second Pos to add. Returns Type Description Pos The Pos that is the sum of the values of left and right . Implicit(Int32 to Pos) Creates an Absolute Pos from the specified integer value. Declaration public static implicit operator Pos(int n) Parameters Type Name Description System.Int32 n The value to convert to the Pos . Returns Type Description Pos The Absolute Pos . Subtraction(Pos, Pos) Subtracts a Pos from a Pos , yielding a new Pos . Declaration public static Pos operator -(Pos left, Pos right) Parameters Type Name Description Pos left The Pos to subtract from (the minuend). Pos right The Pos to subtract (the subtrahend). Returns Type Description Pos The Pos that is the left minus right ." }, "api/Terminal.Gui/Terminal.Gui.ProgressBar.html": { "href": "api/Terminal.Gui/Terminal.Gui.ProgressBar.html", "title": "Class ProgressBar", "keywords": "Class ProgressBar A Progress Bar view that can indicate progress of an activity visually. Inheritance System.Object Responder View ProgressBar Implements System.Collections.IEnumerable Inherited Members View.Enter View.Leave View.MouseEnter View.MouseLeave View.Driver View.Subviews View.Id View.IsCurrentTop View.WantMousePositionReports View.WantContinuousButtonPressed View.Frame View.GetEnumerator() View.LayoutStyle View.Bounds View.X View.Y View.Width View.Height View.SuperView View.SetNeedsDisplay() View.SetNeedsDisplay(Rect) View.ChildNeedsDisplay() View.Add(View) View.Add(View[]) View.RemoveAll() View.Remove(View) View.BringSubviewToFront(View) View.SendSubviewToBack(View) View.SendSubviewBackwards(View) View.BringSubviewForward(View) View.Clear() View.Clear(Rect) View.ScreenToView(Int32, Int32) View.ClipToBounds() View.SetClip(Rect) View.DrawFrame(Rect, Int32, Boolean) View.DrawHotString(ustring, Attribute, Attribute) View.DrawHotString(ustring, Boolean, ColorScheme) View.Move(Int32, Int32) View.PositionCursor() View.HasFocus View.OnEnter() View.OnLeave() View.Focused View.MostFocused View.ColorScheme View.AddRune(Int32, Int32, Rune) View.ClearNeedsDisplay() View.SetFocus(View) View.KeyPress View.ProcessKey(KeyEvent) View.ProcessHotKey(KeyEvent) View.ProcessColdKey(KeyEvent) View.KeyDown View.OnKeyDown(KeyEvent) View.KeyUp View.OnKeyUp(KeyEvent) View.EnsureFocus() View.FocusFirst() View.FocusLast() View.FocusPrev() View.FocusNext() View.LayoutSubviews() View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) Responder.CanFocus Responder.MouseEvent(MouseEvent) System.Object.Equals(System.Object) System.Object.Equals(System.Object, System.Object) System.Object.GetHashCode() System.Object.GetType() System.Object.MemberwiseClone() System.Object.ReferenceEquals(System.Object, System.Object) Namespace : Terminal.Gui Assembly : Terminal.Gui.dll Syntax public class ProgressBar : View, IEnumerable Remarks ProgressBar can operate in two modes, percentage mode, or activity mode. The progress bar starts in percentage mode and setting the Fraction property will reflect on the UI the progress made so far. Activity mode is used when the application has no way of knowing how much time is left, and is started when the Pulse() method is called. Call Pulse() repeatedly as progress is made. Constructors ProgressBar() Initializes a new instance of the ProgressBar class, starts in percentage mode and uses relative layout. Declaration public ProgressBar() ProgressBar(Rect) Initializes a new instance of the ProgressBar class, starts in percentage mode with an absolute position and size. Declaration public ProgressBar(Rect rect) Parameters Type Name Description Rect rect Rect. Properties Fraction Gets or sets the ProgressBar fraction to display, must be a value between 0 and 1. Declaration public float Fraction { get; set; } Property Value Type Description System.Single The fraction representing the progress. Methods Pulse() Notifies the ProgressBar that some progress has taken place. Declaration public void Pulse() Remarks If the ProgressBar is is percentage mode, it switches to activity mode. If is in activity mode, the marker is moved. Redraw(Rect) Declaration public override void Redraw(Rect region) Parameters Type Name Description Rect region Overrides View.Redraw(Rect) Implements System.Collections.IEnumerable" }, "api/Terminal.Gui/Terminal.Gui.RadioGroup.html": { "href": "api/Terminal.Gui/Terminal.Gui.RadioGroup.html", "title": "Class RadioGroup", "keywords": "Class RadioGroup RadioGroup shows a group of radio labels, only one of those can be selected at a given time Inheritance System.Object Responder View RadioGroup Implements System.Collections.IEnumerable Inherited Members View.Enter View.Leave View.MouseEnter View.MouseLeave View.Driver View.Subviews View.Id View.IsCurrentTop View.WantMousePositionReports View.WantContinuousButtonPressed View.Frame View.GetEnumerator() View.LayoutStyle View.Bounds View.X View.Y View.Width View.Height View.SuperView View.SetNeedsDisplay() View.SetNeedsDisplay(Rect) View.ChildNeedsDisplay() View.Add(View) View.Add(View[]) View.RemoveAll() View.Remove(View) View.BringSubviewToFront(View) View.SendSubviewToBack(View) View.SendSubviewBackwards(View) View.BringSubviewForward(View) View.Clear() View.Clear(Rect) View.ScreenToView(Int32, Int32) View.ClipToBounds() View.SetClip(Rect) View.DrawFrame(Rect, Int32, Boolean) View.DrawHotString(ustring, Attribute, Attribute) View.DrawHotString(ustring, Boolean, ColorScheme) View.Move(Int32, Int32) View.HasFocus View.OnEnter() View.OnLeave() View.Focused View.MostFocused View.ColorScheme View.AddRune(Int32, Int32, Rune) View.ClearNeedsDisplay() View.SetFocus(View) View.KeyPress View.ProcessHotKey(KeyEvent) View.KeyDown View.OnKeyDown(KeyEvent) View.KeyUp View.OnKeyUp(KeyEvent) View.EnsureFocus() View.FocusFirst() View.FocusLast() View.FocusPrev() View.FocusNext() View.LayoutSubviews() View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) Responder.CanFocus System.Object.Equals(System.Object) System.Object.Equals(System.Object, System.Object) System.Object.GetHashCode() System.Object.GetType() System.Object.MemberwiseClone() System.Object.ReferenceEquals(System.Object, System.Object) Namespace : Terminal.Gui Assembly : Terminal.Gui.dll Syntax public class RadioGroup : View, IEnumerable Constructors RadioGroup(Int32, Int32, String[], Int32) Initializes a new instance of the RadioGroup class setting up the initial set of radio labels and the item that should be selected. The View frame is computed from the provided radio labels. Declaration public RadioGroup(int x, int y, string[] radioLabels, int selected = 0) Parameters Type Name Description System.Int32 x The x coordinate. System.Int32 y The y coordinate. System.String [] radioLabels The radio labels; an array of strings that can contain hotkeys using an underscore before the letter. System.Int32 selected The item to be selected, the value is clamped to the number of items. RadioGroup(String[], Int32) Initializes a new instance of the RadioGroup class setting up the initial set of radio labels and the item that should be selected. Declaration public RadioGroup(string[] radioLabels, int selected = 0) Parameters Type Name Description System.String [] radioLabels The radio labels; an array of strings that can contain hotkeys using an underscore before the letter. System.Int32 selected The index of the item to be selected, the value is clamped to the number of items. RadioGroup(Rect, String[], Int32) Initializes a new instance of the RadioGroup class setting up the initial set of radio labels and the item that should be selected and uses an absolute layout for the result. Declaration public RadioGroup(Rect rect, string[] radioLabels, int selected = 0) Parameters Type Name Description Rect rect Boundaries for the radio group. System.String [] radioLabels The radio labels; an array of strings that can contain hotkeys using an underscore before the letter. System.Int32 selected The index of item to be selected, the value is clamped to the number of items. Fields SelectionChanged Declaration public Action SelectionChanged Field Value Type Description System.Action < System.Int32 > Properties Cursor The location of the cursor in the RadioGroup Declaration public int Cursor { get; set; } Property Value Type Description System.Int32 RadioLabels The radio labels to display Declaration public string[] RadioLabels { get; set; } Property Value Type Description System.String [] The radio labels. Selected The currently selected item from the list of radio labels Declaration public int Selected { get; set; } Property Value Type Description System.Int32 The selected. Methods MouseEvent(MouseEvent) Declaration public override bool MouseEvent(MouseEvent me) Parameters Type Name Description MouseEvent me Returns Type Description System.Boolean Overrides Responder.MouseEvent(MouseEvent) PositionCursor() Declaration public override void PositionCursor() Overrides View.PositionCursor() ProcessColdKey(KeyEvent) Declaration public override bool ProcessColdKey(KeyEvent kb) Parameters Type Name Description KeyEvent kb Returns Type Description System.Boolean Overrides View.ProcessColdKey(KeyEvent) ProcessKey(KeyEvent) Declaration public override bool ProcessKey(KeyEvent kb) Parameters Type Name Description KeyEvent kb Returns Type Description System.Boolean Overrides View.ProcessKey(KeyEvent) Redraw(Rect) Declaration public override void Redraw(Rect region) Parameters Type Name Description Rect region Overrides View.Redraw(Rect) Implements System.Collections.IEnumerable" }, "api/Terminal.Gui/Terminal.Gui.Rect.html": { "href": "api/Terminal.Gui/Terminal.Gui.Rect.html", "title": "Struct Rect", "keywords": "Struct Rect Stores a set of four integers that represent the location and size of a rectangle Inherited Members System.Object.Equals(System.Object, System.Object) System.Object.GetType() System.Object.ReferenceEquals(System.Object, System.Object) Namespace : Terminal.Gui Assembly : Terminal.Gui.dll Syntax public struct Rect Constructors Rect(Int32, Int32, Int32, Int32) Rectangle Constructor Declaration public Rect(int x, int y, int width, int height) Parameters Type Name Description System.Int32 x System.Int32 y System.Int32 width System.Int32 height Remarks Creates a Rectangle from a specified x,y location and width and height values. Rect(Point, Size) Rectangle Constructor Declaration public Rect(Point location, Size size) Parameters Type Name Description Point location Size size Remarks Creates a Rectangle from Point and Size values. Fields Empty Empty Shared Field Declaration public static readonly Rect Empty Field Value Type Description Rect Remarks An uninitialized Rectangle Structure. Height Gets or sets the height of this Rectangle structure. Declaration public int Height Field Value Type Description System.Int32 Width Gets or sets the width of this Rect structure. Declaration public int Width Field Value Type Description System.Int32 X Gets or sets the x-coordinate of the upper-left corner of this Rectangle structure. Declaration public int X Field Value Type Description System.Int32 Y Gets or sets the y-coordinate of the upper-left corner of this Rectangle structure. Declaration public int Y Field Value Type Description System.Int32 Properties Bottom Bottom Property Declaration public int Bottom { get; } Property Value Type Description System.Int32 Remarks The Y coordinate of the bottom edge of the Rectangle. Read only. IsEmpty IsEmpty Property Declaration public bool IsEmpty { get; } Property Value Type Description System.Boolean Remarks Indicates if the width or height are zero. Read only. Left Left Property Declaration public int Left { get; } Property Value Type Description System.Int32 Remarks The X coordinate of the left edge of the Rectangle. Read only. Location Location Property Declaration public Point Location { get; set; } Property Value Type Description Point Remarks The Location of the top-left corner of the Rectangle. Right Right Property Declaration public int Right { get; } Property Value Type Description System.Int32 Remarks The X coordinate of the right edge of the Rectangle. Read only. Size Size Property Declaration public Size Size { get; set; } Property Value Type Description Size Remarks The Size of the Rectangle. Top Top Property Declaration public int Top { get; } Property Value Type Description System.Int32 Remarks The Y coordinate of the top edge of the Rectangle. Read only. Methods Contains(Int32, Int32) Contains Method Declaration public bool Contains(int x, int y) Parameters Type Name Description System.Int32 x System.Int32 y Returns Type Description System.Boolean Remarks Checks if an x,y coordinate lies within this Rectangle. Contains(Point) Contains Method Declaration public bool Contains(Point pt) Parameters Type Name Description Point pt Returns Type Description System.Boolean Remarks Checks if a Point lies within this Rectangle. Contains(Rect) Contains Method Declaration public bool Contains(Rect rect) Parameters Type Name Description Rect rect Returns Type Description System.Boolean Remarks Checks if a Rectangle lies entirely within this Rectangle. Equals(Object) Equals Method Declaration public override bool Equals(object obj) Parameters Type Name Description System.Object obj Returns Type Description System.Boolean Overrides System.ValueType.Equals(System.Object) Remarks Checks equivalence of this Rectangle and another object. FromLTRB(Int32, Int32, Int32, Int32) FromLTRB Shared Method Declaration public static Rect FromLTRB(int left, int top, int right, int bottom) Parameters Type Name Description System.Int32 left System.Int32 top System.Int32 right System.Int32 bottom Returns Type Description Rect Remarks Produces a Rectangle structure from left, top, right and bottom coordinates. GetHashCode() GetHashCode Method Declaration public override int GetHashCode() Returns Type Description System.Int32 Overrides System.ValueType.GetHashCode() Remarks Calculates a hashing value. Inflate(Int32, Int32) Inflate Method Declaration public void Inflate(int width, int height) Parameters Type Name Description System.Int32 width System.Int32 height Remarks Inflates the Rectangle by a specified width and height. Inflate(Rect, Int32, Int32) Inflate Shared Method Declaration public static Rect Inflate(Rect rect, int x, int y) Parameters Type Name Description Rect rect System.Int32 x System.Int32 y Returns Type Description Rect Remarks Produces a new Rectangle by inflating an existing Rectangle by the specified coordinate values. Inflate(Size) Inflate Method Declaration public void Inflate(Size size) Parameters Type Name Description Size size Remarks Inflates the Rectangle by a specified Size. Intersect(Rect) Intersect Method Declaration public void Intersect(Rect rect) Parameters Type Name Description Rect rect Remarks Replaces the Rectangle with the intersection of itself and another Rectangle. Intersect(Rect, Rect) Intersect Shared Method Declaration public static Rect Intersect(Rect a, Rect b) Parameters Type Name Description Rect a Rect b Returns Type Description Rect Remarks Produces a new Rectangle by intersecting 2 existing Rectangles. Returns null if there is no intersection. IntersectsWith(Rect) IntersectsWith Method Declaration public bool IntersectsWith(Rect rect) Parameters Type Name Description Rect rect Returns Type Description System.Boolean Remarks Checks if a Rectangle intersects with this one. Offset(Int32, Int32) Offset Method Declaration public void Offset(int x, int y) Parameters Type Name Description System.Int32 x System.Int32 y Remarks Moves the Rectangle a specified distance. Offset(Point) Offset Method Declaration public void Offset(Point pos) Parameters Type Name Description Point pos Remarks Moves the Rectangle a specified distance. ToString() ToString Method Declaration public override string ToString() Returns Type Description System.String Overrides System.ValueType.ToString() Remarks Formats the Rectangle as a string in (x,y,w,h) notation. Union(Rect, Rect) Union Shared Method Declaration public static Rect Union(Rect a, Rect b) Parameters Type Name Description Rect a Rect b Returns Type Description Rect Remarks Produces a new Rectangle from the union of 2 existing Rectangles. Operators Equality(Rect, Rect) Equality Operator Declaration public static bool operator ==(Rect left, Rect right) Parameters Type Name Description Rect left Rect right Returns Type Description System.Boolean Remarks Compares two Rectangle objects. The return value is based on the equivalence of the Location and Size properties of the two Rectangles. Inequality(Rect, Rect) Inequality Operator Declaration public static bool operator !=(Rect left, Rect right) Parameters Type Name Description Rect left Rect right Returns Type Description System.Boolean Remarks Compares two Rectangle objects. The return value is based on the equivalence of the Location and Size properties of the two Rectangles." }, "api/Terminal.Gui/Terminal.Gui.Responder.html": { "href": "api/Terminal.Gui/Terminal.Gui.Responder.html", "title": "Class Responder", "keywords": "Class Responder Responder base class implemented by objects that want to participate on keyboard and mouse input. Inheritance System.Object Responder View 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 Responder Properties CanFocus Gets or sets a value indicating whether this Responder can focus. Declaration public virtual bool CanFocus { get; set; } Property Value Type Description System.Boolean true if can focus; otherwise, false . HasFocus Gets or sets a value indicating whether this Responder has focus. Declaration public virtual bool HasFocus { get; } Property Value Type Description System.Boolean true if has focus; otherwise, false . Methods MouseEvent(MouseEvent) Method invoked when a mouse event is generated Declaration public virtual bool MouseEvent(MouseEvent mouseEvent) Parameters Type Name Description MouseEvent mouseEvent Contains the details about the mouse event. Returns Type Description System.Boolean true , if the event was handled, false otherwise. OnEnter() Method invoked when a view gets focus. Declaration public virtual bool OnEnter() Returns Type Description System.Boolean true , if the event was handled, false otherwise. OnKeyDown(KeyEvent) Method invoked when a key is pressed. Declaration public virtual 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 true if the event was handled OnKeyUp(KeyEvent) Method invoked when a key is released. Declaration public virtual 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 true if the event was handled OnLeave() Method invoked when a view loses focus. Declaration public virtual bool OnLeave() Returns Type Description System.Boolean true , if the event was handled, false otherwise. OnMouseEnter(MouseEvent) Method invoked when a mouse event is generated for the first time. Declaration public virtual bool OnMouseEnter(MouseEvent mouseEvent) Parameters Type Name Description MouseEvent mouseEvent Returns Type Description System.Boolean true , if the event was handled, false otherwise. OnMouseLeave(MouseEvent) Method invoked when a mouse event is generated for the last time. Declaration public virtual bool OnMouseLeave(MouseEvent mouseEvent) Parameters Type Name Description MouseEvent mouseEvent Returns Type Description System.Boolean true , if the event was handled, false otherwise. ProcessColdKey(KeyEvent) This method can be overwritten by views that want to provide accelerator functionality (Alt-key for example), but without interefering with normal ProcessKey behavior. Declaration public virtual bool ProcessColdKey(KeyEvent keyEvent) Parameters Type Name Description KeyEvent keyEvent Contains the details about the key that produced the event. Returns Type Description System.Boolean Remarks After keys are sent to the subviews on the current view, all the view are processed and the key is passed to the views to allow some of them to process the keystroke as a cold-key. This functionality is used, for example, by default buttons to act on the enter key. Processing this as a hot-key would prevent non-default buttons from consuming the enter keypress when they have the focus. ProcessHotKey(KeyEvent) This method can be overwritten by view that want to provide accelerator functionality (Alt-key for example). Declaration public virtual bool ProcessHotKey(KeyEvent kb) Parameters Type Name Description KeyEvent kb Returns Type Description System.Boolean Remarks Before keys are sent to the subview on the current view, all the views are processed and the key is passed to the widgets to allow some of them to process the keystroke as a hot-key. For example, if you implement a button that has a hotkey ok \"o\", you would catch the combination Alt-o here. If the event is caught, you must return true to stop the keystroke from being dispatched to other views. ProcessKey(KeyEvent) If the view is focused, gives the view a chance to process the keystroke. Declaration public virtual bool ProcessKey(KeyEvent keyEvent) Parameters Type Name Description KeyEvent keyEvent Contains the details about the key that produced the event. Returns Type Description System.Boolean Remarks Views can override this method if they are interested in processing the given keystroke. If they consume the keystroke, they must return true to stop the keystroke from being processed by other widgets or consumed by the widget engine. If they return false, the keystroke will be passed using the ProcessColdKey method to other views to process. The View implementation does nothing but return false, so it is not necessary to call base.ProcessKey if you derive directly from View, but you should if you derive other View subclasses." }, "api/Terminal.Gui/Terminal.Gui.SaveDialog.html": { "href": "api/Terminal.Gui/Terminal.Gui.SaveDialog.html", "title": "Class SaveDialog", "keywords": "Class SaveDialog The SaveDialog provides an interactive dialog box for users to pick a file to save. Inheritance System.Object Responder View Toplevel Window Dialog FileDialog SaveDialog Implements System.Collections.IEnumerable Inherited Members FileDialog.WillPresent() FileDialog.Prompt FileDialog.NameFieldLabel FileDialog.Message FileDialog.CanCreateDirectories FileDialog.IsExtensionHidden FileDialog.DirectoryPath FileDialog.AllowedFileTypes FileDialog.AllowsOtherFileTypes FileDialog.FilePath FileDialog.Canceled Dialog.AddButton(Button) Dialog.LayoutSubviews() Dialog.ProcessKey(KeyEvent) Window.Title Window.GetEnumerator() Window.Add(View) Window.Remove(View) Window.RemoveAll() Window.Redraw(Rect) Window.MouseEvent(MouseEvent) Toplevel.Running Toplevel.Ready Toplevel.Create() Toplevel.CanFocus Toplevel.Modal Toplevel.MenuBar Toplevel.StatusBar View.Enter View.Leave View.MouseEnter View.MouseLeave View.Driver View.Subviews View.Id View.IsCurrentTop View.WantMousePositionReports View.WantContinuousButtonPressed View.Frame View.LayoutStyle View.Bounds View.X View.Y View.Width View.Height View.SuperView View.SetNeedsDisplay() View.SetNeedsDisplay(Rect) View.ChildNeedsDisplay() View.Add(View[]) View.BringSubviewToFront(View) View.SendSubviewToBack(View) View.SendSubviewBackwards(View) View.BringSubviewForward(View) View.Clear() View.Clear(Rect) View.ScreenToView(Int32, Int32) View.ClipToBounds() View.SetClip(Rect) View.DrawFrame(Rect, Int32, Boolean) View.DrawHotString(ustring, Attribute, Attribute) View.DrawHotString(ustring, Boolean, ColorScheme) View.Move(Int32, Int32) View.PositionCursor() View.HasFocus View.OnEnter() View.OnLeave() View.Focused View.MostFocused View.ColorScheme View.AddRune(Int32, Int32, Rune) View.ClearNeedsDisplay() View.SetFocus(View) View.KeyPress View.ProcessHotKey(KeyEvent) View.ProcessColdKey(KeyEvent) View.KeyDown View.OnKeyDown(KeyEvent) View.KeyUp View.OnKeyUp(KeyEvent) View.EnsureFocus() View.FocusFirst() View.FocusLast() View.FocusPrev() View.FocusNext() View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) System.Object.Equals(System.Object) System.Object.Equals(System.Object, System.Object) System.Object.GetHashCode() System.Object.GetType() System.Object.MemberwiseClone() System.Object.ReferenceEquals(System.Object, System.Object) Namespace : Terminal.Gui Assembly : Terminal.Gui.dll Syntax public class SaveDialog : FileDialog, IEnumerable Remarks To use, create an instance of SaveDialog , and pass it to Run() . This will run the dialog modally, and when this returns, the FileName property will contain the selected file name or null if the user canceled. Constructors SaveDialog(ustring, ustring) Initializes a new SaveDialog Declaration public SaveDialog(ustring title, ustring message) Parameters Type Name Description NStack.ustring title The title. NStack.ustring message The message. Properties FileName Gets the name of the file the user selected for saving, or null if the user canceled the SaveDialog . Declaration public ustring FileName { get; } Property Value Type Description NStack.ustring The name of the file. Implements System.Collections.IEnumerable" }, "api/Terminal.Gui/Terminal.Gui.ScrollBarView.html": { "href": "api/Terminal.Gui/Terminal.Gui.ScrollBarView.html", "title": "Class ScrollBarView", "keywords": "Class ScrollBarView ScrollBarViews are views that display a 1-character scrollbar, either horizontal or vertical Inheritance System.Object Responder View ScrollBarView Implements System.Collections.IEnumerable Inherited Members View.Enter View.Leave View.MouseEnter View.MouseLeave View.Driver View.Subviews View.Id View.IsCurrentTop View.WantMousePositionReports View.WantContinuousButtonPressed View.Frame View.GetEnumerator() View.LayoutStyle View.Bounds View.X View.Y View.Width View.Height View.SuperView View.SetNeedsDisplay() View.SetNeedsDisplay(Rect) View.ChildNeedsDisplay() View.Add(View) View.Add(View[]) View.RemoveAll() View.Remove(View) View.BringSubviewToFront(View) View.SendSubviewToBack(View) View.SendSubviewBackwards(View) View.BringSubviewForward(View) View.Clear() View.Clear(Rect) View.ScreenToView(Int32, Int32) View.ClipToBounds() View.SetClip(Rect) View.DrawFrame(Rect, Int32, Boolean) View.DrawHotString(ustring, Attribute, Attribute) View.DrawHotString(ustring, Boolean, ColorScheme) View.Move(Int32, Int32) View.PositionCursor() View.HasFocus View.OnEnter() View.OnLeave() View.Focused View.MostFocused View.ColorScheme View.AddRune(Int32, Int32, Rune) View.ClearNeedsDisplay() View.SetFocus(View) View.KeyPress View.ProcessKey(KeyEvent) View.ProcessHotKey(KeyEvent) View.ProcessColdKey(KeyEvent) View.KeyDown View.OnKeyDown(KeyEvent) View.KeyUp View.OnKeyUp(KeyEvent) View.EnsureFocus() View.FocusFirst() View.FocusLast() View.FocusPrev() View.FocusNext() View.LayoutSubviews() View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) Responder.CanFocus System.Object.Equals(System.Object) System.Object.Equals(System.Object, System.Object) System.Object.GetHashCode() System.Object.GetType() System.Object.MemberwiseClone() System.Object.ReferenceEquals(System.Object, System.Object) Namespace : Terminal.Gui Assembly : Terminal.Gui.dll Syntax public class ScrollBarView : View, IEnumerable Remarks The scrollbar is drawn to be a representation of the Size, assuming that the scroll position is set at Position. If the region to display the scrollbar is larger than three characters, arrow indicators are drawn. Constructors ScrollBarView(Rect, Int32, Int32, Boolean) Initializes a new instance of the ScrollBarView class. Declaration public ScrollBarView(Rect rect, int size, int position, bool isVertical) Parameters Type Name Description Rect rect Frame for the scrollbar. System.Int32 size The size that this scrollbar represents. System.Int32 position The position within this scrollbar. System.Boolean isVertical If set to true this is a vertical scrollbar, otherwise, the scrollbar is horizontal. Properties Position The position to show the scrollbar at. Declaration public int Position { get; set; } Property Value Type Description System.Int32 The position. Size The size that this scrollbar represents Declaration public int Size { get; set; } Property Value Type Description System.Int32 The size. Methods MouseEvent(MouseEvent) Declaration public override bool MouseEvent(MouseEvent me) Parameters Type Name Description MouseEvent me Returns Type Description System.Boolean Overrides Responder.MouseEvent(MouseEvent) Redraw(Rect) Redraw the scrollbar Declaration public override void Redraw(Rect region) Parameters Type Name Description Rect region Region to be redrawn. Overrides View.Redraw(Rect) Events ChangedPosition This event is raised when the position on the scrollbar has changed. Declaration public event Action ChangedPosition Event Type Type Description System.Action Implements System.Collections.IEnumerable" }, "api/Terminal.Gui/Terminal.Gui.ScrollView.html": { "href": "api/Terminal.Gui/Terminal.Gui.ScrollView.html", "title": "Class ScrollView", "keywords": "Class ScrollView Scrollviews are views that present a window into a virtual space where children views are added. Similar to the iOS UIScrollView. Inheritance System.Object Responder View ScrollView Implements System.Collections.IEnumerable Inherited Members View.Enter View.Leave View.MouseEnter View.MouseLeave View.Driver View.Subviews View.Id View.IsCurrentTop View.WantMousePositionReports View.WantContinuousButtonPressed View.Frame View.GetEnumerator() View.LayoutStyle View.Bounds View.X View.Y View.Width View.Height View.SuperView View.SetNeedsDisplay() View.SetNeedsDisplay(Rect) View.ChildNeedsDisplay() View.Add(View[]) View.Remove(View) View.BringSubviewToFront(View) View.SendSubviewToBack(View) View.SendSubviewBackwards(View) View.BringSubviewForward(View) View.Clear() View.Clear(Rect) View.ScreenToView(Int32, Int32) View.ClipToBounds() View.SetClip(Rect) View.DrawFrame(Rect, Int32, Boolean) View.DrawHotString(ustring, Attribute, Attribute) View.DrawHotString(ustring, Boolean, ColorScheme) View.Move(Int32, Int32) View.HasFocus View.OnEnter() View.OnLeave() View.Focused View.MostFocused View.ColorScheme View.AddRune(Int32, Int32, Rune) View.ClearNeedsDisplay() View.SetFocus(View) View.KeyPress View.ProcessHotKey(KeyEvent) View.ProcessColdKey(KeyEvent) View.KeyDown View.OnKeyDown(KeyEvent) View.KeyUp View.OnKeyUp(KeyEvent) View.EnsureFocus() View.FocusFirst() View.FocusLast() View.FocusPrev() View.FocusNext() View.LayoutSubviews() View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) Responder.CanFocus System.Object.Equals(System.Object) System.Object.Equals(System.Object, System.Object) System.Object.GetHashCode() System.Object.GetType() System.Object.MemberwiseClone() System.Object.ReferenceEquals(System.Object, System.Object) Namespace : Terminal.Gui Assembly : Terminal.Gui.dll Syntax public class ScrollView : View, IEnumerable Remarks The subviews that are added to this scrollview are offset by the ContentOffset property. The view itself is a window into the space represented by the ContentSize. Constructors ScrollView(Rect) Constructs a ScrollView Declaration public ScrollView(Rect frame) Parameters Type Name Description Rect frame Properties ContentOffset Represents the top left corner coordinate that is displayed by the scrollview Declaration public Point ContentOffset { get; set; } Property Value Type Description Point The content offset. ContentSize Represents the contents of the data shown inside the scrolview Declaration public Size ContentSize { get; set; } Property Value Type Description Size The size of the content. ShowHorizontalScrollIndicator Gets or sets the visibility for the horizontal scroll indicator. Declaration public bool ShowHorizontalScrollIndicator { get; set; } Property Value Type Description System.Boolean true if show vertical scroll indicator; otherwise, false . ShowVerticalScrollIndicator /// Gets or sets the visibility for the vertical scroll indicator. Declaration public bool ShowVerticalScrollIndicator { get; set; } Property Value Type Description System.Boolean true if show vertical scroll indicator; otherwise, false . Methods Add(View) Adds the view to the scrollview. Declaration public override void Add(View view) Parameters Type Name Description View view The view to add to the scrollview. Overrides View.Add(View) MouseEvent(MouseEvent) Declaration public override bool MouseEvent(MouseEvent me) Parameters Type Name Description MouseEvent me Returns Type Description System.Boolean Overrides Responder.MouseEvent(MouseEvent) PositionCursor() Declaration public override void PositionCursor() Overrides View.PositionCursor() ProcessKey(KeyEvent) Declaration public override bool ProcessKey(KeyEvent kb) Parameters Type Name Description KeyEvent kb Returns Type Description System.Boolean Overrides View.ProcessKey(KeyEvent) Redraw(Rect) This event is raised when the contents have scrolled Declaration public override void Redraw(Rect region) Parameters Type Name Description Rect region Overrides View.Redraw(Rect) RemoveAll() Removes all widgets from this container. Declaration public override void RemoveAll() Overrides View.RemoveAll() Remarks ScrollDown(Int32) Scrolls the view down. Declaration public bool ScrollDown(int lines) Parameters Type Name Description System.Int32 lines Number of lines to scroll. Returns Type Description System.Boolean true , if left was scrolled, false otherwise. ScrollLeft(Int32) Scrolls the view to the left Declaration public bool ScrollLeft(int cols) Parameters Type Name Description System.Int32 cols Number of columns to scroll by. Returns Type Description System.Boolean true , if left was scrolled, false otherwise. ScrollRight(Int32) Scrolls the view to the right. Declaration public bool ScrollRight(int cols) Parameters Type Name Description System.Int32 cols Number of columns to scroll by. Returns Type Description System.Boolean true , if right was scrolled, false otherwise. ScrollUp(Int32) Scrolls the view up. Declaration public bool ScrollUp(int lines) Parameters Type Name Description System.Int32 lines Number of lines to scroll. Returns Type Description System.Boolean true , if left was scrolled, false otherwise. Implements System.Collections.IEnumerable" }, "api/Terminal.Gui/Terminal.Gui.Size.html": { "href": "api/Terminal.Gui/Terminal.Gui.Size.html", "title": "Struct Size", "keywords": "Struct Size Stores an ordered pair of integers, which specify a Height and Width. Inherited Members System.Object.Equals(System.Object, System.Object) System.Object.GetType() System.Object.ReferenceEquals(System.Object, System.Object) Namespace : Terminal.Gui Assembly : Terminal.Gui.dll Syntax public struct Size Constructors Size(Int32, Int32) Size Constructor Declaration public Size(int width, int height) Parameters Type Name Description System.Int32 width System.Int32 height Remarks Creates a Size from specified dimensions. Size(Point) Size Constructor Declaration public Size(Point pt) Parameters Type Name Description Point pt Remarks Creates a Size from a Point value. Fields Empty Gets a Size structure that has a Height and Width value of 0. Declaration public static readonly Size Empty Field Value Type Description Size Properties Height Height Property Declaration public int Height { get; set; } Property Value Type Description System.Int32 Remarks The Height coordinate of the Size. IsEmpty IsEmpty Property Declaration public bool IsEmpty { get; } Property Value Type Description System.Boolean Remarks Indicates if both Width and Height are zero. Width Width Property Declaration public int Width { get; set; } Property Value Type Description System.Int32 Remarks The Width coordinate of the Size. Methods Add(Size, Size) Adds the width and height of one Size structure to the width and height of another Size structure. Declaration public static Size Add(Size sz1, Size sz2) Parameters Type Name Description Size sz1 The first Size structure to add. Size sz2 The second Size structure to add. Returns Type Description Size The add. Equals(Object) Equals Method Declaration public override bool Equals(object obj) Parameters Type Name Description System.Object obj Returns Type Description System.Boolean Overrides System.ValueType.Equals(System.Object) Remarks Checks equivalence of this Size and another object. GetHashCode() GetHashCode Method Declaration public override int GetHashCode() Returns Type Description System.Int32 Overrides System.ValueType.GetHashCode() Remarks Calculates a hashing value. Subtract(Size, Size) Subtracts the width and height of one Size structure to the width and height of another Size structure. Declaration public static Size Subtract(Size sz1, Size sz2) Parameters Type Name Description Size sz1 The first Size structure to subtract. Size sz2 The second Size structure to subtract. Returns Type Description Size The subtract. ToString() ToString Method Declaration public override string ToString() Returns Type Description System.String Overrides System.ValueType.ToString() Remarks Formats the Size as a string in coordinate notation. Operators Addition(Size, Size) Addition Operator Declaration public static Size operator +(Size sz1, Size sz2) Parameters Type Name Description Size sz1 Size sz2 Returns Type Description Size Remarks Addition of two Size structures. Equality(Size, Size) Equality Operator Declaration public static bool operator ==(Size sz1, Size sz2) Parameters Type Name Description Size sz1 Size sz2 Returns Type Description System.Boolean Remarks Compares two Size objects. The return value is based on the equivalence of the Width and Height properties of the two Sizes. Explicit(Size to Point) Size to Point Conversion Declaration public static explicit operator Point(Size size) Parameters Type Name Description Size size Returns Type Description Point Remarks Returns a Point based on the dimensions of a given Size. Requires explicit cast. Inequality(Size, Size) Inequality Operator Declaration public static bool operator !=(Size sz1, Size sz2) Parameters Type Name Description Size sz1 Size sz2 Returns Type Description System.Boolean Remarks Compares two Size objects. The return value is based on the equivalence of the Width and Height properties of the two Sizes. Subtraction(Size, Size) Subtraction Operator Declaration public static Size operator -(Size sz1, Size sz2) Parameters Type Name Description Size sz1 Size sz2 Returns Type Description Size Remarks Subtracts two Size structures." }, "api/Terminal.Gui/Terminal.Gui.StatusBar.html": { "href": "api/Terminal.Gui/Terminal.Gui.StatusBar.html", "title": "Class StatusBar", "keywords": "Class StatusBar A status bar is a View that snaps to the bottom of a Toplevel displaying set of StatusItem s. The StatusBar should be context sensitive. This means, if the main menu and an open text editor are visible, the items probably shown will be ~F1~ Help ~F2~ Save ~F3~ Load. While a dialog to ask a file to load is executed, the remaining commands will probably be ~F1~ Help. So for each context must be a new instance of a statusbar. Inheritance System.Object Responder View StatusBar Implements System.Collections.IEnumerable Inherited Members View.Enter View.Leave View.MouseEnter View.MouseLeave View.Driver View.Subviews View.Id View.IsCurrentTop View.WantMousePositionReports View.WantContinuousButtonPressed View.Frame View.GetEnumerator() View.LayoutStyle View.Bounds View.X View.Y View.Width View.Height View.SuperView View.SetNeedsDisplay() View.SetNeedsDisplay(Rect) View.ChildNeedsDisplay() View.Add(View) View.Add(View[]) View.RemoveAll() View.Remove(View) View.BringSubviewToFront(View) View.SendSubviewToBack(View) View.SendSubviewBackwards(View) View.BringSubviewForward(View) View.Clear() View.Clear(Rect) View.ScreenToView(Int32, Int32) View.ClipToBounds() View.SetClip(Rect) View.DrawFrame(Rect, Int32, Boolean) View.DrawHotString(ustring, Attribute, Attribute) View.DrawHotString(ustring, Boolean, ColorScheme) View.Move(Int32, Int32) View.PositionCursor() View.HasFocus View.OnEnter() View.OnLeave() View.Focused View.MostFocused View.ColorScheme View.AddRune(Int32, Int32, Rune) View.ClearNeedsDisplay() View.SetFocus(View) View.KeyPress View.ProcessKey(KeyEvent) View.ProcessColdKey(KeyEvent) View.KeyDown View.OnKeyDown(KeyEvent) View.KeyUp View.OnKeyUp(KeyEvent) View.EnsureFocus() View.FocusFirst() View.FocusLast() View.FocusPrev() View.FocusNext() View.LayoutSubviews() View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) Responder.CanFocus Responder.MouseEvent(MouseEvent) System.Object.Equals(System.Object) System.Object.Equals(System.Object, System.Object) System.Object.GetHashCode() System.Object.GetType() System.Object.MemberwiseClone() System.Object.ReferenceEquals(System.Object, System.Object) Namespace : Terminal.Gui Assembly : Terminal.Gui.dll Syntax public class StatusBar : View, IEnumerable Constructors StatusBar(StatusItem[]) Initializes a new instance of the StatusBar class with the specified set of StatusItem s. The StatusBar will be drawn on the lowest line of the terminal or Parent (if not null). Declaration public StatusBar(StatusItem[] items) Parameters Type Name Description StatusItem [] items A list of statusbar items. Properties Items The items that compose the StatusBar Declaration public StatusItem[] Items { get; set; } Property Value Type Description StatusItem [] Parent The parent view of the StatusBar . Declaration public View Parent { get; set; } Property Value Type Description View Methods ProcessHotKey(KeyEvent) Declaration public override bool ProcessHotKey(KeyEvent kb) Parameters Type Name Description KeyEvent kb Returns Type Description System.Boolean Overrides View.ProcessHotKey(KeyEvent) Redraw(Rect) Declaration public override void Redraw(Rect region) Parameters Type Name Description Rect region Overrides View.Redraw(Rect) Implements System.Collections.IEnumerable" }, "api/Terminal.Gui/Terminal.Gui.StatusItem.html": { "href": "api/Terminal.Gui/Terminal.Gui.StatusItem.html", "title": "Class StatusItem", "keywords": "Class StatusItem StatusItem objects are contained by StatusBar View s. Each StatusItem has a title, a shortcut (hotkey), and an Action that will be invoked when the Shortcut is pressed. The Shortcut will be a global hotkey for the application in the current context of the screen. The colour of the Title will be changed after each ~. A Title set to `~F1~ Help` will render as *F1* using HotNormal and *Help* as HotNormal . Inheritance System.Object StatusItem Inherited Members System.Object.Equals(System.Object) System.Object.Equals(System.Object, System.Object) System.Object.GetHashCode() System.Object.GetType() System.Object.MemberwiseClone() System.Object.ReferenceEquals(System.Object, System.Object) System.Object.ToString() Namespace : Terminal.Gui Assembly : Terminal.Gui.dll Syntax public class StatusItem Constructors StatusItem(Key, ustring, Action) Initializes a new StatusItem . Declaration public StatusItem(Key shortcut, ustring title, Action action) Parameters Type Name Description Key shortcut Shortcut to activate the StatusItem . NStack.ustring title Title for the StatusItem . System.Action action Action to invoke when the StatusItem is activated. Properties Action Gets or sets the action to be invoked when the statusbar item is triggered Declaration public Action Action { get; } Property Value Type Description System.Action Action to invoke. Shortcut Gets the global shortcut to invoke the action on the menu. Declaration public Key Shortcut { get; } Property Value Type Description Key Title Gets or sets the title. Declaration public ustring Title { get; } Property Value Type Description NStack.ustring The title. Remarks The colour of the Title will be changed after each ~. A Title set to `~F1~ Help` will render as *F1* using HotNormal and *Help* as HotNormal ." }, "api/Terminal.Gui/Terminal.Gui.TextAlignment.html": { "href": "api/Terminal.Gui/Terminal.Gui.TextAlignment.html", "title": "Enum TextAlignment", "keywords": "Enum TextAlignment Text alignment enumeration, controls how text is displayed. Namespace : Terminal.Gui Assembly : Terminal.Gui.dll Syntax public enum TextAlignment Fields Name Description Centered Centers the text in the frame. Justified Shows the text as justified text in the frame. Left Aligns the text to the left of the frame. Right Aligns the text to the right side of the frame." }, "api/Terminal.Gui/Terminal.Gui.TextField.html": { "href": "api/Terminal.Gui/Terminal.Gui.TextField.html", "title": "Class TextField", "keywords": "Class TextField Single-line text entry View Inheritance System.Object Responder View TextField DateField TimeField Implements System.Collections.IEnumerable Inherited Members View.Enter View.Leave View.MouseEnter View.MouseLeave View.Driver View.Subviews View.Id View.IsCurrentTop View.WantMousePositionReports View.WantContinuousButtonPressed View.GetEnumerator() View.LayoutStyle View.Bounds View.X View.Y View.Width View.Height View.SuperView View.SetNeedsDisplay() View.SetNeedsDisplay(Rect) View.ChildNeedsDisplay() View.Add(View) View.Add(View[]) View.RemoveAll() View.Remove(View) View.BringSubviewToFront(View) View.SendSubviewToBack(View) View.SendSubviewBackwards(View) View.BringSubviewForward(View) View.Clear() View.Clear(Rect) View.ScreenToView(Int32, Int32) View.ClipToBounds() View.SetClip(Rect) View.DrawFrame(Rect, Int32, Boolean) View.DrawHotString(ustring, Attribute, Attribute) View.DrawHotString(ustring, Boolean, ColorScheme) View.Move(Int32, Int32) View.HasFocus View.OnEnter() View.Focused View.MostFocused View.ColorScheme View.AddRune(Int32, Int32, Rune) View.ClearNeedsDisplay() View.SetFocus(View) View.KeyPress View.ProcessHotKey(KeyEvent) View.ProcessColdKey(KeyEvent) View.KeyDown View.OnKeyDown(KeyEvent) View.KeyUp View.OnKeyUp(KeyEvent) View.EnsureFocus() View.FocusFirst() View.FocusLast() View.FocusPrev() View.FocusNext() View.LayoutSubviews() View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) System.Object.Equals(System.Object) System.Object.Equals(System.Object, System.Object) System.Object.GetHashCode() System.Object.GetType() System.Object.MemberwiseClone() System.Object.ReferenceEquals(System.Object, System.Object) Namespace : Terminal.Gui Assembly : Terminal.Gui.dll Syntax public class TextField : View, IEnumerable Remarks The TextField View provides editing functionality and mouse support. Constructors TextField(ustring) Public constructor that creates a text field, with layout controlled with X, Y, Width and Height. Declaration public TextField(ustring text) Parameters Type Name Description NStack.ustring text Initial text contents. TextField(Int32, Int32, Int32, ustring) Public constructor that creates a text field at an absolute position and size. Declaration public TextField(int x, int y, int w, ustring text) Parameters Type Name Description System.Int32 x The x coordinate. System.Int32 y The y coordinate. System.Int32 w The width. NStack.ustring text Initial text contents. TextField(String) Public constructor that creates a text field, with layout controlled with X, Y, Width and Height. Declaration public TextField(string text) Parameters Type Name Description System.String text Initial text contents. Properties CanFocus Declaration public override bool CanFocus { get; set; } Property Value Type Description System.Boolean Overrides Responder.CanFocus CursorPosition Sets or gets the current cursor position. Declaration public int CursorPosition { get; set; } Property Value Type Description System.Int32 Frame Declaration public override Rect Frame { get; set; } Property Value Type Description Rect Overrides View.Frame ReadOnly If set to true its not allow any changes in the text. Declaration public bool ReadOnly { get; set; } Property Value Type Description System.Boolean Secret Sets the secret property. Declaration public bool Secret { get; set; } Property Value Type Description System.Boolean Remarks This makes the text entry suitable for entering passwords. SelectedLength Length of the selected text. Declaration public int SelectedLength { get; set; } Property Value Type Description System.Int32 SelectedStart Start position of the selected text. Declaration public int SelectedStart { get; set; } Property Value Type Description System.Int32 SelectedText The selected text. Declaration public ustring SelectedText { get; set; } Property Value Type Description NStack.ustring Text Sets or gets the text held by the view. Declaration public ustring Text { get; set; } Property Value Type Description NStack.ustring Remarks Used Tracks whether the text field should be considered \"used\", that is, that the user has moved in the entry, so new input should be appended at the cursor position, rather than clearing the entry Declaration public bool Used { get; set; } Property Value Type Description System.Boolean Methods ClearAllSelection() Clear the selected text. Declaration public void ClearAllSelection() Copy() Copy the selected text to the clipboard. Declaration public virtual void Copy() Cut() Cut the selected text to the clipboard. Declaration public virtual void Cut() MouseEvent(MouseEvent) Declaration public override bool MouseEvent(MouseEvent ev) Parameters Type Name Description MouseEvent ev Returns Type Description System.Boolean Overrides Responder.MouseEvent(MouseEvent) OnLeave() Declaration public override bool OnLeave() Returns Type Description System.Boolean Overrides View.OnLeave() Paste() Paste the selected text from the clipboard. Declaration public virtual void Paste() PositionCursor() Sets the cursor position. Declaration public override void PositionCursor() Overrides View.PositionCursor() ProcessKey(KeyEvent) Processes key presses for the TextField . Declaration public override bool ProcessKey(KeyEvent kb) Parameters Type Name Description KeyEvent kb Returns Type Description System.Boolean Overrides View.ProcessKey(KeyEvent) Remarks The TextField control responds to the following keys: Keys Function Delete , Backspace Deletes the character before cursor. Redraw(Rect) Declaration public override void Redraw(Rect region) Parameters Type Name Description Rect region Overrides View.Redraw(Rect) Events Changed Changed event, raised when the text has clicked. Declaration public event EventHandler Changed Event Type Type Description System.EventHandler < NStack.ustring > Remarks This event is raised when the Text changes. Implements System.Collections.IEnumerable" }, "api/Terminal.Gui/Terminal.Gui.TextView.html": { "href": "api/Terminal.Gui/Terminal.Gui.TextView.html", "title": "Class TextView", "keywords": "Class TextView Multi-line text editing View Inheritance System.Object Responder View TextView Implements System.Collections.IEnumerable Inherited Members View.Enter View.Leave View.MouseEnter View.MouseLeave View.Driver View.Subviews View.Id View.IsCurrentTop View.WantMousePositionReports View.WantContinuousButtonPressed View.Frame View.GetEnumerator() View.LayoutStyle View.Bounds View.X View.Y View.Width View.Height View.SuperView View.SetNeedsDisplay() View.SetNeedsDisplay(Rect) View.ChildNeedsDisplay() View.Add(View) View.Add(View[]) View.RemoveAll() View.Remove(View) View.BringSubviewToFront(View) View.SendSubviewToBack(View) View.SendSubviewBackwards(View) View.BringSubviewForward(View) View.Clear() View.Clear(Rect) View.ScreenToView(Int32, Int32) View.ClipToBounds() View.SetClip(Rect) View.DrawFrame(Rect, Int32, Boolean) View.DrawHotString(ustring, Attribute, Attribute) View.DrawHotString(ustring, Boolean, ColorScheme) View.Move(Int32, Int32) View.HasFocus View.OnEnter() View.OnLeave() View.Focused View.MostFocused View.ColorScheme View.AddRune(Int32, Int32, Rune) View.ClearNeedsDisplay() View.SetFocus(View) View.KeyPress View.ProcessHotKey(KeyEvent) View.ProcessColdKey(KeyEvent) View.KeyDown View.OnKeyDown(KeyEvent) View.KeyUp View.OnKeyUp(KeyEvent) View.EnsureFocus() View.FocusFirst() View.FocusLast() View.FocusPrev() View.FocusNext() View.LayoutSubviews() View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) System.Object.Equals(System.Object) System.Object.Equals(System.Object, System.Object) System.Object.GetHashCode() System.Object.GetType() System.Object.MemberwiseClone() System.Object.ReferenceEquals(System.Object, System.Object) Namespace : Terminal.Gui Assembly : Terminal.Gui.dll Syntax public class TextView : View, IEnumerable Remarks TextView provides a multi-line text editor. Users interact with it with the standard Emacs commands for movement or the arrow keys. Shortcut Action performed Left cursor, Control-b Moves the editing point left. Right cursor, Control-f Moves the editing point right. Alt-b Moves one word back. Alt-f Moves one word forward. Up cursor, Control-p Moves the editing point one line up. Down cursor, Control-n Moves the editing point one line down Home key, Control-a Moves the cursor to the beginning of the line. End key, Control-e Moves the cursor to the end of the line. Delete, Control-d Deletes the character in front of the cursor. Backspace Deletes the character behind the cursor. Control-k Deletes the text until the end of the line and replaces the kill buffer with the deleted text. You can paste this text in a different place by using Control-y. Control-y Pastes the content of the kill ring into the current position. Alt-d Deletes the word above the cursor and adds it to the kill ring. You can paste the contents of the kill ring with Control-y. Control-q Quotes the next input character, to prevent the normal processing of key handling to take place. Constructors TextView() Initalizes a TextView on the specified area, with dimensions controlled with the X, Y, Width and Height properties. Declaration public TextView() TextView(Rect) Initalizes a TextView on the specified area, with absolute position and size. Declaration public TextView(Rect frame) Parameters Type Name Description Rect frame Remarks Properties CanFocus Declaration public override bool CanFocus { get; set; } Property Value Type Description System.Boolean Overrides Responder.CanFocus CurrentColumn Gets the cursor column. Declaration public int CurrentColumn { get; } Property Value Type Description System.Int32 The cursor column. CurrentRow Gets the current cursor row. Declaration public int CurrentRow { get; } Property Value Type Description System.Int32 ReadOnly Gets or sets whether the TextView is in read-only mode or not Declaration public bool ReadOnly { get; set; } Property Value Type Description System.Boolean Boolean value(Default false) Text Sets or gets the text in the TextView . Declaration public ustring Text { get; set; } Property Value Type Description NStack.ustring Remarks Methods CloseFile() Closes the contents of the stream into the TextView . Declaration public bool CloseFile() Returns Type Description System.Boolean true , if stream was closed, false otherwise. LoadFile(String) Loads the contents of the file into the TextView . Declaration public bool LoadFile(string path) Parameters Type Name Description System.String path Path to the file to load. Returns Type Description System.Boolean true , if file was loaded, false otherwise. LoadStream(Stream) Loads the contents of the stream into the TextView . Declaration public void LoadStream(Stream stream) Parameters Type Name Description System.IO.Stream stream Stream to load the contents from. MouseEvent(MouseEvent) Declaration public override bool MouseEvent(MouseEvent ev) Parameters Type Name Description MouseEvent ev Returns Type Description System.Boolean Overrides Responder.MouseEvent(MouseEvent) PositionCursor() Positions the cursor on the current row and column Declaration public override void PositionCursor() Overrides View.PositionCursor() ProcessKey(KeyEvent) Declaration public override bool ProcessKey(KeyEvent kb) Parameters Type Name Description KeyEvent kb Returns Type Description System.Boolean Overrides View.ProcessKey(KeyEvent) Redraw(Rect) Declaration public override void Redraw(Rect region) Parameters Type Name Description Rect region Overrides View.Redraw(Rect) ScrollTo(Int32) Will scroll the TextView to display the specified row at the top Declaration public void ScrollTo(int row) Parameters Type Name Description System.Int32 row Row that should be displayed at the top, if the value is negative it will be reset to zero Events TextChanged Raised when the Text of the TextView changes. Declaration public event EventHandler TextChanged Event Type Type Description System.EventHandler Implements System.Collections.IEnumerable" }, "api/Terminal.Gui/Terminal.Gui.TimeField.html": { "href": "api/Terminal.Gui/Terminal.Gui.TimeField.html", "title": "Class TimeField", "keywords": "Class TimeField Time editing View Inheritance System.Object Responder View TextField TimeField Implements System.Collections.IEnumerable Inherited Members TextField.Used TextField.ReadOnly TextField.Changed TextField.OnLeave() TextField.Frame TextField.Text TextField.Secret TextField.CursorPosition TextField.PositionCursor() TextField.Redraw(Rect) TextField.CanFocus TextField.SelectedStart TextField.SelectedLength TextField.SelectedText TextField.ClearAllSelection() TextField.Copy() TextField.Cut() TextField.Paste() View.Enter View.Leave View.MouseEnter View.MouseLeave View.Driver View.Subviews View.Id View.IsCurrentTop View.WantMousePositionReports View.WantContinuousButtonPressed View.GetEnumerator() View.LayoutStyle View.Bounds View.X View.Y View.Width View.Height View.SuperView View.SetNeedsDisplay() View.SetNeedsDisplay(Rect) View.ChildNeedsDisplay() View.Add(View) View.Add(View[]) View.RemoveAll() View.Remove(View) View.BringSubviewToFront(View) View.SendSubviewToBack(View) View.SendSubviewBackwards(View) View.BringSubviewForward(View) View.Clear() View.Clear(Rect) View.ScreenToView(Int32, Int32) View.ClipToBounds() View.SetClip(Rect) View.DrawFrame(Rect, Int32, Boolean) View.DrawHotString(ustring, Attribute, Attribute) View.DrawHotString(ustring, Boolean, ColorScheme) View.Move(Int32, Int32) View.HasFocus View.OnEnter() View.Focused View.MostFocused View.ColorScheme View.AddRune(Int32, Int32, Rune) View.ClearNeedsDisplay() View.SetFocus(View) View.KeyPress View.ProcessHotKey(KeyEvent) View.ProcessColdKey(KeyEvent) View.KeyDown View.OnKeyDown(KeyEvent) View.KeyUp View.OnKeyUp(KeyEvent) View.EnsureFocus() View.FocusFirst() View.FocusLast() View.FocusPrev() View.FocusNext() View.LayoutSubviews() View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) System.Object.Equals(System.Object) System.Object.Equals(System.Object, System.Object) System.Object.GetHashCode() System.Object.GetType() System.Object.MemberwiseClone() System.Object.ReferenceEquals(System.Object, System.Object) Namespace : Terminal.Gui Assembly : Terminal.Gui.dll Syntax public class TimeField : TextField, IEnumerable Remarks The TimeField View provides time editing functionality with mouse support. Constructors TimeField(DateTime) Initializes a new instance of TimeField Declaration public TimeField(DateTime time) Parameters Type Name Description System.DateTime time TimeField(Int32, Int32, DateTime, Boolean) Initializes a new instance of TimeField at an absolute position and fixed size. Declaration public TimeField(int x, int y, DateTime time, bool isShort = false) Parameters Type Name Description System.Int32 x The x coordinate. System.Int32 y The y coordinate. System.DateTime time Initial time contents. System.Boolean isShort If true, the seconds are hidden. Properties IsShortFormat Get or set the data format for the widget. Declaration public bool IsShortFormat { get; set; } Property Value Type Description System.Boolean Time Gets or sets the time of the TimeField . Declaration public DateTime Time { get; set; } Property Value Type Description System.DateTime Remarks Methods MouseEvent(MouseEvent) Declaration public override bool MouseEvent(MouseEvent ev) Parameters Type Name Description MouseEvent ev Returns Type Description System.Boolean Overrides TextField.MouseEvent(MouseEvent) ProcessKey(KeyEvent) Declaration public override bool ProcessKey(KeyEvent kb) Parameters Type Name Description KeyEvent kb Returns Type Description System.Boolean Overrides TextField.ProcessKey(KeyEvent) Implements System.Collections.IEnumerable" }, "api/Terminal.Gui/Terminal.Gui.Toplevel.html": { "href": "api/Terminal.Gui/Terminal.Gui.Toplevel.html", "title": "Class Toplevel", "keywords": "Class Toplevel Toplevel views can be modally executed. Inheritance System.Object Responder View Toplevel Window Implements System.Collections.IEnumerable Inherited Members View.Enter View.Leave View.MouseEnter View.MouseLeave View.Driver View.Subviews View.Id View.IsCurrentTop View.WantMousePositionReports View.WantContinuousButtonPressed View.Frame View.GetEnumerator() View.LayoutStyle View.Bounds View.X View.Y View.Width View.Height View.SuperView View.SetNeedsDisplay() View.SetNeedsDisplay(Rect) View.ChildNeedsDisplay() View.Add(View[]) View.BringSubviewToFront(View) View.SendSubviewToBack(View) View.SendSubviewBackwards(View) View.BringSubviewForward(View) View.Clear() View.Clear(Rect) View.ScreenToView(Int32, Int32) View.ClipToBounds() View.SetClip(Rect) View.DrawFrame(Rect, Int32, Boolean) View.DrawHotString(ustring, Attribute, Attribute) View.DrawHotString(ustring, Boolean, ColorScheme) View.Move(Int32, Int32) View.PositionCursor() View.HasFocus View.OnEnter() View.OnLeave() View.Focused View.MostFocused View.ColorScheme View.AddRune(Int32, Int32, Rune) View.ClearNeedsDisplay() View.SetFocus(View) View.KeyPress View.ProcessHotKey(KeyEvent) View.ProcessColdKey(KeyEvent) View.KeyDown View.OnKeyDown(KeyEvent) View.KeyUp View.OnKeyUp(KeyEvent) View.EnsureFocus() View.FocusFirst() View.FocusLast() View.FocusPrev() View.FocusNext() View.LayoutSubviews() View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) Responder.MouseEvent(MouseEvent) System.Object.Equals(System.Object) System.Object.Equals(System.Object, System.Object) System.Object.GetHashCode() System.Object.GetType() System.Object.MemberwiseClone() System.Object.ReferenceEquals(System.Object, System.Object) Namespace : Terminal.Gui Assembly : Terminal.Gui.dll Syntax public class Toplevel : View, IEnumerable Remarks Toplevels can be modally executing views, and they return control to the caller when the \"Running\" property is set to false, or by calling Terminal.Gui.Application.RequestStop() There will be a toplevel created for you on the first time use and can be accessed from the property Top , but new toplevels can be created and ran on top of it. To run, create the toplevel and then invoke Run() with the new toplevel. TopLevels can also opt-in to more sophisticated initialization by implementing System.ComponentModel.ISupportInitialize . When they do so, the System.ComponentModel.ISupportInitialize.BeginInit and System.ComponentModel.ISupportInitialize.EndInit methods will be called before running the view. If first-run-only initialization is preferred, the System.ComponentModel.ISupportInitializeNotification can be implemented too, in which case the System.ComponentModel.ISupportInitialize methods will only be called if System.ComponentModel.ISupportInitializeNotification.IsInitialized is false . This allows proper View inheritance hierarchies to override base class layout code optimally by doing so only on first run, instead of on every run. Constructors Toplevel() Initializes a new instance of the Toplevel class with Computed layout, defaulting to async full screen. Declaration public Toplevel() Toplevel(Rect) Initializes a new instance of the Toplevel class with the specified absolute layout. Declaration public Toplevel(Rect frame) Parameters Type Name Description Rect frame Frame. Properties CanFocus Gets or sets a value indicating whether this Toplevel can focus. Declaration public override bool CanFocus { get; } Property Value Type Description System.Boolean true if can focus; otherwise, false . Overrides Responder.CanFocus MenuBar Check id current toplevel has menu bar Declaration public MenuBar MenuBar { get; set; } Property Value Type Description MenuBar Modal Determines whether the Toplevel is modal or not. Causes ProcessKey(KeyEvent) to propagate keys upwards by default unless set to true . Declaration public bool Modal { get; set; } Property Value Type Description System.Boolean Running Gets or sets whether the Mainloop for this Toplevel is running or not. Setting this property to false will cause the MainLoop to exit. Declaration public bool Running { get; set; } Property Value Type Description System.Boolean StatusBar Check id current toplevel has status bar Declaration public StatusBar StatusBar { get; set; } Property Value Type Description StatusBar Methods Add(View) Declaration public override void Add(View view) Parameters Type Name Description View view Overrides View.Add(View) Create() Convenience factory method that creates a new toplevel with the current terminal dimensions. Declaration public static Toplevel Create() Returns Type Description Toplevel The create. ProcessKey(KeyEvent) Declaration public override bool ProcessKey(KeyEvent keyEvent) Parameters Type Name Description KeyEvent keyEvent Returns Type Description System.Boolean Overrides View.ProcessKey(KeyEvent) Redraw(Rect) Declaration public override void Redraw(Rect region) Parameters Type Name Description Rect region Overrides View.Redraw(Rect) Remove(View) Declaration public override void Remove(View view) Parameters Type Name Description View view Overrides View.Remove(View) RemoveAll() Declaration public override void RemoveAll() Overrides View.RemoveAll() WillPresent() This method is invoked by Application.Begin as part of the Application.Run after the views have been laid out, and before the views are drawn for the first time. Declaration public virtual void WillPresent() Events Ready Fired once the Toplevel's MainLoop has started it's first iteration. Subscribe to this event to perform tasks when the Toplevel has been laid out and focus has been set. changes. A Ready event handler is a good place to finalize initialization after calling ` Run() (topLevel)`. Declaration public event EventHandler Ready Event Type Type Description System.EventHandler Implements System.Collections.IEnumerable" }, "api/Terminal.Gui/Terminal.Gui.View.html": { "href": "api/Terminal.Gui/Terminal.Gui.View.html", "title": "Class View", "keywords": "Class View View is the base class for all views on the screen and represents a visible element that can render itself and contains zero or more nested views. Inheritance System.Object Responder View Button CheckBox ComboBox FrameView HexView Label ListView MenuBar ProgressBar RadioGroup ScrollBarView ScrollView StatusBar TextField TextView Toplevel Implements System.Collections.IEnumerable Inherited Members Responder.CanFocus Responder.MouseEvent(MouseEvent) System.Object.Equals(System.Object) System.Object.Equals(System.Object, System.Object) System.Object.GetHashCode() System.Object.GetType() System.Object.MemberwiseClone() System.Object.ReferenceEquals(System.Object, System.Object) Namespace : Terminal.Gui Assembly : Terminal.Gui.dll Syntax public class View : Responder, IEnumerable Remarks The View defines the base functionality for user interface elements in Terminal/gui.cs. Views can contain one or more subviews, can respond to user input and render themselves on the screen. Views can either be created with an absolute position, by calling the constructor that takes a Rect parameter to specify the absolute position and size (the Frame of the View) or by setting the X, Y, Width and Height properties on the view. Both approaches use coordinates that are relative to the container they are being added to. When you do not specify a Rect frame you can use the more flexible Dim and Pos objects that can dynamically update the position of a view. The X and Y properties are of type Pos and you can use either absolute positions, percentages or anchor points. The Width and Height properties are of type Dim and can use absolute position, percentages and anchors. These are useful as they will take care of repositioning your views if your view's frames are resized or if the terminal size changes. When you specify the Rect parameter to a view, you are setting the LayoutStyle to Absolute, and the view will always stay in the position that you placed it. To change the position change the Frame property to the new position. Subviews can be added to a View by calling the Add method. The container of a view is the Superview. Developers can call the SetNeedsDisplay method on the view to flag a region or the entire view as requiring to be redrawn. Views have a ColorScheme property that defines the default colors that subviews should use for rendering. This ensures that the views fit in the context where they are being used, and allows for themes to be plugged in. For example, the default colors for windows and toplevels uses a blue background, while it uses a white background for dialog boxes and a red background for errors. If a ColorScheme is not set on a view, the result of the ColorScheme is the value of the SuperView and the value might only be valid once a view has been added to a SuperView, so your subclasses should not rely on ColorScheme being set at construction time. Using ColorSchemes has the advantage that your application will work both in color as well as black and white displays. Views that are focusable should implement the PositionCursor to make sure that the cursor is placed in a location that makes sense. Unix terminals do not have a way of hiding the cursor, so it can be distracting to have the cursor left at the last focused view. So views should make sure that they place the cursor in a visually sensible place. The metnod LayoutSubviews is invoked when the size or layout of a view has changed. The default processing system will keep the size and dimensions for views that use the LayoutKind.Absolute, and will recompute the frames for the vies that use LayoutKind.Computed. Constructors View() Initializes a new instance of the View class and sets the view up for Computed layout, which will use the values in X, Y, Width and Height to compute the View's Frame. Declaration public View() View(Rect) Initializes a new instance of the View class with the absolute dimensions specified in the frame. If you want to have Views that can be positioned with Pos and Dim properties on X, Y, Width and Height, use the empty constructor. Declaration public View(Rect frame) Parameters Type Name Description Rect frame The region covered by this view. Properties Bounds The bounds represent the View-relative rectangle used for this view. Updates to the Bounds update the Frame, and has the same side effects as updating the frame. Declaration public Rect Bounds { get; set; } Property Value Type Description Rect The bounds. ColorScheme The color scheme for this view, if it is not defined, it returns the parent's color scheme. Declaration public ColorScheme ColorScheme { get; set; } Property Value Type Description ColorScheme Driver Points to the current driver in use by the view, it is a convenience property for simplifying the development of new views. Declaration public static ConsoleDriver Driver { get; } Property Value Type Description ConsoleDriver Focused Returns the currently focused view inside this view, or null if nothing is focused. Declaration public View Focused { get; } Property Value Type Description View The focused. Frame Gets or sets the frame for the view. Declaration public virtual Rect Frame { get; set; } Property Value Type Description Rect The frame. Remarks Altering the Frame of a view will trigger the redrawing of the view as well as the redrawing of the affected regions in the superview. HasFocus Declaration public override bool HasFocus { get; } Property Value Type Description System.Boolean Overrides Responder.HasFocus Height Gets or sets the height for the view. This is only used when the LayoutStyle is Computed, if the LayoutStyle is set to Absolute, this value is ignored. Declaration public Dim Height { get; set; } Property Value Type Description Dim The height. Id Gets or sets an identifier for the view; Declaration public ustring Id { get; set; } Property Value Type Description NStack.ustring The identifier. IsCurrentTop Returns a value indicating if this View is currently on Top (Active) Declaration public bool IsCurrentTop { get; } Property Value Type Description System.Boolean LayoutStyle Controls how the view's Frame is computed during the LayoutSubviews method, if Absolute, then LayoutSubviews does not change the Frame properties, otherwise the Frame is updated from the values in X, Y, Width and Height properties. Declaration public LayoutStyle LayoutStyle { get; set; } Property Value Type Description LayoutStyle The layout style. MostFocused Returns the most focused view in the chain of subviews (the leaf view that has the focus). Declaration public View MostFocused { get; } Property Value Type Description View The most focused. Subviews This returns a list of the subviews contained by this view. Declaration public IList Subviews { get; } Property Value Type Description System.Collections.Generic.IList < View > The subviews. SuperView Returns the container for this view, or null if this view has not been added to a container. Declaration public View SuperView { get; } Property Value Type Description View The super view. WantContinuousButtonPressed Gets or sets a value indicating whether this View want continuous button pressed event. Declaration public virtual bool WantContinuousButtonPressed { get; set; } Property Value Type Description System.Boolean WantMousePositionReports Gets or sets a value indicating whether this View want mouse position reports. Declaration public virtual bool WantMousePositionReports { get; set; } Property Value Type Description System.Boolean true if want mouse position reports; otherwise, false . Width Gets or sets the width for the view. This is only used when the LayoutStyle is Computed, if the LayoutStyle is set to Absolute, this value is ignored. Declaration public Dim Width { get; set; } Property Value Type Description Dim The width. X Gets or sets the X position for the view (the column). This is only used when the LayoutStyle is Computed, if the LayoutStyle is set to Absolute, this value is ignored. Declaration public Pos X { get; set; } Property Value Type Description Pos The X Position. Y Gets or sets the Y position for the view (line). This is only used when the LayoutStyle is Computed, if the LayoutStyle is set to Absolute, this value is ignored. Declaration public Pos Y { get; set; } Property Value Type Description Pos The y position (line). Methods Add(View) Adds a subview to this view. Declaration public virtual void Add(View view) Parameters Type Name Description View view Remarks Add(View[]) Adds the specified views to the view. Declaration public void Add(params View[] views) Parameters Type Name Description View [] views Array of one or more views (can be optional parameter). AddRune(Int32, Int32, Rune) Displays the specified character in the specified column and row. Declaration public void AddRune(int col, int row, Rune ch) Parameters Type Name Description System.Int32 col Col. System.Int32 row Row. System.Rune ch Ch. BringSubviewForward(View) Moves the subview backwards in the hierarchy, only one step Declaration public void BringSubviewForward(View subview) Parameters Type Name Description View subview The subview to send backwards Remarks If you want to send the view all the way to the back use SendSubviewToBack. BringSubviewToFront(View) Brings the specified subview to the front so it is drawn on top of any other views. Declaration public void BringSubviewToFront(View subview) Parameters Type Name Description View subview The subview to send to the front Remarks SendSubviewToBack(View) . ChildNeedsDisplay() Flags this view for requiring the children views to be repainted. Declaration public void ChildNeedsDisplay() Clear() Clears the view region with the current color. Declaration public void Clear() Remarks This clears the entire region used by this view. Clear(Rect) Clears the specified rectangular region with the current color Declaration public void Clear(Rect r) Parameters Type Name Description Rect r ClearNeedsDisplay() Removes the SetNeedsDisplay and the ChildNeedsDisplay setting on this view. Declaration protected void ClearNeedsDisplay() ClipToBounds() Sets the Console driver's clip region to the current View's Bounds. Declaration public Rect ClipToBounds() Returns Type Description Rect The existing driver's Clip region, which can be then set by setting the Driver.Clip property. DrawFrame(Rect, Int32, Boolean) Draws a frame in the current view, clipped by the boundary of this view Declaration public void DrawFrame(Rect rect, int padding = 0, bool fill = false) Parameters Type Name Description Rect rect Rectangular region for the frame to be drawn. System.Int32 padding The padding to add to the drawn frame. System.Boolean fill If set to true it fill will the contents. DrawHotString(ustring, Boolean, ColorScheme) Utility function to draw strings that contains a hotkey using a colorscheme and the \"focused\" state. Declaration public void DrawHotString(ustring text, bool focused, ColorScheme scheme) Parameters Type Name Description NStack.ustring text String to display, the underscoore before a letter flags the next letter as the hotkey. System.Boolean focused If set to true this uses the focused colors from the color scheme, otherwise the regular ones. ColorScheme scheme The color scheme to use. DrawHotString(ustring, Attribute, Attribute) Utility function to draw strings that contain a hotkey Declaration public void DrawHotString(ustring text, Attribute hotColor, Attribute normalColor) Parameters Type Name Description NStack.ustring text String to display, the underscoore before a letter flags the next letter as the hotkey. Attribute hotColor Hot color. Attribute normalColor Normal color. EnsureFocus() Finds the first view in the hierarchy that wants to get the focus if nothing is currently focused, otherwise, it does nothing. Declaration public void EnsureFocus() FocusFirst() Focuses the first focusable subview if one exists. Declaration public void FocusFirst() FocusLast() Focuses the last focusable subview if one exists. Declaration public void FocusLast() FocusNext() Focuses the next view. Declaration public bool FocusNext() Returns Type Description System.Boolean true , if next was focused, false otherwise. FocusPrev() Focuses the previous view. Declaration public bool FocusPrev() Returns Type Description System.Boolean true , if previous was focused, false otherwise. GetEnumerator() Gets an enumerator that enumerates the subviews in this view. Declaration public IEnumerator GetEnumerator() Returns Type Description System.Collections.IEnumerator The enumerator. LayoutSubviews() This virtual method is invoked when a view starts executing or when the dimensions of the view have changed, for example in response to the container view or terminal resizing. Declaration public virtual void LayoutSubviews() Move(Int32, Int32) This moves the cursor to the specified column and row in the view. Declaration public void Move(int col, int row) Parameters Type Name Description System.Int32 col Col. System.Int32 row Row. OnEnter() Declaration public override bool OnEnter() Returns Type Description System.Boolean Overrides Responder.OnEnter() OnKeyDown(KeyEvent) Declaration public override bool OnKeyDown(KeyEvent keyEvent) Parameters Type Name Description KeyEvent keyEvent Contains the details about the key that produced the event. Returns Type Description System.Boolean Overrides Responder.OnKeyDown(KeyEvent) OnKeyUp(KeyEvent) Declaration public override bool OnKeyUp(KeyEvent keyEvent) Parameters Type Name Description KeyEvent keyEvent Contains the details about the key that produced the event. Returns Type Description System.Boolean Overrides Responder.OnKeyUp(KeyEvent) OnLeave() Declaration public override bool OnLeave() Returns Type Description System.Boolean Overrides Responder.OnLeave() OnMouseEnter(MouseEvent) Declaration public override bool OnMouseEnter(MouseEvent mouseEvent) Parameters Type Name Description MouseEvent mouseEvent Returns Type Description System.Boolean Overrides Responder.OnMouseEnter(MouseEvent) OnMouseLeave(MouseEvent) Declaration public override bool OnMouseLeave(MouseEvent mouseEvent) Parameters Type Name Description MouseEvent mouseEvent Returns Type Description System.Boolean Overrides Responder.OnMouseLeave(MouseEvent) PositionCursor() Positions the cursor in the right position based on the currently focused view in the chain. Declaration public virtual void PositionCursor() ProcessColdKey(KeyEvent) Declaration public override bool ProcessColdKey(KeyEvent keyEvent) Parameters Type Name Description KeyEvent keyEvent Returns Type Description System.Boolean Overrides Responder.ProcessColdKey(KeyEvent) ProcessHotKey(KeyEvent) Declaration public override bool ProcessHotKey(KeyEvent keyEvent) Parameters Type Name Description KeyEvent keyEvent Returns Type Description System.Boolean Overrides Responder.ProcessHotKey(KeyEvent) ProcessKey(KeyEvent) Declaration public override bool ProcessKey(KeyEvent keyEvent) Parameters Type Name Description KeyEvent keyEvent Returns Type Description System.Boolean Overrides Responder.ProcessKey(KeyEvent) Redraw(Rect) Performs a redraw of this view and its subviews, only redraws the views that have been flagged for a re-display. Declaration public virtual void Redraw(Rect region) Parameters Type Name Description Rect region The region to redraw, this is relative to the view itself. Remarks Views should set the color that they want to use on entry, as otherwise this will inherit the last color that was set globaly on the driver. Remove(View) Removes a widget from this container. Declaration public virtual void Remove(View view) Parameters Type Name Description View view Remarks RemoveAll() Removes all the widgets from this container. Declaration public virtual void RemoveAll() Remarks ScreenToView(Int32, Int32) Converts a point from screen coordinates into the view coordinate space. Declaration public Point ScreenToView(int x, int y) Parameters Type Name Description System.Int32 x X screen-coordinate point. System.Int32 y Y screen-coordinate point. Returns Type Description Point The mapped point. SendSubviewBackwards(View) Moves the subview backwards in the hierarchy, only one step Declaration public void SendSubviewBackwards(View subview) Parameters Type Name Description View subview The subview to send backwards Remarks If you want to send the view all the way to the back use SendSubviewToBack. SendSubviewToBack(View) Sends the specified subview to the front so it is the first view drawn Declaration public void SendSubviewToBack(View subview) Parameters Type Name Description View subview The subview to send to the front Remarks BringSubviewToFront(View) . SetClip(Rect) Sets the clipping region to the specified region, the region is view-relative Declaration public Rect SetClip(Rect rect) Parameters Type Name Description Rect rect Rectangle region to clip into, the region is view-relative. Returns Type Description Rect The previous clip region. SetFocus(View) Focuses the specified sub-view. Declaration public void SetFocus(View view) Parameters Type Name Description View view View. SetNeedsDisplay() Invoke to flag that this view needs to be redisplayed, by any code that alters the state of the view. Declaration public void SetNeedsDisplay() SetNeedsDisplay(Rect) Flags the specified rectangle region on this view as needing to be repainted. Declaration public void SetNeedsDisplay(Rect region) Parameters Type Name Description Rect region The region that must be flagged for repaint. ToString() Declaration public override string ToString() Returns Type Description System.String Overrides System.Object.ToString() Events Enter Event fired when the view get focus. Declaration public event EventHandler Enter Event Type Type Description System.EventHandler KeyDown Invoked when a key is pressed Declaration public event EventHandler KeyDown Event Type Type Description System.EventHandler < View.KeyEventEventArgs > KeyPress Invoked when a character key is pressed and occurs after the key up event. Declaration public event EventHandler KeyPress Event Type Type Description System.EventHandler < View.KeyEventEventArgs > KeyUp Invoked when a key is released Declaration public event EventHandler KeyUp Event Type Type Description System.EventHandler < View.KeyEventEventArgs > Leave Event fired when the view lost focus. Declaration public event EventHandler Leave Event Type Type Description System.EventHandler MouseEnter Event fired when the view receives the mouse event for the first time. Declaration public event EventHandler MouseEnter Event Type Type Description System.EventHandler < MouseEvent > MouseLeave Event fired when the view loses mouse event for the last time. Declaration public event EventHandler MouseLeave Event Type Type Description System.EventHandler < MouseEvent > Implements System.Collections.IEnumerable" }, "api/Terminal.Gui/Terminal.Gui.View.KeyEventEventArgs.html": { "href": "api/Terminal.Gui/Terminal.Gui.View.KeyEventEventArgs.html", "title": "Class View.KeyEventEventArgs", "keywords": "Class View.KeyEventEventArgs Specifies the event arguments for KeyEvent Inheritance System.Object System.EventArgs View.KeyEventEventArgs Inherited Members System.EventArgs.Empty System.Object.Equals(System.Object) System.Object.Equals(System.Object, System.Object) System.Object.GetHashCode() System.Object.GetType() System.Object.MemberwiseClone() System.Object.ReferenceEquals(System.Object, System.Object) System.Object.ToString() Namespace : Terminal.Gui Assembly : Terminal.Gui.dll Syntax public class KeyEventEventArgs : EventArgs Constructors KeyEventEventArgs(KeyEvent) Constructs. Declaration public KeyEventEventArgs(KeyEvent ke) Parameters Type Name Description KeyEvent ke Properties Handled Indicates if the current Key event has already been processed and the driver should stop notifying any other event subscriber. Its important to set this value to true specially when updating any View's layout from inside the subscriber method. Declaration public bool Handled { get; set; } Property Value Type Description System.Boolean KeyEvent The KeyEvent for the event. Declaration public KeyEvent KeyEvent { get; set; } Property Value Type Description KeyEvent" }, "api/Terminal.Gui/Terminal.Gui.Window.html": { "href": "api/Terminal.Gui/Terminal.Gui.Window.html", "title": "Class Window", "keywords": "Class Window A Toplevel View that draws a frame around its region and has a \"ContentView\" subview where the contents are added. Inheritance System.Object Responder View Toplevel Window Dialog Implements System.Collections.IEnumerable Inherited Members Toplevel.Running Toplevel.Ready Toplevel.Create() Toplevel.CanFocus Toplevel.Modal Toplevel.MenuBar Toplevel.StatusBar Toplevel.ProcessKey(KeyEvent) Toplevel.WillPresent() View.Enter View.Leave View.MouseEnter View.MouseLeave View.Driver View.Subviews View.Id View.IsCurrentTop View.WantMousePositionReports View.WantContinuousButtonPressed View.Frame View.LayoutStyle View.Bounds View.X View.Y View.Width View.Height View.SuperView View.SetNeedsDisplay() View.SetNeedsDisplay(Rect) View.ChildNeedsDisplay() View.Add(View[]) View.BringSubviewToFront(View) View.SendSubviewToBack(View) View.SendSubviewBackwards(View) View.BringSubviewForward(View) View.Clear() View.Clear(Rect) View.ScreenToView(Int32, Int32) View.ClipToBounds() View.SetClip(Rect) View.DrawFrame(Rect, Int32, Boolean) View.DrawHotString(ustring, Attribute, Attribute) View.DrawHotString(ustring, Boolean, ColorScheme) View.Move(Int32, Int32) View.PositionCursor() View.HasFocus View.OnEnter() View.OnLeave() View.Focused View.MostFocused View.ColorScheme View.AddRune(Int32, Int32, Rune) View.ClearNeedsDisplay() View.SetFocus(View) View.KeyPress View.ProcessHotKey(KeyEvent) View.ProcessColdKey(KeyEvent) View.KeyDown View.OnKeyDown(KeyEvent) View.KeyUp View.OnKeyUp(KeyEvent) View.EnsureFocus() View.FocusFirst() View.FocusLast() View.FocusPrev() View.FocusNext() View.LayoutSubviews() View.ToString() View.OnMouseEnter(MouseEvent) View.OnMouseLeave(MouseEvent) System.Object.Equals(System.Object) System.Object.Equals(System.Object, System.Object) System.Object.GetHashCode() System.Object.GetType() System.Object.MemberwiseClone() System.Object.ReferenceEquals(System.Object, System.Object) Namespace : Terminal.Gui Assembly : Terminal.Gui.dll Syntax public class Window : Toplevel, IEnumerable Constructors Window(ustring) Initializes a new instance of the Window class with an optional title. Declaration public Window(ustring title = null) Parameters Type Name Description NStack.ustring title Title. Window(ustring, Int32) Initializes a new instance of the Window with the specified frame for its location, with the specified border an optional title. Declaration public Window(ustring title = null, int padding = 0) Parameters Type Name Description NStack.ustring title Title. System.Int32 padding Number of characters to use for padding of the drawn frame. Window(Rect, ustring) Initializes a new instance of the Window class with an optional title and a set frame. Declaration public Window(Rect frame, ustring title = null) Parameters Type Name Description Rect frame Frame. NStack.ustring title Title. Window(Rect, ustring, Int32) Initializes a new instance of the Window with the specified frame for its location, with the specified border an optional title. Declaration public Window(Rect frame, ustring title = null, int padding = 0) Parameters Type Name Description Rect frame Frame. NStack.ustring title Title. System.Int32 padding Number of characters to use for padding of the drawn frame. Properties Title The title to be displayed for this window. Declaration public ustring Title { get; set; } Property Value Type Description NStack.ustring The title. Methods Add(View) Add the specified view to the Terminal.Gui.Window.ContentView . Declaration public override void Add(View view) Parameters Type Name Description View view View to add to the window. Overrides Toplevel.Add(View) GetEnumerator() Enumerates the various View s in the embedded Terminal.Gui.Window.ContentView . Declaration public IEnumerator GetEnumerator() Returns Type Description System.Collections.IEnumerator The enumerator. MouseEvent(MouseEvent) Declaration public override bool MouseEvent(MouseEvent mouseEvent) Parameters Type Name Description MouseEvent mouseEvent Returns Type Description System.Boolean Overrides Responder.MouseEvent(MouseEvent) Redraw(Rect) Declaration public override void Redraw(Rect bounds) Parameters Type Name Description Rect bounds Overrides Toplevel.Redraw(Rect) Remove(View) Removes a widget from this container. Declaration public override void Remove(View view) Parameters Type Name Description View view Overrides Toplevel.Remove(View) Remarks RemoveAll() Removes all widgets from this container. Declaration public override void RemoveAll() Overrides Toplevel.RemoveAll() Remarks Implements System.Collections.IEnumerable" }, "api/Terminal.Gui/Unix.Terminal.Curses.Event.html": { "href": "api/Terminal.Gui/Unix.Terminal.Curses.Event.html", "title": "Enum Curses.Event", "keywords": "Enum Curses.Event Namespace : Unix.Terminal Assembly : Terminal.Gui.dll Syntax public enum Event : long Fields Name Description AllEvents Button1Clicked Button1DoubleClicked Button1Pressed Button1Released Button1TripleClicked Button2Clicked Button2DoubleClicked Button2Pressed Button2Released Button2TrippleClicked Button3Clicked Button3DoubleClicked Button3Pressed Button3Released Button3TripleClicked Button4Clicked Button4DoubleClicked Button4Pressed Button4Released Button4TripleClicked ButtonAlt ButtonCtrl ButtonShift ReportMousePosition" }, "api/Terminal.Gui/Unix.Terminal.Curses.html": { "href": "api/Terminal.Gui/Unix.Terminal.Curses.html", "title": "Class Curses", "keywords": "Class Curses Inheritance System.Object Curses 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 : Unix.Terminal Assembly : Terminal.Gui.dll Syntax public class Curses Fields A_BLINK Declaration public const int A_BLINK = 524288 Field Value Type Description System.Int32 A_BOLD Declaration public const int A_BOLD = 2097152 Field Value Type Description System.Int32 A_DIM Declaration public const int A_DIM = 1048576 Field Value Type Description System.Int32 A_INVIS Declaration public const int A_INVIS = 8388608 Field Value Type Description System.Int32 A_NORMAL Declaration public const int A_NORMAL = 0 Field Value Type Description System.Int32 A_PROTECT Declaration public const int A_PROTECT = 16777216 Field Value Type Description System.Int32 A_REVERSE Declaration public const int A_REVERSE = 262144 Field Value Type Description System.Int32 A_STANDOUT Declaration public const int A_STANDOUT = 65536 Field Value Type Description System.Int32 A_UNDERLINE Declaration public const int A_UNDERLINE = 131072 Field Value Type Description System.Int32 ACS_BLOCK Declaration public const int ACS_BLOCK = 4194352 Field Value Type Description System.Int32 ACS_BOARD Declaration public const int ACS_BOARD = 4194408 Field Value Type Description System.Int32 ACS_BTEE Declaration public const int ACS_BTEE = 4194422 Field Value Type Description System.Int32 ACS_BULLET Declaration public const int ACS_BULLET = 4194430 Field Value Type Description System.Int32 ACS_CKBOARD Declaration public const int ACS_CKBOARD = 4194401 Field Value Type Description System.Int32 ACS_DARROW Declaration public const int ACS_DARROW = 4194350 Field Value Type Description System.Int32 ACS_DEGREE Declaration public const int ACS_DEGREE = 4194406 Field Value Type Description System.Int32 ACS_DIAMOND Declaration public const int ACS_DIAMOND = 4194400 Field Value Type Description System.Int32 ACS_HLINE Declaration public const int ACS_HLINE = 4194417 Field Value Type Description System.Int32 ACS_LANTERN Declaration public const int ACS_LANTERN = 4194409 Field Value Type Description System.Int32 ACS_LARROW Declaration public const int ACS_LARROW = 4194348 Field Value Type Description System.Int32 ACS_LLCORNER Declaration public const int ACS_LLCORNER = 4194413 Field Value Type Description System.Int32 ACS_LRCORNER Declaration public const int ACS_LRCORNER = 4194410 Field Value Type Description System.Int32 ACS_LTEE Declaration public const int ACS_LTEE = 4194420 Field Value Type Description System.Int32 ACS_PLMINUS Declaration public const int ACS_PLMINUS = 4194407 Field Value Type Description System.Int32 ACS_PLUS Declaration public const int ACS_PLUS = 4194414 Field Value Type Description System.Int32 ACS_RARROW Declaration public const int ACS_RARROW = 4194347 Field Value Type Description System.Int32 ACS_RTEE Declaration public const int ACS_RTEE = 4194421 Field Value Type Description System.Int32 ACS_S1 Declaration public const int ACS_S1 = 4194415 Field Value Type Description System.Int32 ACS_S9 Declaration public const int ACS_S9 = 4194419 Field Value Type Description System.Int32 ACS_TTEE Declaration public const int ACS_TTEE = 4194423 Field Value Type Description System.Int32 ACS_UARROW Declaration public const int ACS_UARROW = 4194349 Field Value Type Description System.Int32 ACS_ULCORNER Declaration public const int ACS_ULCORNER = 4194412 Field Value Type Description System.Int32 ACS_URCORNER Declaration public const int ACS_URCORNER = 4194411 Field Value Type Description System.Int32 ACS_VLINE Declaration public const int ACS_VLINE = 4194424 Field Value Type Description System.Int32 AltKeyDown Declaration public const int AltKeyDown = 529 Field Value Type Description System.Int32 AltKeyEnd Declaration public const int AltKeyEnd = 534 Field Value Type Description System.Int32 AltKeyHome Declaration public const int AltKeyHome = 540 Field Value Type Description System.Int32 AltKeyLeft Declaration public const int AltKeyLeft = 551 Field Value Type Description System.Int32 AltKeyNPage Declaration public const int AltKeyNPage = 556 Field Value Type Description System.Int32 AltKeyPPage Declaration public const int AltKeyPPage = 561 Field Value Type Description System.Int32 AltKeyRight Declaration public const int AltKeyRight = 566 Field Value Type Description System.Int32 AltKeyUp Declaration public const int AltKeyUp = 572 Field Value Type Description System.Int32 COLOR_BLACK Declaration public const int COLOR_BLACK = 0 Field Value Type Description System.Int32 COLOR_BLUE Declaration public const int COLOR_BLUE = 4 Field Value Type Description System.Int32 COLOR_CYAN Declaration public const int COLOR_CYAN = 6 Field Value Type Description System.Int32 COLOR_GREEN Declaration public const int COLOR_GREEN = 2 Field Value Type Description System.Int32 COLOR_MAGENTA Declaration public const int COLOR_MAGENTA = 5 Field Value Type Description System.Int32 COLOR_RED Declaration public const int COLOR_RED = 1 Field Value Type Description System.Int32 COLOR_WHITE Declaration public const int COLOR_WHITE = 7 Field Value Type Description System.Int32 COLOR_YELLOW Declaration public const int COLOR_YELLOW = 3 Field Value Type Description System.Int32 CtrlKeyDown Declaration public const int CtrlKeyDown = 531 Field Value Type Description System.Int32 CtrlKeyEnd Declaration public const int CtrlKeyEnd = 536 Field Value Type Description System.Int32 CtrlKeyHome Declaration public const int CtrlKeyHome = 542 Field Value Type Description System.Int32 CtrlKeyLeft Declaration public const int CtrlKeyLeft = 553 Field Value Type Description System.Int32 CtrlKeyNPage Declaration public const int CtrlKeyNPage = 558 Field Value Type Description System.Int32 CtrlKeyPPage Declaration public const int CtrlKeyPPage = 563 Field Value Type Description System.Int32 CtrlKeyRight Declaration public const int CtrlKeyRight = 568 Field Value Type Description System.Int32 CtrlKeyUp Declaration public const int CtrlKeyUp = 574 Field Value Type Description System.Int32 DownEnd Declaration public const int DownEnd = 6 Field Value Type Description System.Int32 ERR Declaration public const int ERR = -1 Field Value Type Description System.Int32 Home Declaration public const int Home = 7 Field Value Type Description System.Int32 KEY_CODE_YES Declaration public const int KEY_CODE_YES = 256 Field Value Type Description System.Int32 KeyAlt Declaration public const int KeyAlt = 8192 Field Value Type Description System.Int32 KeyBackspace Declaration public const int KeyBackspace = 263 Field Value Type Description System.Int32 KeyBackTab Declaration public const int KeyBackTab = 353 Field Value Type Description System.Int32 KeyDeleteChar Declaration public const int KeyDeleteChar = 330 Field Value Type Description System.Int32 KeyDown Declaration public const int KeyDown = 258 Field Value Type Description System.Int32 KeyEnd Declaration public const int KeyEnd = 360 Field Value Type Description System.Int32 KeyF1 Declaration public const int KeyF1 = 265 Field Value Type Description System.Int32 KeyF10 Declaration public const int KeyF10 = 274 Field Value Type Description System.Int32 KeyF11 Declaration public const int KeyF11 = 275 Field Value Type Description System.Int32 KeyF12 Declaration public const int KeyF12 = 276 Field Value Type Description System.Int32 KeyF2 Declaration public const int KeyF2 = 266 Field Value Type Description System.Int32 KeyF3 Declaration public const int KeyF3 = 267 Field Value Type Description System.Int32 KeyF4 Declaration public const int KeyF4 = 268 Field Value Type Description System.Int32 KeyF5 Declaration public const int KeyF5 = 269 Field Value Type Description System.Int32 KeyF6 Declaration public const int KeyF6 = 270 Field Value Type Description System.Int32 KeyF7 Declaration public const int KeyF7 = 271 Field Value Type Description System.Int32 KeyF8 Declaration public const int KeyF8 = 272 Field Value Type Description System.Int32 KeyF9 Declaration public const int KeyF9 = 273 Field Value Type Description System.Int32 KeyHome Declaration public const int KeyHome = 262 Field Value Type Description System.Int32 KeyInsertChar Declaration public const int KeyInsertChar = 331 Field Value Type Description System.Int32 KeyLeft Declaration public const int KeyLeft = 260 Field Value Type Description System.Int32 KeyMouse Declaration public const int KeyMouse = 409 Field Value Type Description System.Int32 KeyNPage Declaration public const int KeyNPage = 338 Field Value Type Description System.Int32 KeyPPage Declaration public const int KeyPPage = 339 Field Value Type Description System.Int32 KeyResize Declaration public const int KeyResize = 410 Field Value Type Description System.Int32 KeyRight Declaration public const int KeyRight = 261 Field Value Type Description System.Int32 KeyTab Declaration public const int KeyTab = 9 Field Value Type Description System.Int32 KeyUp Declaration public const int KeyUp = 259 Field Value Type Description System.Int32 LC_ALL Declaration public const int LC_ALL = 6 Field Value Type Description System.Int32 LeftRightUpNPagePPage Declaration public const int LeftRightUpNPagePPage = 8 Field Value Type Description System.Int32 ShiftCtrlKeyDown Declaration public const int ShiftCtrlKeyDown = 532 Field Value Type Description System.Int32 ShiftCtrlKeyEnd Declaration public const int ShiftCtrlKeyEnd = 537 Field Value Type Description System.Int32 ShiftCtrlKeyHome Declaration public const int ShiftCtrlKeyHome = 543 Field Value Type Description System.Int32 ShiftCtrlKeyLeft Declaration public const int ShiftCtrlKeyLeft = 554 Field Value Type Description System.Int32 ShiftCtrlKeyNPage Declaration public const int ShiftCtrlKeyNPage = 559 Field Value Type Description System.Int32 ShiftCtrlKeyPPage Declaration public const int ShiftCtrlKeyPPage = 564 Field Value Type Description System.Int32 ShiftCtrlKeyRight Declaration public const int ShiftCtrlKeyRight = 569 Field Value Type Description System.Int32 ShiftCtrlKeyUp Declaration public const int ShiftCtrlKeyUp = 575 Field Value Type Description System.Int32 ShiftKeyDown Declaration public const int ShiftKeyDown = 336 Field Value Type Description System.Int32 ShiftKeyEnd Declaration public const int ShiftKeyEnd = 386 Field Value Type Description System.Int32 ShiftKeyHome Declaration public const int ShiftKeyHome = 391 Field Value Type Description System.Int32 ShiftKeyLeft Declaration public const int ShiftKeyLeft = 393 Field Value Type Description System.Int32 ShiftKeyNPage Declaration public const int ShiftKeyNPage = 396 Field Value Type Description System.Int32 ShiftKeyPPage Declaration public const int ShiftKeyPPage = 398 Field Value Type Description System.Int32 ShiftKeyRight Declaration public const int ShiftKeyRight = 402 Field Value Type Description System.Int32 ShiftKeyUp Declaration public const int ShiftKeyUp = 337 Field Value Type Description System.Int32 Properties ColorPairs Declaration public static int ColorPairs { get; } Property Value Type Description System.Int32 Cols Declaration public static int Cols { get; } Property Value Type Description System.Int32 HasColors Declaration public static bool HasColors { get; } Property Value Type Description System.Boolean Lines Declaration public static int Lines { get; } Property Value Type Description System.Int32 Methods addch(Int32) Declaration public static int addch(int ch) Parameters Type Name Description System.Int32 ch Returns Type Description System.Int32 addstr(String, Object[]) Declaration public static int addstr(string format, params object[] args) Parameters Type Name Description System.String format System.Object [] args Returns Type Description System.Int32 addwstr(String) Declaration public static int addwstr(string s) Parameters Type Name Description System.String s Returns Type Description System.Int32 attroff(Int32) Declaration public static int attroff(int attrs) Parameters Type Name Description System.Int32 attrs Returns Type Description System.Int32 attron(Int32) Declaration public static int attron(int attrs) Parameters Type Name Description System.Int32 attrs Returns Type Description System.Int32 attrset(Int32) Declaration public static int attrset(int attrs) Parameters Type Name Description System.Int32 attrs Returns Type Description System.Int32 cbreak() Declaration public static int cbreak() Returns Type Description System.Int32 CheckWinChange() Declaration public static bool CheckWinChange() Returns Type Description System.Boolean clearok(IntPtr, Boolean) Declaration public static int clearok(IntPtr win, bool bf) Parameters Type Name Description System.IntPtr win System.Boolean bf Returns Type Description System.Int32 COLOR_PAIRS() Declaration public static int COLOR_PAIRS() Returns Type Description System.Int32 ColorPair(Int32) Declaration public static int ColorPair(int n) Parameters Type Name Description System.Int32 n Returns Type Description System.Int32 doupdate() Declaration public static int doupdate() Returns Type Description System.Int32 echo() Declaration public static int echo() Returns Type Description System.Int32 endwin() Declaration public static int endwin() Returns Type Description System.Int32 get_wch(out Int32) Declaration public static int get_wch(out int sequence) Parameters Type Name Description System.Int32 sequence Returns Type Description System.Int32 getch() Declaration public static int getch() Returns Type Description System.Int32 getmouse(out Curses.MouseEvent) Declaration public static uint getmouse(out Curses.MouseEvent ev) Parameters Type Name Description Curses.MouseEvent ev Returns Type Description System.UInt32 halfdelay(Int32) Declaration public static int halfdelay(int t) Parameters Type Name Description System.Int32 t Returns Type Description System.Int32 has_colors() Declaration public static bool has_colors() Returns Type Description System.Boolean idcok(IntPtr, Boolean) Declaration public static void idcok(IntPtr win, bool bf) Parameters Type Name Description System.IntPtr win System.Boolean bf idlok(IntPtr, Boolean) Declaration public static int idlok(IntPtr win, bool bf) Parameters Type Name Description System.IntPtr win System.Boolean bf Returns Type Description System.Int32 immedok(IntPtr, Boolean) Declaration public static void immedok(IntPtr win, bool bf) Parameters Type Name Description System.IntPtr win System.Boolean bf init_pair(Int16, Int16, Int16) Declaration public static int init_pair(short pair, short f, short b) Parameters Type Name Description System.Int16 pair System.Int16 f System.Int16 b Returns Type Description System.Int32 InitColorPair(Int16, Int16, Int16) Declaration public static int InitColorPair(short pair, short foreground, short background) Parameters Type Name Description System.Int16 pair System.Int16 foreground System.Int16 background Returns Type Description System.Int32 initscr() Declaration public static Curses.Window initscr() Returns Type Description Curses.Window intrflush(IntPtr, Boolean) Declaration public static int intrflush(IntPtr win, bool bf) Parameters Type Name Description System.IntPtr win System.Boolean bf Returns Type Description System.Int32 IsAlt(Int32) Declaration public static int IsAlt(int key) Parameters Type Name Description System.Int32 key Returns Type Description System.Int32 isendwin() Declaration public static bool isendwin() Returns Type Description System.Boolean keypad(IntPtr, Boolean) Declaration public static int keypad(IntPtr win, bool bf) Parameters Type Name Description System.IntPtr win System.Boolean bf Returns Type Description System.Int32 leaveok(IntPtr, Boolean) Declaration public static int leaveok(IntPtr win, bool bf) Parameters Type Name Description System.IntPtr win System.Boolean bf Returns Type Description System.Int32 meta(IntPtr, Boolean) Declaration public static int meta(IntPtr win, bool bf) Parameters Type Name Description System.IntPtr win System.Boolean bf Returns Type Description System.Int32 mouseinterval(Int32) Declaration public static int mouseinterval(int interval) Parameters Type Name Description System.Int32 interval Returns Type Description System.Int32 mousemask(Curses.Event, out Curses.Event) Declaration public static Curses.Event mousemask(Curses.Event newmask, out Curses.Event oldmask) Parameters Type Name Description Curses.Event newmask Curses.Event oldmask Returns Type Description Curses.Event move(Int32, Int32) Declaration public static int move(int line, int col) Parameters Type Name Description System.Int32 line System.Int32 col Returns Type Description System.Int32 mvgetch(Int32, Int32) Declaration public static int mvgetch(int y, int x) Parameters Type Name Description System.Int32 y System.Int32 x Returns Type Description System.Int32 nl() Declaration public static int nl() Returns Type Description System.Int32 nocbreak() Declaration public static int nocbreak() Returns Type Description System.Int32 noecho() Declaration public static int noecho() Returns Type Description System.Int32 nonl() Declaration public static int nonl() Returns Type Description System.Int32 noqiflush() Declaration public static void noqiflush() noraw() Declaration public static int noraw() Returns Type Description System.Int32 notimeout(IntPtr, Boolean) Declaration public static int notimeout(IntPtr win, bool bf) Parameters Type Name Description System.IntPtr win System.Boolean bf Returns Type Description System.Int32 qiflush() Declaration public static void qiflush() raw() Declaration public static int raw() Returns Type Description System.Int32 redrawwin(IntPtr) Declaration public static int redrawwin(IntPtr win) Parameters Type Name Description System.IntPtr win Returns Type Description System.Int32 refresh() Declaration public static int refresh() Returns Type Description System.Int32 scrollok(IntPtr, Boolean) Declaration public static int scrollok(IntPtr win, bool bf) Parameters Type Name Description System.IntPtr win System.Boolean bf Returns Type Description System.Int32 setlocale(Int32, String) Declaration public static int setlocale(int cate, string locale) Parameters Type Name Description System.Int32 cate System.String locale Returns Type Description System.Int32 setscrreg(Int32, Int32) Declaration public static int setscrreg(int top, int bot) Parameters Type Name Description System.Int32 top System.Int32 bot Returns Type Description System.Int32 start_color() Declaration public static int start_color() Returns Type Description System.Int32 StartColor() Declaration public static int StartColor() Returns Type Description System.Int32 timeout(Int32) Declaration public static int timeout(int delay) Parameters Type Name Description System.Int32 delay Returns Type Description System.Int32 typeahead(IntPtr) Declaration public static int typeahead(IntPtr fd) Parameters Type Name Description System.IntPtr fd Returns Type Description System.Int32 ungetch(Int32) Declaration public static int ungetch(int ch) Parameters Type Name Description System.Int32 ch Returns Type Description System.Int32 ungetmouse(ref Curses.MouseEvent) Declaration public static uint ungetmouse(ref Curses.MouseEvent ev) Parameters Type Name Description Curses.MouseEvent ev Returns Type Description System.UInt32 use_default_colors() Declaration public static int use_default_colors() Returns Type Description System.Int32 UseDefaultColors() Declaration public static int UseDefaultColors() Returns Type Description System.Int32 waddch(IntPtr, Int32) Declaration public static int waddch(IntPtr win, int ch) Parameters Type Name Description System.IntPtr win System.Int32 ch Returns Type Description System.Int32 wmove(IntPtr, Int32, Int32) Declaration public static int wmove(IntPtr win, int line, int col) Parameters Type Name Description System.IntPtr win System.Int32 line System.Int32 col Returns Type Description System.Int32 wnoutrefresh(IntPtr) Declaration public static int wnoutrefresh(IntPtr win) Parameters Type Name Description System.IntPtr win Returns Type Description System.Int32 wrefresh(IntPtr) Declaration public static int wrefresh(IntPtr win) Parameters Type Name Description System.IntPtr win Returns Type Description System.Int32 wsetscrreg(IntPtr, Int32, Int32) Declaration public static int wsetscrreg(IntPtr win, int top, int bot) Parameters Type Name Description System.IntPtr win System.Int32 top System.Int32 bot Returns Type Description System.Int32 wtimeout(IntPtr, Int32) Declaration public static int wtimeout(IntPtr win, int delay) Parameters Type Name Description System.IntPtr win System.Int32 delay Returns Type Description System.Int32" }, "api/Terminal.Gui/Unix.Terminal.Curses.MouseEvent.html": { "href": "api/Terminal.Gui/Unix.Terminal.Curses.MouseEvent.html", "title": "Struct Curses.MouseEvent", "keywords": "Struct Curses.MouseEvent Inherited Members System.ValueType.Equals(System.Object) System.ValueType.GetHashCode() System.ValueType.ToString() System.Object.Equals(System.Object, System.Object) System.Object.GetType() System.Object.ReferenceEquals(System.Object, System.Object) Namespace : Unix.Terminal Assembly : Terminal.Gui.dll Syntax public struct MouseEvent Fields ButtonState Declaration public Curses.Event ButtonState Field Value Type Description Curses.Event ID Declaration public short ID Field Value Type Description System.Int16 X Declaration public int X Field Value Type Description System.Int32 Y Declaration public int Y Field Value Type Description System.Int32 Z Declaration public int Z Field Value Type Description System.Int32" }, "api/Terminal.Gui/Unix.Terminal.Curses.Window.html": { "href": "api/Terminal.Gui/Unix.Terminal.Curses.Window.html", "title": "Class Curses.Window", "keywords": "Class Curses.Window Inheritance System.Object Curses.Window 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 : Unix.Terminal Assembly : Terminal.Gui.dll Syntax public class Window Fields Handle Declaration public readonly IntPtr Handle Field Value Type Description System.IntPtr Properties Current Declaration public static Curses.Window Current { get; } Property Value Type Description Curses.Window Standard Declaration public static Curses.Window Standard { get; } Property Value Type Description Curses.Window Methods addch(Char) Declaration public int addch(char ch) Parameters Type Name Description System.Char ch Returns Type Description System.Int32 clearok(Boolean) Declaration public int clearok(bool bf) Parameters Type Name Description System.Boolean bf Returns Type Description System.Int32 idcok(Boolean) Declaration public void idcok(bool bf) Parameters Type Name Description System.Boolean bf idlok(Boolean) Declaration public int idlok(bool bf) Parameters Type Name Description System.Boolean bf Returns Type Description System.Int32 immedok(Boolean) Declaration public void immedok(bool bf) Parameters Type Name Description System.Boolean bf intrflush(Boolean) Declaration public int intrflush(bool bf) Parameters Type Name Description System.Boolean bf Returns Type Description System.Int32 keypad(Boolean) Declaration public int keypad(bool bf) Parameters Type Name Description System.Boolean bf Returns Type Description System.Int32 leaveok(Boolean) Declaration public int leaveok(bool bf) Parameters Type Name Description System.Boolean bf Returns Type Description System.Int32 meta(Boolean) Declaration public int meta(bool bf) Parameters Type Name Description System.Boolean bf Returns Type Description System.Int32 move(Int32, Int32) Declaration public int move(int line, int col) Parameters Type Name Description System.Int32 line System.Int32 col Returns Type Description System.Int32 notimeout(Boolean) Declaration public int notimeout(bool bf) Parameters Type Name Description System.Boolean bf Returns Type Description System.Int32 redrawwin() Declaration public int redrawwin() Returns Type Description System.Int32 refresh() Declaration public int refresh() Returns Type Description System.Int32 scrollok(Boolean) Declaration public int scrollok(bool bf) Parameters Type Name Description System.Boolean bf Returns Type Description System.Int32 setscrreg(Int32, Int32) Declaration public int setscrreg(int top, int bot) Parameters Type Name Description System.Int32 top System.Int32 bot Returns Type Description System.Int32 wnoutrefresh() Declaration public int wnoutrefresh() Returns Type Description System.Int32 wrefresh() Declaration public int wrefresh() Returns Type Description System.Int32 wtimeout(Int32) Declaration public int wtimeout(int delay) Parameters Type Name Description System.Int32 delay Returns Type Description System.Int32" }, "api/Terminal.Gui/Unix.Terminal.html": { "href": "api/Terminal.Gui/Unix.Terminal.html", "title": "Namespace Unix.Terminal", "keywords": "Namespace Unix.Terminal Classes Curses Curses.Window Structs Curses.MouseEvent Enums Curses.Event" }, "api/UICatalog/UICatalog.html": { "href": "api/UICatalog/UICatalog.html", "title": "Namespace UICatalog", "keywords": "Namespace UICatalog Classes 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 Init(Toplevel) 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. / Scenario.ScenarioCategory Defines the category names used to catagorize a Scenario Scenario.ScenarioMetadata Defines the metadata (Name and Description) for a Scenario UICatalogApp UI Catalog is a comprehensive sample app and scenario library for Terminal.Gui" }, "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 Init(Toplevel) 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 Implements System.IDisposable Inherited Members System.Object.Equals(System.Object) System.Object.Equals(System.Object, System.Object) System.Object.GetHashCode() System.Object.GetType() System.Object.MemberwiseClone() System.Object.ReferenceEquals(System.Object, System.Object) Namespace : 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 System.Collections.Generic.List < System.String > list of catagory names 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) 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 Init(Toplevel) to provide any Toplevel behavior needed. Declaration public virtual void Init(Toplevel top) Parameters Type Name Description Toplevel top Remarks Thg base implementation calls Init() , 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() 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 Overrides System.Object.ToString() Implements System.IDisposable" }, "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 System.Attribute Scenario.ScenarioCategory Inherited Members System.Attribute.Equals(System.Object) System.Attribute.GetCustomAttribute(System.Reflection.Assembly, System.Type) System.Attribute.GetCustomAttribute(System.Reflection.Assembly, System.Type, System.Boolean) System.Attribute.GetCustomAttribute(System.Reflection.MemberInfo, System.Type) System.Attribute.GetCustomAttribute(System.Reflection.MemberInfo, System.Type, System.Boolean) System.Attribute.GetCustomAttribute(System.Reflection.Module, System.Type) System.Attribute.GetCustomAttribute(System.Reflection.Module, System.Type, System.Boolean) System.Attribute.GetCustomAttribute(System.Reflection.ParameterInfo, System.Type) System.Attribute.GetCustomAttribute(System.Reflection.ParameterInfo, System.Type, System.Boolean) System.Attribute.GetCustomAttributes(System.Reflection.Assembly) System.Attribute.GetCustomAttributes(System.Reflection.Assembly, System.Boolean) System.Attribute.GetCustomAttributes(System.Reflection.Assembly, System.Type) System.Attribute.GetCustomAttributes(System.Reflection.Assembly, System.Type, System.Boolean) System.Attribute.GetCustomAttributes(System.Reflection.MemberInfo) System.Attribute.GetCustomAttributes(System.Reflection.MemberInfo, System.Boolean) System.Attribute.GetCustomAttributes(System.Reflection.MemberInfo, System.Type) System.Attribute.GetCustomAttributes(System.Reflection.MemberInfo, System.Type, System.Boolean) System.Attribute.GetCustomAttributes(System.Reflection.Module) System.Attribute.GetCustomAttributes(System.Reflection.Module, System.Boolean) System.Attribute.GetCustomAttributes(System.Reflection.Module, System.Type) System.Attribute.GetCustomAttributes(System.Reflection.Module, System.Type, System.Boolean) System.Attribute.GetCustomAttributes(System.Reflection.ParameterInfo) System.Attribute.GetCustomAttributes(System.Reflection.ParameterInfo, System.Boolean) System.Attribute.GetCustomAttributes(System.Reflection.ParameterInfo, System.Type) System.Attribute.GetCustomAttributes(System.Reflection.ParameterInfo, System.Type, System.Boolean) System.Attribute.GetHashCode() System.Attribute.IsDefaultAttribute() System.Attribute.IsDefined(System.Reflection.Assembly, System.Type) System.Attribute.IsDefined(System.Reflection.Assembly, System.Type, System.Boolean) System.Attribute.IsDefined(System.Reflection.MemberInfo, System.Type) System.Attribute.IsDefined(System.Reflection.MemberInfo, System.Type, System.Boolean) System.Attribute.IsDefined(System.Reflection.Module, System.Type) System.Attribute.IsDefined(System.Reflection.Module, System.Type, System.Boolean) System.Attribute.IsDefined(System.Reflection.ParameterInfo, System.Type) System.Attribute.IsDefined(System.Reflection.ParameterInfo, System.Type, System.Boolean) System.Attribute.Match(System.Object) System.Attribute.TypeId System.Object.Equals(System.Object, System.Object) System.Object.GetType() System.Object.MemberwiseClone() System.Object.ReferenceEquals(System.Object, System.Object) System.Object.ToString() Namespace : UICatalog Assembly : UICatalog.dll Syntax [AttributeUsage(AttributeTargets.Class, AllowMultiple = true)] public class ScenarioCategory : 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 System.Type t Returns Type Description System.Collections.Generic.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 System.Type t Returns Type Description System.String Name of the catagory" }, "api/UICatalog/UICatalog.Scenario.ScenarioMetadata.html": { "href": "api/UICatalog/UICatalog.Scenario.ScenarioMetadata.html", "title": "Class Scenario.ScenarioMetadata", "keywords": "Class Scenario.ScenarioMetadata Defines the metadata (Name and Description) for a Scenario Inheritance System.Object System.Attribute Scenario.ScenarioMetadata Inherited Members System.Attribute.Equals(System.Object) System.Attribute.GetCustomAttribute(System.Reflection.Assembly, System.Type) System.Attribute.GetCustomAttribute(System.Reflection.Assembly, System.Type, System.Boolean) System.Attribute.GetCustomAttribute(System.Reflection.MemberInfo, System.Type) System.Attribute.GetCustomAttribute(System.Reflection.MemberInfo, System.Type, System.Boolean) System.Attribute.GetCustomAttribute(System.Reflection.Module, System.Type) System.Attribute.GetCustomAttribute(System.Reflection.Module, System.Type, System.Boolean) System.Attribute.GetCustomAttribute(System.Reflection.ParameterInfo, System.Type) System.Attribute.GetCustomAttribute(System.Reflection.ParameterInfo, System.Type, System.Boolean) System.Attribute.GetCustomAttributes(System.Reflection.Assembly) System.Attribute.GetCustomAttributes(System.Reflection.Assembly, System.Boolean) System.Attribute.GetCustomAttributes(System.Reflection.Assembly, System.Type) System.Attribute.GetCustomAttributes(System.Reflection.Assembly, System.Type, System.Boolean) System.Attribute.GetCustomAttributes(System.Reflection.MemberInfo) System.Attribute.GetCustomAttributes(System.Reflection.MemberInfo, System.Boolean) System.Attribute.GetCustomAttributes(System.Reflection.MemberInfo, System.Type) System.Attribute.GetCustomAttributes(System.Reflection.MemberInfo, System.Type, System.Boolean) System.Attribute.GetCustomAttributes(System.Reflection.Module) System.Attribute.GetCustomAttributes(System.Reflection.Module, System.Boolean) System.Attribute.GetCustomAttributes(System.Reflection.Module, System.Type) System.Attribute.GetCustomAttributes(System.Reflection.Module, System.Type, System.Boolean) System.Attribute.GetCustomAttributes(System.Reflection.ParameterInfo) System.Attribute.GetCustomAttributes(System.Reflection.ParameterInfo, System.Boolean) System.Attribute.GetCustomAttributes(System.Reflection.ParameterInfo, System.Type) System.Attribute.GetCustomAttributes(System.Reflection.ParameterInfo, System.Type, System.Boolean) System.Attribute.GetHashCode() System.Attribute.IsDefaultAttribute() System.Attribute.IsDefined(System.Reflection.Assembly, System.Type) System.Attribute.IsDefined(System.Reflection.Assembly, System.Type, System.Boolean) System.Attribute.IsDefined(System.Reflection.MemberInfo, System.Type) System.Attribute.IsDefined(System.Reflection.MemberInfo, System.Type, System.Boolean) System.Attribute.IsDefined(System.Reflection.Module, System.Type) System.Attribute.IsDefined(System.Reflection.Module, System.Type, System.Boolean) System.Attribute.IsDefined(System.Reflection.ParameterInfo, System.Type) System.Attribute.IsDefined(System.Reflection.ParameterInfo, System.Type, System.Boolean) System.Attribute.Match(System.Object) System.Attribute.TypeId System.Object.Equals(System.Object, System.Object) System.Object.GetType() System.Object.MemberwiseClone() System.Object.ReferenceEquals(System.Object, System.Object) System.Object.ToString() Namespace : UICatalog Assembly : UICatalog.dll Syntax [AttributeUsage(AttributeTargets.Class)] public class ScenarioMetadata : Attribute Constructors ScenarioMetadata(String, String) Declaration public ScenarioMetadata(string Name, string Description) Parameters Type Name Description System.String Name System.String Description Properties Description Scenario Description Declaration public string Description { get; set; } Property Value Type Description System.String Name Scenario Name Declaration public string Name { get; set; } Property Value Type Description System.String Methods GetDescription(Type) Static helper function to get the Scenario Description given a Type Declaration public static string GetDescription(Type t) Parameters Type Name Description System.Type t Returns Type Description System.String GetName(Type) Static helper function to get the Scenario Name given a Type Declaration public static string GetName(Type t) Parameters Type Name Description System.Type t Returns Type Description System.String" }, "api/UICatalog/UICatalog.UICatalogApp.html": { "href": "api/UICatalog/UICatalog.UICatalogApp.html", "title": "Class UICatalogApp", "keywords": "Class UICatalogApp UI Catalog is a comprehensive sample app and scenario library for Terminal.Gui Inheritance System.Object UICatalogApp Inherited Members System.Object.Equals(System.Object) System.Object.Equals(System.Object, System.Object) System.Object.GetHashCode() System.Object.GetType() System.Object.MemberwiseClone() System.Object.ReferenceEquals(System.Object, System.Object) System.Object.ToString() Namespace : UICatalog Assembly : UICatalog.dll Syntax public class UICatalogApp" }, "articles/index.html": { "href": "articles/index.html", "title": "Conceptual Documentation", "keywords": "Conceptual Documentation Terminal.Gui Overview Keyboard Event Processing Event Processing and the Application Main Loop" }, "articles/keyboard.html": { "href": "articles/keyboard.html", "title": "Keyboard Event Processing", "keywords": "Keyboard Event Processing Keyboard events are sent by the Main Loop to the Application class for processing. The keyboard events are sent exclusively to the current Toplevel , this being either the default that is created when you call Application.Init , or one that you created an passed to Application.Run(Toplevel) . Flow Keystrokes are first processes as hotkeys, then as regular keys, and there is a final cold post-processing event that is invoked if no view processed the key. HotKey Processing Events are first send to all views as a \"HotKey\", this means that the View.ProcessHotKey method is invoked on the current toplevel, which in turns propagates this to all the views in the hierarchy. If any view decides to process the event, no further processing takes place. This is how hotkeys for buttons are implemented. For example, the keystroke \"Alt-A\" is handled by Buttons that have a hot-letter \"A\" to activate the button. Regular Processing Unlike the hotkey processing, the regular processing is only sent to the currently focused view in the focus chain. The regular key processing is only invoked if no hotkey was caught. Cold-key Processing This stage only is executed if the focused view did not process the event, and is broadcast to all the views in the Toplevel. This method can be overwritten by views that want to provide accelerator functionality (Alt-key for example), but without interefering with normal ProcessKey behavior." }, "articles/mainloop.html": { "href": "articles/mainloop.html", "title": "Event Processing and the Application Main Loop", "keywords": "Event Processing and the Application Main Loop The method Application.Run that we covered before will wait for events from either the keyboard or mouse and route those events to the proper view. The job of waiting for events and dispatching them in the Application is implemented by an instance of the MainLoop class. Mainloops are a common idiom in many user interface toolkits so many of the concepts will be familiar to you if you have used other toolkits before. This class provides the following capabilities: Keyboard and mouse processing .NET Async support Timers processing Invoking of UI code from a background thread Idle processing handlers Possibility of integration with other mainloops. On Unix systems, it can monitor file descriptors for readability or writability. The MainLoop property in the the Application provides access to these functions. When your code invokes Application.Run (Toplevel) , the application will prepare the current Toplevel instance by redrawing the screen appropriately and then calling the mainloop to run. You can configure the Mainloop before calling Application.Run, or you can configure the MainLoop in response to events during the execution. The keyboard inputs is dispatched by the application class to the current TopLevel window this is covered in more detail in the Keyboard Event Processing document. Async Execution On startup, the Application class configured the .NET Asynchronous machinery to allow you to use the await keyword to run tasks in the background and have the execution of those tasks resume on the context of the main thread running the main loop. Once you invoke Application.Main the async machinery will be ready to use, and you can merely call methods using await from your main thread, and the awaited code will resume execution on the main thread. Timers Processing You can register timers to be executed at specified intervals by calling the AddTimeout method, like this: void UpdateTimer () { time.Text = DateTime.Now.ToString (); } var token = Application.MainLoop.AddTimeout (TimeSpan.FromSeconds (20), UpdateTimer); The return value from AddTimeout is a token value that you can use if you desire to cancel the timer before it runs: Application.MainLoop.RemoveTimeout (token); Idle Handlers You can register code to be executed when the application is idling and there are no events to process by calling the AddIdle method. This method takes as a parameter a function that will be invoked when the application is idling. Idle functions should return true if they should be invoked again, and false if the idle invocations should stop. Like the timer APIs, the return value is a token that can be used to cancel the scheduled idle function from being executed. Threading Like other UI toolkits, Terminal.Gui is generally not thread safe. You should avoid calling methods in the UI classes from a background thread as there is no guarantee that they will not corrupt the state of the UI application. Generally, as there is not much state, you will get lucky, but the application will not behave properly. You will be served better off by using C# async machinery and the various APIs in the System.Threading.Tasks.Task APIs. But if you absolutely must work with threads on your own you should only invoke APIs in Terminal.Gui from the main thread. To make this simple, you can use the Application.MainLoop.Invoke method and pass an Action . This action will be queued for execution on the main thread at an appropriate time and will run your code there. For example, the following shows how to properly update a label from a background thread: void BackgroundThreadUpdateProgress () { Application.MainLoop.Invoke (() => { progress.Text = $\"Progress: {bytesDownloaded/totalBytes}\"; }); } Integration With Other Main Loop Drivers It is possible to run the main loop in a way that it does not take over control of your application, but rather in a cooperative way. To do this, you must use the lower-level APIs in Application : the Begin method to prepare a toplevel for execution, followed by calls to MainLoop.EventsPending to determine whether the events must be processed, and in that case, calling RunLoop method and finally completing the process by calling End . The method Run is implemented like this: void Run (Toplevel top) { var runToken = Begin (view); RunLoop (runToken); End (runToken); } Unix File Descriptor Monitoring On Unix, it is possible to monitor file descriptors for input being available, or for the file descriptor being available for data to be written without blocking the application. To do this, you on Unix, you can cast the MainLoop instance to a UnixMainLoop and use the AddWatch method to register an interest on a particular condition." }, "articles/overview.html": { "href": "articles/overview.html", "title": "Terminal.Gui API Overview", "keywords": "Terminal.Gui API Overview Terminal.Gui is a library intended to create console-based applications using C#. The framework has been designed to make it easy to write applications that will work on monochrome terminals, as well as modern color terminals with mouse support. This library works across Windows, Linux and MacOS. This library provides a text-based toolkit as works in a way similar to graphic toolkits. There are many controls that can be used to create your applications and it is event based, meaning that you create the user interface, hook up various events and then let the a processing loop run your application, and your code is invoked via one or more callbacks. The simplest application looks like this: using Terminal.Gui; class Demo { static int Main () { Application.Init (); var n = MessageBox.Query (50, 7, \"Question\", \"Do you like console apps?\", \"Yes\", \"No\"); return n; } } This example shows a prompt and returns an integer value depending on which value was selected by the user (Yes, No, or if they use chose not to make a decision and instead pressed the ESC key). More interesting user interfaces can be created by composing some of the various views that are included. In the following sections, you will see how applications are put together. In the example above, you can see that we have initialized the runtime by calling the Init method in the Application class - this sets up the environment, initializes the color schemes available for your application and clears the screen to start your application. The Application class, additionally creates an instance of the [Toplevel]((../api/Terminal.Gui/Terminal.Gui.Toplevel.html) class that is ready to be consumed, this instance is available in the Application.Top property, and can be used like this: using Terminal.Gui; class Demo { static int Main () { Application.Init (); var label = new Label (\"Hello World\") { X = Pos.Center (), Y = Pos.Center (), Height = 1, }; Application.Top.Add (label); Application.Run (); } } Typically, you will want your application to have more than a label, you might want a menu, and a region for your application to live in, the following code does this: using Terminal.Gui; class Demo { static int Main () { Application.Init (); var menu = new MenuBar (new MenuBarItem [] { new MenuBarItem (\"_File\", new MenuItem [] { new MenuItem (\"_Quit\", \"\", () => { Application.RequestStop (); }) }), }); var win = new Window (\"Hello\") { X = 0, Y = 1, Width = Dim.Fill (), Height = Dim.Fill () - 1 }; // Add both menu and win in a single call Application.Top.Add (menu, win); Application.Run (); } } Views All visible elements on a Terminal.Gui application are implemented as Views . Views are self-contained objects that take care of displaying themselves, can receive keyboard and mouse input and participate in the focus mechanism. Every view can contain an arbitrary number of children views. These are called the Subviews. You can add a view to an existing view, by calling the Add method, for example, to add a couple of buttons to a UI, you can do this: void SetupMyView (View myView) { var label = new Label (\"Username: \") { X = 1, Y = 1, Width = 20, Height = 1 }; myView.Add (label); var username = new TextField (\"\") { X = 1, Y = 2, Width = 30, Height = 1 }; myView.Add (username); } The container of a given view is called the SuperView and it is a property of every View. There are many views that you can use to spice up your application: Buttons , Labels , Text entry , Text view , Radio buttons , Checkboxes , Dialog boxes , Message boxes , Windows , Menus , ListViews , Frames , ProgressBars , Scroll views and Scrollbars . Layout Terminal.Gui supports two different layout systems, absolute and computed \\ (controlled by the LayoutStyle property on the view. The absolute system is used when you want the view to be positioned exactly in one location and want to manually control where the view is. This is done by invoking your View constructor with an argument of type Rect . When you do this, to change the position of the View, you can change the Frame property on the View. The computed layout system offers a few additional capabilities, like automatic centering, expanding of dimensions and a handful of other features. To use this you construct your object without an initial Frame , but set the X , Y , Width and Height properties after the object has been created. Examples: // Dynamically computed var label = new Label (\"Hello\") { X = 1, Y = Pos.Center (), Width = Dim.Fill (), Height = 1 }; // Absolute position using the provided rectangle var label2 = new Label (new Rect (1, 2, 20, 1), \"World\") The computed layout system does not take integers, instead the X and Y properties are of type Pos and the Width and Height properties are of type Dim both which can be created implicitly from integer values. The Pos Type The Pos type on X and Y offers a few options: Absolute position, by passing an integer Percentage of the parent's view size - Pos.Percent(n) Anchored from the end of the dimension - AnchorEnd(int margin=0) Centered, using Center() Reference the Left (X), Top (Y), Bottom, Right positions of another view The Pos values can be added or subtracted, like this: // Set the X coordinate to 10 characters left from the center view.X = Pos.Center () - 10; view.Y = Pos.Percent (20); anotherView.X = AnchorEnd (10); anotherView.Width = 9; myView.X = Pos.X (view); myView.Y = Pos.Bottom (anotherView); The Dim Type The Dim type is used for the Width and Height properties on the View and offers the following options: Absolute size, by passing an integer Percentage of the parent's view size - Dim.Percent(n) Fill to the end - Dim.Fill () Reference the Width or Height of another view Like, Pos , objects of type Dim can be added an subtracted, like this: // Set the Width to be 10 characters less than filling // the remaining portion of the screen view.Width = Dim.Fill () - 10; view.Height = Dim.Percent(20) - 1; anotherView.Height = Dim.Height (view)+1 TopLevels, Windows and Dialogs. Among the many kinds of views, you typically will create a Toplevel view (or any of its subclasses, like Window or Dialog which is special kind of views that can be executed modally - that is, the view can take over all input and returns only when the user chooses to complete their work there. The following sections cover the differences. TopLevel Views Toplevel views have no visible user interface elements and occupy an arbitrary portion of the screen. You would use a toplevel Modal view for example to launch an entire new experience in your application, one where you would have a new top-level menu for example. You typically would add a Menu and a Window to your Toplevel, it would look like this: using Terminal.Gui; class Demo { static void Edit (string filename) { var top = new Toplevel () { X = 0, Y = 0, Width = Dim.Fill (), Height = Dim.Fill () }; var menu = new MenuBar (new MenuBarItem [] { new MenuBarItem (\"_File\", new MenuItem [] { new MenuItem (\"_Close\", \"\", () => { Application.RequestStop (); }) }), }); // nest a window for the editor var win = new Window (filename) { X = 0, Y = 1, Width = Dim.Fill (), Height = Dim.Fill () - 1 }; var editor = new TextView () { X = 0, Y = 0, Width = Dim.Fill (), Height = Dim.Fill () }; editor.Text = System.IO.File.ReadAllText (filename); win.Add (editor); // Add both menu and win in a single call top.Add (win, menu); Application.Run (top); } } Window Views Window views extend the Toplevel view by providing a frame and a title around the toplevel - and can be moved on the screen with the mouse (caveat: code is currently disabled) From a user interface perspective, you might have more than one Window on the screen at a given time. Dialogs Dialog are Window objects that happen to be centered in the middle of the screen. Dialogs are instances of a Window that are centered in the screen, and are intended to be used modally - that is, they run, and they are expected to return a result before resuming execution of your application. Dialogs are a subclass of Window and additionally expose the AddButton API which manages the layout of any button passed to it, ensuring that the buttons are at the bottom of the dialog. Example: bool okpressed = false; var ok = new Button(\"Ok\"); var cancel = new Button(\"Cancel\"); var dialog = new Dialog (\"Quit\", 60, 7, ok, cancel); Which will show something like this: +- Quit -----------------------------------------------+ | | | | | [ Ok ] [ Cancel ] | +------------------------------------------------------+ Running Modally To run your Dialog, Window or Toplevel modally, you will invoke the Application.Run method on the toplevel. It is up to your code and event handlers to invoke the Application.RequestStop() method to terminate the modal execution. bool okpressed = false; var ok = new Button(3, 14, \"Ok\") { Clicked = () => { Application.RequestStop (); okpressed = true; } }; var cancel = new Button(10, 14, \"Cancel\") { Clicked = () => Application.RequestStop () }; var dialog = new Dialog (\"Login\", 60, 18, ok, cancel); var entry = new TextField () { X = 1, Y = 1, Width = Dim.Fill (), Height = 1 }; dialog.Add (entry); Application.Run (dialog); if (okpressed) Console.WriteLine (\"The user entered: \" + entry.Text); There is no return value from running modally, so your code will need to have a mechanism of indicating the reason that the execution of the modal dialog was completed, in the case above, the okpressed value is set to true if the user pressed or selected the Ok button. Input Handling Every view has a focused view, and if that view has nested views, one of those is the focused view. This is called the focus chain, and at any given time, only one View has the focus. The library binds the key Tab to focus the next logical view, and the Shift-Tab combination to focus the previous logical view. Keyboard processing is divided in three stages: HotKey processing, regular processing and cold key processing. Hot key processing happens first, and it gives all the views in the current toplevel a chance to monitor whether the key needs to be treated specially. This for example handles the scenarios where the user pressed Alt-o, and a view with a highlighted \"o\" is being displayed. If no view processed the hotkey, then the key is sent to the currently focused view. If the key was not processed by the normal processing, all views are given a chance to process the keystroke in their cold processing stage. Examples include the processing of the \"return\" key in a dialog when a button in the dialog has been flagged as the \"default\" action. The most common case is the normal processing, which sends the keystrokes to the currently focused view. Mouse events are processed in visual order, and the event will be sent to the view on the screen. The only exception is that no mouse events are delivered to background views when a modal view is running. More details are available on the Keyboard Event Processing document. Colors and Color Schemes All views have been configured with a color scheme that will work both in color terminals as well as the more limited black and white terminals. The various styles are captured in the Colors class which defined color schemes for the normal views, the menu bar, popup dialog boxes and error dialog boxes, that you can use like this: Colors.Base Colors.Menu Colors.Dialog Colors.Error You can use them for example like this to set the colors for a new Window: var w = new Window (\"Hello\"); w.ColorScheme = Colors.Error The ColorScheme represents four values, the color used for Normal text, the color used for normal text when a view is focused an the colors for the hot-keys both in focused and unfocused modes. By using ColorSchemes you ensure that your application will work correctbly both in color and black and white terminals. Some views support setting individual color attributes, you create an attribute for a particular pair of Foreground/Background like this: var myColor = Application.Driver.MakeAttribute (Color.Blue, Color.Red); var label = new Label (...); label.TextColor = myColor MainLoop, Threads and Input Handling Detailed description of the mainlop is described on the Event Processing and the Application Main Loop document." }, "articles/views.html": { "href": "articles/views.html", "title": "Views", "keywords": "Views Layout Creating Custom Views Constructor Rendering Using Custom Colors Keyboard processing Mouse event processing" }, "index.html": { "href": "index.html", "title": "Terminal.Gui - Terminal UI toolkit for .NET", "keywords": "Terminal.Gui - Terminal UI toolkit for .NET A simple UI toolkit for .NET, .NET Core, and Mono that works on Windows, the Mac, and Linux/Unix. Terminal.Gui Project on GitHub Terminal.Gui API Documentation API Reference Terminal.Gui API Overview Keyboard Event Processing Event Processing and the Application Main Loop UI Catalog UI Catalog is a comprehensive sample library for Terminal.Gui. It provides a simple UI for adding to the catalog of scenarios. UI Catalog API Reference UI Catalog Source" } }