1 /* $Id: assistant.hg,v 1.4 2006/06/13 17:16:26 murrayc Exp $ */
5 * Copyright (C) 2004 The gtkmm Development Team
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version.
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Library General Public License for more details.
17 * You should have received a copy of the GNU Library General Public
18 * License along with this library; if not, write to the Free
19 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
22 #include <gtkmm/window.h>
23 #include <gdkmm/pixbuf.h>
26 _PINCLUDE(gtkmm/private/window_p.h)
31 _WRAP_ENUM(AssistantPageType, GtkAssistantPageType)
33 /** A widget used to guide users through multi-step operations.
35 * A Gtk::Assistant is a widget used to represent a generally complex
36 * operation split into several steps, guiding the user through its
37 * pages and controlling the page flow to collect the necessary data.
42 class Assistant : public Window
44 _CLASS_GTKOBJECT(Assistant, GtkAssistant, GTK_ASSISTANT, Gtk::Window, GtkWindow)
49 _WRAP_METHOD(int get_current_page() const, gtk_assistant_get_current_page)
50 _WRAP_METHOD(void set_current_page(int page_num), gtk_assistant_set_current_page)
51 _WRAP_METHOD(int get_n_pages() const, gtk_assistant_get_n_pages)
52 _WRAP_METHOD(Widget* get_nth_page(int page_num), gtk_assistant_get_nth_page)
53 _WRAP_METHOD(const Widget* get_nth_page(int page_num) const, gtk_assistant_get_nth_page, constversion)
54 _WRAP_METHOD(int prepend_page(Widget& page), gtk_assistant_prepend_page)
55 _WRAP_METHOD(int append_page(Widget& page), gtk_assistant_append_page)
56 _WRAP_METHOD(int insert_page(Widget& page, int position), gtk_assistant_insert_page)
58 typedef sigc::slot<int, int /* current_page */> SlotForwardPage;
60 void set_forward_page_func(const SlotForwardPage& slot);
61 _IGNORE(gtk_assistant_set_forward_page_func)
63 _WRAP_METHOD(void set_page_type(const Widget& page, AssistantPageType type), gtk_assistant_set_page_type)
64 _WRAP_METHOD(AssistantPageType get_page_type(const Widget& page) const, gtk_assistant_get_page_type)
65 _WRAP_METHOD(void set_page_title(const Widget& page, const Glib::ustring& title), gtk_assistant_set_page_title)
66 _WRAP_METHOD(Glib::ustring get_page_title(const Widget& page) const, gtk_assistant_get_page_title)
67 _WRAP_METHOD(void set_page_header_image(const Widget& page, const Glib::RefPtr<Gdk::Pixbuf>& pixbuf), gtk_assistant_set_page_header_image)
68 _WRAP_METHOD(Glib::RefPtr<Gdk::Pixbuf> get_page_header_image(const Widget& page), gtk_assistant_get_page_header_image)
69 _WRAP_METHOD(Glib::RefPtr<const Gdk::Pixbuf> get_page_header_image(const Widget& page) const, gtk_assistant_get_page_header_image, constversion)
70 _WRAP_METHOD(void set_page_side_image(const Widget& page, const Glib::RefPtr<Gdk::Pixbuf>& pixbuf), gtk_assistant_set_page_side_image)
71 _WRAP_METHOD(Glib::RefPtr<Gdk::Pixbuf> get_page_side_image(const Widget& page), gtk_assistant_get_page_side_image)
72 _WRAP_METHOD(Glib::RefPtr<const Gdk::Pixbuf> get_page_side_image(const Widget& page) const, gtk_assistant_get_page_side_image, constversion)
73 _WRAP_METHOD(void set_page_complete(const Widget& page, bool complete = true), gtk_assistant_set_page_complete)
74 _WRAP_METHOD(bool get_page_complete(const Widget& page) const, gtk_assistant_get_page_complete)
75 _WRAP_METHOD(void add_action_widget(Widget& child), gtk_assistant_add_action_widget)
76 _WRAP_METHOD(void remove_action_widget(Widget& child), gtk_assistant_remove_action_widget)
77 _WRAP_METHOD(void update_buttons_state(), gtk_assistant_update_buttons_state)
79 _WRAP_SIGNAL(void prepare(Gtk::Widget* page), "prepare")
80 _WRAP_SIGNAL(void apply(), "apply")
81 _WRAP_SIGNAL(void close(), "close")
82 _WRAP_SIGNAL(void cancel(), "cancel")
84 //TODO: Child properties?