GtkAssistant: GtkAssistant

Description Methods and Functions Hierarchy Interfaces Detailed Description GtkAssistant as GtkBuildable Structures Convenient Construction Enums and Flags User Functions Signals Style Properties Author(s) References

Description

A widget used to guide users through multi-step operations

Methods and Functions

gtkAssistantNew(show = TRUE)
gtkAssistantGetCurrentPage(object)
gtkAssistantSetCurrentPage(object, page.num)
gtkAssistantGetNPages(object)
gtkAssistantGetNthPage(object, page.num)
gtkAssistantPrependPage(object, page)
gtkAssistantAppendPage(object, page)
gtkAssistantInsertPage(object, page, position)
gtkAssistantSetForwardPageFunc(object, page.func, data)
gtkAssistantSetPageType(object, page, type)
gtkAssistantGetPageType(object, page)
gtkAssistantSetPageTitle(object, page, title)
gtkAssistantGetPageTitle(object, page)
gtkAssistantSetPageHeaderImage(object, page, pixbuf = NULL)
gtkAssistantGetPageHeaderImage(object, page)
gtkAssistantSetPageSideImage(object, page, pixbuf = NULL)
gtkAssistantGetPageSideImage(object, page)
gtkAssistantSetPageComplete(object, page, complete)
gtkAssistantGetPageComplete(object, page)
gtkAssistantAddActionWidget(object, child)
gtkAssistantRemoveActionWidget(object, child)
gtkAssistantUpdateButtonsState(object)
gtkAssistant(show = TRUE)

Hierarchy

1
2
3
4
5
6
7
8
GObject
   +----GInitiallyUnowned
         +----GtkObject
               +----GtkWidget
                     +----GtkContainer
                           +----GtkBin
                                 +----GtkWindow
                                       +----GtkAssistant

Interfaces

GtkAssistant implements AtkImplementorIface and GtkBuildable.

Detailed Description

A GtkAssistant 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 GtkAssistant implementation of the GtkBuildable interface exposes the action.area as internal children with the name "action_area".

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

Structures

GtkAssistant

undocumented

Convenient Construction

gtkAssistant is the equivalent of gtkAssistantNew.

Enums and Flags

GtkAssistantPageType

An enum for determining the page role inside the GtkAssistant. It's used to handle buttons sensitivity and visibility.

Note that an assistant needs to end its page flow with a page of type GTK_ASSISTANT_PAGE_CONFIRM or GTK_ASSISTANT_PAGE_SUMMARY to be correct.

content

The page has regular contents.

intro

The page contains an introduction to the assistant task.

confirm

The page lets the user confirm or deny the changes.

summary

The page informs the user of the changes done.

progress

Used for tasks that take a long time to complete, blocks the assistant until the page is marked as complete.

User Functions

GtkAssistantPageFunc(current.page, data)

A function used by gtkAssistantSetForwardPageFunc to know which is the next page given a current one. It's called both for computing the next page when the user presses the "forward" button and for handling the behavior of the "last" button.

current.page

The page number used to calculate the next page.

data

user data.

Returns: [integer] The next page number.

Signals

apply(assistant, user.data)

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

A handler for the ::apply 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 GTK_ASSISTANT_PAGE_PROGRESS after the confirmation page and handle this operation within the "prepare" signal of the progress page. Since 2.10

assistant

the GtkAssistant

user.data

user data set when the signal handler was connected.

cancel(assistant, user.data)

The ::cancel signal is emitted when then the cancel button is clicked. Since 2.10

assistant

the GtkAssistant

user.data

user data set when the signal handler was connected.

close(assistant, user.data)

The ::close signal is emitted either when the close button of a summary page is clicked, or when the apply button in the last page in the flow (of type GTK_ASSISTANT_PAGE_CONFIRM) is clicked. Since 2.10

assistant

the GtkAssistant

user.data

user data set when the signal handler was connected.

prepare(assistant, page, user.data)

The ::prepare 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. Since 2.10

assistant

the GtkAssistant

page

the current page

user.data

user data set when the signal handler was connected.

Style Properties

content-padding [integer : Read]

Number of pixels around the content pages. Allowed values: >= 0 Default value: 1

header-padding [integer : Read]

Number of pixels around the header. Allowed values: >= 0 Default value: 6

Author(s)

Derived by RGtkGen from GTK+ documentation

References

https://developer.gnome.org/gtk2/stable/GtkAssistant.html


RGtk2 documentation built on Oct. 14, 2021, 5:08 p.m.

Related to GtkAssistant in RGtk2...