Synopsis#include <gtk/gtk.h> GtkAssistant; GtkWidget* gtk_assistant_new (void); gint gtk_assistant_get_current_page (GtkAssistant *assistant); void gtk_assistant_set_current_page (GtkAssistant *assistant, gint page_num); gint gtk_assistant_get_n_pages (GtkAssistant *assistant); GtkWidget* gtk_assistant_get_nth_page (GtkAssistant *assistant, gint page_num); gint gtk_assistant_prepend_page (GtkAssistant *assistant, GtkWidget *page); gint gtk_assistant_append_page (GtkAssistant *assistant, GtkWidget *page); gint gtk_assistant_insert_page (GtkAssistant *assistant, GtkWidget *page, gint position); gint (*GtkAssistantPageFunc) (gint current_page, gpointer data); void gtk_assistant_set_forward_page_func (GtkAssistant *assistant, GtkAssistantPageFunc page_func, gpointer data, GDestroyNotify destroy); enum GtkAssistantPageType; void gtk_assistant_set_page_type (GtkAssistant *assistant, GtkWidget *page, GtkAssistantPageType type); GtkAssistantPageType gtk_assistant_get_page_type (GtkAssistant *assistant, GtkWidget *page); void gtk_assistant_set_page_title (GtkAssistant *assistant, GtkWidget *page, const gchar *title); const gchar* gtk_assistant_get_page_title (GtkAssistant *assistant, GtkWidget *page); void gtk_assistant_set_page_header_image (GtkAssistant *assistant, GtkWidget *page, GdkPixbuf *pixbuf); GdkPixbuf* gtk_assistant_get_page_header_image (GtkAssistant *assistant, GtkWidget *page); void gtk_assistant_set_page_side_image (GtkAssistant *assistant, GtkWidget *page, GdkPixbuf *pixbuf); GdkPixbuf* gtk_assistant_get_page_side_image (GtkAssistant *assistant, GtkWidget *page); void gtk_assistant_set_page_complete (GtkAssistant *assistant, GtkWidget *page, gboolean complete); gboolean gtk_assistant_get_page_complete (GtkAssistant *assistant, GtkWidget *page); void gtk_assistant_add_action_widget (GtkAssistant *assistant, GtkWidget *child); void gtk_assistant_remove_action_widget (GtkAssistant *assistant, GtkWidget *child); void gtk_assistant_update_buttons_state (GtkAssistant *assistant); Object HierarchyGObject +----GInitiallyUnowned +----GtkObject +----GtkWidget +----GtkContainer +----GtkBin +----GtkWindow +----GtkAssistant Child Properties"complete" gboolean : Read / Write "header-image" GdkPixbuf* : Read / Write "page-type" GtkAssistantPageType : Read / Write "sidebar-image" GdkPixbuf* : Read / Write "title" gchar* : Read / Write DescriptionA 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. Detailsgtk_assistant_new ()GtkWidget* gtk_assistant_new (void); Creates a new GtkAssistant.
Since 2.10 gtk_assistant_get_current_page ()gint gtk_assistant_get_current_page (GtkAssistant *assistant); Returns the page number of the current page
Since 2.10 gtk_assistant_set_current_page ()void gtk_assistant_set_current_page (GtkAssistant *assistant, gint page_num);
Switches the page to
Since 2.10 gtk_assistant_get_n_pages ()gint gtk_assistant_get_n_pages (GtkAssistant *assistant);
Returns the number of pages in the
Since 2.10 gtk_assistant_get_nth_page ()GtkWidget* gtk_assistant_get_nth_page (GtkAssistant *assistant, gint page_num);
Returns the child widget contained in page number
Since 2.10 gtk_assistant_prepend_page ()gint gtk_assistant_prepend_page (GtkAssistant *assistant, GtkWidget *page);
Prepends a page to the
Since 2.10 gtk_assistant_append_page ()gint gtk_assistant_append_page (GtkAssistant *assistant, GtkWidget *page);
Appends a page to the
Since 2.10 gtk_assistant_insert_page ()gint gtk_assistant_insert_page (GtkAssistant *assistant, GtkWidget *page, gint position);
Inserts a page in the
Since 2.10 GtkAssistantPageFunc ()gint (*GtkAssistantPageFunc) (gint current_page, gpointer data);
A function used by
gtk_assistant_set_forward_page_func ()void gtk_assistant_set_forward_page_func (GtkAssistant *assistant, GtkAssistantPageFunc page_func, gpointer data, GDestroyNotify destroy);
Sets the page forwarding function to be
Since 2.10 enum GtkAssistantPageTypetypedef enum { GTK_ASSISTANT_PAGE_CONTENT, GTK_ASSISTANT_PAGE_INTRO, GTK_ASSISTANT_PAGE_CONFIRM, GTK_ASSISTANT_PAGE_SUMMARY, GTK_ASSISTANT_PAGE_PROGRESS } 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.
gtk_assistant_set_page_type ()void gtk_assistant_set_page_type (GtkAssistant *assistant, GtkWidget *page, GtkAssistantPageType type);
Sets the page type for
Since 2.10 gtk_assistant_get_page_type ()GtkAssistantPageType gtk_assistant_get_page_type (GtkAssistant *assistant, GtkWidget *page);
Gets the page type of
Since 2.10 gtk_assistant_set_page_title ()void gtk_assistant_set_page_title (GtkAssistant *assistant, GtkWidget *page, const gchar *title);
Sets a title for
Since 2.10 gtk_assistant_get_page_title ()const gchar* gtk_assistant_get_page_title (GtkAssistant *assistant, GtkWidget *page);
Gets the title for
Since 2.10 gtk_assistant_set_page_header_image ()void gtk_assistant_set_page_header_image (GtkAssistant *assistant, GtkWidget *page, GdkPixbuf *pixbuf);
Sets a header image for
Since 2.10 gtk_assistant_get_page_header_image ()GdkPixbuf* gtk_assistant_get_page_header_image (GtkAssistant *assistant, GtkWidget *page);
Gets the header image for
Since 2.10 gtk_assistant_set_page_side_image ()void gtk_assistant_set_page_side_image (GtkAssistant *assistant, GtkWidget *page, GdkPixbuf *pixbuf);
Sets a header image for
Since 2.10 gtk_assistant_get_page_side_image ()GdkPixbuf* gtk_assistant_get_page_side_image (GtkAssistant *assistant, GtkWidget *page);
Gets the header image for
Since 2.10 gtk_assistant_set_page_complete ()void gtk_assistant_set_page_complete (GtkAssistant *assistant, GtkWidget *page, gboolean complete);
Sets whether
Since 2.10 gtk_assistant_get_page_complete ()gboolean gtk_assistant_get_page_complete (GtkAssistant *assistant, GtkWidget *page);
Gets whether
Since 2.10 gtk_assistant_add_action_widget ()void gtk_assistant_add_action_widget (GtkAssistant *assistant, GtkWidget *child); Adds a widget to the action area of a GtkAssistant.
Since 2.10 gtk_assistant_remove_action_widget ()void gtk_assistant_remove_action_widget (GtkAssistant *assistant, GtkWidget *child); Removes a widget from the action area of a GtkAssistant.
Since 2.10 gtk_assistant_update_buttons_state ()void gtk_assistant_update_buttons_state (GtkAssistant *assistant);
Forces 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.
Since 2.10 Child Property DetailsThe
|
|
the GtkAssistant
|
|
user data set when the signal handler was connected. |
Since 2.10
"cancel"
signalvoid user_function (GtkAssistant *assistant, gpointer user_data) : Run Last
The ::cancel signal is emitted when then the cancel button is clicked.
|
the GtkAssistant |
|
user data set when the signal handler was connected. |
Since 2.10
"close"
signalvoid user_function (GtkAssistant *assistant, gpointer user_data) : Run Last
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.
|
the GtkAssistant |
|
user data set when the signal handler was connected. |
Since 2.10
"prepare"
signalvoid user_function (GtkAssistant *assistant, GtkWidget *page, gpointer user_data) : Run Last
The ::prepared 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
.
|
the GtkAssistant |
|
the current page |
|
user data set when the signal handler was connected. |
Since 2.10