gtk3-0.15.10: Binding to the Gtk+ 3 graphical user interface library

Maintainer | gtk2hs-users@lists.sourceforge.net
Stability | provisional
Portability | portable (depends on GHC)
Safe Haskell | None
Language | Haskell98

Graphics.UI.Gtk.Recent.RecentChooser

Contents

- Detail
- Class Hierarchy
- Types
- Enums
- Methods
- Attributes
- Signals

Description

Interface implemented by widgets displaying recently used files

- Module available since Gtk+ version 2.10

Synopsis

- data RecentChooser
- class GObjectClass o => RecentChooserClass o
- castToRecentChooser :: GObjectClass obj => obj -> RecentChooser
- toRecentChooser :: RecentChooserClass o => o -> RecentChooser
- data RecentChooserError
  - = RecentChooserErrorNotFound
  - | RecentChooserErrorInvalidUri
- data RecentSortType
  - = RecentSortNone
  - | RecentSortMru
  - | RecentSortLru
  - | RecentSortCustom
- recentChooserSetSortFunc :: RecentChooserClass self => self -> Maybe (RecentInfo -> IO Int) -> IO ()
- recentChooserSetCurrentURI :: (RecentChooserClass self, GlibString string) => self -> string -> IO Bool
- recentChooserGetCurrentURI :: (RecentChooserClass self, GlibString string) => self -> IO string
- recentChooserGetCurrentItem :: RecentChooserClass self => self -> IO RecentInfo
- recentChooserSelectURI :: (RecentChooserClass self, GlibString string) => self -> string -> IO Bool
- recentChooserUnselectURI :: (RecentChooserClass self, GlibString string) => self -> string -> IO ()
- recentChooserSelectAll :: RecentChooserClass self => self -> IO ()
- recentChooserUnselectAll :: RecentChooserClass self => self -> IO ()
- recentChooserGetItems :: RecentChooserClass self => self -> IO [RecentInfo]
- recentChooserGetURIs :: (RecentChooserClass self, GlibString string) => self -> IO [string]
- recentChooserAddFilter :: (RecentChooserClass self, RecentFilterClass filter) => self -> filter -> IO ()
- recentChooserRemoveFilter :: (RecentChooserClass self, RecentFilterClass filter) => self -> filter -> IO ()
- recentChooserListFilters :: RecentChooserClass self => self -> IO [RecentFilter]
- recentChooserShowPrivate :: RecentChooserClass self => Attr self Bool
- recentChooserShowTips :: RecentChooserClass self => Attr self Bool
- recentChooserShowIcons :: RecentChooserClass self => Attr self Bool
- recentChooserShowNotFound :: RecentChooserClass self => Attr self Bool
- recentChooserSelectMultiple :: RecentChooserClass self => Attr self Bool
- recentChooserLocalOnly :: RecentChooserClass self => Attr self Bool
- recentChooserLimit :: RecentChooserClass self => Attr self Int
- recentChooserSortType :: RecentChooserClass self => Attr self RecentSortType
- recentChooserFilter :: (RecentChooserClass self, RecentFilterClass recentFilter) => ReadWriteAttr self RecentFilter recentFilter
- recentChooserSelectionChanged :: RecentChooserClass self => Signal self (IO ())
- recentChooserItemActivated :: RecentChooserClass self => Signal self (IO ())

# Detail

`RecentChooser` is an interface that can be implemented by widgets displaying the list of recently used files. In Gtk+, the main objects that implement this interface are `RecentChooserWidget`, `RecentChooserDialog` and `RecentChooserMenu`.

Recently used files are supported since Gtk+ 2.10.

# Class Hierarchy

    | GInterface
    | +----RecentChooser

# Types

data RecentChooser Source #

#### Instances

Instances details

Eq RecentChooser Source # |
Instance details Defined in Graphics.UI.Gtk.Types Methods (==) :: RecentChooser -> RecentChooser -> Bool Source # (/=) :: RecentChooser -> RecentChooser -> Bool Source #
Ord RecentChooser Source # |

Instance details

Defined in Graphics.UI.Gtk.Types

Methods

compare :: RecentChooser -> RecentChooser -> Ordering Source #

(<) :: RecentChooser -> RecentChooser -> Bool Source #

(<=) :: RecentChooser -> RecentChooser -> Bool Source #

(>) :: RecentChooser -> RecentChooser -> Bool Source #

(>=) :: RecentChooser -> RecentChooser -> Bool Source #

max :: RecentChooser -> RecentChooser -> RecentChooser Source #

min :: RecentChooser -> RecentChooser -> RecentChooser Source #

GObjectClass RecentChooser Source # |
Instance details Defined in Graphics.UI.Gtk.Types Methods toGObject :: RecentChooser -> GObject Source # unsafeCastGObject :: GObject -> RecentChooser Source #
RecentChooserClass RecentChooser Source # |
Instance details Defined in Graphics.UI.Gtk.Types

class GObjectClass o => RecentChooserClass o Source #

#### Instances

Instances details

RecentChooserClass RecentChooser Source # |
Instance details Defined in Graphics.UI.Gtk.Types

castToRecentChooser :: GObjectClass obj => obj -> RecentChooser Source #

toRecentChooser :: RecentChooserClass o => o -> RecentChooser Source #

# Enums

data RecentChooserError Source #

These identify the various errors that can occur while calling `RecentChooser` functions.

Constructors

RecentChooserErrorNotFound |
RecentChooserErrorInvalidUri |

#### Instances

Instances details

Bounded RecentChooserError Source # |
Instance details Defined in Graphics.UI.Gtk.Recent.RecentChooser Methods minBound :: RecentChooserError Source # maxBound :: RecentChooserError Source #
Enum RecentChooserError Source # |

Instance details

Defined in Graphics.UI.Gtk.Recent.RecentChooser

Methods

succ :: RecentChooserError -> RecentChooserError Source #

pred :: RecentChooserError -> RecentChooserError Source #

toEnum :: Int -> RecentChooserError Source #

fromEnum :: RecentChooserError -> Int Source #

enumFrom :: RecentChooserError -> [RecentChooserError] Source #

enumFromThen :: RecentChooserError -> RecentChooserError -> [RecentChooserError] Source #

enumFromTo :: RecentChooserError -> RecentChooserError -> [RecentChooserError] Source #

enumFromThenTo :: RecentChooserError -> RecentChooserError -> RecentChooserError -> [RecentChooserError] Source #

Show RecentChooserError Source # |
Instance details Defined in Graphics.UI.Gtk.Recent.RecentChooser Methods showsPrec :: Int -> RecentChooserError -> ShowS Source # show :: RecentChooserError -> String Source # showList :: [RecentChooserError] -> ShowS Source #
Eq RecentChooserError Source # |
Instance details Defined in Graphics.UI.Gtk.Recent.RecentChooser Methods (==) :: RecentChooserError -> RecentChooserError -> Bool Source # (/=) :: RecentChooserError -> RecentChooserError -> Bool Source #

data RecentSortType Source #

Used to specify the sorting method to be applied to the recently used resource list.

Constructors

RecentSortNone |
RecentSortMru |
RecentSortLru |
RecentSortCustom |

#### Instances

Instances details

Bounded RecentSortType Source # |
Instance details Defined in Graphics.UI.Gtk.Recent.RecentChooser Methods minBound :: RecentSortType Source # maxBound :: RecentSortType Source #

Enum RecentSortType Source #

Sets the comparison function used when sorting to be `sortFunc`. If the `chooser` has the sort type set to `RecentSortCustom` then the chooser will sort using this function.

To the comparison function will be passed two `RecentInfo` structs and `sortData`; `sortFunc` should return a positive integer if the first item comes before the second, zero if the two items are equal and a negative integer if the first item comes after the second.

- Available since Gtk+ version 2.10

Instance details

Defined in Graphics.UI.Gtk.Recent.RecentChooser

Methods

succ :: RecentSortType -> RecentSortType Source #

pred :: RecentSortType -> RecentSortType Source #

toEnum :: Int -> RecentSortType Source #

fromEnum :: RecentSortType -> Int Source #

enumFrom :: RecentSortType -> [RecentSortType] Source #

enumFromThen :: RecentSortType -> RecentSortType -> [RecentSortType] Source #

enumFromTo :: RecentSortType -> RecentSortType -> [RecentSortType] Source #

enumFromThenTo :: RecentSortType -> RecentSortType -> RecentSortType -> [RecentSortType] Source #

Show RecentSortType Source # |
Instance details Defined in Graphics.UI.Gtk.Recent.RecentChooser Methods showsPrec :: Int -> RecentSortType -> ShowS Source # show :: RecentSortType -> String Source # showList :: [RecentSortType] -> ShowS Source #
Eq RecentSortType Source # |
Instance details Defined in Graphics.UI.Gtk.Recent.RecentChooser Methods (==) :: RecentSortType -> RecentSortType -> Bool Source # (/=) :: RecentSortType -> RecentSortType -> Bool Source #

# Methods

recentChooserSetSortFunc :: RecentChooserClass self => self -> Maybe (RecentInfo -> IO Int) -> IO () Source #

recentChooserSetCurrentURI Source #

Arguments

:: (RecentChooserClass self, GlibString string) |
=> self |
-> string | `uri` - a URI
-> IO Bool | returns `True` if the URI was found.

Sets `uri` as the current URI for `chooser`.

- Available since Gtk+ version 2.10

recentChooserGetCurrentURI Source #

Arguments

:: (RecentChooserClass self, GlibString string) |
=> self |
-> IO string | returns a newly string holding a URI.

Gets the URI currently selected by `chooser`.

- Available since Gtk+ version 2.10

recentChooserGetCurrentItem Source #

Arguments

:: RecentChooserClass self |
=> self |
-> IO RecentInfo | returns a `RecentInfo`. Use `recentInfoUnref` when when you have finished using it.

Gets the `RecentInfo` currently selected by `chooser`.

- Available since Gtk+ version 2.10

recentChooserSelectURI Source #

Arguments

:: (RecentChooserClass self, GlibString string) |
=> self |
-> string | `uri` - a URI
-> IO Bool | returns `True` if `uri` was found.

Selects `uri` inside `chooser`.

- Available since Gtk+ version 2.10

recentChooserUnselectURI Source #

Arguments

:: (RecentChooserClass self, GlibString string) |
=> self |
-> string | `uri` - a URI
-> IO () |

Unselects `uri` inside `chooser`.

- Available since Gtk+ version 2.10

recentChooserSelectAll :: RecentChooserClass self => self -> IO () Source #

Selects all the items inside `chooser`, if the `chooser` supports multiple selection.

- Available since Gtk+ version 2.10

recentChooserUnselectAll :: RecentChooserClass self => self -> IO () Source #

Unselects all the items inside `chooser`.

- Available since Gtk+ version 2.10

recentChooserGetItems Source #

Arguments

:: RecentChooserClass self |
=> self |
-> IO [RecentInfo] | returns A list of `RecentInfo` objects.

Gets the list of recently used resources in form of `RecentInfo`

The return value of this function is affected by the "sort-type" and "limit" properties of `chooser`.

recentChooserGetURIs :: (RecentChooserClass self, GlibString string) => self -> IO [string] Source #

Gets the URI of the recently used resources.

The return value of this function is affected by the "sort-type" and "limit" properties of `chooser`.

- Available since Gtk+ version 2.10

recentChooserAddFilter Source #

Arguments

:: (RecentChooserClass self, RecentFilterClass filter) |
=> self |
-> filter | `filter` - a `RecentFilter`
-> IO () |

Adds `filter` to the list of `RecentFilter` objects held by `chooser`.

If no previous filter objects were defined, this function will call `recentChooserSetFilter`.

- Available since Gtk+ version 2.10

recentChooserRemoveFilter Source #

Arguments

:: (RecentChooserClass self, RecentFilterClass filter) |
=> self |
-> filter | `filter` - a `RecentFilter`
-> IO () |

Removes `filter` from the list of `RecentFilter` objects held by `chooser`.

recentChooserListFilters Source #

Arguments

:: RecentChooserClass self |
=> self |
-> IO [RecentFilter] | returns A singly linked list of `RecentFilter`.

Gets the `RecentFilter` objects held by `chooser`.

- Available since Gtk+ version 2.10

# Attributes

recentChooserShowPrivate :: RecentChooserClass self => Attr self Bool Source #

Whether the private items should be displayed.

Default value: `False`

- Available since Gtk+ version 2.10

recentChooserShowTips :: RecentChooserClass self => Attr self Bool Source #

Whether this `RecentChooser` should display a tooltip containing the full path of the recently used resources.

Default value: `False`

- Available since Gtk+ version 2.10

recentChooserShowIcons :: RecentChooserClass self => Attr self Bool Source #

Whether this `RecentChooser` should display an icon near the item.

Default value: `True`

- Available since Gtk+ version 2.10

recentChooserShowNotFound :: RecentChooserClass self => Attr self Bool Source #

Whether this `RecentChooser` should display the recently used resources even if not present anymore. Setting this to `False` will perform a potentially expensive check on every local resource (every remote resource will always be displayed).

Default value: `True`

- Available since Gtk+ version 2.10

recentChooserSelectMultiple :: RecentChooserClass self => Attr self Bool Source #

Allow the user to select multiple resources.

Default value: `False`

- Available since Gtk+ version 2.10

recentChooserLocalOnly :: RecentChooserClass self => Attr self Bool Source #

Whether this `RecentChooser` should display only local (file:) resources.

Default value: `True`

- Available since Gtk+ version 2.10

recentChooserLimit :: RecentChooserClass self => Attr self Int Source #

The maximum number of recently used resources to be displayed, or -1 to display all items. By default, the `Setting`:gtk-recent-files-limit setting is respected: you can override that limit on a particular instance of `RecentChooser` by setting this property.

Allowed values: >= `GMaxulong`

Default value: -1

- Available since Gtk+ version 2.10

recentChooserSortType :: RecentChooserClass self => Attr self RecentSortType Source #

Sorting order to be used when displaying the recently used resources.

Default value: '`RecentSortNone'`

- Available since Gtk+ version 2.10

recentChooserFilter :: (RecentChooserClass self, RecentFilterClass recentFilter) => ReadWriteAttr self RecentFilter recentFilter Source #

The `RecentFilter` object to be used when displaying the recently used resources.

- Available since Gtk+ version 2.10

# Signals

recentChooserSelectionChanged :: RecentChooserClass self => Signal self (IO ()) Source #

This signal is emitted when there is a change in the set of selected recently used resources. This can happen when a user modifies the selection with the mouse or the keyboard, or when explicitly calling functions to change the selection.

- Available since Gtk+ version 2.10

recentChooserItemActivated :: RecentChooserClass self => Signal self (IO ()) Source #

This signal is emitted when the user "activates" a recent item in the recent chooser. This can happen by double-clicking on an item in the recently used resources list, or by pressing Enter.

- Available since Gtk+ version 2.10