libgnomeuimm 2.28.0
|
00001 // -*- c++ -*- 00002 // Generated by gtkmmproc -- DO NOT MODIFY! 00003 #ifndef _LIBGNOMEUIMM_APPBAR_H 00004 #define _LIBGNOMEUIMM_APPBAR_H 00005 00006 00007 #include <glibmm.h> 00008 00009 // -*- C++ -*- 00010 /* $Id: appbar.hg,v 1.11 2002/09/15 12:12:37 murrayc Exp $ */ 00011 00012 /* appbar.h 00013 * 00014 * Copyright (C) 1998 EMC Capital Management Inc. 00015 * Developed by Havoc Pennington <hp@pobox.com> 00016 * 00017 * Copyright (C) 1999 The Gtk-- Development Team 00018 * 00019 * This library is free software; you can redistribute it and/or 00020 * modify it under the terms of the GNU Lesser General Public 00021 * License as published by the Free Software Foundation; either 00022 * version 2.1 of the License, or (at your option) any later version. 00023 * 00024 * This library is distributed in the hope that it will be useful, 00025 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00026 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00027 * Lesser General Public License for more details. 00028 * 00029 * You should have received a copy of the GNU Lesser General Public 00030 * License along with this library; if not, write to the Free 00031 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 00032 */ 00033 00034 #include <libgnomeui/gnome-appbar.h> 00035 #include <gtkmm/box.h> 00036 #include <gtkmm/progressbar.h> 00037 00038 00039 #ifndef DOXYGEN_SHOULD_SKIP_THIS 00040 typedef struct _GnomeAppBar GnomeAppBar; 00041 typedef struct _GnomeAppBarClass GnomeAppBarClass; 00042 #endif /* DOXYGEN_SHOULD_SKIP_THIS */ 00043 00044 00045 namespace Gnome 00046 { 00047 00048 namespace UI 00049 { class AppBar_Class; } // namespace UI 00050 00051 } // namespace Gnome 00052 namespace Gnome 00053 { 00054 00055 namespace UI 00056 { 00057 00058 00064 enum PreferencesType 00065 { 00066 PREFERENCES_NEVER, 00067 PREFERENCES_USER, 00068 PREFERENCES_ALWAYS 00069 }; 00070 00071 } // namespace UI 00072 00073 } // namespace Gnome 00074 00075 00076 #ifndef DOXYGEN_SHOULD_SKIP_THIS 00077 namespace Glib 00078 { 00079 00080 template <> 00081 class Value<Gnome::UI::PreferencesType> : public Glib::Value_Enum<Gnome::UI::PreferencesType> 00082 { 00083 public: 00084 static GType value_type() G_GNUC_CONST; 00085 }; 00086 00087 } // namespace Glib 00088 #endif /* DOXYGEN_SHOULD_SKIP_THIS */ 00089 00090 00091 namespace Gnome 00092 { 00093 00094 namespace UI 00095 { 00096 00097 00098 class AppBar : public Gtk::HBox 00099 { 00100 public: 00101 #ifndef DOXYGEN_SHOULD_SKIP_THIS 00102 typedef AppBar CppObjectType; 00103 typedef AppBar_Class CppClassType; 00104 typedef GnomeAppBar BaseObjectType; 00105 typedef GnomeAppBarClass BaseClassType; 00106 #endif /* DOXYGEN_SHOULD_SKIP_THIS */ 00107 00108 virtual ~AppBar(); 00109 00110 #ifndef DOXYGEN_SHOULD_SKIP_THIS 00111 00112 private: 00113 friend class AppBar_Class; 00114 static CppClassType appbar_class_; 00115 00116 // noncopyable 00117 AppBar(const AppBar&); 00118 AppBar& operator=(const AppBar&); 00119 00120 protected: 00121 explicit AppBar(const Glib::ConstructParams& construct_params); 00122 explicit AppBar(GnomeAppBar* castitem); 00123 00124 #endif /* DOXYGEN_SHOULD_SKIP_THIS */ 00125 00126 public: 00127 #ifndef DOXYGEN_SHOULD_SKIP_THIS 00128 static GType get_type() G_GNUC_CONST; 00129 00130 00131 static GType get_base_type() G_GNUC_CONST; 00132 #endif 00133 00135 GnomeAppBar* gobj() { return reinterpret_cast<GnomeAppBar*>(gobject_); } 00136 00138 const GnomeAppBar* gobj() const { return reinterpret_cast<GnomeAppBar*>(gobject_); } 00139 00140 00141 public: 00142 //C++ methods used to invoke GTK+ virtual functions: 00143 #ifdef GLIBMM_VFUNCS_ENABLED 00144 #endif //GLIBMM_VFUNCS_ENABLED 00145 00146 protected: 00147 //GTK+ Virtual Functions (override these to change behaviour): 00148 #ifdef GLIBMM_VFUNCS_ENABLED 00149 #endif //GLIBMM_VFUNCS_ENABLED 00150 00151 //Default Signal Handlers:: 00152 #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED 00153 virtual void on_clear_prompt(); 00154 virtual void on_user_response(); 00155 #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED 00156 00157 00158 private: 00159 00160 public: 00161 00162 explicit AppBar(bool has_progress = false, bool has_status = true, PreferencesType interactivity = PREFERENCES_NEVER); 00163 00164 00165 Gtk::ProgressBar* get_progress(); 00166 00167 00168 Gtk::Widget* get_status(); 00169 00170 const Gtk::Widget* get_status() const; 00171 00172 00173 void set_default(const Glib::ustring& default_status); 00174 00175 void set_status(const Glib::ustring& status); 00176 00177 void push(const Glib::ustring& status); 00178 00179 void pop(); 00180 00181 void clear_stack(); 00182 00183 void set_progress_percentage(gfloat percentage); 00184 00185 void refresh(); 00186 00187 void prompt(const Glib::ustring& message, bool modal = true); 00188 00189 void clear_prompt(); 00190 00191 Glib::ustring get_response() const; 00192 00193 00199 Glib::SignalProxy0< void > signal_clear_prompt(); 00200 00201 00207 Glib::SignalProxy0< void > signal_user_response(); 00208 00209 00210 }; 00211 00212 } /* namespace UI */ 00213 } /* namespace Gnome */ 00214 00215 00216 namespace Glib 00217 { 00226 Gnome::UI::AppBar* wrap(GnomeAppBar* object, bool take_copy = false); 00227 } //namespace Glib 00228 00229 00230 #endif /* _LIBGNOMEUIMM_APPBAR_H */ 00231