Expand description
Right-click context menu for widgets with selectable text.
Use [context_menu_overlay] from your widget’s overlay() method
with any widget that implements
HasSelectableText
to get a context menu with Copy, Select All, and optionally Cut/Paste.
Internally uses libcosmic’s Menu system for
proper rendering, hover effects, and positioning.
On Wayland, [create_text_context_popup] can be used instead to show
the context menu as a native popup surface.
Traits§
- HasSelectable
Text - Implement this on a widget to enable context menu support for text selection (Copy, Select All, and optionally Cut / Paste) in libcosmic