gi-gtk-3.0.28: Gtk bindings

CopyrightWill Thompson Iñaki García Etxebarria and Jonas Platte
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria (inaki@blueleaf.cc)
Safe HaskellNone
LanguageHaskell2010

GI.Gtk.Objects.RecentAction

Contents

Description

A RecentAction represents a list of recently used files, which can be shown by widgets such as RecentChooserDialog or RecentChooserMenu.

To construct a submenu showing recently used files, use a RecentAction as the action for a <menuitem>. To construct a menu toolbutton showing the recently used files in the popup menu, use a RecentAction as the action for a <toolitem> element.

Synopsis

Exported types

newtype RecentAction Source #

Memory-managed wrapper type.

Instances
GObject RecentAction Source # 
Instance details

Defined in GI.Gtk.Objects.RecentAction

Methods

gobjectType :: IO GType #

HasParentTypes RecentAction Source # 
Instance details

Defined in GI.Gtk.Objects.RecentAction

type ParentTypes RecentAction Source # 
Instance details

Defined in GI.Gtk.Objects.RecentAction

type ParentTypes RecentAction = Action ': (Object ': (Buildable ': (RecentChooser ': ([] :: [Type]))))

class (GObject o, IsDescendantOf RecentAction o) => IsRecentAction o Source #

Type class for types which can be safely cast to RecentAction, for instance with toRecentAction.

Instances
(GObject o, IsDescendantOf RecentAction o) => IsRecentAction o Source # 
Instance details

Defined in GI.Gtk.Objects.RecentAction

toRecentAction :: (MonadIO m, IsRecentAction o) => o -> m RecentAction Source #

Cast to RecentAction, for types for which this is known to be safe. For general casts, use castTo.

Methods

getShowNumbers

recentActionGetShowNumbers Source #

Arguments

:: (HasCallStack, MonadIO m, IsRecentAction a) 
=> a

action: a RecentAction

-> m Bool

Returns: True if numbers should be shown.

Deprecated: (Since version 3.10)

Returns the value set by recentChooserMenuSetShowNumbers.

Since: 2.12

new

recentActionNew Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Text

name: a unique name for the action

-> Maybe Text

label: the label displayed in menu items and on buttons, or Nothing

-> Maybe Text

tooltip: a tooltip for the action, or Nothing

-> Maybe Text

stockId: the stock icon to display in widgets representing the action, or Nothing

-> m RecentAction

Returns: the newly created RecentAction.

Deprecated: (Since version 3.10)

Creates a new RecentAction object. To add the action to a ActionGroup and set the accelerator for the action, call actionGroupAddActionWithAccel.

Since: 2.12

newForManager

recentActionNewForManager Source #

Arguments

:: (HasCallStack, MonadIO m, IsRecentManager a) 
=> Text

name: a unique name for the action

-> Maybe Text

label: the label displayed in menu items and on buttons, or Nothing

-> Maybe Text

tooltip: a tooltip for the action, or Nothing

-> Maybe Text

stockId: the stock icon to display in widgets representing the action, or Nothing

-> Maybe a

manager: a RecentManager, or Nothing for using the default RecentManager

-> m RecentAction

Returns: the newly created RecentAction

Deprecated: (Since version 3.10)

Creates a new RecentAction object. To add the action to a ActionGroup and set the accelerator for the action, call actionGroupAddActionWithAccel.

Since: 2.12

setShowNumbers

recentActionSetShowNumbers Source #

Arguments

:: (HasCallStack, MonadIO m, IsRecentAction a) 
=> a

action: a RecentAction

-> Bool

showNumbers: True if the shown items should be numbered

-> m () 

Deprecated: (Since version 3.10)

Sets whether a number should be added to the items shown by the widgets representing action. The numbers are shown to provide a unique character for a mnemonic to be used inside the menu item's label. Only the first ten items get a number to avoid clashes.

Since: 2.12

Properties

showNumbers

Whether the items should be displayed with a number.

constructRecentActionShowNumbers :: IsRecentAction 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.

getRecentActionShowNumbers :: (MonadIO m, IsRecentAction o) => o -> m Bool Source #

Get the value of the “show-numbers” property. When overloading is enabled, this is equivalent to

get recentAction #showNumbers

setRecentActionShowNumbers :: (MonadIO m, IsRecentAction o) => o -> Bool -> m () Source #

Set the value of the “show-numbers” property. When overloading is enabled, this is equivalent to

set recentAction [ #showNumbers := value ]