RecentChooserMenuRef

public struct RecentChooserMenuRef : RecentChooserMenuProtocol, GWeakCapturing

GtkRecentChooserMenu is a widget suitable for displaying recently used files inside a menu. It can be used to set a sub-menu of a GtkMenuItem using gtk_menu_item_set_submenu(), or as the menu of a GtkMenuToolButton.

Note that GtkRecentChooserMenu does not have any methods of its own. Instead, you should use the functions that work on a GtkRecentChooser.

Note also that GtkRecentChooserMenu does not support multiple filters, as it has no way to let the user choose between them as the GtkRecentChooserWidget and GtkRecentChooserDialog widgets do. Thus using gtk_recent_chooser_add_filter() on a GtkRecentChooserMenu widget will yield the same effects as using gtk_recent_chooser_set_filter(), replacing any currently set filter with the supplied filter; gtk_recent_chooser_remove_filter() will remove any currently set GtkRecentFilter object and will unset the current filter; gtk_recent_chooser_list_filters() will return a list containing a single GtkRecentFilter object.

Recently used files are supported since GTK+ 2.10.

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

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

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

    Declaration

    Swift

    public let ptr: UnsafeMutableRawPointer!

RecentChooserMenu Class

  • Designated initialiser from the underlying C data type

    Declaration

    Swift

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

    Declaration

    Swift

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

    Declaration

    Swift

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

    Declaration

    Swift

    @inlinable
    init!(_ maybePointer: UnsafePointer<GtkRecentChooserMenu>?)
  • 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 RecentChooserMenuProtocol

    Declaration

    Swift

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

    Declaration

    Swift

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

    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 RecentChooserMenuProtocol.

    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 RecentChooserMenuProtocol.

    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 RecentChooserMenuProtocol.

    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 RecentChooserMenuProtocol.

    Declaration

    Swift

    @inlinable
    init(opaquePointer: OpaquePointer)
  • Creates a new `GtkRecentChooserMenu` widget.
    

    This kind of widget shows the list of recently used resources as a menu, each item as a menu item. Each item inside the menu might have an icon, representing its MIME type, and a number, for mnemonic access.

    This widget implements the GtkRecentChooser interface.

    This widget creates its own GtkRecentManager object. See the gtk_recent_chooser_menu_new_for_manager() function to know how to create a GtkRecentChooserMenu widget bound to another GtkRecentManager object.

    Declaration

    Swift

    @inlinable
    init()
  • Creates a new GtkRecentChooserMenu widget using manager as the underlying recently used resources manager.

    This is useful if you have implemented your own recent manager, or if you have a customized instance of a GtkRecentManager object or if you wish to share a common GtkRecentManager object among multiple GtkRecentChooser widgets.

    Declaration

    Swift

    @inlinable
    init<RecentManagerT>(manager: RecentManagerT) where RecentManagerT : RecentManagerProtocol
  • Creates a new GtkRecentChooserMenu widget using manager as the underlying recently used resources manager.

    This is useful if you have implemented your own recent manager, or if you have a customized instance of a GtkRecentManager object or if you wish to share a common GtkRecentManager object among multiple GtkRecentChooser widgets.

    Declaration

    Swift

    @inlinable
    static func newFor<RecentManagerT>(manager: RecentManagerT) -> WidgetRef! where RecentManagerT : RecentManagerProtocol