diff --git a/.github/workflows/api-docs.yml b/.github/workflows/api-docs.yml index cd51b6d9d5..50cec2810a 100644 --- a/.github/workflows/api-docs.yml +++ b/.github/workflows/api-docs.yml @@ -3,17 +3,20 @@ name: Build and publish v2 API docs on: push: branches: [develop] + workflow_dispatch: + inputs: + regenerate-views: + description: Regenerate views.md and view GIF assets + type: boolean + default: true permissions: id-token: write pages: write jobs: - deploy: - name: Build and Deploy v2 API docs to github-pages ${{ github.ref_name }} - environment: - name: github-pages - url: ${{ steps.deployment.outputs.page_url }} + build: + name: Build v2 API docs ${{ github.ref_name }} runs-on: windows-latest steps: - name: Checkout @@ -27,6 +30,31 @@ jobs: dotnet-version: 10.x dotnet-quality: 'ga' + - name: Detect view docs changes + id: view-docs + shell: pwsh + run: | + $shouldGenerate = $false + + if ("${{ github.event_name }}" -eq "workflow_dispatch") { + $shouldGenerate = "${{ inputs.regenerate-views }}" -eq "true" + } else { + $before = "${{ github.event.before }}" + + if ($before -match "^0+$") { + $before = "HEAD~1" + } + + $changedFiles = git diff --name-only $before "${{ github.sha }}" + $shouldGenerate = [bool]($changedFiles | Where-Object { + $_ -match "^Terminal\.Gui/Views/" -or + $_ -match "^docfx/scripts/OutputView/" -or + $_ -match "^docfx/scripts/generate-views-doc\.ps1$" + } | Select-Object -First 1) + } + + "should_generate=$($shouldGenerate.ToString().ToLowerInvariant())" >> $env:GITHUB_OUTPUT + - name: Restore dependencies run: dotnet restore @@ -36,23 +64,60 @@ jobs: - name: Build EditorRef (for Terminal.Gui.Editor docs) run: dotnet build docfx/EditorRef/EditorRef.csproj --configuration Release - - name: DocFX Build - working-directory: docfx + - name: Install DocFX run: | dotnet tool install -g docfx + + - name: Setup Go + if: steps.view-docs.outputs.should_generate == 'true' + uses: actions/setup-go@v6 + with: + go-version: stable + + - name: Install views docs tools + if: steps.view-docs.outputs.should_generate == 'true' + run: | + go install github.com/gui-cs/tuirec/cmd/tuirec@latest + Add-Content $env:GITHUB_PATH "$(go env GOPATH)\bin" + Install-Module powershell-yaml -Scope CurrentUser -Force + + - name: Generate API metadata + working-directory: docfx + run: | $env:DOCFX_SOURCE_BRANCH_NAME="${{ github.ref_name }}" docfx metadata + + - name: Generate views docs + if: steps.view-docs.outputs.should_generate == 'true' + working-directory: docfx + run: | + ./scripts/generate-views-doc.ps1 + + - name: DocFX Build + working-directory: docfx + run: | docfx build continue-on-error: false - name: Setup Pages + if: github.event_name == 'push' && github.ref_name == 'develop' uses: actions/configure-pages@v6 - + - name: Upload artifact + if: github.event_name == 'push' && github.ref_name == 'develop' uses: actions/upload-pages-artifact@v5 with: path: docfx/_site - + + deploy: + name: Deploy v2 API docs to github-pages ${{ github.ref_name }} + if: github.event_name == 'push' && github.ref_name == 'develop' + needs: build + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: windows-latest + steps: - name: Deploy to GitHub Pages id: deployment uses: actions/deploy-pages@v5 diff --git a/Terminal.Gui/Views/LinearRange/LinearRange.cs b/Terminal.Gui/Views/LinearRange/LinearRange.cs index 2f352c0447..599184bdae 100644 --- a/Terminal.Gui/Views/LinearRange/LinearRange.cs +++ b/Terminal.Gui/Views/LinearRange/LinearRange.cs @@ -6,6 +6,7 @@ namespace Terminal.Gui.Views; /// and create the view without supplying a type argument. /// /// +/// LinearRange demo /// /// To work with non-string option types, use directly. /// diff --git a/Terminal.Gui/Views/LinearRange/LinearRangeT.cs b/Terminal.Gui/Views/LinearRange/LinearRangeT.cs index 46541e60a6..38effc20b9 100644 --- a/Terminal.Gui/Views/LinearRange/LinearRangeT.cs +++ b/Terminal.Gui/Views/LinearRange/LinearRangeT.cs @@ -8,6 +8,7 @@ namespace Terminal.Gui.Views; /// /// The data type of the options. /// +/// LinearRange demo /// /// To switch between left-bounded, right-bounded, and closed range modes, set /// . Setting migrates the current diff --git a/Terminal.Gui/Views/Prompt.cs b/Terminal.Gui/Views/Prompt.cs index 2c863b090c..a53aab28f5 100644 --- a/Terminal.Gui/Views/Prompt.cs +++ b/Terminal.Gui/Views/Prompt.cs @@ -15,6 +15,7 @@ namespace Terminal.Gui.Views; /// /// /// +/// Prompt demo /// /// This class provides a convenient way to prompt the user with any view and get a typed result. /// The wrapped view is displayed in the dialog, and when the user clicks Ok (or presses Enter), diff --git a/Terminal.Gui/Views/ScrollBar/ScrollBar.cs b/Terminal.Gui/Views/ScrollBar/ScrollBar.cs index 59c1d4eb08..a6cde4b084 100644 --- a/Terminal.Gui/Views/ScrollBar/ScrollBar.cs +++ b/Terminal.Gui/Views/ScrollBar/ScrollBar.cs @@ -634,22 +634,25 @@ public bool EnableForDesign () if (args.Value == Orientation.Vertical) { Width = 1; - Height = Dim.Fill (); + Height = 10; } else { - Width = Dim.Fill (); + Width = 30; Height = 1; } }; - Width = 1; - Height = Dim.Fill (); + Orientation = Orientation.Horizontal; + Width = 30; + Height = 1; + VisibleContentSize = 10; ScrollableContentSize = 250; + Value = 80; return true; } /// - public string? GetDemoKeyStrokes () => "wait:500,CursorDown,wait:300,CursorDown,wait:300,CursorDown,wait:300,CursorDown,wait:800"; + public string? GetDemoKeyStrokes () => "wait:2000"; } diff --git a/Terminal.Gui/Views/SpinnerView/SpinnerView.cs b/Terminal.Gui/Views/SpinnerView/SpinnerView.cs index 247ca56d40..578d92fc3f 100644 --- a/Terminal.Gui/Views/SpinnerView/SpinnerView.cs +++ b/Terminal.Gui/Views/SpinnerView/SpinnerView.cs @@ -350,8 +350,7 @@ private void SyncProgressIndicator () bool IDesignable.EnableForDesign () { - Style = new SpinnerStyle.Points (); - SpinReverse = true; + Style = new SpinnerStyle.Dots2 (); AutoSpin = true; return true; diff --git a/artifacts/submenu-hover-fix.gif b/artifacts/submenu-hover-fix.gif deleted file mode 100644 index 4df9da714f..0000000000 Binary files a/artifacts/submenu-hover-fix.gif and /dev/null differ diff --git a/docfx/docs/views.md b/docfx/docs/views.md index 3360735f2b..01f745d4d9 100644 --- a/docfx/docs/views.md +++ b/docfx/docs/views.md @@ -1,8 +1,7 @@ # Terminal Gui's Built-in Views @@ -14,26 +13,7 @@ using Application.ToString to capture the view's rendered output. Allows the user to pick an by selecting foreground and background colors, and text styles. -
-┌┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┐
-┊┌┤Foreground├───────────────────────────────────────────────┬┤Style├────────┐ ┊
-┊│H:                                                    355 │☒ Bold         │ ┊
-┊│S:                                                    70  │☐ Faint        │ ┊
-┊│V:                                                    91  │☒ Italic       │ ┊
-┊│Name: BrightRed                                            │☐ Underline    │ ┊
-┊│Hex:#E74856                                               │☐ Blink        │ ┊
-┊├┼Background┼───────────────────────────────────────────────┤☐ Reverse      │ ┊
-┊│H:                                                    240 │☐ Strikethrough│ ┊
-┊│S:                                                    100 │               │ ┊
-┊│V:                                                    100 │               │ ┊
-┊│Name: Blue                                                 │               │ ┊
-┊│Hex:#0000FF                                               │               │ ┊
-┊└───────────────────────────────────────────────────────────┴───────────────┘ ┊
-                           Multi-line Sample Text.                            
-                           This is the second line.                           
-└┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┘
-
-
+![AttributePicker](../images/views/AttributePicker.gif) ## [Bar](xref:Terminal.Gui.Views.Bar) @@ -41,12 +21,7 @@ Allows the user to pick an by selecting fo A container for items that arranges them horizontally or vertically. Serves as the base class for , , and . -
-┌┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┐
- Shortcut  Shortcut help  F1  Help  Help Text  F1Check  Czech  F9
-└┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┘
-
-
+![Bar](../images/views/Bar.gif) ## [Button](xref:Terminal.Gui.Views.Button) @@ -54,12 +29,7 @@ A container for items that arranges them hori Raises the and events when the user presses , `Enter`, or `Space` or clicks with the mouse. -
-┌┤Button├┄┄┐
-Button ⟧
-└┄┄┄┄┄┄┄┄┄┄┘
-
-
+![Button](../images/views/Button.gif) ## [CharMap](xref:Terminal.Gui.Views.CharMap) @@ -67,29 +37,7 @@ Raises the and -┌┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┐ - 0 1 2 3 4 5 6 7 8 9 a b c d e f -U+00000_ ␁ ␂ ␃ ␄ ␅ ␆ ␇ ␈ ␉ ␊ ␋ ␌ ␍ ␎ ␏ -U+00001_ ␐ ␑ ␒ ␓ ␔ ␕ ␖ ␗ ␘ ␙ ␚ ␛ ␜ ␝ ␞ ␟ -U+00002_ ! " # $ % & ' ( ) * + , - . / -U+00003_ 0 1 2 3 4 5 6 7 8 9 : ; < = > ? -U+00004_ @ A B C D E F G H I J K L M N O -U+00005_ P Q R S T U V W X Y Z [ \ ] ^ _ -U+00006_ ` a b c d e f g h i j k l m n o -U+00007_ p q r s t u v w x y z { | } ~ ⑿ -U+00008_ ⒀ ⒁ ⒂ ⒃ ⒄ ⒅ ⒆ ⒇ ⒈ ⒉ ⒊ ⒋ ⒌ ⒍ ⒎ ⒏ -U+00009_ ⒐ ⒑ ⒒ ⒓ ⒔ ⒕ ⒖ ⒗ ⒘ ⒙ ⒚ ⒛ ⒜ ⒝ ⒞ ⒟ -U+0000a_   ¡ ¢ £ ¤ ¥ ¦ § ¨ © ª « ¬ F ® ¯ -U+0000b_ ° ± ² ³ ´ µ ¶ · ¸ ¹ º » ¼ ½ ¾ ¿ -U+0000c_ À Á Â Ã Ä Å Æ Ç È É Ê Ë Ì Í Î Ï -U+0000d_ Ð Ñ Ò Ó Ô Õ Ö × Ø Ù Ú Û Ü Ý Þ ß -U+0000e_ à á â ã ä å æ ç è é ê ë ì í î ï -U+0000f_ ð ñ ò ó ô õ ö ÷ ø ù ú û ü ý þ ÿ -U+00010_ Ā ā Ă ă Ą ą Ć ć Ĉ ĉ Ċ ċ Č č Ď ď -└┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┘ - - +![CharMap](../images/views/CharMap.gif) ## [CheckBox](xref:Terminal.Gui.Views.CheckBox) @@ -97,12 +45,15 @@ A scrollable map of the Unicode codepoints. Shows a checkbox that can be cycled between two or three states. -
-┌┤This is some demo text.├┐
-☐ This is some demo text.
-└┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┘
+![CheckBox](../images/views/CheckBox.gif)
+
+
+## [Code](xref:Terminal.Gui.Views.Code)
 
-
+A read-only view that renders syntax-highlighted source code. + + +![Code](../images/views/Code.gif) ## [ColorPicker](xref:Terminal.Gui.Views.ColorPicker) @@ -110,15 +61,7 @@ Shows a checkbox that can be cycled between two or three states. Color Picker supporting RGB, HSL, and HSV color models. Supports choosing colors with sliders and color names from the . -
-┌┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┐
-H:                         355 
-┊S:                         70  
-┊V:                         91  
-┊Hex:#E74856  
-└┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┘
-
-
+![ColorPicker](../images/views/ColorPicker.gif) ## [ColorPicker16](xref:Terminal.Gui.Views.ColorPicker16) @@ -126,15 +69,7 @@ Color Picker supporting RGB, HSL, and HSV color models. Supports choosing colors A simple color picker that supports the legacy 16 ANSI colors. -
-┌┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┐
-┌┄┄┐                            
-└┄┄┘                            
-                                
-                                
-└┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┘
-
-
+![ColorPicker16](../images/views/ColorPicker16.gif) ## [DateEditor](xref:Terminal.Gui.Views.DateEditor) @@ -142,12 +77,7 @@ A simple color picker that supports the legacy 16 ANSI colors. Provides date editing functionality using with culture-aware formatting. -
-┌┄┄┄┄┄┄┄┄┄┄┄┐
-01/15/2024 
-└┄┄┄┄┄┄┄┄┄┄┄┘
-
-
+![DateEditor](../images/views/DateEditor.gif) ## [DatePicker](xref:Terminal.Gui.Views.DatePicker) @@ -155,63 +85,39 @@ Provides date editing functionality using -┌─────────────────────────────┐ -│Date: 04/20/2026 -│┌───┬───┬───┬───┬───┬───┬───┐│ -││Sun│Mon│Tue│Wed│Thu│Fri│Sat││ -│├───┼───┼───┼───┼───┼───┼───┤│ -││- │- │- │1 │2 │3 │4 ││ -││5 │6 │7 │8 │9 │10 │11 ││ -││12 │13 │14 │15 │16 │17 │18 ││ -││19 │20 │21 │22 │23 │24 │25 ││ -││26 │27 │28 │29 │30 │- │- ││ -││- │- │- │- │- │- │- ││ -│└───┴───┴───┴───┴───┴───┴───┘│ -│ ◄◄ ►► │ -└─────────────────────────────┘ - - +![DatePicker](../images/views/DatePicker.gif) -## [Dialog](xref:Terminal.Gui.Views.Dialog) +## [Dialog\](xref:Terminal.Gui.Views.Dialog`1) -A modal dialog window with buttons across the bottom. When a button is pressed, is set to the button's index (0-based). +A generic modal dialog window with buttons across the bottom. Derive from this class to create dialogs that return custom result types. -
-┏┥Dialog Title┝━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
-┃Example: Type and press ENTER to accept.         ▼┃
-┃                                                  ┃
-┃                               ⟦ Cancel ⟧ ⟦► OK ◄⟧┃
-┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
+![Dialog-1](../images/views/Dialog.gif)
 
-
+## [Dialog](xref:Terminal.Gui.Views.Dialog) -## [Dialog\](xref:Terminal.Gui.Views.Dialog`1) +A modal dialog window with buttons across the bottom. When a button is pressed, is set to the button's index (0-based). -A generic modal dialog window with buttons across the bottom. Derive from this class to create dialogs that return custom result types. +![Dialog](../images/views/Dialog.gif) -## [DropDownList](xref:Terminal.Gui.Views.DropDownList) +## [DropDownList\](xref:Terminal.Gui.Views.DropDownList`1) -A dropdown/combo-box control that combines a with a popover for selecting from a list of items. +A type-safe dropdown control for selecting a single value from an enum. Provides the same interface as but rendered as a compact dropdown list. -
-┌┄┄┄┄┄┄┄┄┄┄┐
-Germany  ▼┊
-└┄┄┄┄┄┄┄┄┄┄┘
+![DropDownList-1](../images/views/DropDownList.gif)
 
-
+## [DropDownList](xref:Terminal.Gui.Views.DropDownList) -## [DropDownList\](xref:Terminal.Gui.Views.DropDownList`1) +A dropdown/combo-box control that combines a with a popover for selecting from a list of items. -A type-safe dropdown control for selecting a single value from an enum. Provides the same interface as but rendered as a compact dropdown list. +![DropDownList](../images/views/DropDownList.gif) ## [FileDialog](xref:Terminal.Gui.Views.FileDialog) @@ -219,53 +125,23 @@ A type-safe dropdown control for selecting a single value from an enum. Provides The base-class for and -
-┏┥Open┝━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
-┃C:\Users\Tig\s\gui-cs\Terminal.Gui\docfx                                   ┃
-┃⟦▲⟧                                                                        ┃
-┃┌────────────────────┬──────────┬──────────────────────────────┬───────────┃
-┃│Filename (▲)        │Size      │Modified                      │Type       ┃
-┃├────────────────────┼──────────┼──────────────────────────────┼───────────┃
-┃│..                  │          │                              │<Directory>┃
-┃│\_exported_templates│          │2026-04-09T04:42:42           │<Directory>┃
-┃│\_site              │          │2026-04-20T10:45:59           │<Directory>┃
-┃│\api                │          │2026-04-20T10:45:05           │<Directory>┃
-┃│\apispec            │          │2026-04-09T04:42:42           │<Directory>┃
-┃│\docs               │          │2026-04-20T10:42:55           │<Directory>┃
-┃│\images             │          │2026-04-09T04:42:42           │<Directory>┃
-┃│\includes           │          │2026-04-18T06:44:01           │<Directory>┃
-┃│\schemas            │          │2026-04-09T04:42:42           │<Directory>┃
-┃│\scripts            │          │2026-04-09T04:42:42           │<Directory>┃
-┃│aboutbox.png        │14.06 KB  │2026-04-09T04:42:42           │.png       ┃
-┃                                                                           ┃
-┃⟦►Tree⟧                                                  ⟦ Cancel ⟧⟦► OK ◄⟧┃
-┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
-
-
+![FileDialog](../images/views/FileDialog.gif) -## [FlagSelector](xref:Terminal.Gui.Views.FlagSelector) +## [FlagSelector\](xref:Terminal.Gui.Views.FlagSelector`1) -Provides a user interface for displaying and selecting non-mutually-exclusive flags from a provided dictionary. provides a type-safe version where a `[Flags]` enum can be provided. +Provides a user interface for displaying and selecting non-mutually-exclusive flags in a type-safe way. provides a non-type-safe version. `TFlagsEnum` must be a valid enum type with the '[Flags]' attribute. -
-┌┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┐
-No Style               
-┊☐ Show None Value Style  ┊
-┊☐ ShowAllFlag            ┊
-┊☐ Show Value Editor Style┊
-┊☐ All Styles             ┊
-0                        
-└┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┘
+![FlagSelector-1](../images/views/FlagSelector.gif)
 
-
+## [FlagSelector](xref:Terminal.Gui.Views.FlagSelector) -## [FlagSelector\](xref:Terminal.Gui.Views.FlagSelector`1) +Provides a user interface for displaying and selecting non-mutually-exclusive flags from a provided dictionary. provides a type-safe version where a `[Flags]` enum can be provided. -Provides a user interface for displaying and selecting non-mutually-exclusive flags in a type-safe way. provides a non-type-safe version. `TFlagsEnum` must be a valid enum type with the '[Flags]' attribute. +![FlagSelector](../images/views/FlagSelector.gif) ## [FrameView](xref:Terminal.Gui.Views.FrameView) @@ -273,29 +149,7 @@ Provides a user interface for displaying and selecting non-mutually-exclusive fl A non-overlapped container for other views with a border and optional title. -
-╭──────────────────────────────────────────────────────────────────────────────╮
-This is some demo text.
-│                                                                              │
-│                                                                              │
-│                                                                              │
-│                                                                              │
-│                                                                              │
-│                                                                              │
-│                                                                              │
-│                                                                              │
-│                                                                              │
-│                                                                              │
-│                                                                              │
-│                                                                              │
-│                                                                              │
-│                                                                              │
-│                                                                              │
-│                                                                              │
-│                                                                              │
-╰──────────────────────────────────────────────────────────────────────────────╯
-
-
+![FrameView](../images/views/FrameView.gif) ## [GraphView](xref:Terminal.Gui.Views.GraphView) @@ -303,29 +157,7 @@ A non-overlapped container for other views with a border and optional title. Displays graphs (bar, scatter, etc.) with flexible labels, scaling, and scrolling. -
-┌┤Sine Wave├┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┐
-┊                            │     .                  ∙                        ┊
-┊                            ┤    ∙                    .                       ┊
-┊                            │   .                      ..                     ┊
-┊                            │ ..                         .                    ┊
-┊                        0.20┤.                            ∙                   ┊
-┊   ┬────┬────┬────┬────┬────∙────┬────┬────┬────┬────┬────┬────┬────┬────┬────┊
-┊ -2.50     -1.50     -0.50 .│  0.50      1.50      2.50     .3.50      4.50   ┊
-┊                          . │                                .                ┊
-┊↑                      -0.20┤                                 .               ┊
-┊Y.                      .   │                                  ∙              ┊
-┊  .                    ∙    ┤                                   .             ┊
-┊   ∙                  .     │                                    ..           ┊
-┊    .               .. -0.60┤                                      .          ┊
-┊     ..            .        │                                       ∙.        ┊
-┊       .        ..∙         ┤                                         ..      ┊
-┊        ∙....∙..       -1.00┤                                           .∙....┊
-┊                                                                              ┊
-┊                                      X →                                     ┊
-└┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┘
-
-
+![GraphView](../images/views/GraphView.gif) ## [HexView](xref:Terminal.Gui.Views.HexView) @@ -333,29 +165,15 @@ Displays graphs (bar, scatter, etc.) with flexible labels, scaling, and scrollin Provides a hex editor with the left side showing the hex values of the bytes in a `Stream` and the right side showing the contents (filtered to printable Unicode glyphs). -
-┌┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┐
-00000000 48 65 78 56 ┊ 69 65 77 20 ┊ 64 61 74 61  HexView data                ┊
-0000000c 20 77 69 74 ┊ 68 20 77 69 ┊ 64 65 20 63   with wide c                ┊
-00000018 6f 64 65 70 ┊ 6f 69 6e 74 ┊ 73 3a 20 f0  odepoints: �                ┊
-00000024 9d 94 b9 41 ┊ e2 84 9d f0 ┊ 9d 94 bd 21  ���A�������!                ┊
-00000030             ┊             ┊                                          ┊
-0000003c             ┊             ┊                                          ┊
-00000048             ┊             ┊                                          ┊
-00000054             ┊             ┊                                          ┊
-00000060             ┊             ┊                                          ┊
-0000006c             ┊             ┊                                          ┊
-00000078             ┊             ┊                                          ┊
-00000084             ┊             ┊                                          ┊
-00000090             ┊             ┊                                          ┊
-0000009c             ┊             ┊                                          ┊
-000000a8             ┊             ┊                                          ┊
-000000b4             ┊             ┊                                          ┊
-000000c0             ┊             ┊                                          ┊
-000000cc             ┊             ┊                                          ┊
-└┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┘
-
-
+![HexView](../images/views/HexView.gif) + + +## [ImageView](xref:Terminal.Gui.Views.ImageView) + +Displays an image represented as a 2D array of pixels. Supports two rendering modes: cell-based (one colored space per pixel, works everywhere) and sixel-based (when the terminal supports it). + + +![ImageView](../images/views/ImageView.gif) ## [Label](xref:Terminal.Gui.Views.Label) @@ -363,12 +181,7 @@ Provides a hex editor with the left side showing the hex values of the bytes in Displays text that describes the View next in the . When the user presses a hotkey that matches the of the Label, the next in will be activated. -
-┌┤Lab├┐
-Label┊
-└┄┄┄┄┄┘
-
-
+![Label](../images/views/Label.gif) ## [LegendAnnotation](xref:Terminal.Gui.Views.LegendAnnotation) @@ -376,29 +189,7 @@ Displays text that describes the View next in the to render symbol definitions in a graph, e.g. colors and their meanings -
-┌──────────────────────────────────────────────────────────────────────────────┐
-│                                                                              │
-│                                                                              │
-│                                                                              │
-│                                                                              │
-│                                                                              │
-│                                                                              │
-│                                                                              │
-│                                                                              │
-│                                                                              │
-│                                                                              │
-│                                                                              │
-│                                                                              │
-│                                                                              │
-│                                                                              │
-│                                                                              │
-│                                                                              │
-│                                                                              │
-│                                                                              │
-└──────────────────────────────────────────────────────────────────────────────┘
-
-
+![LegendAnnotation](../images/views/LegendAnnotation.gif) ## [Line](xref:Terminal.Gui.Views.Line) @@ -406,73 +197,69 @@ Used by to render symbol definitions in a gr Draws a single line using the specified by . -
-┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄
+![Line](../images/views/Line.gif)
 
-
+## [LinearMultiSelector\](xref:Terminal.Gui.Views.LinearMultiSelector`1) -## [LinearRange](xref:Terminal.Gui.Views.LinearRange) +A linear range view that allows selection of zero or more options from a typed list. + + +![LinearMultiSelector-1](../images/views/LinearMultiSelector.gif) -Provides a linear range control letting the user navigate from a set of typed options in a linear manner using the keyboard or mouse. +## [LinearMultiSelector](xref:Terminal.Gui.Views.LinearMultiSelector) -
-┌┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┐
-┊           ●           ┊
-┊This is some demo text.┊
-└┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┘
+Convenience non-generic  closed over . Allows designer scenarios (e.g. `AllViewsTester`) and reflection-based instantiation to discover and create the view without supplying a type argument.
 
-
+ +![LinearMultiSelector](../images/views/LinearMultiSelector.gif) ## [LinearRange\](xref:Terminal.Gui.Views.LinearRange`1) -Provides a type-safe linear range control letting the user navigate from a set of typed options in a linear manner using the keyboard or mouse. +A linear range view representing a contiguous range of options. The current value is a whose is one of , , , or . +![LinearRange-1](../images/views/LinearRange.gif) -## [Link](xref:Terminal.Gui.Views.Link) -Displays a clickable hyperlink with optional display text and a target URL. +## [LinearRange](xref:Terminal.Gui.Views.LinearRange) +Convenience non-generic closed over . Allows designer scenarios (e.g. `AllViewsTester`) and reflection-based instantiation to discover and create the view without supplying a type argument. -
-┌┤Link├┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┐
-https://github.com/gui-cs
-└┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┘
 
-
+![LinearRange](../images/views/LinearRange.gif) -## [ListView](xref:Terminal.Gui.Views.ListView) +## [LinearRangeViewBase\](xref:Terminal.Gui.Views.LinearRangeViewBase`2) -Provides a scrollable list of data where each item can be activated to perform an action. +Abstract base for linear range views (, , ) that present a list of typed options navigable by keyboard or mouse, and expose the current selection as a strongly-typed value via . + + + +## [LinearSelector\](xref:Terminal.Gui.Views.LinearSelector`1) + +A linear range view that allows selection of a single option from a typed list of options. + + +![LinearSelector-1](../images/views/LinearSelector.gif) + + +## [LinearSelector](xref:Terminal.Gui.Views.LinearSelector) + +Convenience non-generic closed over . Allows designer scenarios (e.g. `AllViewsTester`) and reflection-based instantiation to discover and create the view without supplying a type argument. + + +![LinearSelector](../images/views/LinearSelector.gif) + + +## [Link](xref:Terminal.Gui.Views.Link) + +Displays a clickable hyperlink with optional display text and a target URL. -
-┌┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┐
-┊List Item 1                                                                   ┊
-┊List Item two                                                                 ┊
-┊List Item 3                                                                   ┊
-┊List Item Quattro                                                             ┊
-┊Last List Item                                                                ┊
-┊                                                                              ┊
-┊                                                                              ┊
-┊                                                                              ┊
-┊                                                                              ┊
-┊                                                                              ┊
-┊                                                                              ┊
-┊                                                                              ┊
-┊                                                                              ┊
-┊                                                                              ┊
-┊                                                                              ┊
-┊                                                                              ┊
-┊                                                                              ┊
-┊                                                                              ┊
-└┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┘
-
-
+![Link](../images/views/Link.gif) ## [ListView\](xref:Terminal.Gui.Views.ListView`1) @@ -480,35 +267,23 @@ Provides a scrollable list of data where each item can be activated to perform a Provides a scrollable list of data where each item can be activated to perform an action, with a strongly-typed property that returns the selected object of type T from the underlying . +![ListView-1](../images/views/ListView.gif) + + +## [ListView](xref:Terminal.Gui.Views.ListView) + +Provides a scrollable list of data where each item can be activated to perform an action. + + +![ListView](../images/views/ListView.gif) + ## [Markdown](xref:Terminal.Gui.Views.Markdown) A read-only view that renders Markdown-formatted text with styled headings, lists, links, code blocks, and more. -
-┌┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┐
-# Terminal.GuiMarkdown Sample 🚀                                             ▲┊
-
-┊Rich text with bold, italic, inline code, and strikethrough.                 
-
-## Links & Images                                                            ░┊
-┊                                                                             ░┊
-┊API Docs:                                                                    ░┊
-┊                                                                             ░┊
-Markdown for more info.                                                    ░┊
-MarkdownTable for more info.                                               ░┊
-MarkdownCodeBlock for more info.                                           ░┊
-┊                                                                             ░┊
-## Checklist                                                                 ░┊
-┊                                                                             ░┊
-• [x] Bold & italic ✅                                                       ░┊
-• [x] Code blocks 🔧                                                         ░┊
-• [ ] Emojis 🎉                                                              ░┊
-┊                                                                             ▼┊
-└┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┘
-
-
+![Markdown](../images/views/Markdown.gif) ## [MarkdownCodeBlock](xref:Terminal.Gui.Views.MarkdownCodeBlock) @@ -516,13 +291,7 @@ A read-only view that renders Markdown-formatted text with styled headings, list A read-only view that renders a single Markdown fenced code block with a dimmed background and an optional copy button. -
-┌┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┐
-using IApplication app = Application.Create(
-app.Init ();                                 
-└┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┘
-
-
+![MarkdownCodeBlock](../images/views/MarkdownCodeBlock.gif) ## [MarkdownTable](xref:Terminal.Gui.Views.MarkdownTable) @@ -530,16 +299,7 @@ A read-only view that renders a single Markdown fenced code block with a dimmed A read-only view that renders a single Markdown table with box-drawing borders via and styled header/body text with inline Markdown formatting. -
-┌┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┐
-┊┌──────────┬─────────────────────────┬────────────────────────────────────────┼
-┊│ FeatureStatus (centered)Owner
-┊├──────────┼─────────────────────────┼────────────────────────────────────────┼
-┊│ Markdown │       ✅ Totally!       │ @tig                                   ┊
-┊│ Tables   │      ✅ For sure!tig
-└┼┄┄┄┄┄┄┄┄┄┄┼┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┼┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┘
-
-
+![MarkdownTable](../images/views/MarkdownTable.gif) ## [Menu](xref:Terminal.Gui.Views.Menu) @@ -547,15 +307,7 @@ A read-only view that renders a single Markdown table with box-drawing borders v A vertically-oriented that contains items, supporting cascading sub-menus, selection tracking, and the pattern. -
-┌────────────────────────────────────┐
- Format  Text formatting options   
-View               View options  
-├────────────────────────────────────│
-About              About this demo │
-└────────────────────────────────────└
-
-
+![Menu](../images/views/Menu.gif) ## [MenuBar](xref:Terminal.Gui.Views.MenuBar) @@ -563,10 +315,7 @@ A vertically-oriented that contains that contains items. Each owns a that is displayed as a drop-down when the item is selected. Typically placed at the top of a window or view. -
- File  Edit  Help                                                               
-
-
+![MenuBar](../images/views/MenuBar.gif) ## [MenuBarItem](xref:Terminal.Gui.Views.MenuBarItem) @@ -574,12 +323,7 @@ A horizontal that contains -derived item for use in a . Each holds either a (modal, default) or an inline (non-modal) that is displayed as a drop-down menu when the item is selected. The behavior is controlled by the property. -
-┌┄┄┐
-  
-└┄┄┘
-
-
+![MenuBarItem](../images/views/MenuBarItem.gif) ## [MenuItem](xref:Terminal.Gui.Views.MenuItem) @@ -587,31 +331,23 @@ A -derived item for use in a -derived item for use in a . Displays a command, help text, and key binding and supports nested s for cascading menu hierarchies. -
-┌┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┐
- Shortcut  Shortcut help  F1 
-└┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┘
+![MenuItem](../images/views/MenuItem.gif)
 
-
+## [NumericUpDown\](xref:Terminal.Gui.Views.NumericUpDown`1) -## [NumericUpDown](xref:Terminal.Gui.Views.NumericUpDown) +Enables the user to increase or decrease a value with the mouse or keyboard in type-safe way. -Enables the user to increase or decrease an int by clicking on the up or down buttons. +![NumericUpDown-1](../images/views/NumericUpDown.gif) -
-┌┄┄┄┐
-┊▼0▲┊
-└┄┄┄┘
 
-
+## [NumericUpDown](xref:Terminal.Gui.Views.NumericUpDown) +Enables the user to increase or decrease an int by clicking on the up or down buttons. -## [NumericUpDown\](xref:Terminal.Gui.Views.NumericUpDown`1) - -Enables the user to increase or decrease a value with the mouse or keyboard in type-safe way. +![NumericUpDown](../images/views/NumericUpDown.gif) ## [OpenDialog](xref:Terminal.Gui.Views.OpenDialog) @@ -619,51 +355,23 @@ Enables the user to increase or decrease a value with the mouse or keyboard in t Provides an interactive for selecting files or directories for opening -
-┏┥Open┝━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
-┃C:\Users\Tig\s\gui-cs\Terminal.Gui\docfx                                   ┃
-┃⟦▲⟧                                                                        ┃
-┃┌────────────────────┬──────────┬──────────────────────────────┬───────────┃
-┃│Filename (▲)        │Size      │Modified                      │Type       ┃
-┃├────────────────────┼──────────┼──────────────────────────────┼───────────┃
-┃│..                  │          │                              │<Directory>┃
-┃│\_exported_templates│          │2026-04-09T04:42:42           │<Directory>┃
-┃│\_site              │          │2026-04-20T10:45:59           │<Directory>┃
-┃│\api                │          │2026-04-20T10:45:05           │<Directory>┃
-┃│\apispec            │          │2026-04-09T04:42:42           │<Directory>┃
-┃│\docs               │          │2026-04-20T10:42:55           │<Directory>┃
-┃│\images             │          │2026-04-09T04:42:42           │<Directory>┃
-┃│\includes           │          │2026-04-18T06:44:01           │<Directory>┃
-┃│\schemas            │          │2026-04-09T04:42:42           │<Directory>┃
-┃│\scripts            │          │2026-04-09T04:42:42           │<Directory>┃
-┃│aboutbox.png        │14.06 KB  │2026-04-09T04:42:42           │.png       ┃
-┃                                                                           ┃
-┃⟦►Tree⟧                                                  ⟦ Cancel ⟧⟦► OK ◄⟧┃
-┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
-
-
+![OpenDialog](../images/views/OpenDialog.gif) -## [OptionSelector](xref:Terminal.Gui.Views.OptionSelector) +## [OptionSelector\](xref:Terminal.Gui.Views.OptionSelector`1) -Provides a user interface for displaying and selecting a single item from a list of options. Each option is represented by a checkbox, but only one can be selected at a time. provides a type-safe version where a enum can be provided. +Provides a user interface for displaying and selecting a single item from a list of options in a type-safe way. Each option is represented by a checkbox, but only one can be selected at a time. provides a non-type-safe version. -
-┌┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┐
-Option 1      
-┊○ Option 2      ┊
-┊○ Third Option  ┊
-┊○ Option Quattro┊
-└┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┘
+![OptionSelector-1](../images/views/OptionSelector.gif)
 
-
+## [OptionSelector](xref:Terminal.Gui.Views.OptionSelector) -## [OptionSelector\](xref:Terminal.Gui.Views.OptionSelector`1) +Provides a user interface for displaying and selecting a single item from a list of options. Each option is represented by a checkbox, but only one can be selected at a time. provides a type-safe version where a enum can be provided. -Provides a user interface for displaying and selecting a single item from a list of options in a type-safe way. Each option is represented by a checkbox, but only one can be selected at a time. provides a non-type-safe version. +![OptionSelector](../images/views/OptionSelector.gif) ## [PopoverMenu](xref:Terminal.Gui.Views.PopoverMenu) @@ -671,42 +379,13 @@ Provides a user interface for displaying and selecting a single item from a list A -derived view that provides a cascading menu. Can be used as a context menu or a drop-down menu as part of . -
-                                                                                
-                                                                                
-                                                                                
-                                                                                
-                                                                                
-                                                                                
-                                                                                
-                                                                                
-                                                                                
-                                                                                
-                                                                                
-                                                                                
-                                                                                
-                                                                                
-                                                                                
-                                                                                
-                                                                                
-                                                                                
-                                                                                
-                                                                                
-
-
- ## [ProgressBar](xref:Terminal.Gui.Views.ProgressBar) A Progress Bar view that can indicate progress of an activity visually. -
-┌┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┐
-┊▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌                    ┊
-└┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┘
-
-
+![ProgressBar](../images/views/ProgressBar.gif) ## [Prompt\](xref:Terminal.Gui.Views.Prompt`2) @@ -714,41 +393,23 @@ A Progress Bar view that can indicate progress of an activity visually. A dialog that wraps any with Ok/Cancel buttons, extracting a typed result when the user accepts. +![Prompt-2](../images/views/Prompt-2.gif) -## [Runnable](xref:Terminal.Gui.Views.Runnable) -Base implementation of for views that can be run as blocking sessions without returning a result. +## [Runnable\](xref:Terminal.Gui.Views.Runnable`1) + +Base implementation of for views that can be run as blocking sessions. -
-┌┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┐
-┊This is some demo text.                                                       ┊
-┊                                                                              ┊
-┊                                                                              ┊
-┊                                                                              ┊
-┊                                                                              ┊
-┊                                                                              ┊
-┊                                                                              ┊
-┊                                                                              ┊
-┊                                                                              ┊
-┊                                                                              ┊
-┊                                                                              ┊
-┊                                                                              ┊
-┊                                                                              ┊
-┊                                                                              ┊
-┊                                                                              ┊
-┊                                                                              ┊
-┊                                                                              ┊
-┊                                                                              ┊
-└┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┘
-
-
+![Runnable-1](../images/views/Runnable.gif) -## [Runnable\](xref:Terminal.Gui.Views.Runnable`1) +## [Runnable](xref:Terminal.Gui.Views.Runnable) + +Base implementation of for views that can be run as blocking sessions without returning a result. -Base implementation of for views that can be run as blocking sessions. +![Runnable](../images/views/Runnable.gif) ## [RunnableWrapper\](xref:Terminal.Gui.Views.RunnableWrapper`2) @@ -762,29 +423,7 @@ Wraps any to make it runnable with a typed res Provides an interactive for selecting files or directories for saving -
-┏┥Save┝━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
-┃C:\Users\Tig\s\gui-cs\Terminal.Gui\docfx                                   ┃
-┃⟦▲⟧                                                                        ┃
-┃┌────────────────────┬──────────┬──────────────────────────────┬───────────┃
-┃│Filename (▲)        │Size      │Modified                      │Type       ┃
-┃├────────────────────┼──────────┼──────────────────────────────┼───────────┃
-┃│..                  │          │                              │<Directory>┃
-┃│\_exported_templates│          │2026-04-09T04:42:42           │<Directory>┃
-┃│\_site              │          │2026-04-20T10:45:59           │<Directory>┃
-┃│\api                │          │2026-04-20T10:45:05           │<Directory>┃
-┃│\apispec            │          │2026-04-09T04:42:42           │<Directory>┃
-┃│\docs               │          │2026-04-20T10:42:55           │<Directory>┃
-┃│\images             │          │2026-04-09T04:42:42           │<Directory>┃
-┃│\includes           │          │2026-04-18T06:44:01           │<Directory>┃
-┃│\schemas            │          │2026-04-09T04:42:42           │<Directory>┃
-┃│\scripts            │          │2026-04-09T04:42:42           │<Directory>┃
-┃│aboutbox.png        │14.06 KB  │2026-04-09T04:42:42           │.png       ┃
-┃                                                                           ┃
-┃⟦►Tree⟧                                                ⟦ Cancel ⟧⟦► Save ◄⟧┃
-┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
-
-
+![SaveDialog](../images/views/SaveDialog.gif) ## [ScrollBar](xref:Terminal.Gui.Views.ScrollBar) @@ -792,29 +431,7 @@ Provides an interactive for selecting files or Indicates the size of scrollable content and controls the position of the visible content, either vertically or horizontally. Two s are provided, one to scroll up or left and one to scroll down or right. Between the buttons is a that can be dragged to control the position of the visible content. The ScrollSlier is sized to show the proportion of the scrollable content to the size of the . -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+![ScrollBar](../images/views/ScrollBar.gif) ## [ScrollButton](xref:Terminal.Gui.Views.ScrollButton) @@ -822,12 +439,7 @@ Indicates the size of scrollable content and controls the position of the visibl A used to scroll content forward or backward. It enables mouse hold-repeat for continuous scrolling when the mouse button is held down. The button displays an arrow glyph determined by the combination of and :
OrientationDirectionGlyph
HorizontalBackward
HorizontalForward
VerticalBackward
VerticalForward
-
-┌┤Butt├┐
-Button┊
-└┄┄┄┄┄┄┘
-
-
+![ScrollButton](../images/views/ScrollButton.gif) ## [ScrollSlider](xref:Terminal.Gui.Views.ScrollSlider) @@ -835,14 +447,7 @@ A used to scroll content forward or backward. I Represents the proportion of the visible content to the Viewport in a . Can be dragged with the mouse, constrained by the size of the Viewport of it's superview. Can be oriented either vertically or horizontally. -
-┌┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┐
-██████████████████████████████████████████████████████████████████████████████
-██████████████████████████████████████████████████████████████████████████████
-██████████████████████████████████████████████████████████████████████████████
-└┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┘
-
-
+![ScrollSlider](../images/views/ScrollSlider.gif) ## [SelectorBase](xref:Terminal.Gui.Views.SelectorBase) @@ -856,12 +461,7 @@ The abstract base class for and , , , and . -
-┌┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┐
- Shortcut  Shortcut help  F1 
-└┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┘
-
-
+![Shortcut](../images/views/Shortcut.gif) ## [SpinnerView](xref:Terminal.Gui.Views.SpinnerView) @@ -869,12 +469,7 @@ Displays a command, help text, and a key binding. Serves as the foundational bui Displays a spinning glyph or combinations of glyphs to indicate progress or activity -
-┌┄┐
-┊●┊
-└┄┘
-
-
+![SpinnerView](../images/views/SpinnerView.gif) ## [StatusBar](xref:Terminal.Gui.Views.StatusBar) @@ -882,10 +477,7 @@ Displays a spinning glyph or combinations of glyphs to indicate progress or acti A status bar is a that snaps to the bottom of the Viewport displaying set of s. The 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 status bar. -
- Ctrl+Z  Quit  Quit │ F1  Help Text  Help │ F10Show/Hide │⟦ I'll Hide ⟧│Focu
-
-
+![StatusBar](../images/views/StatusBar.gif) ## [TableView](xref:Terminal.Gui.Views.TableView) @@ -893,29 +485,7 @@ A status bar is a that snaps to the bottom of Displays and enables infinite scrolling through tabular data based on a . See the TableView Deep Dive for more. -
-┌┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┐
-┊┌──────────────────┬──────────────────────┬──────┬───────────────────┬────────┊
-┊│StrCol            │DateCol               │IntCol│DoubleCol          │NullsCol┊
-┊├──────────────────┼──────────────────────┼──────┼───────────────────┼────────┊
-┊│Demo text in row 0│12/25/2000 12:00:00 AM│0     │-0.5               │-       ┊
-┊│Demo text in row 1│12/25/2001 12:00:00 AM│0     │0.40245424998107093│-       ┊
-┊│Demo text in row 2│12/25/2002 12:00:00 AM│0     │1.3973309257520972 │-       ┊
-┊│Demo text in row 3│12/25/2003 12:00:00 AM│2     │1.3318544644079424 │-       ┊
-┊│Demo text in row 4│12/25/2004 12:00:00 AM│1     │0.09525688765349649│-       ┊
-┊                                                                              ┊
-┊                                                                              ┊
-┊                                                                              ┊
-┊                                                                              ┊
-┊                                                                              ┊
-┊                                                                              ┊
-┊                                                                              ┊
-┊                                                                              ┊
-┊                                                                              ┊
-┊                                                                              ┊
-└┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┘
-
-
+![TableView](../images/views/TableView.gif) ## [Tabs](xref:Terminal.Gui.Views.Tabs) @@ -923,29 +493,7 @@ Displays and enables infinite scrolling through tabular data based on a that renders each SubView as a selectable tab with a header drawn by . The currently focused SubView is the selected (front-most) tab. -
-┌┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┐
-┊╭─────────╮──────────╮────────────╮──────────╮                                ┊
-┊│Attribute│Line Style│Tab Settings│Add/Remove│                                ┊
-┊│         ╰──────────┴────────────┴──────────┴───────────────────────────────╮┊
-┊│                                                                            │┊
-┊│┌──────────────────────────────────────────────────────────────────────────┐│┊
-┊││┌┤Foreground├───────────────────────────────────────────┬┤Style├────────┐ ││┊
-┊│││H:                                                0   │☐ Bold         │ ││┊
-┊│││S:                                                0   │☐ Faint        │ ││┊
-┊│││V:                                                100 │☐ Italic       │ ││┊
-┊│││Name: White                                            │☐ Underline    │ ││┊
-┊│││Hex:#FFFFFF  ■                                         │☐ Blink        │ ││┊
-┊││├┼Background┼───────────────────────────────────────────┤☐ Reverse      │ ││┊
-┊│││H:                                                0   │☐ Strikethrough│ ││┊
-┊│││S:                                                0   │               │ ││┊
-┊│││V:                                                0   │               │ ││┊
-┊│││Name: Black                                            │               │ ││┊
-┊│││Hex:#000000                                           │               │ ││┊
-┊╰────────────────────────────────────────────────────────────────────────────╯┊
-└┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┘
-
-
+![Tabs](../images/views/Tabs.gif) ## [TextField](xref:Terminal.Gui.Views.TextField) @@ -953,12 +501,7 @@ A tabbed container that renders each SubView a Single-line text editor. -
-┌┤Caption├┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┐
-This is a test.                                                               
-└┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┘
-
-
+![TextField](../images/views/TextField.gif) ## [TextValidateField](xref:Terminal.Gui.Views.TextValidateField) @@ -966,24 +509,15 @@ Single-line text editor. Masked text editor that validates input through a . -
-┌┤^([0-9]?[0-9]?[0-9]|1000)$├──────────────────────────────────────────────────┐
-999                                                                           
-└──────────────────────────────────────────────────────────────────────────────┘
+![TextValidateField](../images/views/TextValidateField.gif)
 
-
- -## [Editor](xref:Terminal.Gui.Views.Editor) +## [TextView](xref:Terminal.Gui.Views.TextView) Fully featured multi-line text editor. -
-┌┐
-└┘
-
-
+![TextView](../images/views/TextView.gif) ## [TimeEditor](xref:Terminal.Gui.Views.TimeEditor) @@ -991,48 +525,23 @@ Fully featured multi-line text editor. Provides time editing functionality using with culture-aware formatting. -
-┌┄┄┄┄┄┄┄┄┄┄┄┄┐
-02:30:00 PM 
-└┄┄┄┄┄┄┄┄┄┄┄┄┘
+![TimeEditor](../images/views/TimeEditor.gif)
 
-
+## [TreeView\](xref:Terminal.Gui.Views.TreeView`1) -## [TreeView](xref:Terminal.Gui.Views.TreeView) +Hierarchical tree view with expandable branches. Branch objects are dynamically determined when expanded using a user defined . See TreeView Deep Dive for more information. -Convenience implementation of generic for any tree were all nodes implement . See TreeView Deep Dive for more information. +![TreeView-1](../images/views/TreeView.gif) -
-┌┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┐
-├-Root1                                                                       
-┊│ ├─Child1.1                                                                  ┊
-┊│ └─Child1.2                                                                  ┊
-┊└-Root2                                                                       ┊
-┊  ├-Child2.1                                                                  ┊
-┊  │ ├─Child2.1.1                                                              ┊
-┊  │ └─Child2.1.2                                                              ┊
-┊  └─Child2.2                                                                  ┊
-┊                                                                              ┊
-┊                                                                              ┊
-┊                                                                              ┊
-┊                                                                              ┊
-┊                                                                              ┊
-┊                                                                              ┊
-┊                                                                              ┊
-┊                                                                              ┊
-┊                                                                              ┊
-┊                                                                              ┊
-└┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┘
-
-
+## [TreeView](xref:Terminal.Gui.Views.TreeView) -## [TreeView\](xref:Terminal.Gui.Views.TreeView`1) +Convenience implementation of generic for any tree were all nodes implement . See TreeView Deep Dive for more information. -Hierarchical tree view with expandable branches. Branch objects are dynamically determined when expanded using a user defined . See TreeView Deep Dive for more information. +![TreeView](../images/views/TreeView.gif) ## [Window](xref:Terminal.Gui.Views.Window) @@ -1040,29 +549,7 @@ Hierarchical tree view with expandable branches. Branch objects are dynamically An overlapped container for other views with a border and optional title. -
-┌──────────────────────────────────────────────────────────────────────────────┐
-│This is some demo text.                                                       │
-│                                                                              │
-│                                                                              │
-│                                                                              │
-│                                                                              │
-│                                                                              │
-│                                                                              │
-│                                                                              │
-│                                                                              │
-│                                                                              │
-│                                                                              │
-│                                                                              │
-│                                                                              │
-│                                                                              │
-│                                                                              │
-│                                                                              │
-│                                                                              │
-│                                                                              │
-└──────────────────────────────────────────────────────────────────────────────┘
-
-
+![Window](../images/views/Window.gif) ## [Wizard](xref:Terminal.Gui.Views.Wizard) @@ -1070,24 +557,7 @@ An overlapped container for other views with a border and optional title. A multi-step dialog for collecting related data across sequential steps. -
-┌┤Wizard Title - Example Step├┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┐
-┊Enter Text:                                     This is some help text  ┊
-┊                                                for the WizardStep.     ┊
-┊    A List: ┌╌╌╌╌╌╌╌╌┐                          You can provide         ┊
-┊            ┆Item 1  instructions or         ┊
-┊            ┆Item 2  ┆                          information to guide the┊
-┊            ┆Item 3  ┆                          user through this step  ┊
-┊            ┆Item 4  ┆                          of the wizard.          ┊
-┊            ┆Item 5  ┆                                                  ┊
-┊            └╌╌╌╌╌╌╌╌┘                                                  ┊
-┊                                                                        ┊
-┊                                                                        ┊
-┊                                                                        ┊
-┊                                                           ⟦► Next... ◄⟧┊
-└┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┘
-
-
+![Wizard](../images/views/Wizard.gif) ## [WizardStep](xref:Terminal.Gui.Views.WizardStep) @@ -1095,27 +565,5 @@ A multi-step dialog for collecting related data across sequential steps. A single step in a . Can contain arbitrary s and display help text in the right . -
-┌┤Example Step├┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┐
-Enter Text:                                           This is some help text  
-for the WizardStep.     
-A List: ┌╌╌╌╌╌╌╌╌┐                                You can provide         
-┊            ┆Item 1  instructions or         
-┊            ┆Item 2  ┆                                information to guide the
-┊            ┆Item 3  ┆                                user through this step  
-┊            ┆Item 4  ┆                                of the wizard.          
-┊            ┆Item 5  ┆                                                        
-┊            └╌╌╌╌╌╌╌╌┘                                                        
-                        
-                        
-                        
-                        
-                        
-                        
-                        
-                        
-                        
-└┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┘
-
-
+![WizardStep](../images/views/WizardStep.gif) diff --git a/docfx/images/views/AttributePicker.gif b/docfx/images/views/AttributePicker.gif index 8ef3d70e08..f6147bc2ac 100644 Binary files a/docfx/images/views/AttributePicker.gif and b/docfx/images/views/AttributePicker.gif differ diff --git a/docfx/images/views/Bar.gif b/docfx/images/views/Bar.gif index c853f62eb1..f713ab320a 100644 Binary files a/docfx/images/views/Bar.gif and b/docfx/images/views/Bar.gif differ diff --git a/docfx/images/views/Button.gif b/docfx/images/views/Button.gif index 873ebb2bee..3ac6a572be 100644 Binary files a/docfx/images/views/Button.gif and b/docfx/images/views/Button.gif differ diff --git a/docfx/images/views/CharMap.gif b/docfx/images/views/CharMap.gif index 4eb01b3882..a3c3d71eef 100644 Binary files a/docfx/images/views/CharMap.gif and b/docfx/images/views/CharMap.gif differ diff --git a/docfx/images/views/CheckBox.gif b/docfx/images/views/CheckBox.gif index 5834fd7fdd..f9bbdb33e9 100644 Binary files a/docfx/images/views/CheckBox.gif and b/docfx/images/views/CheckBox.gif differ diff --git a/docfx/images/views/Code.gif b/docfx/images/views/Code.gif index ce1e2c1ea8..8251a2753c 100644 Binary files a/docfx/images/views/Code.gif and b/docfx/images/views/Code.gif differ diff --git a/docfx/images/views/ColorPicker.gif b/docfx/images/views/ColorPicker.gif index 4babe20c0d..5cde59553f 100644 Binary files a/docfx/images/views/ColorPicker.gif and b/docfx/images/views/ColorPicker.gif differ diff --git a/docfx/images/views/ColorPicker16.gif b/docfx/images/views/ColorPicker16.gif new file mode 100644 index 0000000000..18d518424f Binary files /dev/null and b/docfx/images/views/ColorPicker16.gif differ diff --git a/docfx/images/views/DateEditor.gif b/docfx/images/views/DateEditor.gif index a7de7aba9d..6a09063890 100644 Binary files a/docfx/images/views/DateEditor.gif and b/docfx/images/views/DateEditor.gif differ diff --git a/docfx/images/views/DatePicker.gif b/docfx/images/views/DatePicker.gif index 97ddc7ca8c..baf3fb35d3 100644 Binary files a/docfx/images/views/DatePicker.gif and b/docfx/images/views/DatePicker.gif differ diff --git a/docfx/images/views/Dialog.gif b/docfx/images/views/Dialog.gif index e780a05e0f..5c56e7894f 100644 Binary files a/docfx/images/views/Dialog.gif and b/docfx/images/views/Dialog.gif differ diff --git a/docfx/images/views/DropDownList.gif b/docfx/images/views/DropDownList.gif index 764c066830..27a22228b8 100644 Binary files a/docfx/images/views/DropDownList.gif and b/docfx/images/views/DropDownList.gif differ diff --git a/docfx/images/views/FileDialog.gif b/docfx/images/views/FileDialog.gif index 3f89f5c07d..d51378dc94 100644 Binary files a/docfx/images/views/FileDialog.gif and b/docfx/images/views/FileDialog.gif differ diff --git a/docfx/images/views/FlagSelector.gif b/docfx/images/views/FlagSelector.gif index 54c25d11ce..6d85175e9a 100644 Binary files a/docfx/images/views/FlagSelector.gif and b/docfx/images/views/FlagSelector.gif differ diff --git a/docfx/images/views/FrameView.gif b/docfx/images/views/FrameView.gif index d2cfed551f..5bf8770eb4 100644 Binary files a/docfx/images/views/FrameView.gif and b/docfx/images/views/FrameView.gif differ diff --git a/docfx/images/views/GraphView.gif b/docfx/images/views/GraphView.gif index a160a00756..2a8ef41938 100644 Binary files a/docfx/images/views/GraphView.gif and b/docfx/images/views/GraphView.gif differ diff --git a/docfx/images/views/HexView.gif b/docfx/images/views/HexView.gif index 39301ef0ae..ee16e9075c 100644 Binary files a/docfx/images/views/HexView.gif and b/docfx/images/views/HexView.gif differ diff --git a/docfx/images/views/ImageView.gif b/docfx/images/views/ImageView.gif new file mode 100644 index 0000000000..b9b6c0466e Binary files /dev/null and b/docfx/images/views/ImageView.gif differ diff --git a/docfx/images/views/Label.gif b/docfx/images/views/Label.gif index ece93241bb..1e2f12ea8a 100644 Binary files a/docfx/images/views/Label.gif and b/docfx/images/views/Label.gif differ diff --git a/docfx/images/views/LegendAnnotation.gif b/docfx/images/views/LegendAnnotation.gif new file mode 100644 index 0000000000..05d94dbd5f Binary files /dev/null and b/docfx/images/views/LegendAnnotation.gif differ diff --git a/docfx/images/views/Line.gif b/docfx/images/views/Line.gif index 03d7ad5103..2a6eb1f5bc 100644 Binary files a/docfx/images/views/Line.gif and b/docfx/images/views/Line.gif differ diff --git a/docfx/images/views/LinearMultiSelector.gif b/docfx/images/views/LinearMultiSelector.gif new file mode 100644 index 0000000000..2b5e8369e7 Binary files /dev/null and b/docfx/images/views/LinearMultiSelector.gif differ diff --git a/docfx/images/views/LinearRange.gif b/docfx/images/views/LinearRange.gif new file mode 100644 index 0000000000..61f4f61d34 Binary files /dev/null and b/docfx/images/views/LinearRange.gif differ diff --git a/docfx/images/views/LinearSelector.gif b/docfx/images/views/LinearSelector.gif new file mode 100644 index 0000000000..0c2485fed2 Binary files /dev/null and b/docfx/images/views/LinearSelector.gif differ diff --git a/docfx/images/views/Link.gif b/docfx/images/views/Link.gif index 4ae9f64cf0..47f8f1db92 100644 Binary files a/docfx/images/views/Link.gif and b/docfx/images/views/Link.gif differ diff --git a/docfx/images/views/ListView.gif b/docfx/images/views/ListView.gif index 4924952138..e85c42fcf5 100644 Binary files a/docfx/images/views/ListView.gif and b/docfx/images/views/ListView.gif differ diff --git a/docfx/images/views/Markdown.gif b/docfx/images/views/Markdown.gif index d835312c3b..ba202614a0 100644 Binary files a/docfx/images/views/Markdown.gif and b/docfx/images/views/Markdown.gif differ diff --git a/docfx/images/views/MarkdownCodeBlock.gif b/docfx/images/views/MarkdownCodeBlock.gif new file mode 100644 index 0000000000..924282ad13 Binary files /dev/null and b/docfx/images/views/MarkdownCodeBlock.gif differ diff --git a/docfx/images/views/MarkdownTable.gif b/docfx/images/views/MarkdownTable.gif new file mode 100644 index 0000000000..93d0c8f7fa Binary files /dev/null and b/docfx/images/views/MarkdownTable.gif differ diff --git a/docfx/images/views/Menu.gif b/docfx/images/views/Menu.gif new file mode 100644 index 0000000000..f12d01fd91 Binary files /dev/null and b/docfx/images/views/Menu.gif differ diff --git a/docfx/images/views/MenuBar.gif b/docfx/images/views/MenuBar.gif index bc2c6b193f..3e0e91120e 100644 Binary files a/docfx/images/views/MenuBar.gif and b/docfx/images/views/MenuBar.gif differ diff --git a/docfx/images/views/MenuBarItem.gif b/docfx/images/views/MenuBarItem.gif new file mode 100644 index 0000000000..42cb4fe8c9 Binary files /dev/null and b/docfx/images/views/MenuBarItem.gif differ diff --git a/docfx/images/views/MenuItem.gif b/docfx/images/views/MenuItem.gif new file mode 100644 index 0000000000..463871d8f4 Binary files /dev/null and b/docfx/images/views/MenuItem.gif differ diff --git a/docfx/images/views/NumericUpDown.gif b/docfx/images/views/NumericUpDown.gif index 07daae8d3a..8f26ba3708 100644 Binary files a/docfx/images/views/NumericUpDown.gif and b/docfx/images/views/NumericUpDown.gif differ diff --git a/docfx/images/views/OpenDialog.gif b/docfx/images/views/OpenDialog.gif new file mode 100644 index 0000000000..7dc9a510d2 Binary files /dev/null and b/docfx/images/views/OpenDialog.gif differ diff --git a/docfx/images/views/OptionSelector.gif b/docfx/images/views/OptionSelector.gif index 8b378f12dd..8043fe2020 100644 Binary files a/docfx/images/views/OptionSelector.gif and b/docfx/images/views/OptionSelector.gif differ diff --git a/docfx/images/views/ProgressBar.gif b/docfx/images/views/ProgressBar.gif index 4943b22d19..3c1a6f87bc 100644 Binary files a/docfx/images/views/ProgressBar.gif and b/docfx/images/views/ProgressBar.gif differ diff --git a/docfx/images/views/Prompt-2.gif b/docfx/images/views/Prompt-2.gif new file mode 100644 index 0000000000..2ab06b0961 Binary files /dev/null and b/docfx/images/views/Prompt-2.gif differ diff --git a/docfx/images/views/Runnable.gif b/docfx/images/views/Runnable.gif new file mode 100644 index 0000000000..2e88e16fee Binary files /dev/null and b/docfx/images/views/Runnable.gif differ diff --git a/docfx/images/views/SaveDialog.gif b/docfx/images/views/SaveDialog.gif new file mode 100644 index 0000000000..807c012165 Binary files /dev/null and b/docfx/images/views/SaveDialog.gif differ diff --git a/docfx/images/views/ScrollBar.gif b/docfx/images/views/ScrollBar.gif index d6e1abee7a..b11b5eca46 100644 Binary files a/docfx/images/views/ScrollBar.gif and b/docfx/images/views/ScrollBar.gif differ diff --git a/docfx/images/views/ScrollButton.gif b/docfx/images/views/ScrollButton.gif new file mode 100644 index 0000000000..291cf6b6dc Binary files /dev/null and b/docfx/images/views/ScrollButton.gif differ diff --git a/docfx/images/views/ScrollSlider.gif b/docfx/images/views/ScrollSlider.gif new file mode 100644 index 0000000000..a1d4a57680 Binary files /dev/null and b/docfx/images/views/ScrollSlider.gif differ diff --git a/docfx/images/views/Shortcut.gif b/docfx/images/views/Shortcut.gif index f62d53cd16..463871d8f4 100644 Binary files a/docfx/images/views/Shortcut.gif and b/docfx/images/views/Shortcut.gif differ diff --git a/docfx/images/views/SpinnerView.gif b/docfx/images/views/SpinnerView.gif index da4175584b..aae6afcae8 100644 Binary files a/docfx/images/views/SpinnerView.gif and b/docfx/images/views/SpinnerView.gif differ diff --git a/docfx/images/views/StatusBar.gif b/docfx/images/views/StatusBar.gif index 8e29d37efb..856a54c309 100644 Binary files a/docfx/images/views/StatusBar.gif and b/docfx/images/views/StatusBar.gif differ diff --git a/docfx/images/views/TableView.gif b/docfx/images/views/TableView.gif index af83244fec..e425b25057 100644 Binary files a/docfx/images/views/TableView.gif and b/docfx/images/views/TableView.gif differ diff --git a/docfx/images/views/Tabs.gif b/docfx/images/views/Tabs.gif index 5e37626496..4e03db9afd 100644 Binary files a/docfx/images/views/Tabs.gif and b/docfx/images/views/Tabs.gif differ diff --git a/docfx/images/views/TextField.gif b/docfx/images/views/TextField.gif index 5e628641eb..5b48f9063a 100644 Binary files a/docfx/images/views/TextField.gif and b/docfx/images/views/TextField.gif differ diff --git a/docfx/images/views/TextValidateField.gif b/docfx/images/views/TextValidateField.gif index 2d8bdc9d47..f914d8a46e 100644 Binary files a/docfx/images/views/TextValidateField.gif and b/docfx/images/views/TextValidateField.gif differ diff --git a/docfx/images/views/TextView.gif b/docfx/images/views/TextView.gif index eb70284043..5f763d5d3a 100644 Binary files a/docfx/images/views/TextView.gif and b/docfx/images/views/TextView.gif differ diff --git a/docfx/images/views/TimeEditor.gif b/docfx/images/views/TimeEditor.gif index 656d42f72b..d2b19162c5 100644 Binary files a/docfx/images/views/TimeEditor.gif and b/docfx/images/views/TimeEditor.gif differ diff --git a/docfx/images/views/TreeView.gif b/docfx/images/views/TreeView.gif index 0db66f3227..08baa02e40 100644 Binary files a/docfx/images/views/TreeView.gif and b/docfx/images/views/TreeView.gif differ diff --git a/docfx/images/views/Window.gif b/docfx/images/views/Window.gif index f48dedbd5e..6c6665375c 100644 Binary files a/docfx/images/views/Window.gif and b/docfx/images/views/Window.gif differ diff --git a/docfx/images/views/Wizard.gif b/docfx/images/views/Wizard.gif index 5a65385e22..71de83e6bf 100644 Binary files a/docfx/images/views/Wizard.gif and b/docfx/images/views/Wizard.gif differ diff --git a/docfx/images/views/WizardStep.gif b/docfx/images/views/WizardStep.gif new file mode 100644 index 0000000000..27f51c5452 Binary files /dev/null and b/docfx/images/views/WizardStep.gif differ diff --git a/docfx/scripts/OutputView/OutputView.cs b/docfx/scripts/OutputView/OutputView.cs index d5816d09fb..7226a237ea 100644 --- a/docfx/scripts/OutputView/OutputView.cs +++ b/docfx/scripts/OutputView/OutputView.cs @@ -34,6 +34,8 @@ var addBorderFrame = false; var live = false; var queryKeyStrokes = false; +var cols = 80; +var rows = 20; for (var i = 0; i < commandArgs.Length; i++) { @@ -69,6 +71,22 @@ { queryKeyStrokes = true; } + else if (commandArgs [i].StartsWith ("--cols=", StringComparison.OrdinalIgnoreCase)) + { + cols = int.Parse (commandArgs [i] ["--cols=".Length..]); + } + else if (commandArgs [i] == "--cols" && i + 1 < commandArgs.Length) + { + cols = int.Parse (commandArgs [i + 1]); + } + else if (commandArgs [i].StartsWith ("--rows=", StringComparison.OrdinalIgnoreCase)) + { + rows = int.Parse (commandArgs [i] ["--rows=".Length..]); + } + else if (commandArgs [i] == "--rows" && i + 1 < commandArgs.Length) + { + rows = int.Parse (commandArgs [i + 1]); + } } if (string.IsNullOrEmpty (viewName)) @@ -91,7 +109,14 @@ return; } - View? view = (View?)Activator.CreateInstance (type); + View? view = ViewDemoWindow.CreateView (type); + + if (view is null) + { + Console.WriteLine (""); + + return; + } if (view is IDesignable designable) { @@ -109,22 +134,15 @@ ViewDemoWindow.ViewName = viewName; ViewDemoWindow.AddBorderFrame = addBorderFrame; ViewDemoWindow.IsLiveMode = live; +ViewDemoWindow.Cols = cols; +ViewDemoWindow.Rows = rows; IApplication app = Application.Create (); app.Init (DriverRegistry.Names.ANSI); if (live) { - // Live mode: run normally so tuirec can record the interaction. - // Write a dot colored to match the agg monokai theme background (#272822 = RGB 39,40,34) - // before TG renders, then briefly pause. This creates 2 visually distinct frames for - // tuirec's --trim without any visible preroll artifact. 50ms is enough for a distinct - // timestamp but too short to be perceptible in the GIF. - Console.Write ("\x1b[2J\x1b[H\x1b[38;2;39;40;34m.\x1b[0m"); - Console.Out.Flush (); - Thread.Sleep (50); - - app.Driver!.SetScreenSize (80, 20); + app.Driver!.SetScreenSize (cols, rows); app.Run (); app.Dispose (); } @@ -133,7 +151,7 @@ // Original mode: stop after first iteration and capture output app.StopAfterFirstIteration = true; app.Driver!.Force16Colors = !ansi; - app.Driver!.SetScreenSize (80, 20); + app.Driver!.SetScreenSize (cols, rows); var result = app.Run ().GetResult (); @@ -179,12 +197,13 @@ internal class ViewDemoWindow : Runnable { public static string? ViewName { get; set; } public static bool IsLiveMode { get; set; } + public static int Cols { get; set; } = 80; + public static int Rows { get; set; } = 20; public ViewDemoWindow () { - // Limit the size of the window to 80x20, which works good for most views - Width = 80; - Height = 20; + Width = Cols; + Height = Rows; if (!IsLiveMode) { @@ -207,8 +226,10 @@ public ViewDemoWindow () /// public static Type? ResolveViewType (string viewName) { + string normalizedViewName = NormalizeDocfxGenericName (viewName); + // Try direct resolution first - Type? type = Type.GetType ($"Terminal.Gui.Views.{viewName}, Terminal.Gui", false, true); + Type? type = Type.GetType ($"Terminal.Gui.Views.{normalizedViewName}, Terminal.Gui", false, true); if (type is not null) { @@ -222,7 +243,26 @@ public ViewDemoWindow () .FirstOrDefault (t => t.IsClass && !t.IsAbstract && t.IsSubclassOf (typeof (View)) - && string.Equals (t.Name, viewName, StringComparison.OrdinalIgnoreCase)); + && string.Equals (t.Name, normalizedViewName, StringComparison.OrdinalIgnoreCase)); + } + + private static string NormalizeDocfxGenericName (string viewName) + { + int suffixSeparator = viewName.LastIndexOf ('-'); + + if (suffixSeparator < 0) + { + return viewName; + } + + string suffix = viewName [(suffixSeparator + 1)..]; + + if (!int.TryParse (suffix, out _)) + { + return viewName; + } + + return $"{viewName [..suffixSeparator]}`{suffix}"; } /// @@ -261,13 +301,21 @@ protected override void OnIsRunningChanged (bool newIsRunning) Add (view); Layout (); - App?.Driver?.SetScreenSize (view.Frame.Width, view.Frame.Height); + + if (!IsLiveMode) + { + App?.Driver?.SetScreenSize (view.Frame.Width, view.Frame.Height); + } } - private static View? CreateView (Type type) + public static View? CreateView (Type type) { + if (type.IsGenericTypeDefinition && type == typeof (Prompt<,>)) + { + type = type.MakeGenericType (typeof (TextField), typeof (string)); + } // If we are to create a generic Type - if (type.IsGenericType) + else if (type.IsGenericTypeDefinition) { // For each of the arguments List typeArguments = new (); @@ -298,11 +346,15 @@ protected override void OnIsRunningChanged (bool newIsRunning) } // Instantiate view - var view = (View)Activator.CreateInstance (type)!; + View view = (View)Activator.CreateInstance (type)!; - if (view is IDesignable designable) + if (view.GetType ().IsGenericType && view.GetType ().GetGenericTypeDefinition () == typeof (Prompt<,>)) + { + ConfigurePrompt (view); + } + else if (view is IDesignable designable) { - var demoText = "This is some demo text."; + string demoText = "This is some demo text."; designable.EnableForDesign (ref demoText); } else @@ -310,11 +362,33 @@ protected override void OnIsRunningChanged (bool newIsRunning) view.Text = "This is some demo text."; } + if (view is FileDialog) + { + view.Width = Dim.Fill (); + view.Height = Dim.Fill (); + } + //view.Title = $"View: {type.Name}"; return view; } + private static void ConfigurePrompt (View view) + { + view.Title = "Prompt"; + + System.Reflection.MethodInfo? getWrappedView = view.GetType ().GetMethod ("GetWrappedView"); + View? wrappedView = getWrappedView?.Invoke (view, null) as View; + + if (wrappedView is null) + { + return; + } + + wrappedView.Text = "What is your name?"; + wrappedView.Width = 32; + } + private static void ViewInitialized (object? sender, EventArgs e) { if (sender is not View view) diff --git a/docfx/scripts/generate-views-doc.ps1 b/docfx/scripts/generate-views-doc.ps1 index 28a0bde058..90f29b0c37 100644 --- a/docfx/scripts/generate-views-doc.ps1 +++ b/docfx/scripts/generate-views-doc.ps1 @@ -99,8 +99,39 @@ foreach ($file in $viewFiles) { # Record GIF with tuirec $gifOutput = "" $viewNameClean = $file.BaseName -replace "^Terminal\.Gui\.Views\.", "" + $cols = 80 + $rows = 20 + $addFrame = $true + $startupDelay = 400 + $outputViewArgs = "$outputViewDll,--view=$viewNameClean,--live" + $genericBaseName = $null + + if ($viewNameClean -match "^(.+)-\d+$") { + $genericBaseName = $matches[1] + } + + if ($viewNameClean -in @("ScrollBar", "SpinnerView")) { + $addFrame = $false + } + + if ($addFrame) { + $outputViewArgs = "$outputViewArgs,--frame" + } + + if ($viewNameClean -in @("FileDialog", "OpenDialog", "SaveDialog")) { + $cols = 94 + $rows = 23 + } + + $outputViewArgs = "$outputViewArgs,--cols=$cols,--rows=$rows" - if (-not $SkipGifs) { + if ($genericBaseName -and $viewNameClean -ne "Prompt-2" -and (Test-Path (Join-Path $ImagePath "$genericBaseName.gif"))) { + Write-Host " Reusing $genericBaseName GIF for $viewNameClean..." -ForegroundColor Gray + $gifOutput = "`n![${viewNameClean}](../images/views/${genericBaseName}.gif)`n" + } elseif ($SkipGifs -and (Test-Path (Join-Path $ImagePath "$viewNameClean.gif"))) { + Write-Host " Reusing existing GIF for $viewNameClean..." -ForegroundColor Gray + $gifOutput = "`n![${viewNameClean}](../images/views/${viewNameClean}.gif)`n" + } elseif (-not $SkipGifs) { try { # Query the view's demo keystrokes Write-Host " Querying keystrokes for $viewNameClean..." -ForegroundColor Gray @@ -122,41 +153,22 @@ foreach ($file in $viewFiles) { Write-Host " Recording $viewNameClean with tuirec..." -ForegroundColor Cyan Write-Host " Keystrokes: $ks" -ForegroundColor Gray - # Always use --trim to remove preroll/postroll (v0.4.2+) tuirec record ` --binary dotnet ` - --args "$outputViewDll,--view=$viewNameClean,--live,--frame" ` + --args $outputViewArgs ` --name $viewNameClean ` --title $viewNameClean ` --keystrokes $ks ` - --startup-delay 0 ` + --startup-delay $startupDelay ` --drain 1000 ` --trim ` --mouse-pointer none ` - --cols 80 --rows 20 ` + --cols $cols --rows $rows ` --output $gifFile ` --verbosity quiet - # Retry without trim if validation failed (should not happen now that - # OutputView writes a clear-screen baseline frame before rendering) - if ($LASTEXITCODE -ne 0) { - Write-Host " WARNING: --trim failed (exit $LASTEXITCODE), retrying without trim..." -ForegroundColor Yellow - tuirec record ` - --binary dotnet ` - --args "$outputViewDll,--view=$viewNameClean,--live,--frame" ` - --name $viewNameClean ` - --title $viewNameClean ` - --keystrokes $ks ` - --startup-delay 0 ` - --drain 1000 ` - --trim=false ` - --mouse-pointer none ` - --cols 80 --rows 20 ` - --output $gifFile ` - --verbosity quiet - } - - if ($LASTEXITCODE -eq 0 -and (Test-Path $gifFile)) { + if ((Test-Path $gifFile)) { + $global:LASTEXITCODE = 0 $gifSize = (Get-Item $gifFile).Length Write-Host " OK ($gifSize bytes)" -ForegroundColor Green $gifOutput = "`n![${viewNameClean}](../images/views/${viewNameClean}.gif)`n"