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.Windows.Assistant

Contents

- Detail
  - GtkAssistant as GtkBuildable
- Class Hierarchy
- Types
- Enums.
- Constructors
- Methods
- Attributes
- Child Attributes
- Signals

Description

A widget used to guide users through multi-step operations

- Module available since Gtk+ version 2.10

Synopsis

- data Assistant
- class WindowClass o => AssistantClass o
- castToAssistant :: GObjectClass obj => obj -> Assistant
- toAssistant :: AssistantClass o => o -> Assistant
- data AssistantPageType
  - = AssistantPageContent
  - | AssistantPageIntro
  - | AssistantPageConfirm
  - | AssistantPageSummary
  - | AssistantPageProgress
  - | AssistantPageCustom
- assistantNew :: IO Assistant
- assistantGetNPages :: AssistantClass self => self -> IO Int
- assistantGetNthPage :: AssistantClass self => self -> Int -> IO (Maybe Widget)
- assistantPrependPage :: (AssistantClass self, WidgetClass page) => self -> page -> IO Int
- assistantAppendPage :: (AssistantClass self, WidgetClass page) => self -> page -> IO Int
- assistantInsertPage :: (AssistantClass self, WidgetClass page) => self -> page -> Int -> IO Int
- assistantSetForwardPageFunc :: AssistantClass self => self -> Maybe (Int -> IO Int) -> IO ()
- assistantAddActionWidget :: (AssistantClass self, WidgetClass child) => self -> child -> IO ()
- assistantRemoveActionWidget :: (AssistantClass self, WidgetClass child) => self -> child -> IO ()
- assistantUpdateButtonsState :: AssistantClass self => self -> IO ()
- assistantSetPageType :: (AssistantClass self, WidgetClass page) => self -> page -> AssistantPageType -> IO ()
- assistantGetPageType :: (AssistantClass self, WidgetClass page) => self -> page -> IO AssistantPageType
- assistantSetPageTitle :: (AssistantClass self, WidgetClass page, GlibString string) => self -> page -> string -> IO ()
- assistantGetPageTitle :: (AssistantClass self, WidgetClass page, GlibString string) => self -> page -> IO string
- assistantSetPageHeaderImage :: (AssistantClass self, WidgetClass page) => self -> page -> Pixbuf -> IO ()
- assistantGetPageHeaderImage :: (AssistantClass self, WidgetClass page) => self -> page -> IO (Maybe Pixbuf)
- assistantSetPageSideImage :: (AssistantClass self, WidgetClass page) => self -> page -> Pixbuf -> IO ()
- assistantGetPageSideImage :: (AssistantClass self, WidgetClass page) => self -> page -> IO (Maybe Pixbuf)
- assistantSetPageComplete :: (AssistantClass self, WidgetClass page) => self -> page -> Bool -> IO ()
- assistantGetPageComplete :: (AssistantClass self, WidgetClass page) => self -> page -> IO Bool
- assistantCommit :: AssistantClass self => self -> IO ()
- assistantCurrentPage :: AssistantClass self => Attr self Int
- assistantChildPageType :: AssistantClass self => Attr self AssistantPageType
- assistantChildTitle :: (AssistantClass self, GlibString string) => Attr self string
- assistantChildHeaderImage :: AssistantClass self => Attr self Pixbuf
- assistantChildSidebarImage :: AssistantClass self => Attr self Pixbuf
- assistantChildComplete :: AssistantClass self => Attr self Bool
- assistantCancel :: AssistantClass self => Signal self (IO ())
- assistantPrepare :: AssistantClass self => Signal self (Widget -> IO ())
- assistantApply :: AssistantClass self => Signal self (IO ())
- assistantClose :: AssistantClass self => Signal self (IO ())

# Detail

A `Assistant` is a widget used to represent a generally complex operation split in several steps, guiding the user through its pages and controlling the page flow to collect the necessary data.

## GtkAssistant as GtkBuildable

The `Assistant` implementation of the `Buildable` interface exposes the `actionArea` as internal children with the name "action_area".

To add pages to an assistant in `Builder`, simply add it as a <child> to the `Assistant` object, and set its child properties as necessary.

# Class Hierarchy

    | GObject
    | +----Object
    | +----Widget
    | +----Container
    | +----Bin
    | +----Window
    | +----Assistant

# Types

data Assistant Source #

#### Instances

Instances details

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

Instance details

Defined in Graphics.UI.Gtk.Types

Methods

compare :: Assistant -> Assistant -> Ordering Source #

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

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

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

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

max :: Assistant -> Assistant -> Assistant Source #

min :: Assistant -> Assistant -> Assistant Source #

GObjectClass Assistant Source # |
Instance details Defined in Graphics.UI.Gtk.Types Methods toGObject :: Assistant -> GObject Source # unsafeCastGObject :: GObject -> Assistant Source #
AssistantClass Assistant Source # |
Instance details Defined in Graphics.UI.Gtk.Types
BinClass Assistant Source # |
Instance details Defined in Graphics.UI.Gtk.Types
ContainerClass Assistant Source # |
Instance details Defined in Graphics.UI.Gtk.Types
WidgetClass Assistant Source # |
Instance details Defined in Graphics.UI.Gtk.Types
WindowClass Assistant Source # |
Instance details Defined in Graphics.UI.Gtk.Types

class WindowClass o => AssistantClass o Source #

#### Instances

Instances details

AssistantClass Assistant Source # |
Instance details Defined in Graphics.UI.Gtk.Types

castToAssistant :: GObjectClass obj => obj -> Assistant Source #

toAssistant :: AssistantClass o => o -> Assistant Source #

# Enums.

data AssistantPageType Source #

Constructors

AssistantPageContent |
AssistantPageIntro |
AssistantPageConfirm |
AssistantPageSummary |
AssistantPageProgress |
AssistantPageCustom |

#### Instances

Instances details

Bounded AssistantPageType Source # |
Instance details Defined in Graphics.UI.Gtk.Windows.Assistant Methods minBound :: AssistantPageType Source # maxBound :: AssistantPageType Source #
Enum AssistantPageType Source # |

Instance details

Defined in Graphics.UI.Gtk.Windows.Assistant

Methods

succ :: AssistantPageType -> AssistantPageType Source #

pred :: AssistantPageType -> AssistantPageType Source #

toEnum :: Int -> AssistantPageType Source #

fromEnum :: AssistantPageType -> Int Source #

enumFrom :: AssistantPageType -> [AssistantPageType] Source #

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

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

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

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

# Constructors

assistantNew :: IO Assistant Source #

Creates a new `Assistant`.

- Available since Gtk+ version 2.10

# Methods

assistantGetNPages Source #

Arguments

:: AssistantClass self |
=> self |
-> IO Int | returns The number of pages in the `assistant`.

Returns the number of pages in the `assistant`

- Available since Gtk+ version 2.10

assistantGetNthPage Source #

Arguments

:: AssistantClass self |
=> self |
-> Int | `pageNum` - The index of a page in the `assistant`, or -1 to get the last page;
-> IO (Maybe Widget) | returns The child widget, or `Nothing` if `pageNum` is out of bounds.

Returns the child widget contained in page number `pageNum`.

- Available since Gtk+ version 2.10

assistantPrependPage Source #

Arguments

:: (AssistantClass self, WidgetClass page) |
=> self |
-> page | `page` - a `Widget`
-> IO Int | returns the index (starting at 0) of the inserted page

Prepends a page to the `assistant`.

- Available since Gtk+ version 2.10

assistantAppendPage Source #

Arguments

:: (AssistantClass self, WidgetClass page) |
=> self |
-> page | `page` - a `Widget`
-> IO Int | returns the index (starting at 0) of the inserted page

Appends a page to the `assistant`.

- Available since Gtk+ version 2.10

assistantInsertPage Source #

Arguments

:: (AssistantClass self, WidgetClass page) |
=> self |
-> page | `page` - a `Widget`
-> Int | `position` - the index (starting at 0) at which to insert the page, or -1 to append the page to the `assistant`
-> IO Int | returns the index (starting from 0) of the inserted page

Inserts a page in the `assistant` at a given position.

- Available since Gtk+ version 2.10

assistantSetForwardPageFunc Source #

Arguments

:: AssistantClass self |
=> self |
-> Maybe (Int -> IO Int) | `pageFunc` - the `AssistantPage`, or `Nothing` to use the default one.
-> IO () |

Sets the page forwarding function to be `pageFunc`, this function will be used to determine what will be the next page when the user presses the forward button. Setting `pageFunc` to `Nothing` will make the assistant to use the default forward function, which just goes to the next visible page.

- Available since Gtk+ version 2.10

assistantAddActionWidget Source #

Arguments

:: (AssistantClass self, WidgetClass child) |
=> self |
-> child | `child` - a `Widget`
-> IO () |

Adds a widget to the action area of a `Assistant`.

- Available since Gtk+ version 2.10

assistantRemoveActionWidget Source #

Arguments

:: (AssistantClass self, WidgetClass child) |
=> self |
-> child | `child` - a `Widget`
-> IO () |

Removes a widget from the action area of a `Assistant`.

- Available since Gtk+ version 2.10

assistantUpdateButtonsState :: AssistantClass self => self -> IO () Source #

Forces `assistant` to recompute the buttons state.

Gtk+ automatically takes care of this in most situations, e.g. when the user goes to a different page, or when the visibility or completeness of a page changes.

One situation where it can be necessary to call this function is when changing a value on the current page affects the future page flow of the assistant.

- Available since Gtk+ version 2.10

assistantSetPageType Source #

Arguments

:: (AssistantClass self, WidgetClass page) |
=> self |
-> page | `page` - a page of `assistant`
-> AssistantPageType | `type` - the new type for `page`
-> IO () |

Sets the page type for `page`. The page type determines the page behavior in the `assistant`.

- Available since Gtk+ version 2.10

assistantGetPageType Source #

Arguments

:: (AssistantClass self, WidgetClass page) |
=> self |
-> page | `page` - a page of `assistant`
-> IO AssistantPageType | returns the page type of `page`.

Gets the page type of `page`.

- Available since Gtk+ version 2.10

assistantSetPageTitle Source #

Arguments

:: (AssistantClass self, WidgetClass page, GlibString string) |
=> self |
-> page | `page` - a page of `assistant`
-> string | `title` - the new title for `page`
-> IO () |

Sets a title for `page`. The title is displayed in the header area of the assistant when `page` is the current page.

- Available since Gtk+ version 2.10

assistantGetPageTitle Source #

Arguments

:: (AssistantClass self, WidgetClass page, GlibString string) |
=> self |
-> page | `page` - a page of `assistant`
-> IO string | returns the title for `page`.

Gets the title for `page`.

- Available since Gtk+ version 2.10

assistantSetPageHeaderImage Source #

Arguments

:: (AssistantClass self, WidgetClass page) |
=> self |
-> page | `page` - a page of `assistant`
-> Pixbuf | `pixbuf` - the new header image `page`
-> IO () |

Sets a header image for `page`. This image is displayed in the header area of the assistant when `page` is the current page.

- Available since Gtk+ version 2.10

assistantGetPageHeaderImage Source #

Arguments

:: (AssistantClass self, WidgetClass page) |
=> self |
-> page | `page` - a page of `assistant`
-> IO (Maybe Pixbuf) | returns the header image for `page`, or `Nothing` if there's no header image for the page.

Gets the header image for `page`.

- Available since Gtk+ version 2.10

assistantSetPageSideImage Source #

Arguments

:: (AssistantClass self, WidgetClass page) |
=> self |
-> page | `page` - a page of `assistant`
-> Pixbuf | `pixbuf` - the new header image `page`
-> IO () |

Sets a header image for `page`. This image is displayed in the side area of the assistant when `page` is the current page.

- Available since Gtk+ version 2.10

assistantGetPageSideImage Source #

Arguments

:: (AssistantClass self, WidgetClass page) |
=> self |
-> page | `page` - a page of `assistant`
-> IO (Maybe Pixbuf) | returns the side image for `page`, or `Nothing` if there's no side image for the page.

Gets the header image for `page`.

- Available since Gtk+ version 2.10

assistantSetPageComplete Source #

Arguments

:: (AssistantClass self, WidgetClass page) |
=> self |
-> page | `page` - a page of `assistant`
-> Bool | `complete` - the completeness status of the page
-> IO () |

Sets whether `page` contents are complete. This will make `assistant` update the buttons state to be able to continue the task.

- Available since Gtk+ version 2.10

assistantGetPageComplete Source #

Arguments

:: (AssistantClass self, WidgetClass page) |
=> self |
-> page | `page` - a page of `assistant`
-> IO Bool | returns `True` if `page` is complete.

Gets whether `page` is complete.

- Available since Gtk+ version 2.10

assistantCommit :: AssistantClass self => self -> IO () Source #

Erases the visited page history so the back button is not shown on the current page, and removes the cancel button from subsequent pages.

Use this when the information provided up to the current page is hereafter deemed permanent and cannot be modified or undone. For example, showing a progress page to track a long-running, unreversible operation after the user has clicked apply on a confirmation page.

- Available since Gtk+ version 2.22

# Attributes

assistantCurrentPage :: AssistantClass self => Attr self Int Source #

Switches the page to `pageNum`. Note that this will only be necessary in custom buttons, as the `assistant` flow can be set with `assistantSetForwardPageFunc`.

Returns the page number of the current page

- Available since Gtk+ version 2.10

# Child Attributes

assistantChildPageType :: AssistantClass self => Attr self AssistantPageType Source #

The type of the assistant page.

Default value: `AssistantPageContent`

- Available since Gtk+ version 2.10

assistantChildTitle :: (AssistantClass self, GlibString string) => Attr self string Source #

The title that is displayed in the page header.

If title and header-image are both, no header is displayed.

- Available since Gtk+ version 2.10

assistantChildHeaderImage :: AssistantClass self => Attr self Pixbuf Source #

The image that is displayed next to the page.

- Available since Gtk+ version 2.10

assistantChildSidebarImage :: AssistantClass self => Attr self Pixbuf Source #

Sidebar image for the assistant page.

- Available since Gtk+ version 2.10

assistantChildComplete :: AssistantClass self => Attr self Bool Source #

Setting the "complete" child property to `True` marks a page as complete (i.e.: all the required fields are filled out). Gtk+ uses this information to control the sensitivity of the navigation buttons.

Default value: `False`

- Available since Gtk+ version 2.10

# Signals

assistantCancel :: AssistantClass self => Signal self (IO ()) Source #

The ::assistantCancel signal is emitted when then the assistantCancel button is clicked.

- Available since Gtk+ version 2.10

assistantPrepare :: AssistantClass self => Signal self (Widget -> IO ()) Source #

The ::assistantPrepare signal is emitted when a new page is set as the assistant's current page, before making the new page visible. A handler for this signal can do any preparation which are necessary before showing `page`.

- Available since Gtk+ version 2.10

assistantApply :: AssistantClass self => Signal self (IO ()) Source #

The ::assistantApply signal is emitted when the assistantApply button is clicked. The default behavior of the `Assistant` is to switch to the page after the current page, unless the current page is the last one.

A handler for the ::assistantApply signal should carry out the actions for which the wizard has collected data. If the action takes a long time to complete, you might consider to put a page of type `AssistantPageProgress` after the confirmation page and handle this operation within the `assistantPrepare` signal of the progress page.

- Available since Gtk+ version 2.10

assistantClose :: AssistantClass self => Signal self (IO ()) Source #

The ::assistantClose signal is emitted either when the assistantClose button of a summary page is clicked, or when the apply button in the last page in the flow (of type `AssistantPageConfirm`) is clicked.