#nullable enable namespace Terminal.Gui.App; /// /// Defines the contract for a popover view in Terminal.Gui. /// /// /// /// A popover is a transient UI element that appears above other content to display contextual information or UI, /// such as menus, tooltips, or dialogs. /// Popovers are managed by and are typically shown using /// . /// /// /// Popovers are not modal; they do not block input to the rest of the application, but they do receive focus and /// input events while visible. /// When a popover is shown, it is responsible for handling its own layout and content. /// /// /// Popovers are automatically hidden when: /// /// The user clicks outside the popover (unless occluded by a subview of the popover). /// The user presses (typically Esc). /// Another popover is shown. /// /// /// /// Focus and Input:
/// When visible, a popover receives focus and input events. If the user clicks outside the popover (and not on a /// subview), /// presses , or another popover is shown, the popover will be hidden /// automatically. ///
/// /// Layout:
/// When the popover becomes visible, it is automatically laid out to fill the screen by default. You can override /// this behavior /// by setting and in your derived class. ///
/// /// Mouse:
/// Popovers are transparent to mouse events (see ), /// meaning mouse events in a popover that are not also within a subview of the popover will not be captured. ///
/// /// Custom Popovers:
/// To create a custom popover, inherit from and add your own content and logic. ///
///
public interface IPopover { /// /// Gets or sets the that this Popover is associated with. If null, it is not associated with /// any Toplevel and will receive all keyboard /// events from the . If set, it will only receive keyboard events the Toplevel would normally /// receive. /// When is called, the is set to the current /// if not already set. /// Toplevel? Toplevel { get; set; } }