PopoverMenuBarRef

public struct PopoverMenuBarRef : PopoverMenuBarProtocol, GWeakCapturing

GtkPopoverMenuBar presents a horizontal bar of items that pop up popover menus when clicked.

An example GtkPopoverMenuBar

The only way to create instances of GtkPopoverMenuBar is from a GMenuModel.

CSS nodes

menubar
├── item[.active]
   ╰── popover
╰── item
    ╰── popover

GtkPopoverMenuBar has a single CSS node with name menubar, below which each item has its CSS node, and below that the corresponding popover.

The item whose popover is currently open gets the .active style class.

Accessibility

GtkPopoverMenuBar uses the GTK_ACCESSIBLE_ROLE_MENU_BAR role, the menu items use the GTK_ACCESSIBLE_ROLE_MENU_ITEM role and the menus use the GTK_ACCESSIBLE_ROLE_MENU role.

The PopoverMenuBarRef type acts as a lightweight Swift reference to an underlying GtkPopoverMenuBar instance. It exposes methods that can operate on this data type through PopoverMenuBarProtocol conformance. Use PopoverMenuBarRef only as an unowned reference to an existing GtkPopoverMenuBar instance.

  • ptr
    Untyped pointer to the underlying `GtkPopoverMenuBar` instance.
    

    For type-safe access, use the generated, typed pointer popover_menu_bar_ptr property instead.

    Declaration

    Swift

    public let ptr: UnsafeMutableRawPointer!

PopoverMenuBar Class

  • Designated initialiser from the underlying C data type

    Declaration

    Swift

    @inlinable
    init(_ p: UnsafeMutablePointer<GtkPopoverMenuBar>)
  • Designated initialiser from a constant pointer to the underlying C data type

    Declaration

    Swift

    @inlinable
    init(_ p: UnsafePointer<GtkPopoverMenuBar>)
  • Conditional initialiser from an optional pointer to the underlying C data type

    Declaration

    Swift

    @inlinable
    init!(_ maybePointer: UnsafeMutablePointer<GtkPopoverMenuBar>?)
  • Conditional initialiser from an optional, non-mutable pointer to the underlying C data type

    Declaration

    Swift

    @inlinable
    init!(_ maybePointer: UnsafePointer<GtkPopoverMenuBar>?)
  • Conditional initialiser from an optional gpointer

    Declaration

    Swift

    @inlinable
    init!(gpointer g: gpointer?)
  • Conditional initialiser from an optional, non-mutable gconstpointer

    Declaration

    Swift

    @inlinable
    init!(gconstpointer g: gconstpointer?)
  • Reference intialiser for a related type that implements PopoverMenuBarProtocol

    Declaration

    Swift

    @inlinable
    init<T>(_ other: T) where T : PopoverMenuBarProtocol
  • This factory is syntactic sugar for setting weak pointers wrapped in GWeak<T>

    Declaration

    Swift

    @inlinable
    static func unowned<T>(_ other: T) -> PopoverMenuBarRef where T : PopoverMenuBarProtocol
  • Unsafe typed initialiser. Do not use unless you know the underlying data type the pointer points to conforms to PopoverMenuBarProtocol.

    Declaration

    Swift

    @inlinable
    init<T>(cPointer: UnsafeMutablePointer<T>)
  • Unsafe typed initialiser. Do not use unless you know the underlying data type the pointer points to conforms to PopoverMenuBarProtocol.

    Declaration

    Swift

    @inlinable
    init<T>(constPointer: UnsafePointer<T>)
  • Unsafe untyped initialiser. Do not use unless you know the underlying data type the pointer points to conforms to PopoverMenuBarProtocol.

    Declaration

    Swift

    @inlinable
    init(mutating raw: UnsafeRawPointer)
  • Unsafe untyped initialiser. Do not use unless you know the underlying data type the pointer points to conforms to PopoverMenuBarProtocol.

    Declaration

    Swift

    @inlinable
    init(raw: UnsafeMutableRawPointer)
  • Unsafe untyped initialiser. Do not use unless you know the underlying data type the pointer points to conforms to PopoverMenuBarProtocol.

    Declaration

    Swift

    @inlinable
    init(opaquePointer: OpaquePointer)
  • Creates a GtkPopoverMenuBar from a GMenuModel.

    Declaration

    Swift

    @inlinable
    init<MenuModelT>(model: MenuModelT?) where MenuModelT : MenuModelProtocol
  • Creates a GtkPopoverMenuBar from a GMenuModel.

    Declaration

    Swift

    @inlinable
    static func newFrom<MenuModelT>(model: MenuModelT?) -> WidgetRef! where MenuModelT : MenuModelProtocol