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.
-
Untyped pointer to the underlying `GtkRecentChooserMenu` instance.For type-safe access, use the generated, typed pointer
recent_chooser_menu_ptrproperty instead.Declaration
Swift
public let ptr: UnsafeMutableRawPointer!
-
Designated initialiser from the underlying
Cdata typeDeclaration
Swift
@inlinable init(_ p: UnsafeMutablePointer<GtkRecentChooserMenu>) -
Designated initialiser from a constant pointer to the underlying
Cdata typeDeclaration
Swift
@inlinable init(_ p: UnsafePointer<GtkRecentChooserMenu>) -
Conditional initialiser from an optional pointer to the underlying
Cdata typeDeclaration
Swift
@inlinable init!(_ maybePointer: UnsafeMutablePointer<GtkRecentChooserMenu>?) -
Conditional initialiser from an optional, non-mutable pointer to the underlying
Cdata typeDeclaration
Swift
@inlinable init!(_ maybePointer: UnsafePointer<GtkRecentChooserMenu>?) -
Conditional initialiser from an optional
gpointerDeclaration
Swift
@inlinable init!(gpointer g: gpointer?) -
Conditional initialiser from an optional, non-mutable
gconstpointerDeclaration
Swift
@inlinable init!(gconstpointer g: gconstpointer?) -
Reference intialiser for a related type that implements
RecentChooserMenuProtocolDeclaration
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
GtkRecentChooserinterface.This widget creates its own
GtkRecentManagerobject. See thegtk_recent_chooser_menu_new_for_manager()function to know how to create aGtkRecentChooserMenuwidget bound to anotherGtkRecentManagerobject.Declaration
Swift
@inlinable init() -
Creates a new
GtkRecentChooserMenuwidget usingmanageras 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
GtkRecentManagerobject or if you wish to share a commonGtkRecentManagerobject among multipleGtkRecentChooserwidgets.Declaration
Swift
@inlinable init<RecentManagerT>(manager: RecentManagerT) where RecentManagerT : RecentManagerProtocol -
Creates a new
GtkRecentChooserMenuwidget usingmanageras 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
GtkRecentManagerobject or if you wish to share a commonGtkRecentManagerobject among multipleGtkRecentChooserwidgets.Declaration
Swift
@inlinable static func newFor<RecentManagerT>(manager: RecentManagerT) -> WidgetRef! where RecentManagerT : RecentManagerProtocol
View on GitHub
Install in Dash
RecentChooserMenuRef Structure Reference