Table of Contents

Interface IPopover

Namespace
Terminal.Gui.App
Assembly
Terminal.Gui.dll

Defines the contract for a popover view in Terminal.Gui.

public interface IPopover

Remarks

A popover is a transient UI element that appears above other content to display contextual information or UI, such as menus, tooltips, or dialogs.

IMPORTANT: Popovers must be registered with Popover using Register(IPopover?) before they can be shown with Show(IPopover?).

Lifecycle:
When registered, the popover's lifetime is managed by the application. Registered popovers are automatically disposed when Shutdown() is called. Call DeRegister(IPopover?) to manage the lifetime directly.

Visibility and Hiding:
Popovers are automatically hidden when:

  • The user clicks outside the popover (unless clicking on a subview).
  • The user presses QuitKey (typically Esc).
  • Another popover is shown.
  • Visible is set to false.

Focus and Input:
Popovers are not modal but do receive focus and input events while visible. Registered popovers receive keyboard events even when not visible, enabling global hotkey support.

Layout:
When becoming visible, popovers are automatically laid out to fill the screen by default. Override Width and Height to customize size.

Mouse Events:
Popovers use TransparentMouse, meaning mouse events outside subviews are not captured.

Creating Custom Popovers:
Inherit from PopoverBaseImpl and add your own content and logic.

Properties

Current

Gets or sets the IRunnable that this popover is associated with.