gi-gtk-3.0.43: Gtk bindings

Copyright | Will Thompson and Iñaki García Etxebarria
License | LGPL-2.1
Maintainer | Iñaki García Etxebarria
Safe Haskell | None
Language | Haskell2010

GI.Gtk.Objects.RecentAction

Contents

- Exported types
- Methods
  - getShowNumbers
  - new
  - newForManager
  - setShowNumbers
- Properties
  - showNumbers

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

- newtype RecentAction = RecentAction (ManagedPtr RecentAction)
- class (GObject o, IsDescendantOf RecentAction o) => IsRecentAction o
- toRecentAction :: (MonadIO m, IsRecentAction o) => o -> m RecentAction
- recentActionGetShowNumbers :: (HasCallStack, MonadIO m, IsRecentAction a) => a -> m Bool
- recentActionNew :: (HasCallStack, MonadIO m) => Text -> Maybe Text -> Maybe Text -> Maybe Text -> m RecentAction
- recentActionNewForManager :: (HasCallStack, MonadIO m, IsRecentManager a) => Text -> Maybe Text -> Maybe Text -> Maybe Text -> Maybe a -> m RecentAction
- recentActionSetShowNumbers :: (HasCallStack, MonadIO m, IsRecentAction a) => a -> Bool -> m ()
- constructRecentActionShowNumbers :: (IsRecentAction o, MonadIO m) => Bool -> m (GValueConstruct o)
- getRecentActionShowNumbers :: (MonadIO m, IsRecentAction o) => o -> m Bool
- setRecentActionShowNumbers :: (MonadIO m, IsRecentAction o) => o -> Bool -> m ()

# Exported types

newtype RecentAction Source #

Memory-managed wrapper type.

Constructors

RecentAction (ManagedPtr RecentAction) |

#### Instances

Instances details

Eq RecentAction Source # |
Instance details Defined in GI.Gtk.Objects.RecentAction Methods (==) :: RecentAction -> RecentAction -> Bool Source # (/=) :: RecentAction -> RecentAction -> Bool Source #
GObject RecentAction Source # |
Instance details Defined in GI.Gtk.Objects.RecentAction
ManagedPtrNewtype RecentAction Source # |
Instance details Defined in GI.Gtk.Objects.RecentAction Methods toManagedPtr :: RecentAction -> ManagedPtr RecentAction Source #
TypedObject RecentAction Source # |
Instance details Defined in GI.Gtk.Objects.RecentAction Methods glibType :: IO GType Source #
HasParentTypes RecentAction Source # |
Instance details Defined in GI.Gtk.Objects.RecentAction
IsGValue (Maybe RecentAction) Source # | Convert `RecentAction` to and from `GValue`. See `toGValue` and `fromGValue`.
Instance details Defined in GI.Gtk.Objects.RecentAction Methods gvalueGType_ :: IO GType Source # gvalueSet_ :: Ptr GValue -> Maybe RecentAction -> IO () Source # gvalueGet_ :: Ptr GValue -> IO (Maybe RecentAction) Source #
type ParentTypes RecentAction Source # |
Instance details Defined in GI.Gtk.Objects.RecentAction type ParentTypes RecentAction = '[Action, Object, Buildable, RecentChooser]

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

Instances details

(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

### Click to display all available methods, including inherited ones

Expand

#### Methods

activate, addChild, addFilter, bindProperty, bindPropertyFull, blockActivate, connectAccelerator, constructChild, createIcon, createMenu, createMenuItem, createToolItem, customFinished, customTagEnd, customTagStart, disconnectAccelerator, forceFloating, freezeNotify, getv, isFloating, isSensitive, isVisible, listFilters, notify, notifyByPspec, parserFinished, ref, refSink, removeFilter, runDispose, selectAll, selectUri, stealData, stealQdata, thawNotify, unblockActivate, unref, unselectAll, unselectUri, watchClosure.

#### Getters

getAccelClosure, getAccelPath, getAlwaysShowImage, getCurrentItem, getCurrentUri, getData, getFilter, getGicon, getIconName, getInternalChild, getIsImportant, getItems, getLabel, getLimit, getLocalOnly, getName, getProperty, getProxies, getQdata, getSelectMultiple, getSensitive, getShortLabel, getShowIcons, getShowNotFound, getShowNumbers, getShowPrivate, getShowTips, getSortType, getStockId, getTooltip, getUris, getVisible, getVisibleHorizontal, getVisibleVertical.

#### Setters

setAccelGroup, setAccelPath, setAlwaysShowImage, setBuildableProperty, setCurrentUri, setData, setDataFull, setFilter, setGicon, setIconName, setIsImportant, setLabel, setLimit, setLocalOnly, setName, setProperty, setSelectMultiple, setSensitive, setShortLabel, setShowIcons, setShowNotFound, setShowNumbers, setShowPrivate, setShowTips, setSortFunc, setSortType, setStockId, setTooltip, setVisible, setVisibleHorizontal, setVisibleVertical.

## 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, MonadIO m) => Bool -> m (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 ]