Copyright | Will Thompson Iñaki García Etxebarria and Jonas Platte |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria |
Safe Haskell | None |
Language | Haskell2010 |
GI.Gtk.Objects.RecentChooserMenu
Contents
Description
tRecentChooserMenu
is a widget suitable for displaying recently used files
inside a menu. It can be used to set a sub-menu of a tMenuItem
using
menuItemSetSubmenu
, or as the menu of a tMenuToolButton
.
Note that tRecentChooserMenu
does not have any methods of its own. Instead,
you should use the functions that work on a tRecentChooser
.
Note also that tRecentChooserMenu
does not support multiple filters, as it
has no way to let the user choose between them as the tRecentChooserWidget
and tRecentChooserDialog
widgets do. Thus using recentChooserAddFilter
on a tRecentChooserMenu
widget will yield the same effects as using
recentChooserSetFilter
, replacing any currently set filter
with the supplied filter; recentChooserRemoveFilter
will remove
any currently set tRecentFilter
object and will unset the current filter;
recentChooserListFilters
will return a list containing a single
tRecentFilter
object.
Recently used files are supported since GTK+ 2.10.
Synopsis
- newtype RecentChooserMenu = RecentChooserMenu (ManagedPtr RecentChooserMenu)
- class (GObject o, IsDescendantOf RecentChooserMenu o) => IsRecentChooserMenu o
- toRecentChooserMenu :: (MonadIO m, IsRecentChooserMenu o) => o -> m RecentChooserMenu
- noRecentChooserMenu :: Maybe RecentChooserMenu
- recentChooserMenuGetShowNumbers :: (HasCallStack, MonadIO m, IsRecentChooserMenu a) => a -> m Bool
- recentChooserMenuNew :: (HasCallStack, MonadIO m) => m RecentChooserMenu
- recentChooserMenuNewForManager :: (HasCallStack, MonadIO m, IsRecentManager a) => a -> m RecentChooserMenu
- recentChooserMenuSetShowNumbers :: (HasCallStack, MonadIO m, IsRecentChooserMenu a) => a -> Bool -> m ()
- constructRecentChooserMenuShowNumbers :: IsRecentChooserMenu o => Bool -> IO (GValueConstruct o)
- getRecentChooserMenuShowNumbers :: (MonadIO m, IsRecentChooserMenu o) => o -> m Bool
- setRecentChooserMenuShowNumbers :: (MonadIO m, IsRecentChooserMenu o) => o -> Bool -> m ()
Exported types
newtype RecentChooserMenu Source #
Memory-managed wrapper type.
Constructors
RecentChooserMenu (ManagedPtr RecentChooserMenu) |
Instances
Eq RecentChooserMenu Source # | |
Defined in GI.Gtk.Objects.RecentChooserMenu Methods (==) :: RecentChooserMenu -> RecentChooserMenu -> Bool (/=) :: RecentChooserMenu -> RecentChooserMenu -> Bool | |
GObject RecentChooserMenu Source # | |
Defined in GI.Gtk.Objects.RecentChooserMenu Methods gobjectType :: IO GType | |
IsGValue RecentChooserMenu Source # | Convert |
Defined in GI.Gtk.Objects.RecentChooserMenu | |
HasParentTypes RecentChooserMenu Source # | |
Defined in GI.Gtk.Objects.RecentChooserMenu | |
type ParentTypes RecentChooserMenu Source # | |
Defined in GI.Gtk.Objects.RecentChooserMenu type ParentTypes RecentChooserMenu = Menu ': (MenuShell ': (Container ': (Widget ': (Object ': (ImplementorIface ': (Activatable ': (Buildable ': (RecentChooser ': ([] :: [Type]))))))))) |
class (GObject o, IsDescendantOf RecentChooserMenu o) => IsRecentChooserMenu o Source #
Type class for types which can be safely cast to RecentChooserMenu
, for instance with toRecentChooserMenu
.
Instances
(GObject o, IsDescendantOf RecentChooserMenu o) => IsRecentChooserMenu o Source # | |
Defined in GI.Gtk.Objects.RecentChooserMenu |
toRecentChooserMenu :: (MonadIO m, IsRecentChooserMenu o) => o -> m RecentChooserMenu Source #
Cast to RecentChooserMenu
, for types for which this is known to be safe. For general casts, use castTo
.
noRecentChooserMenu :: Maybe RecentChooserMenu Source #
A convenience alias for Nothing
:: Maybe
RecentChooserMenu
.
Methods
Overloaded methods
getShowNumbers
recentChooserMenuGetShowNumbers Source #
Arguments
:: (HasCallStack, MonadIO m, IsRecentChooserMenu a) | |
=> a |
|
-> m Bool | Returns: |
Returns the value set by recentChooserMenuSetShowNumbers
.
Since: 2.10
new
Arguments
:: (HasCallStack, MonadIO m) | |
=> m RecentChooserMenu | Returns: a new t |
Creates a new tRecentChooserMenu
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 tRecentChooser
interface.
This widget creates its own tRecentManager
object. See the
recentChooserMenuNewForManager
function to know how to create
a tRecentChooserMenu
widget bound to another tRecentManager
object.
Since: 2.10
newForManager
recentChooserMenuNewForManager Source #
Arguments
:: (HasCallStack, MonadIO m, IsRecentManager a) | |
=> a |
|
-> m RecentChooserMenu | Returns: a new t |
Creates a new tRecentChooserMenu
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 tRecentManager
object or if you wish to share a common tRecentManager
object
among multiple tRecentChooser
widgets.
Since: 2.10
setShowNumbers
recentChooserMenuSetShowNumbers Source #
Arguments
:: (HasCallStack, MonadIO m, IsRecentChooserMenu a) | |
=> a |
|
-> Bool |
|
-> m () |
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.
Since: 2.10
Properties
showNumbers
Whether the first ten items in the menu should be prepended by a number acting as a unique mnemonic.
Since: 2.10
constructRecentChooserMenuShowNumbers :: IsRecentChooserMenu o => Bool -> IO (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “show-numbers
” property. This is rarely needed directly, but it is used by new
.
getRecentChooserMenuShowNumbers :: (MonadIO m, IsRecentChooserMenu o) => o -> m Bool Source #
Get the value of the “show-numbers
” property.
When overloading is enabled, this is equivalent to
get
recentChooserMenu #showNumbers
setRecentChooserMenuShowNumbers :: (MonadIO m, IsRecentChooserMenu o) => o -> Bool -> m () Source #
Set the value of the “show-numbers
” property.
When overloading is enabled, this is equivalent to
set
recentChooserMenu [ #showNumbers:=
value ]