gtk-0.12.4: Binding to the Gtk+ graphical user interface library.

Portabilityportable (depends on GHC)
Stabilityprovisional
Maintainergtk2hs-users@lists.sourceforge.net
Safe HaskellNone

Graphics.UI.Gtk.Windows.Assistant

Contents

Description

A widget used to guide users through multi-step operations

  • Module available since Gtk+ version 2.10

Synopsis

Detail

A Assistant is a widget used to represent a generally complex operation splitted 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

Enums.

Constructors

assistantNew :: IO AssistantSource

Creates a new Assistant.

  • Available since Gtk+ version 2.10

Methods

assistantGetNPagesSource

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

assistantGetNthPageSource

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

assistantPrependPageSource

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

assistantAppendPageSource

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

assistantInsertPageSource

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

assistantSetForwardPageFuncSource

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

assistantAddActionWidgetSource

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

assistantRemoveActionWidgetSource

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

assistantSetPageTypeSource

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

assistantGetPageTypeSource

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

assistantSetPageTitleSource

Arguments

:: (AssistantClass self, WidgetClass page) 
=> 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

assistantGetPageTitleSource

Arguments

:: (AssistantClass self, WidgetClass page) 
=> 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

assistantSetPageHeaderImageSource

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

assistantGetPageHeaderImageSource

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

assistantSetPageSideImageSource

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

assistantGetPageSideImageSource

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

assistantSetPageCompleteSource

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

assistantGetPageCompleteSource

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 IntSource

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 AssistantPageTypeSource

The type of the assistant page.

Default value: AssistantPageContent

  • Available since Gtk+ version 2.10

assistantChildTitle :: AssistantClass self => Attr self StringSource

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 PixbufSource

The image that is displayed next to the page.

  • Available since Gtk+ version 2.10

assistantChildSidebarImage :: AssistantClass self => Attr self PixbufSource

Sidebar image for the assistant page.

  • Available since Gtk+ version 2.10

assistantChildComplete :: AssistantClass self => Attr self BoolSource

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.