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

Contents

Description

tRecentChooserDialog is a dialog box suitable for displaying the recently used documents. This widgets works by putting a tRecentChooserWidget inside a tDialog. It exposes the tRecentChooserIface interface, so you can use all the tRecentChooser functions on the recent chooser dialog as well as those for tDialog.

Note that tRecentChooserDialog does not have any methods of its own. Instead, you should use the functions that work on a tRecentChooser.

## {gtkrecentchooser-typical-usage}

In the simplest of cases, you can use the following code to use a tRecentChooserDialog to select a recently used file:

C code

GtkWidget *dialog;
gint res;

dialog = gtk_recent_chooser_dialog_new ("Recent Documents",
                                        parent_window,
                                        _("_Cancel"),
                                        GTK_RESPONSE_CANCEL,
                                        _("_Open"),
                                        GTK_RESPONSE_ACCEPT,
                                        NULL);

res = gtk_dialog_run (GTK_DIALOG (dialog));
if (res == GTK_RESPONSE_ACCEPT)
  {
    GtkRecentInfo *info;
    GtkRecentChooser *chooser = GTK_RECENT_CHOOSER (dialog);

    info = gtk_recent_chooser_get_current_item (chooser);
    open_file (gtk_recent_info_get_uri (info));
    gtk_recent_info_unref (info);
  }

gtk_widget_destroy (dialog);

Recently used files are supported since GTK+ 2.10.

Synopsis

Exported types

newtype RecentChooserDialog Source #

Memory-managed wrapper type.

Constructors

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

Defined in GI.Gtk.Objects.RecentChooserDialog

GObject RecentChooserDialog Source # 
Instance details

Defined in GI.Gtk.Objects.RecentChooserDialog

Methods

gobjectType :: IO GType

IsGValue RecentChooserDialog Source #

Convert RecentChooserDialog to and from GValue with toGValue and fromGValue.

Instance details

Defined in GI.Gtk.Objects.RecentChooserDialog

Methods

toGValue :: RecentChooserDialog -> IO GValue

fromGValue :: GValue -> IO RecentChooserDialog

HasParentTypes RecentChooserDialog Source # 
Instance details

Defined in GI.Gtk.Objects.RecentChooserDialog

type ParentTypes RecentChooserDialog Source # 
Instance details

Defined in GI.Gtk.Objects.RecentChooserDialog

type ParentTypes RecentChooserDialog = Dialog ': (Window ': (Bin ': (Container ': (Widget ': (Object ': (ImplementorIface ': (Buildable ': (RecentChooser ': ([] :: [Type])))))))))

class (GObject o, IsDescendantOf RecentChooserDialog o) => IsRecentChooserDialog o Source #

Type class for types which can be safely cast to RecentChooserDialog, for instance with toRecentChooserDialog.

Instances
(GObject o, IsDescendantOf RecentChooserDialog o) => IsRecentChooserDialog o Source # 
Instance details

Defined in GI.Gtk.Objects.RecentChooserDialog

toRecentChooserDialog :: (MonadIO m, IsRecentChooserDialog o) => o -> m RecentChooserDialog Source #

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

noRecentChooserDialog :: Maybe RecentChooserDialog Source #

A convenience alias for Nothing :: Maybe RecentChooserDialog.

Methods

Overloaded methods