ruby-****@sourc*****
ruby-****@sourc*****
2009年 10月 23日 (金) 09:26:49 JST
------------------------- REMOTE_ADDR = 220.100.125.243 REMOTE_HOST = URL = http://ruby-gnome2.sourceforge.jp/hiki.cgi?Gtk%3A%3AAssistant ------------------------- TITLE = PSpNqBHlqLar -> Gtk::Assistant KEYWORD = They need to be able to last the life of the car: 15 years of deep-cycling. , -> ------------------------- @@ -1 +1,396 @@ -They need to be able to last the life of the car: 15 years of deep-cycling. , += class Gtk::Assistant + +A Gtk::Assistant 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. ((*Since 2.10*)) + + +((<URL:http://library.gnome.org/devel/gtk/stable/assistant.png>)) + +== Object Hierarchy + +* Object + * GLib::Instantiatable + * GLib::Object + * GLib::InitiallyUnowned + * Gtk::Object + * Gtk::Widget + * Gtk::Container + * Gtk::Bin + * Gtk::Window + * Gtk::Assistant + +== Class Methods + +--- Gtk::Assistant.new + + Creates a new Gtk::Assistant. + ((*Since 2.10*)) + + * Returns: a new Gtk::Assistant + +== Instance Methods + +--- current_page + + Returns the page number of the current page. + ((*Since 2.10*)) + + * 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 Gtk::Assistant#set_forward_page_func. + ((*Since 2.10*)) + + * 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 + +--- n_pages + + Returns the number of pages in the assistant. + ((*Since 2.10*)) + + * Returns: The number of pages in the assistant. + +--- get_nth_page(page_num) + + Returns the child widget contained in page number page_num. + ((*Since 2.10*)) + + * 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. + ((*Since 2.10*)) + + * page: a Gtk::Widget + * Returns: the index (starting at 0) of the inserted page + +--- append_page(page) + + Appends a page to the assistant. + ((*Since 2.10*)) + + * 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. + ((*Since 2.10*)) + + * 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{|current_page| ...} + + Sets the page forwarding method to be block, this + method 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. + ((*Since 2.10*)) + + * {|current_page| ... }: the page forwarding block + * current_page: passed argument is the page number used to calculate the next page + * Returns: 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. + ((*Since 2.10*)) + + * page: a page of assistant + * type: the new type for page (Gtk::Assistant#PageType) + * Returns: self + +--- get_page_type(page) + + Gets the page type of the specified page. + ((*Since 2.10*)) + + * page: a page of assistant (Gtk::Widget) + * Returns: the page type of page (Gtk::Assistant#PageType) + +--- 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. + ((*Since 2.10*)) + + * page: a page of assistant (Gtk::Widget) + * title: the new title for page (String) + * Returns: self + +--- get_page_title(page) + + Gets the title for the specified page. + ((*Since 2.10*)) + + * page: a page of assistant (Gtk::Widget) + * 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. + ((*Since 2.10*)) + + * page: a page of assistant (Gtk::Widget) + * pixbuf: the new header image page (Gdk::Pixbuf) + * Returns: self + +--- get_page_header_image(page) + + Gets the header image for the specified page. + ((*Since 2.10*)) + + * page: a page of assistant (Gtk::Widget) + * Returns: the header image for page (Gdk::Pixbuf), 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. + ((*Since 2.10*)) + + * page: a page of assistant (Gtk::Widget) + * pixbuf: the new header image page (Gdk::Pixbuf) + * Returns: self + +--- get_page_side_image(page) + + Gets the header image for the specified page. + ((*Since 2.10*)) + + * page: a page of assistant (Gtk::Widget) + * Returns: the side image for page (Gdk::Pixbuf), 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. + ((*Since 2.10*)) + + * page: a page of assistant (Gtk::Widget) + * complete: the completeness status of the page (true or false) + * Returns: self + +--- get_page_complete(page) + + Gets whether page is complete. + ((*Since 2.10*)) + + * page: a page of assistant (Gtk::Widget) + * Returns: true if page is complete, otherwise false + +--- add_action_widget(child) + + Adds a widget to the action area of the assistant. + ((*Since 2.10*)) + + * child: a Gtk::Widget + * Returns: self + +--- remove_action_widget(child) + + Removes a widget from the action area of the assistant. + ((*Since 2.10*)) + + * 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. + ((*Since 2.10*)) + + * Returns: self + +--- ref_accessible + + See Atk::Implementor#ref_accessible. + +--- set_current_page + + * Returns: self: ((*FIXME*)) + +--- add_child + + See Gtk::Buildable#add_child. + +--- construct_child + + See Gtk::Buildable#construct_child. + +--- get_internal_child + + See Gtk::Buildable#get_internal_child. + +--- name + + See Gtk::Buildable#name. + +--- name= + + See Gtk::Buildable#name=. + +--- set_buildable_property + + See Gtk::Buildable#set_buildable_property. + +--- set_name + + See Gtk::Buildable#set_name. + +== Constants + +=== PageType + +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. + ((*Since 2.10*)) + +--- PAGE_INTRO + + The page contains an introduction to the assistant task. + ((*Since 2.10*)) + +--- PAGE_CONFIRM + + The page lets the user confirm or deny the changes. + ((*Since 2.10*)) + +--- PAGE_SUMMARY + + The page informs the user of the changes done. + ((*Since 2.10*)) + +--- PAGE_PROGRESS + + Used for tasks that take a long time to complete, blocks the + assistant until the page is marked as complete. + ((*Since 2.10*)) + +== Style Properties + +--- content-padding: Integer (Read) + + Number of pixels around the content pages. ((*Since 2.10*)) + * Allowed values: >= 0 + * Default value: 1 + +--- header-padding: Integer (Read) + + Number of pixels around the header. ((*Since 2.10*)) + * Allowed values: >= 0 + * Default value: 6 + +== Child Properties + +--- complete: true or false (Read/Write) + + Whether all required fields on the page have been filled out ((*Since 2.10*)) + +--- header-image: Gdk::Pixbuf (Read/Write) + + Header image for the assistant page ((*Since 2.10*)) + +--- page-type: Gtk::Assistant#PageType (Read/Write) + + The type of the assistant page ((*Since 2.10*)) + +--- sidebar-image: Gdk::Pixbuf (Read/Write) + + Sidebar image for the assistant page ((*Since 2.10*)) + +--- title: String (Read/Write) + + The title of the assistant page ((*Since 2.10*)) + +== 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. + ((*Since 2.10*)) + +--- cancel: self (run last) + + The "cancel" signal is emitted when then the cancel button is + clicked. + ((*Since 2.10*)) + +--- 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. + ((*Since 2.10*)) + +--- 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. + ((*Since 2.10*)) + + * page: the current page (Gtk::Widget) + +== See Also + +== ChangeLog + +* 2007-01-30: Updated. - ((<Masao>)) +* 2006-07-16: new widget binded and documented for 2.10. - ((<gc>)) + +- ((<gc>))