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. Popovers are managed by ApplicationPopover and are typically shown using Show(IPopover?).

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 QuitKey (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 QuitKey, 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 Width and Height in your derived class.

Mouse:
Popovers are transparent to mouse events (see TransparentMouse), 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 PopoverBaseImpl and add your own content and logic.

Properties

Toplevel

Gets or sets the Toplevel that this Popover is associated with. If null, it is not associated with any Toplevel and will receive all keyboard events from the Application. If set, it will only receive keyboard events the Toplevel would normally receive. When Register(IPopover?) is called, the Toplevel is set to the current Top if not already set.