RecentChooserMenu

open class RecentChooserMenu : Menu, RecentChooserMenuProtocol

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 RecentChooserMenu type acts as a reference-counted owner of an underlying GtkRecentChooserMenu instance. It provides the methods that can operate on this data type through RecentChooserMenuProtocol conformance. Use RecentChooserMenu as a strong reference or owner of a GtkRecentChooserMenu instance.

  • Designated initialiser from the underlying `C` data type.
    

    This creates an instance without performing an unbalanced retain i.e., ownership is transferred to the RecentChooserMenu instance.

    Declaration

    Swift

    @inlinable
    public init(_ op: UnsafeMutablePointer<GtkRecentChooserMenu>)

    Parameters

    op

    pointer to the underlying object

  • Designated initialiser from a constant pointer to the underlying C data type. This creates an instance without performing an unbalanced retain i.e., ownership is transferred to the RecentChooserMenu instance.

    Declaration

    Swift

    @inlinable
    public init(_ op: UnsafePointer<GtkRecentChooserMenu>)

    Parameters

    op

    pointer to the underlying object

  • Optional initialiser from a non-mutating gpointer to the underlying C data type. This creates an instance without performing an unbalanced retain i.e., ownership is transferred to the RecentChooserMenu instance.

    Declaration

    Swift

    @inlinable
    override public init!(gpointer op: gpointer?)

    Parameters

    op

    gpointer to the underlying object

  • Optional initialiser from a non-mutating gconstpointer to the underlying C data type. This creates an instance without performing an unbalanced retain i.e., ownership is transferred to the RecentChooserMenu instance.

    Declaration

    Swift

    @inlinable
    override public init!(gconstpointer op: gconstpointer?)

    Parameters

    op

    pointer to the underlying object

  • Optional initialiser from a constant pointer to the underlying C data type. This creates an instance without performing an unbalanced retain i.e., ownership is transferred to the RecentChooserMenu instance.

    Declaration

    Swift

    @inlinable
    public init!(_ op: UnsafePointer<GtkRecentChooserMenu>?)

    Parameters

    op

    pointer to the underlying object

  • Optional initialiser from the underlying C data type. This creates an instance without performing an unbalanced retain i.e., ownership is transferred to the RecentChooserMenu instance.

    Declaration

    Swift

    @inlinable
    public init!(_ op: UnsafeMutablePointer<GtkRecentChooserMenu>?)

    Parameters

    op

    pointer to the underlying object

  • Designated initialiser from the underlying C data type. Will retain GtkRecentChooserMenu. i.e., ownership is transferred to the RecentChooserMenu instance.

    Declaration

    Swift

    @inlinable
    public init(retaining op: UnsafeMutablePointer<GtkRecentChooserMenu>)

    Parameters

    op

    pointer to the underlying object

  • Reference intialiser for a related type that implements RecentChooserMenuProtocol Will retain GtkRecentChooserMenu.

    Declaration

    Swift

    @inlinable
    public init<T>(recentChooserMenu other: T) where T : RecentChooserMenuProtocol

    Parameters

    other

    an instance of a related type that implements RecentChooserMenuProtocol

  • Unsafe typed initialiser. Do not use unless you know the underlying data type the pointer points to conforms to RecentChooserMenuProtocol.

    Declaration

    Swift

    @inlinable
    override public init<T>(cPointer p: UnsafeMutablePointer<T>)

    Parameters

    cPointer

    pointer to the underlying object

  • Unsafe typed, retaining initialiser. Do not use unless you know the underlying data type the pointer points to conforms to RecentChooserMenuProtocol.

    Declaration

    Swift

    @inlinable
    override public init<T>(retainingCPointer cPointer: UnsafeMutablePointer<T>)

    Parameters

    cPointer

    pointer to the underlying object

  • Unsafe untyped initialiser. Do not use unless you know the underlying data type the pointer points to conforms to RecentChooserMenuProtocol.

    Declaration

    Swift

    @inlinable
    override public init(raw p: UnsafeRawPointer)

    Parameters

    p

    raw pointer to the underlying object

  • Unsafe untyped, retaining initialiser. Do not use unless you know the underlying data type the pointer points to conforms to RecentChooserMenuProtocol.

    Declaration

    Swift

    @inlinable
    override public init(retainingRaw 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
    public required init(raw p: UnsafeMutableRawPointer)

    Parameters

    p

    mutable raw pointer to the underlying object

  • Unsafe untyped, retaining initialiser. Do not use unless you know the underlying data type the pointer points to conforms to RecentChooserMenuProtocol.

    Declaration

    Swift

    @inlinable
    required public init(retainingRaw raw: UnsafeMutableRawPointer)

    Parameters

    raw

    mutable raw pointer to the underlying object

  • Unsafe untyped initialiser. Do not use unless you know the underlying data type the pointer points to conforms to RecentChooserMenuProtocol.

    Declaration

    Swift

    @inlinable
    override public init(opaquePointer p: OpaquePointer)

    Parameters

    p

    opaque pointer to the underlying object

  • Unsafe untyped, retaining initialiser. Do not use unless you know the underlying data type the pointer points to conforms to RecentChooserMenuProtocol.

    Declaration

    Swift

    @inlinable
    override public init(retainingOpaquePointer p: OpaquePointer)

    Parameters

    p

    opaque pointer to the underlying object

  • 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
    override public 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
    public 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
    public static func newFor<RecentManagerT>(manager: RecentManagerT) -> Widget! where RecentManagerT : RecentManagerProtocol