00001
00002
00003 #ifndef _LIBGNOMEUIMM_APPBAR_H
00004 #define _LIBGNOMEUIMM_APPBAR_H
00005
00006
00007 #include <glibmm.h>
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
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
00043
00044
00045 namespace Gnome
00046 {
00047
00048 namespace UI
00049 { class AppBar_Class; }
00050
00051 }
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 }
00072
00073 }
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 }
00088 #endif
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
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
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
00125
00126 public:
00127 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00128 static GType get_type() G_GNUC_CONST;
00129 static GType get_base_type() G_GNUC_CONST;
00130 #endif
00131
00133 GnomeAppBar* gobj() { return reinterpret_cast<GnomeAppBar*>(gobject_); }
00134
00136 const GnomeAppBar* gobj() const { return reinterpret_cast<GnomeAppBar*>(gobject_); }
00137
00138
00139 public:
00140
00141
00142 protected:
00143
00144
00145
00146 virtual void on_clear_prompt();
00147 virtual void on_user_response();
00148
00149
00150 private:
00151
00152 public:
00153
00154 explicit AppBar(bool has_progress = false, bool has_status = true, PreferencesType interactivity = PREFERENCES_NEVER);
00155
00156
00157 Gtk::ProgressBar* get_progress();
00158
00159
00160 Gtk::Widget* get_status();
00161
00162 const Gtk::Widget* get_status() const;
00163
00164
00165 void set_default(const Glib::ustring& default_status);
00166
00167 void set_status(const Glib::ustring& status);
00168
00169 void push(const Glib::ustring& status);
00170
00171 void pop();
00172
00173 void clear_stack();
00174
00175 void set_progress_percentage(gfloat percentage);
00176
00177 void refresh();
00178
00179 void prompt(const Glib::ustring& message, bool modal = true);
00180
00181 void clear_prompt();
00182
00183 Glib::ustring get_response() const;
00184
00185
00186 Glib::SignalProxy0< void > signal_clear_prompt();
00187
00188
00189 Glib::SignalProxy0< void > signal_user_response();
00190
00191
00192 };
00193
00194 }
00195 }
00196
00197
00198 namespace Glib
00199 {
00205 Gnome::UI::AppBar* wrap(GnomeAppBar* object, bool take_copy = false);
00206 }
00207
00208
00209 #endif
00210