1/* $Id: assistant.hg,v 1.4 2006/06/13 17:16:26 murrayc Exp $ */ 2 3/* assistant.h 4 * 5 * Copyright (C) 2004 The gtkmm Development Team 6 * 7 * This library is free software; you can redistribute it and/or 8 * modify it under the terms of the GNU Lesser General Public 9 * License as published by the Free Software Foundation; either 10 * version 2.1 of the License, or (at your option) any later version. 11 * 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 * Lesser General Public License for more details. 16 * 17 * You should have received a copy of the GNU Lesser 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. 20 */ 21 22#include <gtkmm/window.h> 23#include <gdkmm/pixbuf.h> 24 25_DEFS(gtkmm,gtk) 26_PINCLUDE(gtkmm/private/window_p.h) 27 28namespace Gtk 29{ 30 31_WRAP_ENUM(AssistantPageType, GtkAssistantPageType) 32 33/** A widget used to guide users through multi-step operations. 34 * 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. 38 * 39 * @newin{2,10} 40 * @ingroup Dialogs 41 */ 42class Assistant : public Window 43{ 44 _CLASS_GTKOBJECT(Assistant, GtkAssistant, GTK_ASSISTANT, Gtk::Window, GtkWindow) 45 _UNMANAGEABLE 46public: 47 _CTOR_DEFAULT() 48 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) 57 58 typedef sigc::slot<int, int /* current_page */> SlotForwardPage; 59 60 void set_forward_page_func(const SlotForwardPage& slot); 61 _IGNORE(gtk_assistant_set_forward_page_func) 62 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) 78 _WRAP_METHOD(void commit(), gtk_assistant_commit) 79 80 _WRAP_SIGNAL(void prepare(Gtk::Widget* page), "prepare") 81 _WRAP_SIGNAL(void apply(), "apply") 82 _WRAP_SIGNAL(void close(), "close") 83 _WRAP_SIGNAL(void cancel(), "cancel") 84 85 //There are no normal properties. 86 //TODO: Child properties? 87}; 88 89} // namespace Gtk 90 91