gtk.assistant
Module for [Assistant] class
Types 3
[gtk.assistant.Assistant] is used to represent a complex as a series of steps.
Each step consists of one or more pages. [gtk.assistant.Assistant] guides the user through the pages, and controls the page flow to collect the data needed for the operation.
[gtk.assistant.Assistant] handles which buttons to show and to make sensitive based on page sequence knowledge and the [gtk.types.AssistantPageType] of each page in addition to state information like the completed and committed page statuses.
If you have a case that doesn’t quite fit in [gtk.assistant.Assistant]s way of handling buttons, you can use the [gtk.types.AssistantPageType.Custom] page type and handle buttons yourself.
[gtk.assistant.Assistant] maintains a [gtk.assistant_page.AssistantPage] object for each added child, which holds additional per-child properties. You obtain the [gtk.assistant_page.AssistantPage] for a child with [gtk.assistant.Assistant.getPage].
GtkAssistant as GtkBuildable
The [gtk.assistant.Assistant] implementation of the [gtk.buildable.Buildable] interface exposes the @action_area as internal children with the name “action_area”.
To add pages to an assistant in [gtk.builder.Builder], simply add it as a child to the [gtk.assistant.Assistant] object. If you need to set per-object properties, create a [gtk.assistant_page.AssistantPage] object explicitly, and set the child widget as a property on it.
CSS nodes
[gtk.assistant.Assistant] has a single CSS node with the name window and style class .assistant.
Deprecated
AssistantGidBuilder builder()Get builder for [gtk.assistant.Assistant] Returns: New builder objectgio.list_model.ListModel pages() @propertyGet `pages` property. Returns: [gio.list_model.ListModel] containing the pages.int useHeaderBar() @propertyGet `useHeaderBar` property. Returns: true if the assistant uses a [gtk.header_bar.HeaderBar] for action buttons instead of the action-area.void addActionWidget(gtk.widget.Widget child)Adds a widget to the action area of a [gtk.assistant.Assistant].int appendPage(gtk.widget.Widget page)Appends a page to the assistant.void commit()Erases the visited page history.int getCurrentPage()Returns the page number of the current page. Returns: The index (starting from 0) of the current page in the assistant, or -1 if the assistant has no pages, or no current pageint getNPages()Returns the number of pages in the assistant Returns: the number of pages in the assistantgtk.widget.Widget getNthPage(int pageNum)Returns the child widget contained in page number page_num.gtk.assistant_page.AssistantPage getPage(gtk.widget.Widget child)Returns the [gtk.assistant_page.AssistantPage] object for child.bool getPageComplete(gtk.widget.Widget page)Gets whether page is complete.string getPageTitle(gtk.widget.Widget page)Gets the title for page.gtk.types.AssistantPageType getPageType(gtk.widget.Widget page)Gets the page type of page.gio.list_model.ListModel getPages()Gets a list model of the assistant pages. Returns: A list model of the pages.int insertPage(gtk.widget.Widget page, int position)Inserts a page in the assistant at a given position.void nextPage()Navigate to the next page.int prependPage(gtk.widget.Widget page)Prepends a page to the assistant.void previousPage()Navigate to the previous visited page.void removeActionWidget(gtk.widget.Widget child)Removes a widget from the action area of a [gtk.assistant.Assistant].void removePage(int pageNum)Removes the page_num’s page from assistant.void setCurrentPage(int pageNum)Switches the page to page_num.void setForwardPageFunc(gtk.types.AssistantPageFunc pageFunc = null)Sets the page forwarding function to be page_func.void setPageComplete(gtk.widget.Widget page, bool complete)Sets whether page contents are complete.void setPageTitle(gtk.widget.Widget page, string title)Sets a title for page.void setPageType(gtk.widget.Widget page, gtk.types.AssistantPageType type)Sets the page type for page.void updateButtonsState()Forces assistant to recompute the buttons state.gulong connectApply(T)(T callback, Flag!"After" after = No.After) if (isCallable!T
&& is(ReturnType!T == void)
&& (Parameters!T.length < 1 || (ParameterStorageClassTuple!T[0] == ParameterStorageClass.none && is(Parameters!T[0] : gtk.assistant.Assistant)))
&& Parameters!T.length < 2)Connect to `Apply` signal.gulong connectCancel(T)(T callback, Flag!"After" after = No.After) if (isCallable!T
&& is(ReturnType!T == void)
&& (Parameters!T.length < 1 || (ParameterStorageClassTuple!T[0] == ParameterStorageClass.none && is(Parameters!T[0] : gtk.assistant.Assistant)))
&& Parameters!T.length < 2)Connect to `Cancel` signal.gulong connectClose(T)(T callback, Flag!"After" after = No.After) if (isCallable!T
&& is(ReturnType!T == void)
&& (Parameters!T.length < 1 || (ParameterStorageClassTuple!T[0] == ParameterStorageClass.none && is(Parameters!T[0] : gtk.assistant.Assistant)))
&& Parameters!T.length < 2)Connect to `Close` signal.gulong connectEscape(T)(T callback, Flag!"After" after = No.After) if (isCallable!T
&& is(ReturnType!T == void)
&& (Parameters!T.length < 1 || (ParameterStorageClassTuple!T[0] == ParameterStorageClass.none && is(Parameters!T[0] : gtk.assistant.Assistant)))
&& Parameters!T.length < 2)Connect to `Escape` signal.gulong connectPrepare(T)(T callback, Flag!"After" after = No.After) if (isCallable!T
&& is(ReturnType!T == void)
&& (Parameters!T.length < 1 || (ParameterStorageClassTuple!T[0] == ParameterStorageClass.none && is(Parameters!T[0] : gtk.widget.Widget)))
&& (Parameters!T.length < 2 || (ParameterStorageClassTuple!T[1] == ParameterStorageClass.none && is(Parameters!T[1] : gtk.assistant.Assistant)))
&& Parameters!T.length < 3)Connect to `Prepare` signal.T useHeaderBar(int propval)Set `useHeaderBar` property. Params: propval = true if the assistant uses a [gtk.header_bar.HeaderBar] for action buttons instead of the action-area.