RecentChooserMenuProtocol
public protocol RecentChooserMenuProtocol : ActivatableProtocol, MenuProtocol, RecentChooserProtocol
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 RecentChooserMenuProtocol
protocol exposes the methods and properties of an underlying GtkRecentChooserMenu
instance.
The default implementation of these can be found in the protocol extension below.
For a concrete class that implements these methods and properties, see RecentChooserMenu
.
Alternatively, use RecentChooserMenuRef
as a lighweight, unowned
reference if you already have an instance you just want to use.
-
Untyped pointer to the underlying
GtkRecentChooserMenu
instance.Declaration
Swift
var ptr: UnsafeMutableRawPointer! { get }
-
recent_chooser_menu_ptr
Default implementationTyped pointer to the underlying
GtkRecentChooserMenu
instance.Default Implementation
Return the stored, untyped pointer as a typed pointer to the
GtkRecentChooserMenu
instance.Declaration
Swift
var recent_chooser_menu_ptr: UnsafeMutablePointer<GtkRecentChooserMenu>! { get }
-
Required Initialiser for types conforming to
RecentChooserMenuProtocol
Declaration
Swift
init(raw: UnsafeMutableRawPointer)
-
bind(property:
Extension methodto: _: flags: transformFrom: transformTo: ) Bind a
RecentChooserMenuPropertyName
source property to a given target object.Declaration
Swift
@discardableResult @inlinable func bind<Q, T>(property source_property: RecentChooserMenuPropertyName, to target: T, _ target_property: Q, flags f: BindingFlags = .default, transformFrom transform_from: @escaping GLibObject.ValueTransformer = { $0.transform(destValue: $1) }, transformTo transform_to: @escaping GLibObject.ValueTransformer = { $0.transform(destValue: $1) }) -> BindingRef! where Q : PropertyNameProtocol, T : ObjectProtocol
Parameters
source_property
the source property to bind
target
the target object to bind to
target_property
the target property to bind to
flags
the flags to pass to the
Binding
transform_from
ValueTransformer
to use for forward transformationtransform_to
ValueTransformer
to use for backwards transformationReturn Value
binding reference or
nil
in case of an error -
get(property:
Extension method) Get the value of a RecentChooserMenu property
Declaration
Swift
@inlinable func get(property: RecentChooserMenuPropertyName) -> GLibObject.Value
Parameters
property
the property to get the value for
Return Value
the value of the named property
-
set(property:
Extension methodvalue: ) Set the value of a RecentChooserMenu property. Note that this will only have an effect on properties that are writable and not construct-only!
Declaration
Swift
@inlinable func set(property: RecentChooserMenuPropertyName, value v: GLibObject.Value)
Parameters
property
the property to get the value for
Return Value
the value of the named property
-
getShowNumbers()
Extension methodReturns the value set by
gtk_recent_chooser_menu_set_show_numbers()
.Declaration
Swift
@inlinable func getShowNumbers() -> Bool
-
set(showNumbers:
Extension method) Sets whether a number should be added to the items of
menu
. The numbers are shown to provide a unique character for a mnemonic to be used inside ten menu item’s label. Only the first the items get a number to avoid clashes.Declaration
Swift
@inlinable func set(showNumbers: Bool)
-
showNumbers
Extension methodReturns the value set by
gtk_recent_chooser_menu_set_show_numbers()
.Declaration
Swift
@inlinable var showNumbers: Bool { get nonmutating set }
-
parentInstance
Extension methodUndocumented
Declaration
Swift
@inlinable var parentInstance: GtkMenu { get }