Class: Gtk::Assistant

Inherits:
Object
  • Object
show all
Defined in:
(unknown)

Instance Method Summary collapse

Instance Method Details

#add_action_widget(child) ⇒ nil

Adds a widget to the action area of a Gtk::Assistant.

Parameters:

Returns:

  • (nil)

#append_page(page) ⇒ Integer

Appends a page to the assistant.

Parameters:

Returns:

  • (Integer)

    the index (starting at 0) of the inserted page

#commitnil

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.

Returns:

  • (nil)

#current_pageInteger

Returns the page number of the current page.

Returns:

  • (Integer)

    The index (starting from 0) of the current page in the assistant, or -1 if the assistant has no pages, or no current page.

#current_page=(page_num) ⇒ nil

Switches the page to page_num.

Note that this will only be necessary in custom buttons, as the assistant flow can be set with gtk_assistant_set_forward_page_func().

Parameters:

  • page_num (Integer)

    index of the page to switch to, starting from 0. If negative, the last page will be used. If greater than the number of pages in the assistant, nothing will be done.

Returns:

  • (nil)

#get_nth_page(page_num) ⇒ Gtk::Widget

Returns the child widget contained in page number page_num.

Parameters:

  • page_num (Integer)

    the index of a page in the assistant, or -1 to get the last page

Returns:

  • (Gtk::Widget)

    the child widget, or nil if page_num is out of bounds

#get_page_complete(page) ⇒ TrueClass

Gets whether page is complete.

Parameters:

Returns:

  • (TrueClass)

    true if page is complete.

#get_page_has_padding(page) ⇒ TrueClass

Gets whether page has padding.

Parameters:

Returns:

  • (TrueClass)

    true if page has padding

#get_page_header_image(page) ⇒ GdkPixbuf::Pixbuf

Gets the header image for page.

Parameters:

Returns:

  • (GdkPixbuf::Pixbuf)

    the header image for page, or nil if there’s no header image for the page

#get_page_side_image(page) ⇒ GdkPixbuf::Pixbuf

Gets the side image for page.

Parameters:

Returns:

  • (GdkPixbuf::Pixbuf)

    the side image for page, or nil if there’s no side image for the page

#get_page_title(page) ⇒ String

Gets the title for page.

Parameters:

Returns:

  • (String)

    the title for page

#get_page_type(page) ⇒ Gtk::AssistantPageType

Gets the page type of page.

Parameters:

Returns:

#insert_page(page, position) ⇒ Integer

Inserts a page in the assistant at a given position.

Parameters:

  • page (Gtk::Widget)

    a Gtk::Widget

  • position (Integer)

    the index (starting at 0) at which to insert the page, or -1 to append the page to the assistant

Returns:

  • (Integer)

    the index (starting from 0) of the inserted page

#n_pagesInteger

Returns the number of pages in the assistant

Returns:

  • (Integer)

    the number of pages in the assistant

#newGtk::Widget

Creates a new Gtk::Assistant.

Returns:

#next_pagenil

Navigate to the next page.

It is a programming error to call this function when there is no next page.

This function is for use when creating pages of the #GTK_ASSISTANT_PAGE_CUSTOM type.

Returns:

  • (nil)

#prepend_page(page) ⇒ Integer

Prepends a page to the assistant.

Parameters:

Returns:

  • (Integer)

    the index (starting at 0) of the inserted page

#previous_pagenil

Navigate to the previous visited page.

It is a programming error to call this function when no previous page is available.

This function is for use when creating pages of the #GTK_ASSISTANT_PAGE_CUSTOM type.

Returns:

  • (nil)

#remove_action_widget(child) ⇒ nil

Removes a widget from the action area of a Gtk::Assistant.

Parameters:

Returns:

  • (nil)

#remove_page(page_num) ⇒ nil

Removes the page_num’s page from assistant.

Parameters:

  • page_num (Integer)

    the index of a page in the assistant, or -1 to remove the last page

Returns:

  • (nil)

#set_forward_page_func(page_func, data, destroy) ⇒ nil

Sets the page forwarding function to be page_func.

This function will be used to determine what will be the next page when the user presses the forward button. Setting page_func to nil will make the assistant to use the default forward function, which just goes to the next visible page.

Parameters:

  • page_func (Gtk::AssistantPageFunc)

    the Gtk::AssistantPageFunc, or nil to use the default one

  • data (GObject)

    user data for page_func

  • destroy (GLib::DestroyNotify)

    destroy notifier for data

Returns:

  • (nil)

#set_page_complete(page, complete) ⇒ nil

Sets whether page contents are complete.

This will make assistant update the buttons state to be able to continue the task.

Parameters:

  • page (Gtk::Widget)

    a page of assistant

  • complete (TrueClass)

    the completeness status of the page

Returns:

  • (nil)

#set_page_has_padding(page, has_padding) ⇒ nil

Sets whether the assistant is adding padding around the page.

Parameters:

  • page (Gtk::Widget)

    a page of assistant

  • has_padding (TrueClass)

    whether this page has padding

Returns:

  • (nil)

#set_page_header_image(page, pixbuf) ⇒ nil

Sets a header image for page.

Parameters:

Returns:

  • (nil)

#set_page_side_image(page, pixbuf) ⇒ nil

Sets a side image for page.

This image used to be displayed in the side area of the assistant when page is the current page.

Parameters:

Returns:

  • (nil)

#set_page_title(page, title) ⇒ nil

Sets a title for page.

The title is displayed in the header area of the assistant when page is the current page.

Parameters:

  • page (Gtk::Widget)

    a page of assistant

  • title (String)

    the new title for page

Returns:

  • (nil)

#set_page_type(page, type) ⇒ nil

Sets the page type for page.

The page type determines the page behavior in the assistant.

Parameters:

Returns:

  • (nil)

#update_buttons_statenil

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.

Returns:

  • (nil)

#use_header_barInteger

true if the assistant uses a Gtk::HeaderBar for action buttons instead of the action-area.

For technical reasons, this property is declared as an integer property, but you should only set it to true or false.

Returns:

  • (Integer)

    use-header-bar

#use_header_bar=(use_header_bar) ⇒ Integer

true if the assistant uses a Gtk::HeaderBar for action buttons instead of the action-area.

For technical reasons, this property is declared as an integer property, but you should only set it to true or false.

Parameters:

  • use_header_bar (Integer)

Returns:

  • (Integer)

    use-header-bar

  • (Integer)

    use-header-bar