gi-gtk-3.0.32: Gtk bindings

CopyrightWill Thompson Iñaki García Etxebarria and Jonas Platte
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellNone
LanguageHaskell2010

GI.Gtk.Objects.RecentAction

Contents

Description

A tRecentAction represents a list of recently used files, which can be shown by widgets such as tRecentChooserDialog or tRecentChooserMenu.

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

Synopsis

Exported types

newtype RecentAction Source #

Memory-managed wrapper type.

Constructors

RecentAction (ManagedPtr RecentAction) 
Instances
Eq RecentAction Source # 
Instance details

Defined in GI.Gtk.Objects.RecentAction

Methods

(==) :: RecentAction -> RecentAction -> Bool

(/=) :: RecentAction -> RecentAction -> Bool

GObject RecentAction Source # 
Instance details

Defined in GI.Gtk.Objects.RecentAction

Methods

gobjectType :: IO GType

IsGValue RecentAction Source #

Convert RecentAction to and from GValue with toGValue and fromGValue.

Instance details

Defined in GI.Gtk.Objects.RecentAction

Methods

toGValue :: RecentAction -> IO GValue

fromGValue :: GValue -> IO RecentAction

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.

noRecentAction :: Maybe RecentAction Source #

A convenience alias for Nothing :: Maybe RecentAction.

Methods

Overloaded methods

getShowNumbers

recentActionGetShowNumbers Source #

Arguments

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

action: a tRecentAction

-> 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 tRecentAction.

Deprecated: (Since version 3.10)

Creates a new tRecentAction object. To add the action to a tActionGroup 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 tRecentManager, or Nothing for using the default tRecentManager

-> m RecentAction

Returns: the newly created tRecentAction

Deprecated: (Since version 3.10)

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

Since: 2.12

setShowNumbers

recentActionSetShowNumbers Source #

Arguments

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

action: a tRecentAction

-> 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 ]