[ruby-gnome2-doc-cvs] [Ruby-GNOME2 Project Website] create - Gtk::Assistant

Back to archive index

ruby-****@sourc***** ruby-****@sourc*****
2006年 7月 16日 (日) 21:51:41 JST


-------------------------
REMOTE_ADDR = 81.62.207.204
REMOTE_HOST = 
REMOTE_USER = ruby-gnome2-hiki
        URL = /hiki.cgi?Gtk%3A%3AAssistant
-------------------------
TITLE       = Gtk::Assistant
KEYWORD     = 
= class Gtk::Assistant

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. ((<URL:http://developer.gnome.org/doc/API/2.0/gtk/assistant.png>))

((*Since 2.10*))

== Object Hierarchy
* Object
  * GLib::Instantiatable
    * GLib::Object
      * Gtk::Widget
        * Gtk::Container
          * Gtk::Bin
            * Gtk::Window
              * Gtk::Assistant


== Class Methods
--- Gtk::PrintJob.new()
     Creates a new Gtk::Assistant.

     * Returns: a new Gtk::Assitant


== Instance Methods
--- current_page
    Returns the page number of the current page.

    * Returns: The index (starting from 0) of the current page in
      the assistant, if the assistant has no pages, -1 will be
      returned.

--- current_page=(page_num)
    Switches the page to page_num. Note that this will only be
    necessary in custom buttons, as the assistant flow can be set
    with #set_forward_page_func.

    * page_num: 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: page_num

--- get_n_pages
    Returns the number of pages in the assistant.

    * Returns: The number of pages in the assistant.

--- get_nth_page(page_num)
    Returns the child widget contained in page number page_num.

    * page_num: The index of a page in the assistant, or -1 to
      get the last page;
    * Returns: The child widget, or nil if page_num is out of
      bounds.

--- prepend_page(page)
    Prepends a page to the assistant.

    * page: a Gtk::Widget
    * Returns: the index (starting at 0) of the inserted page

--- append_page(page)
    Appends a page to the assistant.

    * page: a Gtk::Widget
    * Returns: the index (starting at 0) of the inserted page

--- insert_page(page, position)
    Inserts a page in the assistant at a given position.

    * page: a Gtk::Widget
    * position: the index (starting at 0) at which to insert the
      page, or -1 to append the page to the assistant
    * Returns: the index (starting from 0) of the inserted page

--- set_forward_page_func(&block)
    Sets the page forwarding function to be block, 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. 

    * page_func: the block to use; passed argument is the page
      number used to calculate the next page, from which it must
      return the next page number
    * Returns: self

--- set_page_type(page, type)
    Sets the page type for the specified page. The page type
    determines the page behavior in the assistant.

    * page: a page of assitant
    * type: the new type for page (GtkAssistantPageType)
    * Returns: self

--- get_page_type(page)
    Gets the page type of the specified page.

    * page: a page of assistant
    * Returns: the page type of page (GtkAssistantPageType)

--- set_page_title(page, title)
    Sets a title for the specified page. The title is displayed in the header
    area of the assistant when page is the current page.

    * page: a page of assistant
    * title: the new title for page
    * Returns: self

--- get_page_title(page)
    Gets the title for the specified page.

    * page: a page of assistant
    * Returns: the title for page

--- set_page_header_image(page, pixbuf)
    Sets a header image for the specified page. This image is
    displayed in the header area of the assistant when page is
    the current page.

    * page: a page of assistant
    * pixbuf: the new header image page (Gdk::Pixbuf)
    * Returns: self

--- get_page_header_image(page)
    Gets the header image for the specified page.

    * page: a page of assistant
    * Returns: the header image for page, or nil if there's no
      header image for the page.

--- set_page_side_image(page, pixbuf)
    Sets a header image for the specified page. This image is
    displayed in the side area of the assistant when page is the
    current page.

    * page: a page of assistant
    * pixbuf: the new header image page (Gdk::Pixbuf)
    * Returns: self

--- get_page_side_image(page)
    Gets the header image for the specified page.

    * page: a page of assistant
    * Returns: the side image for page, or nil if there's no side
      image for the page.

--- set_page_complete(page, complete)
    Sets whether specified page contents are complete. This will
    make assistant update the buttons state to be able to
    continue the task.

    * page: a page of assistant
    * complete:	the completeness status of the page (true or false)
    * Returns: self

--- get_page_complete(page)
    Gets whether page is complete.

    * page: a page of assistant
    * Returns: true if page is complete, otherwise false

--- add_action_widget(child)
    Adds a widget to the action area of the assistant.

    * child: a Gtk::Widget
    * Returns: self

--- remove_action_widget(child)
    Removes a widget from the action area of the assistant.

    * child: a Gtk::Widget
    * Returns: self

--- update_buttons_state
    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: self

== Constants
=== GtkAssistantPageType
A value determining the page role inside the assistant. 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.

--- PAGE_CONTENT
    The page has regular contents.

--- PAGE_INTRO
    The page contains an introduction to the assistant task.

--- PAGE_CONFIRM
    The page lets the user confirm or deny the changes.

--- PAGE_SUMMARY
    The page informs the user of the changes done.

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


== Signals
--- apply: self (run last)
    The "apply" signal is emitted when the apply button is clicked.
    The default behavior of the assistant 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.

--- cancel: self (run last)
    The "cancel" signal is emitted when then the cancel button is
    clicked.

--- close: self (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.

--- prepare: self, page (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.

    * page: the current page

== ChangeLog

* 2006-07-16: new widget binded and documented for 2.10. - ((<gc>))

- ((<gc>))






ruby-gnome2-cvs メーリングリストの案内
Back to archive index