Updates v1.7 docs (#1919)

* updated readmes

* Updated doc visual style & regenerated

* updated relnotes
This commit is contained in:
Tig Kindel
2022-07-28 09:31:26 -04:00
committed by GitHub
parent a713ae5f73
commit 7e2e7b9d2d
19 changed files with 225 additions and 112 deletions

118
docs/articles/drivers.html Normal file
View File

@@ -0,0 +1,118 @@
<!DOCTYPE html>
<!--[if IE]><![endif]-->
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Cross-Platform Driver Model </title>
<meta name="viewport" content="width=device-width">
<meta name="title" content="Cross-Platform Driver Model ">
<meta name="generator" content="docfx 2.59.3.0">
<link rel="shortcut icon" href="../favicon.ico">
<link rel="stylesheet" href="../styles/docfx.vendor.css">
<link rel="stylesheet" href="../styles/docfx.css">
<link rel="stylesheet" href="../styles/main.css">
<link href="https://fonts.googleapis.com/css?family=Source Sans Pro" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Source Code Pro" rel="stylesheet">
<meta property="docfx:navrel" content="../toc.html">
<meta property="docfx:tocrel" content="../toc.html">
<meta property="docfx:rel" content="../">
</head> <body data-spy="scroll" data-target="#affix" data-offset="120">
<div id="wrapper">
<header>
<nav id="autocollapse" class="navbar navbar-inverse ng-scope" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="../index.html">
<img id="logo" class="svg" src="../images/logo48.png" alt="">
</a>
</div>
<div class="collapse navbar-collapse" id="navbar">
<form class="navbar-form navbar-right" role="search" id="search">
<div class="form-group">
<input type="text" class="form-control" id="search-query" placeholder="Search" autocomplete="off">
</div>
</form>
</div>
</div>
</nav>
<div class="subnav navbar navbar-default">
<div class="container hide-when-search" id="breadcrumb">
<ul class="breadcrumb">
<li></li>
</ul>
</div>
</div>
</header>
<div class="container body-content">
<div id="search-results">
<div class="search-list">Search Results for <span></span></div>
<div class="sr-items">
<p><i class="glyphicon glyphicon-refresh index-loading"></i></p>
</div>
<ul id="pagination" data-first="First" data-prev="Previous" data-next="Next" data-last="Last"></ul>
</div>
</div>
<div role="main" class="container body-content hide-when-search">
<div class="article row grid">
<div class="col-md-10">
<article class="content wrap" id="_content" data-uid="">
<h1 id="cross-platform-driver-model">Cross-Platform Driver Model</h1>
<p><strong>Terminal.Gui</strong> has support for <a href="https://github.com/gui-cs/Terminal.Gui/blob/master/Terminal.Gui/ConsoleDrivers/CursesDriver/CursesDriver.cs">ncurses</a>, <a href="https://github.com/gui-cs/Terminal.Gui/blob/master/Terminal.Gui/ConsoleDrivers/NetDriver.cs"><code>System.Console</code></a>, and a full <a href="https://github.com/gui-cs/Terminal.Gui/blob/master/Terminal.Gui/ConsoleDrivers/WindowsDriver.cs">Win32 Console</a> front-end.</p>
<p><code>ncurses</code> is used on Mac/Linux/Unix with color support based on what your library is compiled with; the Windows driver supports full color and mouse, and an easy-to-debug <code>System.Console</code> can be used on Windows and Unix, but lacks mouse support.</p>
<p>You can force the use of <code>System.Console</code> on Unix as well; see <code>Core.cs</code>.</p>
</article>
</div>
<div class="hidden-sm col-md-2" role="complementary">
<div class="sideaffix">
<div class="contribution">
<ul class="nav">
<li>
<a href="https://github.com/gui-cs/Terminal.Gui/blob/develop/docfx/articles/drivers.md/#L1" class="contribution-link">Improve this Doc</a>
</li>
</ul>
</div>
<nav class="bs-docs-sidebar hidden-print hidden-xs hidden-sm affix" id="affix">
<h5>In This Article</h5>
<div></div>
</nav>
</div>
</div>
</div>
</div>
<footer>
<div class="grad-bottom"></div>
<div class="footer">
<div class="container">
<span class="pull-right">
<a href="#top">Back to top</a>
</span>
<span>Generated by <strong>DocFX</strong></span>
</div>
</div>
</footer>
</div>
<script type="text/javascript" src="../styles/docfx.vendor.js"></script>
<script type="text/javascript" src="../styles/docfx.js"></script>
<script type="text/javascript" src="../styles/main.js"></script>
</body>
</html>

View File

@@ -78,6 +78,7 @@
<li><a href="views.html">List of Views</a></li>
<li><a href="keyboard.html">Keyboard Event Processing</a></li>
<li><a href="mainloop.html">Event Processing and the Application Main Loop</a></li>
<li><a href="drivers.html">Cross-platform Driver Model</a></li>
<li><a href="tableview.html">TableView Deep Dive</a></li>
<li><a href="treeview.html">TreeView Deep Dive</a></li>
</ul>

View File

@@ -73,6 +73,12 @@
<article class="content wrap" id="_content" data-uid="">
<h1 id="keyboard-event-processing">Keyboard Event Processing</h1>
<p><strong>Terminal.Gui</strong> respects common Linux, Mac, and Windows keyboard idioms. For example, clipboard operations use the familiar <code>Control/Command-C, X, V</code> model. <code>CTRL-Q</code> is used for exiting views (and apps).</p>
<p>The input handling of <strong>Terminal.Gui</strong> is similar in some ways to Emacs and the Midnight Commander, so you can expect some of the special key combinations to be active.</p>
<p>The key <code>ESC</code> can act as an Alt modifier (or Meta in Emacs parlance), to allow input on terminals that do not have an alt key. So to produce the sequence <code>Alt-F</code>, you can press either <code>Alt-F</code>, or <code>ESC</code> followed by the key <code>F</code>.</p>
<p>To enter the key <code>ESC</code>, you can either press <code>ESC</code> and wait 100 milliseconds, or you can press <code>ESC</code> twice.</p>
<p><code>ESC-0</code>, and <code>ESC-1</code> through <code>ESC-9</code> have a special meaning, they map to <code>F10</code>, and <code>F1</code> to <code>F9</code> respectively.</p>
<p>Apps can change key bindings using the <code>AddKeyBinding</code> API. </p>
<p>Keyboard events are sent by the <a href="mainloop.html">Main Loop</a> to the
Application class for processing. The keyboard events are sent
exclusively to the current <code>Toplevel</code>, this being either the default

View File

@@ -73,6 +73,7 @@
<article class="content wrap" id="_content" data-uid="">
<h1 id="event-processing-and-the-application-main-loop">Event Processing and the Application Main Loop</h1>
<p><em>See also <a href="drivers.html">Cross-platform Driver Model</a></em></p>
<p>The method <code>Application.Run</code> that we covered before will wait for
events from either the keyboard or mouse and route those events to the
proper view.</p>

View File

@@ -157,7 +157,7 @@ class Demo {
Application.Shutdown ();
}
}
</code></pre><h1 id="views">Views</h1>
</code></pre><h2 id="views">Views</h2>
<p>All visible elements on a Terminal.Gui application are implemented as
<a href="../api/Terminal.Gui/Terminal.Gui.View.html">Views</a>. Views are self-contained objects that take care of displaying themselves, can receive keyboard and mouse input and participate in the focus mechanism.</p>
<p>See the full list of <a href="views.html">Views provided by the Terminal.Gui library here</a>.</p>
@@ -246,13 +246,13 @@ view.Width = Dim.Fill () - 10;
view.Height = Dim.Percent(20) - 1;
anotherView.Height = Dim.Height (view)+1
</code></pre><h1 id="toplevels-windows-and-dialogs">TopLevels, Windows and Dialogs.</h1>
</code></pre><h2 id="toplevels-windows-and-dialogs">TopLevels, Windows and Dialogs.</h2>
<p>Among the many kinds of views, you typically will create a <a href="../api/Terminal.Gui/Terminal.Gui.Toplevel.html">Toplevel</a> view (or any of its subclasses,
like <a href="../api/Terminal.Gui/Terminal.Gui.Window.html">Window</a> or <a href="../api/Terminal.Gui/Terminal.Gui.Dialog.html">Dialog</a> 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. </p>
<p>The following sections cover the differences.</p>
<h2 id="toplevel-views">TopLevel Views</h2>
<h3 id="toplevel-views">TopLevel Views</h3>
<p><a href="../api/Terminal.Gui/Terminal.Gui.Toplevel.html">Toplevel</a> views have no visible user interface elements and occupy an arbitrary portion of the screen.</p>
<p>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:</p>
@@ -298,10 +298,10 @@ class Demo {
Application.Shutdown ();
}
}
</code></pre><h2 id="window-views">Window Views</h2>
</code></pre><h3 id="window-views">Window Views</h3>
<p><a href="../api/Terminal.Gui/Terminal.Gui.Window.html">Window</a> 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)</p>
<p>From a user interface perspective, you might have more than one Window on the screen at a given time.</p>
<h2 id="dialogs">Dialogs</h2>
<h3 id="dialogs">Dialogs</h3>
<p><a href="../api/Terminal.Gui/Terminal.Gui.Dialog.html">Dialog</a> are <a href="../api/Terminal.Gui/Terminal.Gui.Window.html">Window</a> objects that happen to be centered in the middle of the screen.</p>
<p>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
@@ -320,7 +320,7 @@ var dialog = new Dialog (&quot;Quit&quot;, 60, 7, ok, cancel);
| |
| [ Ok ] [ Cancel ] |
+------------------------------------------------------+
</code></pre><h2 id="running-modally">Running Modally</h2>
</code></pre><h3 id="running-modally">Running Modally</h3>
<p>To run your Dialog, Window or Toplevel modally, you will invoke the <code>Application.Run</code>
method on the toplevel. It is up to your code and event handlers to invoke the <code>Application.RequestStop()</code> method to terminate the modal execution.</p>
<pre><code class="lang-csharp">bool okpressed = false;
@@ -345,7 +345,7 @@ if (okpressed)
</code></pre><p>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 <code>okpressed</code> value is set to true if the user pressed or selected the Ok button.</p>
<h1 id="input-handling">Input Handling</h1>
<h2 id="input-handling">Input Handling</h2>
<p>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. </p>
@@ -374,7 +374,7 @@ currently focused view.</p>
view on the screen. The only exception is that no mouse events are delivered
to background views when a modal view is running. </p>
<p>More details are available on the <a href="keyboard.html"><code>Keyboard Event Processing</code></a> document.</p>
<h1 id="colors-and-color-schemes">Colors and Color Schemes</h1>
<h2 id="colors-and-color-schemes">Colors and Color Schemes</h2>
<p>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. </p>
<p>The various styles are captured in the <a href="../api/Terminal.Gui/Terminal.Gui.Colors.html"><code>Colors</code></a> class which defined color schemes for
@@ -399,8 +399,10 @@ attribute for a particular pair of Foreground/Background like this:</p>
<pre><code>var myColor = Application.Driver.MakeAttribute (Color.Blue, Color.Red);
var label = new Label (...);
label.TextColor = myColor
</code></pre><h1 id="mainloop-threads-and-input-handling">MainLoop, Threads and Input Handling</h1>
</code></pre><h2 id="mainloop-threads-and-input-handling">MainLoop, Threads and Input Handling</h2>
<p>Detailed description of the mainloop is described on the <a href="mainloop.html">Event Processing and the Application Main Loop</a> document.</p>
<h2 id="cross-platform-drivers">Cross-Platform Drivers</h2>
<p>See <a href="drivers.html">Cross-platform Driver Model</a>.</p>
</article>
</div>