mirror of
https://github.com/gui-cs/Terminal.Gui.git
synced 2026-01-02 01:03:29 +01:00
* Pulled from v2_release * Refactor migration guide for Terminal.Gui v2 Restructured and expanded the migration guide to provide a comprehensive resource for transitioning from Terminal.Gui v1 to v2. Key updates include: - Added a Table of Contents for easier navigation. - Summarized major architectural changes in v2, including the instance-based application model, IRunnable architecture, and 24-bit TrueColor support. - Updated examples to reflect new patterns, such as initializers replacing constructors and explicit disposal using `IDisposable`. - Documented changes to the layout system, including the removal of `Absolute`/`Computed` styles and the introduction of `Viewport`. - Standardized event patterns to use `object sender, EventArgs args`. - Detailed updates to the Keyboard, Mouse, and Navigation APIs, including configurable key bindings and viewport-relative mouse coordinates. - Replaced legacy components like `ScrollView` and `ContextMenu` with built-in scrolling and `PopoverMenu`. - Clarified disposal rules and introduced best practices for resource management. - Provided a complete migration example and a summary of breaking changes. This update aims to simplify the migration process by addressing breaking changes, introducing new features, and aligning with modern .NET conventions. * Refactor to use Application.Instance for lifecycle management Replaced all occurrences of `ApplicationImpl.Instance` with the new `Application.Instance` property across the codebase to align with the updated application lifecycle model. Encapsulated the `ApplicationImpl` class by making it `internal`, ensuring it is no longer directly accessible outside its assembly. Introduced the `[Obsolete]` `Application.Instance` property as a backward-compatible singleton for the legacy static `Application` model, while encouraging the use of `Application.Create()` for new code. Updated `MessageBox` methods to use `Application.Instance` for consistent modal dialog management. Improved documentation to reflect these changes and emphasize the transition to the instance-based application model. Performed code cleanup in multiple classes to ensure consistency and maintainability. These changes maintain backward compatibility while preparing the codebase for the eventual removal of the legacy `ApplicationImpl` class. * Fix doc bug * - Removed obsolete `.cd` class diagram files. - Introduced `IRunnable` interface for decoupling component execution. - Added fluent API for running dialogs and retrieving results. - Enhanced `View` with `App` and `Driver` properties for better decoupling. - Improved testability with support for mock and real applications. - Implemented `IDisposable` for proper resource cleanup. - Replaced `RunnableSessionStack` with `SessionStack` for session management. - Updated driver architecture to align with the new model. - Scoped `IKeyboard` to application contexts for modularity. - Updated documentation with migration strategies and best practices. These changes modernize the library, improve maintainability, and align with current development practices.
This commit is contained in:
@@ -10,6 +10,22 @@ namespace Terminal.Gui.App;
|
||||
|
||||
public static partial class Application // Lifecycle (Init/Shutdown)
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the singleton <see cref="IApplication"/> instance used by the legacy static Application model.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <para>
|
||||
/// For new code, prefer using <see cref="Create"/> to get an instance-based application.
|
||||
/// This property is provided for backward compatibility and internal use.
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// This property returns the same singleton instance used by the legacy static <see cref="Application"/>
|
||||
/// methods like <see cref="Init"/> and <see cref="Run(IRunnable, Func{Exception, bool}?)"/>.
|
||||
/// </para>
|
||||
/// </remarks>
|
||||
[Obsolete ("The legacy static Application object is going away. Use Application.Create() for new code.")]
|
||||
public static IApplication Instance => ApplicationImpl.Instance;
|
||||
|
||||
/// <summary>
|
||||
/// Creates a new <see cref="IApplication"/> instance.
|
||||
/// </summary>
|
||||
@@ -49,7 +65,7 @@ public static partial class Application // Lifecycle (Init/Shutdown)
|
||||
internal set => ApplicationImpl.Instance.MainThreadId = value;
|
||||
}
|
||||
|
||||
/// <inheritdoc cref="IApplication.Dispose"/>
|
||||
/// <inheritdoc cref="IDisposable.Dispose"/>
|
||||
[Obsolete ("The legacy static Application object is going away.")]
|
||||
public static void Shutdown () => ApplicationImpl.Instance.Dispose ();
|
||||
|
||||
|
||||
@@ -1,117 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ClassDiagram MajorVersion="1" MinorVersion="1">
|
||||
<Class Name="Terminal.Gui.App.Application">
|
||||
<Position X="2.25" Y="1.5" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>gEK4FIgQOAQIuhQeBwoUgSCgAAJL0AACESIKoAiBWw8=</HashCode>
|
||||
<FileName>App\Application.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="Terminal.Gui.App.ApplicationNavigation" Collapsed="true">
|
||||
<Position X="14.75" Y="2.75" Width="2" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AABAAAAAAABCAAAAAAAAAAAAAAAAIgIAAAAAAAAAAAA=</HashCode>
|
||||
<FileName>App\ApplicationNavigation.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="Terminal.Gui.App.IterationEventArgs" Collapsed="true">
|
||||
<Position X="17" Y="3" Width="2" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
|
||||
<FileName>App\IterationEventArgs.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="Terminal.Gui.App.MainLoop" Collapsed="true" BaseTypeListCollapsed="true">
|
||||
<Position X="11.25" Y="3.75" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAACAAAAAAAAAAAAAACBAAEAAIIAIAgAAAEAI=</HashCode>
|
||||
<FileName>App\MainLoop.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
<Lollipop Position="0.2" Collapsed="true" />
|
||||
</Class>
|
||||
<Class Name="Terminal.Gui.App.MainLoopSyncContext" Collapsed="true">
|
||||
<Position X="13" Y="3.75" Width="2" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAgAAAAAAAAAAAEAAAAAACAAAAAAAAAAAAAAAAAA=</HashCode>
|
||||
<FileName>App\MainLoopSyncContext.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="Terminal.Gui.App.SessionToken" Collapsed="true" BaseTypeListCollapsed="true">
|
||||
<Position X="15.25" Y="4" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAACACAgAAAAAAAAAAAAAAAAACQAAAAAAAAAA=</HashCode>
|
||||
<FileName>App\SessionToken.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
<Lollipop Position="0.2" Collapsed="true" />
|
||||
</Class>
|
||||
<Class Name="Terminal.Gui.App.SessionTokenEventArgs" Collapsed="true">
|
||||
<Position X="17" Y="4" Width="2" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAA=</HashCode>
|
||||
<FileName>App\SessionTokenEventArgs.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="Terminal.Gui.App.Timeout" Collapsed="true">
|
||||
<Position X="11.25" Y="4.75" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAQAA=</HashCode>
|
||||
<FileName>App\Timeout.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="Terminal.Gui.App.TimeoutEventArgs" Collapsed="true">
|
||||
<Position X="13" Y="4.75" Width="2" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAAAAAAAAAAAAAAAAAACAIAAAAAAAAAAAA=</HashCode>
|
||||
<FileName>App\TimeoutEventArgs.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="Terminal.Gui.App.ApplicationImpl" BaseTypeListCollapsed="true">
|
||||
<Position X="4" Y="5" Width="2" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AABgAAAAIAAIAgQUAAAAAQAAAAAAAAAAQAAKgAAAEAI=</HashCode>
|
||||
<FileName>App\ApplicationImpl.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
<Lollipop Position="0.2" />
|
||||
</Class>
|
||||
<Class Name="Terminal.Gui.App.MouseGrabHandler" Collapsed="true">
|
||||
<Position X="6.25" Y="9.25" Width="2" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>BAAgAAAAgABAAoAAAAAAABAAACEAAAAAAABAAgAAAAA=</HashCode>
|
||||
<FileName>App\MouseGrabHandler.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
<Lollipop Position="0.2" />
|
||||
</Class>
|
||||
<Interface Name="Terminal.Gui.App.IMainLoopDriver">
|
||||
<Position X="11.25" Y="1.5" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAACAAAAAQAAAAABAAAAAAAEAAAAAAAAAAAAAA=</HashCode>
|
||||
<FileName>App\MainLoop.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Interface>
|
||||
<Interface Name="Terminal.Gui.App.IApplication">
|
||||
<Position X="4" Y="1.5" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAgAAAAAAAIAgQUAAAAAQAAAAAAAAAAAAAKgAAAEAI=</HashCode>
|
||||
<FileName>App\IApplication.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
<ShowAsAssociation>
|
||||
<Property Name="MouseGrabHandler" />
|
||||
<Property Name="TimedEvents" />
|
||||
</ShowAsAssociation>
|
||||
</Interface>
|
||||
<Interface Name="Terminal.Gui.App.IMouseGrabHandler">
|
||||
<Position X="7" Y="1.5" Width="2" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>BAAgAAAAAAAAAgAAAAAAABAAACEAAAAAAAAAAgAAAAA=</HashCode>
|
||||
<FileName>App\IMouseGrabHandler.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Interface>
|
||||
<Interface Name="Terminal.Gui.App.ITimedEvents">
|
||||
<Position X="7" Y="4.5" Width="2" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>BAAAIAAAAQAAAAAQACAAAIBAAQAAAAAAAAAIgAAAAAA=</HashCode>
|
||||
<FileName>App\ITimedEvents.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Interface>
|
||||
<Font Name="Segoe UI" Size="9" />
|
||||
</ClassDiagram>
|
||||
@@ -2,7 +2,7 @@ using System.Collections.Concurrent;
|
||||
|
||||
namespace Terminal.Gui.App;
|
||||
|
||||
public partial class ApplicationImpl
|
||||
internal partial class ApplicationImpl
|
||||
{
|
||||
/// <inheritdoc/>
|
||||
public IDriver? Driver { get; set; }
|
||||
|
||||
@@ -3,7 +3,7 @@ using System.Diagnostics.CodeAnalysis;
|
||||
|
||||
namespace Terminal.Gui.App;
|
||||
|
||||
public partial class ApplicationImpl
|
||||
internal partial class ApplicationImpl
|
||||
{
|
||||
/// <inheritdoc/>
|
||||
public int? MainThreadId { get; set; }
|
||||
|
||||
@@ -3,7 +3,7 @@ using System.Diagnostics.CodeAnalysis;
|
||||
|
||||
namespace Terminal.Gui.App;
|
||||
|
||||
public partial class ApplicationImpl
|
||||
internal partial class ApplicationImpl
|
||||
{
|
||||
// Lock object to protect session stack operations and cached state updates
|
||||
private readonly object _sessionStackLock = new ();
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
|
||||
namespace Terminal.Gui.App;
|
||||
|
||||
public partial class ApplicationImpl
|
||||
internal partial class ApplicationImpl
|
||||
{
|
||||
/// <inheritdoc/>
|
||||
public event EventHandler<EventArgs<Rectangle>>? ScreenChanged;
|
||||
|
||||
@@ -6,7 +6,7 @@ namespace Terminal.Gui.App;
|
||||
/// Implementation of core <see cref="Application"/> methods using the modern
|
||||
/// main loop architecture with component factories for different platforms.
|
||||
/// </summary>
|
||||
public partial class ApplicationImpl : IApplication
|
||||
internal partial class ApplicationImpl : IApplication
|
||||
{
|
||||
/// <summary>
|
||||
/// INTERNAL: Creates a new instance of the Application backend and subscribes to Application configuration property
|
||||
@@ -75,7 +75,7 @@ public partial class ApplicationImpl : IApplication
|
||||
/// <summary>
|
||||
/// Gets the currently configured backend implementation of <see cref="Application"/> gateway methods.
|
||||
/// </summary>
|
||||
public static IApplication Instance
|
||||
internal static IApplication Instance
|
||||
{
|
||||
get
|
||||
{
|
||||
|
||||
@@ -1,79 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ClassDiagram MajorVersion="1" MinorVersion="1">
|
||||
<Class Name="Terminal.Gui.Views.AppendAutocomplete" Collapsed="true">
|
||||
<Position X="0.5" Y="6.5" Width="2" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAgAABAAQIAAAAAAAAAAAAABAAAIAQAgAEIAggAIAA=</HashCode>
|
||||
<FileName>Core\Autocomplete\AppendAutocomplete.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="Terminal.Gui.Views.AutocompleteBase" Collapsed="true">
|
||||
<Position X="1.75" Y="5.25" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAQgAAAAAUAAIAAAAAIAAAAAAAEAIAQIgQAIQAAAMBA=</HashCode>
|
||||
<FileName>Core\Autocomplete\AutocompleteBase.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
<Lollipop Position="0.2" />
|
||||
</Class>
|
||||
<Class Name="Terminal.Gui.Views.PopupAutocomplete" Collapsed="true">
|
||||
<Position X="2.75" Y="6.5" Width="1.5" />
|
||||
<NestedTypes>
|
||||
<Class Name="Terminal.Gui.Views.PopupAutocomplete.Popup" Collapsed="true">
|
||||
<TypeIdentifier>
|
||||
<NewMemberFileName>Core\Autocomplete\PopupAutocomplete.cs</NewMemberFileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
</NestedTypes>
|
||||
<TypeIdentifier>
|
||||
<HashCode>IAEhAAQAASBEQAAAAAIBAAgYAAAAIAwAwKAAQACBAAA=</HashCode>
|
||||
<FileName>Core\Autocomplete\PopupAutocomplete.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="Terminal.Gui.Views.SingleWordSuggestionGenerator" BaseTypeListCollapsed="true">
|
||||
<Position X="6.25" Y="3.5" Width="3" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>CEAAAAAAAAAAAAAAAAAAAAAAAAIAAAAAAAAAAAAAIAA=</HashCode>
|
||||
<FileName>Core\Autocomplete\SingleWordSuggestionGenerator.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
<Lollipop Position="0.2" />
|
||||
</Class>
|
||||
<Class Name="Terminal.Gui.Views.Suggestion">
|
||||
<Position X="4.5" Y="2.5" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAAAEAAAAAABAAAAAAAAAAAAAAAAAAAAAE=</HashCode>
|
||||
<FileName>Core\Autocomplete\Suggestion.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="Terminal.Gui.Views.TextFieldAutocomplete" Collapsed="true">
|
||||
<Position X="1.5" Y="7.5" Width="2" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAAAAAAAAAAAAAIAAAAAAAAgAAAAAAAAAA=</HashCode>
|
||||
<FileName>Views\TextField.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="Terminal.Gui.Views.TextViewAutocomplete" Collapsed="true">
|
||||
<Position X="3.75" Y="7.5" Width="2.25" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAAAAAAAAAAAAAIAAAAAAAAgAAAAAAAAAA=</HashCode>
|
||||
<FileName>Views\TextView.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Interface Name="Terminal.Gui.Views.IAutocomplete">
|
||||
<Position X="1.75" Y="0.5" Width="2.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAQgAAAAAUAAIAAAAAAAAAAAAAEAIAQIgQAIQAAAMBA=</HashCode>
|
||||
<FileName>Core\Autocomplete\IAutocomplete.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
<ShowAsAssociation>
|
||||
<Property Name="SuggestionGenerator" />
|
||||
</ShowAsAssociation>
|
||||
</Interface>
|
||||
<Interface Name="Terminal.Gui.Views.ISuggestionGenerator">
|
||||
<Position X="6.25" Y="1.75" Width="2.25" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAA=</HashCode>
|
||||
<FileName>Core\Autocomplete\ISuggestionGenerator.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Interface>
|
||||
<Font Name="Segoe UI" Size="9" />
|
||||
</ClassDiagram>
|
||||
@@ -1,124 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ClassDiagram MajorVersion="1" MinorVersion="1">
|
||||
<Comment CommentText="Views that use the CollectionNavigation system">
|
||||
<Position X="0.5" Y="0.5" Height="0.458" Width="1.856" />
|
||||
</Comment>
|
||||
<Comment CommentText="Specialized navigators for each collection type (e.g. list, tree etc)">
|
||||
<Position X="4.646" Y="0.5" Height="0.5" Width="3.169" />
|
||||
</Comment>
|
||||
<Comment CommentText="Shared matching component (users should provide alternative implementations of this class if they want to modify collection navigation behaviour)">
|
||||
<Position X="9.448" Y="0.5" Height="0.708" Width="3.169" />
|
||||
</Comment>
|
||||
<Class Name="Terminal.Gui.Views.CollectionNavigatorBase" Collapsed="true">
|
||||
<Position X="6.25" Y="1.5" Width="2" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAgEAAAAAAAQAAAIAAEAAgAAAAAABAAEAAAAACwAAAA=</HashCode>
|
||||
<FileName>Views\CollectionNavigation\CollectionNavigatorBase.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
<ShowAsAssociation>
|
||||
<Property Name="Matcher" />
|
||||
</ShowAsAssociation>
|
||||
<Lollipop Position="0.2" />
|
||||
</Class>
|
||||
<Class Name="Terminal.Gui.Views.CollectionNavigator" Collapsed="true">
|
||||
<Position X="4.5" Y="3.5" Width="2" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAAQAAAAAAAAgAAAAAAAAAEAAAAAAAAAAA=</HashCode>
|
||||
<FileName>Views\CollectionNavigation\CollectionNavigator.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
<Lollipop Position="0.2" />
|
||||
</Class>
|
||||
<Class Name="Terminal.Gui.Views.DefaultCollectionNavigatorMatcher">
|
||||
<Position X="9.5" Y="2.5" Width="2.75" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAQA=</HashCode>
|
||||
<FileName>Views\CollectionNavigation\DefaultCollectionNavigatorMatcher.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
<Lollipop Position="0.2" />
|
||||
</Class>
|
||||
<Class Name="Terminal.Gui.Views.TableCollectionNavigator" Collapsed="true">
|
||||
<Position X="4.75" Y="6.5" Width="2.25" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAAAAAAAAAAAgAAAAAAAAAEAAAAIAAAAAA=</HashCode>
|
||||
<FileName>Views\CollectionNavigation\TableCollectionNavigator.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="Terminal.Gui.Views.ListView" Collapsed="true">
|
||||
<Position X="0.5" Y="4.25" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAE+ASAkEnAAABAAKGAggYAZJAIAABEAcBAaAwAQIAA=</HashCode>
|
||||
<FileName>Views\ListView.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
<ShowAsAssociation>
|
||||
<Property Name="KeystrokeNavigator" />
|
||||
</ShowAsAssociation>
|
||||
<Lollipop Position="0.2" />
|
||||
</Class>
|
||||
<Class Name="Terminal.Gui.Views.TableView" Collapsed="true" BaseTypeListCollapsed="true">
|
||||
<Position X="0.5" Y="6.5" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>QwUeAxwgICIAcABIABeR0oBAkhoFGGOBDABgAN3oPEI=</HashCode>
|
||||
<FileName>Views\TableView\TableView.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
<Lollipop Position="0.2" />
|
||||
</Class>
|
||||
<Class Name="Terminal.Gui.Views.TreeView" Collapsed="true">
|
||||
<Position X="0.5" Y="3" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAA=</HashCode>
|
||||
<FileName>Views\TreeView\TreeView.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
<Lollipop Position="0.2" />
|
||||
</Class>
|
||||
<Class Name="Terminal.Gui.Views.TreeView<T>" Collapsed="true">
|
||||
<Position X="0.5" Y="2" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>UwAGySBgBSBGMAQgIiCaBDUItJIBSAWwRMQOSgQCwJI=</HashCode>
|
||||
<FileName>Views\TreeView\TreeView.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
<ShowAsAssociation>
|
||||
<Property Name="KeystrokeNavigator" />
|
||||
</ShowAsAssociation>
|
||||
<Lollipop Position="0.2" />
|
||||
</Class>
|
||||
<Class Name="Terminal.Gui.Views.FileDialog" Collapsed="true">
|
||||
<Position X="0.5" Y="5.5" Width="1.75" />
|
||||
<Compartments>
|
||||
<Compartment Name="Nested Types" Collapsed="false" />
|
||||
</Compartments>
|
||||
<TypeIdentifier>
|
||||
<HashCode>iIY4LQFUHDKVIHIESBoigQcFT6GxhBDABGJItBQAwAQ=</HashCode>
|
||||
<FileName>Views\FileDialogs\FileDialog.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
<Lollipop Position="0.2" />
|
||||
</Class>
|
||||
<Class Name="Terminal.Gui.Views.FileDialogCollectionNavigator" Collapsed="true">
|
||||
<Position X="4.75" Y="5.5" Width="2.25" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAAAAAAAAAAAgAAAAAAAAAEAAAAAAAAAAA=</HashCode>
|
||||
<FileName>Views\FileDialogs\FileDialogCollectionNavigator.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Interface Name="Terminal.Gui.Views.ICollectionNavigatorMatcher" Collapsed="true">
|
||||
<Position X="9.5" Y="1.5" Width="2.75" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAA=</HashCode>
|
||||
<FileName>Views\CollectionNavigation\ICollectionNavigatorMatcher.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Interface>
|
||||
<Interface Name="Terminal.Gui.Views.IListCollectionNavigator" Collapsed="true">
|
||||
<Position X="3.75" Y="2.25" Width="2" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
|
||||
<FileName>Views\CollectionNavigation\IListCollectionNavigator.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Interface>
|
||||
<Interface Name="Terminal.Gui.Views.ICollectionNavigator" Collapsed="true">
|
||||
<Position X="3.75" Y="1.5" Width="2" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAgAAAAAAAAAAAAIAAAAAAAAAAAABAAAAAAAACgAAAA=</HashCode>
|
||||
<FileName>Views\CollectionNavigation\ICollectionNavigator.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Interface>
|
||||
<Font Name="Segoe UI" Size="9" />
|
||||
</ClassDiagram>
|
||||
@@ -1,168 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ClassDiagram MajorVersion="1" MinorVersion="1">
|
||||
<Class Name="Terminal.Gui.FileServices.DefaultSearchMatcher" Collapsed="true" BaseTypeListCollapsed="true">
|
||||
<Position X="9.25" Y="6" Width="2" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAACAAAAAAgAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
|
||||
<FileName>FileServices\DefaultSearchMatcher.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
<Lollipop Position="0.2" />
|
||||
</Class>
|
||||
<Class Name="Terminal.Gui.FileServices.FileSystemInfoStats">
|
||||
<Position X="14" Y="0.5" Width="2.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>ABAIQAIIIAAAAAACQAAAAIQAAAQAAIAAAQAAAAAIAAI=</HashCode>
|
||||
<FileName>FileServices\FileSystemInfoStats.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="Terminal.Gui.Views.FileDialog">
|
||||
<Position X="0.5" Y="0.5" Width="2.75" />
|
||||
<Compartments>
|
||||
<Compartment Name="Fields" Collapsed="true" />
|
||||
<Compartment Name="Methods" Collapsed="true" />
|
||||
<Compartment Name="Nested Types" Collapsed="false" />
|
||||
</Compartments>
|
||||
<NestedTypes>
|
||||
<Class Name="Terminal.Gui.Views.FileDialog.SearchState" Collapsed="true">
|
||||
<TypeIdentifier>
|
||||
<NewMemberFileName>Views\FileDialogs\FileDialog.cs</NewMemberFileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
</NestedTypes>
|
||||
<TypeIdentifier>
|
||||
<HashCode>iIY4LQFUHDKVIHIESBoigQcFT6GxhBDABGJItBQAwAQ=</HashCode>
|
||||
<FileName>Views\FileDialogs\FileDialog.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
<Lollipop Position="0.2" />
|
||||
</Class>
|
||||
<Class Name="Terminal.Gui.Views.FileDialogStyle">
|
||||
<Position X="3.5" Y="0.5" Width="2.75" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>GgBAAAFHAAAAuAAAAAAAEAQQBYAAKREAAAAYQCCAAAA=</HashCode>
|
||||
<FileName>Views\FileDialogs\FileDialogStyle.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="Terminal.Gui.Views.FilesSelectedEventArgs">
|
||||
<Position X="6.5" Y="0.5" Width="2" />
|
||||
<Compartments>
|
||||
<Compartment Name="Methods" Collapsed="true" />
|
||||
</Compartments>
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAA=</HashCode>
|
||||
<FileName>Views\FileDialogs\FilesSelectedEventArgs.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="Terminal.Gui.Views.FileDialogHistory">
|
||||
<Position X="9.25" Y="0.5" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AQABAgEAAAAAAAAAIACAAAAAAAAAAQAAAAAAAAAADAI=</HashCode>
|
||||
<FileName>Views\FileDialogs\FileDialogHistory.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="Terminal.Gui.Views.FileDialogState">
|
||||
<Position X="11.5" Y="0.5" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AABAABAAAAAAAAIAAAAEQAAAAAAAQAAAAgAAAAAAAAI=</HashCode>
|
||||
<FileName>Views\FileDialogs\FileDialogState.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
<ShowAsCollectionAssociation>
|
||||
<Property Name="Children" />
|
||||
</ShowAsCollectionAssociation>
|
||||
</Class>
|
||||
<Class Name="Terminal.Gui.Views.AllowedType" BaseTypeListCollapsed="true">
|
||||
<Position X="13.25" Y="5.75" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAgAAAEAAAAAAAAAAAAAAAAAAgAAAAABAA=</HashCode>
|
||||
<FileName>Views\FileDialogs\AllowedType.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
<Lollipop Position="0.2" />
|
||||
</Class>
|
||||
<Class Name="Terminal.Gui.Views.AllowedTypeAny" BaseTypeListCollapsed="true">
|
||||
<Position X="11.75" Y="5.75" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAABAA=</HashCode>
|
||||
<FileName>Views\FileDialogs\AllowedType.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
<Lollipop Position="0.2" />
|
||||
</Class>
|
||||
<Class Name="Terminal.Gui.Text.NerdFonts">
|
||||
<Position X="9.25" Y="6.75" Width="2" />
|
||||
<Compartments>
|
||||
<Compartment Name="Fields" Collapsed="true" />
|
||||
</Compartments>
|
||||
<TypeIdentifier>
|
||||
<HashCode>AIACAAABQAAAAAAAAAAACAAAIACAAAAAAAIAAAAAAAA=</HashCode>
|
||||
<FileName>Text\NerdFonts.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="Terminal.Gui.FileServices.FileSystemTreeBuilder" BaseTypeListCollapsed="true">
|
||||
<Position X="0.5" Y="6.75" Width="1.75" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>EAAAAAAAAAAAAAAAAAAABAAwAAAAQAAAAABAAAAACAA=</HashCode>
|
||||
<FileName>FileServices\FileSystemTreeBuilder.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
<Lollipop Position="0.2" />
|
||||
</Class>
|
||||
<Class Name="Terminal.Gui.Views.DefaultFileOperations" BaseTypeListCollapsed="true">
|
||||
<Position X="7" Y="6" Width="2" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAAACAAAAAAACAAAAEAAAAAAAAAAAAAgAA=</HashCode>
|
||||
<FileName>Views\FileDialogs\DefaultFileOperations.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
<Lollipop Position="0.2" />
|
||||
</Class>
|
||||
<Class Name="Terminal.Gui.FileServices.FileSystemColorProvider" Collapsed="true">
|
||||
<Position X="7" Y="8.5" Width="2" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AgAAAAAAAEAAAAAAAAAAAAEAAAAAAACAAAAAAAAAAAA=</HashCode>
|
||||
<FileName>FileServices\FileSystemColorProvider.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="Terminal.Gui.FileServices.FileSystemIconProvider" Collapsed="true">
|
||||
<Position X="7" Y="7.75" Width="2" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>ABAAAAAAAACAQAAAAAAAAEAgAAAAAQAAAAAAAAAAAiA=</HashCode>
|
||||
<FileName>FileServices\FileSystemIconProvider.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="Terminal.Gui.Views.FileDialogTableSource">
|
||||
<Position X="2.5" Y="8" Width="2.5" />
|
||||
<Compartments>
|
||||
<Compartment Name="Fields" Collapsed="true" />
|
||||
</Compartments>
|
||||
<TypeIdentifier>
|
||||
<HashCode>AQAAAAAAIAACAEAACAAAAAACAAAEAAAEAAAAgAgBBAA=</HashCode>
|
||||
<FileName>Views\FileDialogs\FileDialogTableSource.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
<Lollipop Position="0.2" />
|
||||
</Class>
|
||||
<Interface Name="Terminal.Gui.FileServices.IFileOperations">
|
||||
<Position X="7" Y="4.25" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAAACAAAAAAAAAAAAEAAAAAAAAAAAAAgAA=</HashCode>
|
||||
<FileName>FileServices\IFileOperations.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Interface>
|
||||
<Interface Name="Terminal.Gui.FileServices.ISearchMatcher">
|
||||
<Position X="9.25" Y="4.25" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAACAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
|
||||
<FileName>FileServices\ISearchMatcher.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Interface>
|
||||
<Interface Name="Terminal.Gui.Views.IAllowedType" Collapsed="true">
|
||||
<Position X="12" Y="4.25" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAA=</HashCode>
|
||||
<FileName>Views\FileDialogs\AllowedType.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Interface>
|
||||
<Enum Name="Terminal.Gui.Views.OpenMode">
|
||||
<Position X="7.5" Y="2.5" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAABAAAAAAACAAAAAAAAAAAAAEAAAAAAAAAAAAAAA=</HashCode>
|
||||
<FileName>Views\FileDialogs\OpenMode.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Enum>
|
||||
<Font Name="Segoe UI" Size="9" />
|
||||
</ClassDiagram>
|
||||
@@ -18,7 +18,7 @@ namespace Terminal.Gui.Views;
|
||||
/// <b>Important:</b> All MessageBox methods require an <see cref="IApplication"/> instance to be passed.
|
||||
/// This enables proper modal dialog management and respects the application's lifecycle. Pass your
|
||||
/// application instance (from <see cref="Application.Create()"/>) or use the legacy
|
||||
/// <see cref="ApplicationImpl.Instance"/> if using the static Application pattern.
|
||||
/// <see cref="Application.Instance"/> if using the static Application pattern.
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// Example using instance-based pattern:
|
||||
|
||||
@@ -634,7 +634,7 @@ public class Shortcut : View, IOrientation, IDesignable
|
||||
get => _bindKeyToApplication;
|
||||
set
|
||||
{
|
||||
App ??= SuperView?.App ?? ApplicationImpl.Instance; // HACK: Remove once legacy static Application is gone
|
||||
App ??= SuperView?.App ?? Application.Instance; // HACK: Remove once legacy static Application is gone
|
||||
Debug.Assert (App is { });
|
||||
|
||||
if (value == _bindKeyToApplication)
|
||||
|
||||
Reference in New Issue
Block a user