gtk.assistant

Module for [Assistant] class

Types 3

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.

The design of GtkAssistant is that it controls what buttons to show and to make sensitive, based on what it knows about the page sequence and the type of each page, in addition to state information like the page completion and committed status.

If you have a case that doesn’t quite fit in #GtkAssistants way of handling buttons, you can use the #GTK_ASSISTANT_PAGE_CUSTOM page type and handle buttons yourself.

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.

CSS nodes

GtkAssistant has a single CSS node with the name assistant.

Methods
GType _getGType() static nothrow
GType _gType() @property nothrow
Assistant self() nothrowReturns `this`, for use in `with` statements.
AssistantGidBuilder builder() static nothrowGet builder for [gtk.assistant.Assistant] Returns: New builder object
int useHeaderBar() @property nothrowGet `useHeaderBar` property. Returns: true if the assistant uses a #GtkHeaderBar for action buttons instead of the action-area.
void addActionWidget(gtk.widget.Widget child) nothrowAdds a widget to the action area of a #GtkAssistant.
int appendPage(gtk.widget.Widget page) nothrowAppends a page to the assistant.
void commit() nothrowErases the visited page history so the back button is not shown on the current page, and removes the cancel button from subsequent pages.
int getCurrentPage() nothrowReturns 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 page.
int getNPages() nothrowReturns the number of pages in the assistant Returns: the number of pages in the assistant
gtk.widget.Widget getNthPage(int pageNum) nothrowReturns the child widget contained in page number page_num.
bool getPageComplete(gtk.widget.Widget page) nothrowGets whether page is complete.
bool getPageHasPadding(gtk.widget.Widget page) nothrowGets whether page has padding.
gdkpixbuf.pixbuf.Pixbuf getPageHeaderImage(gtk.widget.Widget page) nothrowGets the header image for page.
gdkpixbuf.pixbuf.Pixbuf getPageSideImage(gtk.widget.Widget page) nothrowGets the side image for page.
string getPageTitle(gtk.widget.Widget page) nothrowGets the title for page.
gtk.types.AssistantPageType getPageType(gtk.widget.Widget page) nothrowGets the page type of page.
int insertPage(gtk.widget.Widget page, int position) nothrowInserts a page in the assistant at a given position.
void nextPage() nothrowNavigate to the next page.
int prependPage(gtk.widget.Widget page) nothrowPrepends a page to the assistant.
void previousPage() nothrowNavigate to the previous visited page.
void removeActionWidget(gtk.widget.Widget child) nothrowRemoves a widget from the action area of a #GtkAssistant.
void removePage(int pageNum) nothrowRemoves the page_num’s page from assistant.
void setCurrentPage(int pageNum) nothrowSwitches the page to page_num.
void setForwardPageFunc(gtk.types.AssistantPageFunc pageFunc = null) nothrowSets the page forwarding function to be page_func.
void setPageComplete(gtk.widget.Widget page, bool complete) nothrowSets whether page contents are complete.
void setPageHasPadding(gtk.widget.Widget page, bool hasPadding) nothrowSets whether the assistant is adding padding around the page.
void setPageHeaderImage(gtk.widget.Widget page, gdkpixbuf.pixbuf.Pixbuf pixbuf = null) nothrowSets a header image for page.
void setPageSideImage(gtk.widget.Widget page, gdkpixbuf.pixbuf.Pixbuf pixbuf = null) nothrowSets a side image for page.
void setPageTitle(gtk.widget.Widget page, string title) nothrowSets a title for page.
void setPageType(gtk.widget.Widget page, gtk.types.AssistantPageType type) nothrowSets the page type for page.
void updateButtonsState() nothrowForces 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) nothrowConnect 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) nothrowConnect 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) nothrowConnect 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) nothrowConnect 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) nothrowConnect to `Prepare` signal.
Constructors
this(void * ptr, Flag!"Take" take)
this()Creates a new #GtkAssistant. Returns: a newly created #GtkAssistant

Fluent builder implementation template for gtk.assistant.Assistant

Methods
T useHeaderBar(int propval) nothrowSet `useHeaderBar` property. Params: propval = true if the assistant uses a #GtkHeaderBar for action buttons instead of the action-area.

Fluent builder for gtk.assistant.Assistant

Methods
Assistant build() nothrowCreate object from builder. Returns: New object