mirror of
https://github.com/gui-cs/Terminal.Gui.git
synced 2025-12-31 02:08:03 +01:00
Move nested class to a nested file (no type layout change made)
This commit is contained in:
29
Terminal.Gui/Text/Autocomplete/PopupAutocomplete.PopUp.cs
Normal file
29
Terminal.Gui/Text/Autocomplete/PopupAutocomplete.PopUp.cs
Normal file
@@ -0,0 +1,29 @@
|
||||
#nullable enable
|
||||
namespace Terminal.Gui;
|
||||
|
||||
public abstract partial class PopupAutocomplete
|
||||
{
|
||||
private sealed class Popup : View
|
||||
{
|
||||
private readonly PopupAutocomplete _autoComplete;
|
||||
|
||||
public Popup (PopupAutocomplete autoComplete)
|
||||
{
|
||||
this._autoComplete = autoComplete;
|
||||
CanFocus = true;
|
||||
WantMousePositionReports = true;
|
||||
}
|
||||
|
||||
public override bool MouseEvent (MouseEvent mouseEvent) { return _autoComplete.MouseEvent (mouseEvent); }
|
||||
|
||||
public override void OnDrawContent (Rectangle contentArea)
|
||||
{
|
||||
if (!_autoComplete.LastPopupPos.HasValue)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
_autoComplete.RenderOverlay (_autoComplete.LastPopupPos.Value);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4,7 +4,7 @@ namespace Terminal.Gui;
|
||||
/// Renders an overlay on another view at a given point that allows selecting from a range of 'autocomplete'
|
||||
/// options.
|
||||
/// </summary>
|
||||
public abstract class PopupAutocomplete : AutocompleteBase
|
||||
public abstract partial class PopupAutocomplete : AutocompleteBase
|
||||
{
|
||||
private bool closed;
|
||||
private ColorScheme colorScheme;
|
||||
@@ -554,30 +554,4 @@ public abstract class PopupAutocomplete : AutocompleteBase
|
||||
Visible = false;
|
||||
ManipulatePopup ();
|
||||
}
|
||||
|
||||
private sealed class Popup : View
|
||||
{
|
||||
private readonly PopupAutocomplete _autoComplete;
|
||||
|
||||
public Popup (PopupAutocomplete autoComplete)
|
||||
{
|
||||
this._autoComplete = autoComplete;
|
||||
CanFocus = true;
|
||||
WantMousePositionReports = true;
|
||||
}
|
||||
|
||||
public override bool MouseEvent (MouseEvent mouseEvent) { return _autoComplete.MouseEvent (mouseEvent); }
|
||||
|
||||
#nullable enable
|
||||
public override void OnDrawContent (Rectangle contentArea)
|
||||
{
|
||||
if (!_autoComplete.LastPopupPos.HasValue)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
_autoComplete.RenderOverlay (_autoComplete.LastPopupPos.Value);
|
||||
}
|
||||
#nullable restore
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user