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
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
00143 #ifdef GLIBMM_VFUNCS_ENABLED
00144 #endif //GLIBMM_VFUNCS_ENABLED
00145
00146 protected:
00147
00148 #ifdef GLIBMM_VFUNCS_ENABLED
00149 #endif //GLIBMM_VFUNCS_ENABLED
00150
00151
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 }
00213 }
00214
00215
00216 namespace Glib
00217 {
00226 Gnome::UI::AppBar* wrap(GnomeAppBar* object, bool take_copy = false);
00227 }
00228
00229
00230 #endif
00231