diff --git a/docs/api/Terminal.Gui/Mono.Terminal.html b/docs/api/Terminal.Gui/Mono.Terminal.html deleted file mode 100644 index 9818e3f23..000000000 --- a/docs/api/Terminal.Gui/Mono.Terminal.html +++ /dev/null @@ -1,146 +0,0 @@ - - - - -
- - --
public static void End(Application.RunState runState)
+ public static void End(Application.RunState runState, bool closeDriver = true)
| The runstate returned by the Begin(Toplevel) method. | +||
| System.Boolean | +closeDriver | +trueCloses the application.falseCloses the toplevels only. |
+
-Call this method once per instance (or after Shutdown() has been called). +Call this method once per instance (or after Shutdown(Boolean) has been called).
Loads the right ConsoleDriver for the platform. @@ -546,7 +551,7 @@ This will cause
public static void Run(Toplevel view)
+ public static void Run(Toplevel view, bool closeDriver = true)
| + | ||
| System.Boolean | +closeDriver | ++ |
This method is used to start processing events @@ -590,11 +600,11 @@ Runs the main loop on the given Views such as Dialog boxes.
- To make a Run(Toplevel) stop execution, call RequestStop(). + To make a Run(Toplevel, Boolean) stop execution, call RequestStop().
- Calling Run(Toplevel) is equivalent to calling Begin(Toplevel), followed by RunLoop(Application.RunState, Boolean), - and then calling End(Application.RunState). + 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 @@ -609,7 +619,7 @@ Runs the main loop on the given
public static void Shutdown()
+ public static void Shutdown(bool closeDriver = true)
| Type | +Name | +Description | +
|---|---|---|
| System.Boolean | +closeDriver | +trueCloses the application.falseCloses toplevels only. |
+
public virtual void DrawWindowFrame(Rect region, int paddingLeft = 0, int paddingTop = 0, int paddingRight = 0, int paddingBottom = 0, bool border = true, bool fill = false)
+ | 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. |
+
public virtual void DrawWindowTitle(Rect region, ustring title, int paddingLeft, int paddingTop, int paddingRight, int paddingBottom, TextAlignment textAlignment = TextAlignment.Left)
+ | 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. | +
public interface IMainLoopDriver
public class MainLoop
public void MainIteration()
[Flags]
public enum Condition : short
@@ -105,37 +105,37 @@ public enum Condition : short
public class UnixMainLoop : IMainLoopDriver
public bool Handled { get; set; }
+ | Type | +Description | +
|---|---|
| System.Boolean | ++ |
public const int KeyF11 = 275
+ | Type | +Description | +
|---|---|
| System.Int32 | ++ |
public const int KeyF12 = 276
+ | Type | +Description | +
|---|---|
| System.Int32 | ++ |
public const int KeyTab = 9
+ | Type | +Description | +
|---|---|
| System.Int32 | ++ |
Overrides that do not call the base.Run(), must call Shutdown() before returning.
+Overrides that do not call the base.Run(), must call Shutdown(Boolean) before returning.
-
UI Catalog is a comprehensive sample library for Terminal.Gui. It provides a simple UI for adding to the catalog of scenarios.
diff --git a/docs/index.json b/docs/index.json index 2ad0c050f..30021b34c 100644 --- a/docs/index.json +++ b/docs/index.json @@ -1,33 +1,8 @@ { - "api/Terminal.Gui/Mono.Terminal.html": { - "href": "api/Terminal.Gui/Mono.Terminal.html", - "title": "Namespace Mono.Terminal", - "keywords": "Namespace Mono.Terminal Classes MainLoop Simple main loop implementation that can be used to monitor file descriptor, run timers and idle handlers. UnixMainLoop Unix main loop, suitable for using on Posix systems Interfaces IMainLoopDriver Public interface to create your own platform specific main loop driver. Enums UnixMainLoop.Condition Condition on which to wake up from file descriptor activity. These match the Linux/BSD poll definitions." - }, - "api/Terminal.Gui/Mono.Terminal.IMainLoopDriver.html": { - "href": "api/Terminal.Gui/Mono.Terminal.IMainLoopDriver.html", - "title": "Interface IMainLoopDriver", - "keywords": "Interface IMainLoopDriver Public interface to create your own platform specific main loop driver. Namespace : Mono.Terminal 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/Mono.Terminal.MainLoop.html": { - "href": "api/Terminal.Gui/Mono.Terminal.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 : Mono.Terminal 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
- 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;
-
-
-