Tigger Kindel a96c2588d5 Tweaks to api docs před 1 rokem
..
Clipboard 0df485a890 Fixes #666. Refactor `ConsoleDriver`s to simplify and remove duplicated code (#2612) před 2 roky
Configuration 6851b42a49 Fixes #2921 - MainLoop refactoring (#2922) před 1 rokem
ConsoleDrivers aa8b952509 Partially Addresses #2616. Support combining sequences that don't normalize (#2932) před 1 rokem
Drawing 42b9ad1d61 Fixes #2578 - Updates mouse events to be relative to `View.Bounds` (#2920) před 1 rokem
FileServices 095013bf0d Update localizations for FileDialog. (#2935) před 1 rokem
Input 42b9ad1d61 Fixes #2578 - Updates mouse events to be relative to `View.Bounds` (#2920) před 1 rokem
Resources 095013bf0d Update localizations for FileDialog. (#2935) před 1 rokem
Text 42b9ad1d61 Fixes #2578 - Updates mouse events to be relative to `View.Bounds` (#2920) před 1 rokem
Types 2007f3b2d5 Adds `Slider` View (#2919) před 1 rokem
View 42b9ad1d61 Fixes #2578 - Updates mouse events to be relative to `View.Bounds` (#2920) před 1 rokem
Views a96c2588d5 Tweaks to api docs před 1 rokem
Application.cs df37fa6841 No longer publish api docs from v2_develop; v2 is published via the Terminal.GuiV2Docs repo před 1 rokem
Directory.Build.props 906939874b attempting new publish technique před 4 roky
MainLoop.cs 6851b42a49 Fixes #2921 - MainLoop refactoring (#2922) před 1 rokem
README.md b4552ee14b Fixes #2493. Move all layout code out of View (and Toplevel) into a layout helper class (#2544) před 2 roky
RunState.cs e2feeefa93 Fixes #2663 - No more nested classes (#2664) před 2 roky
RunStateEventArgs.cs 574ed8fec7 Fixes #2469 - Revamp file structure and namespace (#2471) před 2 roky
StackExtensions.cs 574ed8fec7 Fixes #2469 - Revamp file structure and namespace (#2471) před 2 roky
Terminal.Gui.csproj cf947026ce v2 - Updates nuget dependencies (#2998) před 1 rokem
Timeout.cs 6851b42a49 Fixes #2921 - MainLoop refactoring (#2922) před 1 rokem
TimeoutEventArgs.cs 6851b42a49 Fixes #2921 - MainLoop refactoring (#2922) před 1 rokem

README.md

Terminal.Gui Project

All files required to build the Terminal.Gui library (and NuGet package).

Project Folder Structure

  • \ - The root folder contains the source code for the library.

    • Terminal.Gui.sln - The Visual Studio solution
    • Application.cs - 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).
    • MainLoop.cs - Defines IMainLoopDriver and implements the MainLoop class.
    • A few supporting class files
  • ConsoleDrivers\

    • ConsoleDriver.cs - Definition for the Console Driver API.
    • Source files for the three ConsoleDriver-based drivers: .NET: NetDriver, Unix & Mac: UnixDriver, and Windows: WindowsDriver.
  • Configuration\ - Classes related the ConfigurationManager.

  • Clipboard\ - Classes related to clipboard access.

  • Input\ - Classes relating to keyboard and mouse input. Includes Responder, which is the base class for View

    • Events.cs - Defines keyboard and mouse-related structs & classes.
    • Responder - Base class for the windowing class hierarchy. Implements support for keyboard & mouse input.
    • etc...
  • Text\ - Classes related to text processing

  • Drawing\ - Classes related to drawing

  • View\ - The View class heirarchy, not including any sub-classes

    • View.cs - Derived from Responder, the base class for non-modal visual elements such as controls.
    • Layout\
      • PosDim.cs - Implements Computed Layout system. These classes have deep dependencies on View.
  • Views\ - Sub-classes of View

    • 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.
    • Window - Derived from TopLevel; implements Toplevel views with a visible frame and Title.
    • Dialog -
    • etc...
  • 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.

Version numbers

Version info for Terminal.Gui is managed by gitversion.

Install gitversion:

dotnet tool install --global GitVersion.Tool
dotnet-gitversion

The project version (the nuget package and in Terminal.Gui.dll) is determined from the latest git tag.

The format of version numbers is vmajor.minor.patch.build.height and follows the Semantic Versioning rules.

To define a new version (e.g. with a higher major, minor, patch, or build value) tag a commit using git tag:

git tag v1.3.4-beta.5 -a -m "Release v1.3.4 Beta 5"
dotnet-gitversion /updateprojectfiles
dotnet build -c Release

DO NOT COMMIT AFTER USING /updateprojectfiles!

Doing so will update the .csproj files in your branch with version info, which we do not want.

Publishing a Release of Terminal.Gui

First, use the Semantic Versioning rules.to determine the new verison number.

Given a version number MAJOR.MINOR.PATCH, increment the:

  • MAJOR version when you make incompatible API changes
  • MINOR version when you add functionality in a backwards compatible manner
  • PATCH version when you make backwards compatible bug fixes

Additional labels for pre-release and build metadata are available as extensions to the MAJOR.MINOR.PATCH format.

To release a new version (e.g. with a higher major, minor, or patch value) tag a commit using git tag and then push that tag directly to the main branch on github.com/gui-cs/Terminal.Gui (upstream).

The tag must be of the form v<major>.<minor>.<patch>, e.g. v2.3.4.

patch can indicate pre-release or not (e.g. pre, beta, rc, etc...).

1) Verify the develop branch is ready for release

  • Ensure everything is committed and pushed to the develop branch
  • Ensure your local develop branch is up-to-date with upstream/develop

2) Create a pull request for the release in the develop branch

The PR title should be of the form "Release v2.3.4"

git checkout develop
git pull upstream develop
git checkout -b v2_3_4
git add .
git commit -m "Release v2.3.4"
git push

Go to the link printed by git push and fill out the Pull Request.

3) On github.com, verify the build action worked on your fork, then merge the PR

4) Pull the merged develop from upstream

git checkout develop
git pull upstream develop

5) Merge develop into main

git checkout main
git pull upstream main
git merge develop

Fix any merge errors.

6) Create a new annotated tag for the release on main

git tag v2.3.4 -a -m "Release v2.3.4"

7) Push the new tag to main on upstream

git push --atomic upstream main v2.3.4

See https://stackoverflow.com/a/3745250/297526

8) Monitor Github Actions to ensure the Nuget publishing worked.

https://github.com/gui-cs/Terminal.Gui/actions

9) Check Nuget to see the new package version (wait a few minutes)

https://www.nuget.org/packages/Terminal.Gui

10) Add a new Release in Github: https://github.com/gui-cs/Terminal.Gui/releases

Generate release notes with the list of PRs since the last release.

11) Update the develop branch with the new version

git checkout develop
git pull upstream develop
git merge main
git push upstream develop

Nuget

https://www.nuget.org/packages/Terminal.Gui

When a new version tag is defined and merged into main, a Nuget package will be generated by a Github Action.

If the version is pre-release (includes a hyphen, e.g. 1.3.4-beta.5) the Nuget package will be tagged as pre-release.

Miguel & Tig can hide defunct/old Nuget packages.

Contributing

See CONTRIBUTING.md.