Skip to main content
Ctrl+K

Ignis

  • User guide
  • API reference
  • Developer Guide
  • Examples
  • GitHub
  • User guide
  • API reference
  • Developer Guide
  • Examples
  • GitHub

Section Navigation

  • Application
  • GObject
  • Variable
  • Client
  • Exceptions
  • D-Bus
  • D-Bus menu
  • BaseWidget
  • BaseService
  • Widgets
    • Arrow
    • ArrowButton
    • Box
    • Button
    • Calendar
    • CenterBox
    • CheckButton
    • DropDown
    • Entry
    • EventBox
    • FileChooserButton
    • FileDialog
    • FileFilter
    • Grid
    • HeaderBar
    • Icon
    • Label
    • ListBox
    • ListBoxRow
    • MenuItem
    • Overlay
    • Picture
    • PopoverMenu
    • RegularWindow
    • Revealer
    • RevealerWindow
    • Scale
    • Scroll
    • Separator
    • SpinButton
    • Switch
    • ToggleButton
    • Window
  • Services
    • Applications
    • Audio
    • Fetch
    • Hyprland
    • MPRIS (media)
    • Network
    • Notifications
    • Options
    • Recorder
    • System Tray
    • Wallpaper
  • Utils
    • FileMonitor
    • Poll
    • ThreadTask
    • Timeout
    • crop_pixbuf
    • download_image
    • exec_sh
    • exec_sh_async
    • get_current_dir
    • get_file_icon_name
    • get_ignis_commit
    • get_ignis_version
    • get_monitor
    • get_n_monitors
    • get_paintable
    • load_interface_xml
    • run_in_thread
    • sass_compile
    • scale_pixbuf
    • thread
  • API reference
  • Widgets
  • MenuItem

MenuItem#

class ignis.widgets.Widget.MenuItem(*args: Any, **kwargs: Any)#

Bases: :class:ignis.gobject.IgnisGObject.

Danger

This is not a regular widget. It doesn't support common widget properties and cannot be added as a child to a container.

A class that represent a menu item. Intended for use in PopoverMenu.

Properties:
  • label (str, required, read-only): The label of item.

  • enabled (bool, optional, read-only): Whether the item is enabled. If False, the item cannot be selected.

  • on_activate (Callable, optional, read-write): Function to call when the user clicks on the item.

  • submenu (PopoverMenu, optional, read-only): The PopoverMenu that will appear when activated.

Widget.MenuItem(
    label="item 1",
    enabled=True,
    on_activate=lambda x: print("menu item 1 activated!"),
    submenu=Widget.PopoverMenu()
)

previous

ListBoxRow

next

Overlay

On this page
  • MenuItem
Edit on GitHub
Show Source

© Copyright 2024, linkfrg.

Created using Sphinx 8.0.2.

Built with the PyData Sphinx Theme 0.15.4.