Skip to content

Commit cc04bb3

Browse files
authored
Release v1.6.0 (#1722)
* Change log for Release v1.6.0 * Regenerated API docs for v1.6.0 * Merged #1724 * Relnotes update * Fixed minor issues in readme * Updated changelog * New sample.gif for README.md * Ignore demo artifacts
1 parent dd48651 commit cc04bb3

File tree

6 files changed

+49
-43
lines changed

6 files changed

+49
-43
lines changed

.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,6 @@ UnitTests/TestResults
1717

1818
.vscode/
1919

20-
demo.txt
20+
demo.*
2121

2222
*.deb

README.md

+19-36
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@
66
[![License](https://img.shields.io/github/license/migueldeicaza/gui.cs.svg)](LICENSE)
77
![Bugs](https://img.shields.io/github/issues/migueldeicaza/gui.cs/bug)
88

9-
# Terminal.Gui - Cross Platform Terminal GUI toolkit for .NET
9+
# Terminal.Gui - Cross Platform Terminal UI toolkit for .NET
1010

11-
A toolkit for building console GUI apps for .NET, .NET Core, and Mono that works on Windows, the Mac, and Linux/Unix.
11+
A toolkit for building rich console apps for .NET, .NET Core, and Mono that works on Windows, the Mac, and Linux/Unix.
1212

1313
![Sample app](https://raw.githubusercontent.com/migueldeicaza/gui.cs/master/docfx/sample.gif)
1414

15-
## Controls & Features
15+
## Controls and Views
1616

17-
*Terminal.Gui* contains various controls for building text user interfaces:
17+
*Terminal.Gui* provides a rich set of views and controls for building terminal user interfaces:
1818

1919
* [Button](https://migueldeicaza.github.io/gui.cs/api/Terminal.Gui/Terminal.Gui.Button.html)
2020
* [CheckBox](https://migueldeicaza.github.io/gui.cs/api/Terminal.Gui/Terminal.Gui.CheckBox.html)
@@ -43,21 +43,21 @@ A toolkit for building console GUI apps for .NET, .NET Core, and Mono that works
4343
* [StatusBar](https://migueldeicaza.github.io/gui.cs/api/Terminal.Gui/Terminal.Gui.StatusBar.html)
4444
* [Window](https://migueldeicaza.github.io/gui.cs/api/Terminal.Gui/Terminal.Gui.Window.html)
4545

46-
In addition, a complete Xterm/Vt100 terminal emulator that you can embed is now part of [XtermSharp](https://github.com/migueldeicaza/XtermSharp/blob/master/GuiCsHost/TerminalView.cs) - you just need to pull [`TerminalView.cs`](https://github.com/migueldeicaza/XtermSharp/blob/master/GuiCsHost/TerminalView.cs) into your project.
47-
4846
### Features
4947

50-
* **Cross Platform** - Works on Windows, Mac, and Linux. Terminal drivers for Curses, [Windows Console](https://github.com/migueldeicaza/gui.cs/issues/27), and the .NET Console mean **Terminal.Gui** works well on both color and monochrome terminals and has mouse support on terminal emulators that support it.
51-
* **Keyboard and Mouse Input** - Both keyboard and mouse input are supported, including limited support for drag & drop.
52-
* **[Flexible Layout](https://migueldeicaza.github.io/gui.cs/articles/overview.html#layout)** - **Terminal.Gui** supports both *Absolute layout* and an innovative UI layout system referred to as *Computed Layout*. *Computed Layout* makes it easy to layout controls relative to each other and enables dynamic console GUIs.
48+
* **Cross Platform** - Windows, Mac, and Linux. Terminal drivers for Curses, [Windows Console](https://github.com/migueldeicaza/gui.cs/issues/27), and the .NET Console mean apps will work well on both color and monochrome terminals.
49+
* **Keyboard and Mouse Input** - Both keyboard and mouse input are supported, including support for drag & drop.
50+
* **[Flexible Layout](https://migueldeicaza.github.io/gui.cs/articles/overview.html#layout)** - Supports both *Absolute layout* and an innovative *Computed Layout* system. *Computed Layout* makes it easy to layout controls relative to each other and enables dynamic terminal UIs.
5351
* **Clipboard support** - Cut, Copy, and Paste of text provided through the [`Clipboard`](https://migueldeicaza.github.io/gui.cs/api/Terminal.Gui/Terminal.Gui.Clipboard.html) class.
5452
* **[Arbitrary Views](https://migueldeicaza.github.io/gui.cs/api/Terminal.Gui/Terminal.Gui.View.html)** - All visible UI elements are subclasses of the `View` class, and these in turn can contain an arbitrary number of sub-views.
5553
* **Advanced App Features** - The [Mainloop](https://migueldeicaza.github.io/gui.cs/api/Terminal.Gui/Terminal.Gui.MainLoop.html) supports processing events, idle handlers, timers, and monitoring file
56-
descriptors.
57-
* **Reactive Extensions Support** - Use [reactive extensions](https://github.com/dotnet/reactive) and benefit from increased code readability, and the ability to apply the MVVM pattern and [ReactiveUI](https://www.reactiveui.net/) data bindings. See the [source code](https://github.com/migueldeicaza/gui.cs/tree/master/ReactiveExample) of a sample app in order to learn how to achieve this.
54+
descriptors. Most classes are safe for threading.
55+
* **Reactive Extensions** - Use [reactive extensions](https://github.com/dotnet/reactive) and benefit from increased code readability, and the ability to apply the MVVM pattern and [ReactiveUI](https://www.reactiveui.net/) data bindings. See the [source code](https://github.com/migueldeicaza/gui.cs/tree/master/ReactiveExample) of a sample app in order to learn how to achieve this.
5856

5957
### Keyboard Input Handling
6058

59+
**Terminal.Gui** respects common Linux, Mac, and Windows keyboard idioms. For example, clipboard operations use the familiar `Control/Command-C, X, V` model. `CTRL-Q` is used for exiting views (and apps).
60+
6161
The input handling of **Terminal.Gui** is similar in some ways to Emacs and the Midnight Commander, so you can expect some of the special key combinations to be active.
6262

6363
The key `ESC` 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 `Alt-F`, you can press either `Alt-F`, or `ESC` followed by the key `F`.
@@ -66,25 +66,9 @@ To enter the key `ESC`, you can either press `ESC` and wait 100 milliseconds, or
6666

6767
`ESC-0`, and `ESC-1` through `ESC-9` have a special meaning, they map to `F10`, and `F1` to `F9` respectively.
6868

69-
**Terminal.Gui** respects common Mac and Windows keyboard idoms as well. For example, clipboard operations use the familiar `Control/Command-C, X, V` model.
70-
71-
`CTRL-Q` is used for exiting views (and apps).
72-
73-
**Terminal.Gui** supports rebinding keys. For example the default key for activating a button is Enter. You can change this using the `ClearKeybinding` and `AddKeybinding` methods:
74-
75-
```csharp
76-
var btn = new Button ("Press Me");
77-
btn.ClearKeybinding (Command.Accept);
78-
btn.AddKeyBinding (Key.b, Command.Accept);
79-
```
80-
81-
The `Command` enum lists generic operations that are implemented by views. For example `Command.Accept` in a Button results in the `Clicked` event firing while in `TableView` it is bound to `CellActivated`. Not all commands are implemented by all views (e.g. you cannot scroll in a Button). To see which commands are implemented by a View you can use the `GetSupportedCommands()` method.
82-
83-
Not all controls have the same key bound for a given command, for example `Command.Accept` defaults to `Key.Enter` in a `Button` but defaults to `Key.Space` in `RadioGroup`.
69+
Apps can change key bindings using the `AddKeyBinding` API.
8470

85-
Keybindings only operate while a view has focus. To register global hotkeys you can override a view's `bool ProcessHotKey (KeyEvent kb)` method.
86-
87-
### Driver model
71+
### Driver Model
8872

8973
**Terminal.Gui** has support for [ncurses](https://github.com/migueldeicaza/gui.cs/blob/master/Terminal.Gui/ConsoleDrivers/CursesDriver/CursesDriver.cs), [`System.Console`](https://github.com/migueldeicaza/gui.cs/blob/master/Terminal.Gui/ConsoleDrivers/NetDriver.cs), and a full [Win32 Console](https://github.com/migueldeicaza/gui.cs/blob/master/Terminal.Gui/ConsoleDrivers/WindowsDriver.cs) front-end.
9074

@@ -99,8 +83,7 @@ You can force the use of `System.Console` on Unix as well; see `Core.cs`.
9983
* **[Example (aka `demo.cs`)](https://github.com/migueldeicaza/gui.cs/tree/master/Example)** - Run `dotnet run` in the `Example` directory to run the simple demo.
10084
* **[Standalone Example](https://github.com/migueldeicaza/gui.cs/tree/master/StandaloneExample)** - A trivial .NET core sample application can be found in the `StandaloneExample` directory. Run `dotnet run` in directory to test.
10185
* **[F# Example](https://github.com/migueldeicaza/gui.cs/tree/master/FSharpExample)** - An example showing how to build a Terminal.Gui app using F#.
102-
* **[Powershell Sample]()** - (Coming soon! See PR #952. Shows how to build Terminal.Gui apps using Powershell.
103-
* **PowerShell's Out-ConsoleGridView** - The [`Out-ConsoleGridView` PowerShell Cmdlet](https://github.com/PowerShell/GraphicalTools/blob/master/docs/Microsoft.PowerShell.ConsoleGuiTools/Out-ConsoleGridView.md) sends the output from a command to a grid view window where the output is displayed in an interactive table. sends the output from a command to a grid view window where the output is displayed in an interactive table, using Terminal.Gui.
86+
* **[PowerShell's `Out-ConsoleGridView`](https://github.com/PowerShell/GraphicalTools/blob/master/docs/Microsoft.PowerShell.ConsoleGuiTools/Out-ConsoleGridView.md)** - `OCGV` sends the output from a command to an interactive table.
10487
* **[PoshRedisViewer](https://github.com/En3Tho/PoshRedisViewer)** - A compact Redis viewer module for PowerShell written in F# and Gui.cs
10588

10689
## Documentation
@@ -112,7 +95,7 @@ You can force the use of `System.Console` on Unix as well; see `Core.cs`.
11295
See the [`Terminal.Gui/` README](https://github.com/migueldeicaza/gui.cs/tree/master/Terminal.Gui) for an overview of how the library is structured. The [Conceptual Documentation](https://migueldeicaza.github.io/gui.cs/articles/index.html) provides insight into core concepts.
11396

11497
### Sample Usage
115-
The code below is done with the new [Top-level statements](https://docs.microsoft.com/en-us/dotnet/csharp/whats-new/csharp-9#top-level-statements) in C# 9.0.
98+
(This code uses C# 9.0 [Top-level statements](https://docs.microsoft.com/en-us/dotnet/csharp/whats-new/csharp-9#top-level-statements).)
11699
```csharp
117100
using Terminal.Gui;
118101
using NStack;
@@ -191,6 +174,8 @@ Application.Run();
191174
Application.Shutdown();
192175
```
193176

177+
The example above shows adding views using both styles of layout supported by **Terminal.Gui**: **Absolute layout** and **[Computed layout](https://migueldeicaza.github.io/gui.cs/articles/overview.html#layout)**.
178+
194179
Alternatively, you can encapsulate the app behavior in a new `Window`-derived class, say `App.cs` containing the code above, and simplify your `Main` method to:
195180

196181
```csharp
@@ -205,8 +190,6 @@ class Demo {
205190
}
206191
```
207192

208-
The example above shows how to add views using both styles of layout supported by **Terminal.Gui**: **Absolute layout** and **[Computed layout](https://migueldeicaza.github.io/gui.cs/articles/overview.html#layout)**.
209-
210193
## Installing
211194

212195
Use NuGet to install the `Terminal.Gui` NuGet package: https://www.nuget.org/packages/Terminal.Gui
@@ -221,10 +204,10 @@ dotnet add package Terminal.Gui
221204

222205
## Running and Building
223206

224-
* Windows, Mac, and Linux - Build and run using the .NET SDK command line tools (`dotnet build` in the root directory). Run `UICatalog` with `dotnet run --project ./UICatalog` or by directly executing `./UICatalog/bin/Debug/net5.0/UICatalog.exe`.
207+
* Windows, Mac, and Linux - Build and run using the .NET SDK command line tools (`dotnet build` in the root directory). Run `UICatalog` with `dotnet run --project UICatalog`.
225208
* Windows - Open `Terminal.Gui.sln` with Visual Studio 2019.
226209

227-
Building in Release requires the [git command line tool](https://git-scm.com/) (a dependency of the [MinVer](https://github.com/adamralph/minver#can-i-disable-minver) build tool)
210+
Building in `Release` requires the [git command line tool](https://git-scm.com/) (a dependency of the [MinVer](https://github.com/adamralph/minver#can-i-disable-minver) build tool)
228211

229212
## Contributing
230213

Terminal.Gui/README.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
# Terminal.Gui Project
22

3-
Contains all files required to build the **Terminal.Gui** library (and nuget package).
3+
Contains all files required to build the **Terminal.Gui** library (and NuGEt package).
44

55
## Project Folder Structure
66

7-
- `Terminal.Gui.sln` - The Visual Studio 2019 solution
7+
- `Terminal.Gui.sln` - The Visual Studio solution
88
- `Core/` - Source files for all types that comprise the core building blocks of **Terminal-Gui**
99
- `Application` - A `static` class that provides the base 'application driver'. Given it defines a **Terminal.Gui** application it is both logically and literally (because `static`) a singleton. It has direct dependencies on `MainLoop`, `Events.cs` `NetDriver`, `CursesDriver`, `WindowsDriver`, `Responder`, `View`, and `TopLevel` (and nothing else).
1010
- `MainLoop` - Defines `IMainLoopDriver` and implements the and `MainLoop` class.
1111
- `ConsoleDriver` - Definition for the Console Driver API.
1212
- `Events.cs` - Defines keyboard and mouse related structs & classes.
13-
- `PosDim.cs` - Implements **Terminal-Gui's** *Computed Layout* system. These classes have deep dependencies on `View`.
13+
- `PosDim.cs` - Implements *Computed Layout* system. These classes have deep dependencies on `View`.
1414
- `Responder` - Base class for the windowing class hierarchy. Implements support for keyboard & mouse input.
1515
- `View` - Derived from `Responder`, the base class for non-modal visual elements such as controls.
16-
- `Toplevel` - Drived from `View`, the base class for modal visual elements such as top-level windows and dialogs. Supports the concept of `MenuBar` and `StatusBar`.
17-
- `Window` - Drived from `TopLevel`, implements Toplevel views with a visible frame and Title.
16+
- `Toplevel` - Derived from `View`, the base class for modal visual elements such as top-level windows and dialogs. Supports the concept of `MenuBar` and `StatusBar`.
17+
- `Window` - Derived from `TopLevel`; implements top level views with a visible frame and Title.
1818
- `Types/` - A folder (not namespace) containing implementations of `Point`, `Rect`, and `Size` which are ancient versions of the modern `System.Drawing.Point`, `System.Drawing.Size`, and `System.Drawning.Rectangle`.
1919
- `ConsoleDrivers/` - Source files for the three `ConsoleDriver`-based drivers: .NET: `NetDriver`, Unix & Mac: `UnixDriver`, and Windows: `WindowsDriver`.
2020
- `Views/` - A folder (not namespace) containing the source for all built-in classes that drive from `View` (non-modals).

Terminal.Gui/Terminal.Gui.csproj

+23-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
<PackageReference Include="NStack.Core" Version="0.17.0" />
1919
<PackageReference Include="MinVer" Version="4.0.0" PrivateAssets="all" />
2020
<InternalsVisibleTo Include="UnitTests" />
21-
<!-- <None Remove="ConsoleDrivers\#ConsoleDriver.cs#" /> -->
2221
</ItemGroup>
2322

2423
<ItemGroup>
@@ -60,6 +59,29 @@
6059
<Title>Terminal.Gui is a framework for creating console user interfaces</Title>
6160

6261
<PackageReleaseNotes>
62+
v1.6.0
63+
* Adds ColorPicker control
64+
* Adds Context Menu to TreeView
65+
* Adds support for custom colors in TreeView
66+
* Adds Data field to MenuItem
67+
* Adds Timeout thread safety
68+
* Adds better docs for Application.Shutdown ()
69+
* Fixes #1699. Menu closes on button press and menu hot-key text renders correctly
70+
* Fixes #1675. ContextMenu MenuItems typo
71+
* Fixes #1715. UI Catalog about box version
72+
* Fixes #1712. Intermittent Github Action build failures
73+
* Fixes remaining wide runes render issues including #1693 Character Map
74+
* Fixes the draw clip bounds issue visible on ScrollView.
75+
* Fixes UpdateScreen running twice on Application.Refresh because Driver. Refresh already does.
76+
* Fixes TextView throwing when WordWrap is true on constructor initialization.
77+
* Fixes RunTimers not checking for key collisions in list when adding to timeouts
78+
* Fixes erroneous namespace on LineView to match other views
79+
* Fixes #1723. ProgressBar with Percentage has extra spaces on the right
80+
* Fixes nullref on unclean shutdown
81+
* Fixes Thin tabview
82+
* Fixes #1732. Toplevel shouldn't clear the buffer.
83+
* Fixes #1730. AllViewsTester throw exception on Dim.Percent.
84+
6385
v1.5.0
6486
* Localization support added. en-US, Japanese, fr-FR, and pt-PT
6587
* Adds Key Binding support. Also refactors Autocomplete.

UICatalog/Properties/launchSettings.json

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"profiles": {
33
"UICatalog": {
44
"commandName": "Project",
5+
"commandLineArgs": "\"ProgressBar Styles\""
56
},
67
"UICatalog : -usc": {
78
"commandName": "Project",

docfx/sample.gif

7.2 MB
Loading

0 commit comments

Comments
 (0)