00001
00002
00003
#ifndef _LIBGNOMEUIMM_APPBAR_H
00004
#define _LIBGNOMEUIMM_APPBAR_H
00005
00006
#include <glibmm.h>
00007
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
#include <libgnomeui/gnome-appbar.h>
00034
#include <gtkmm/box.h>
00035
#include <gtkmm/progressbar.h>
00036
00037
00038
#ifndef DOXYGEN_SHOULD_SKIP_THIS
00039
typedef struct _GnomeAppBar GnomeAppBar;
00040
typedef struct _GnomeAppBarClass GnomeAppBarClass;
00041
#endif
00042
00043
00044
namespace Gnome
00045 {
00046
00047
namespace UI
00048 {
class AppBar_Class; }
00049
00050 }
00051
namespace Gnome
00052 {
00053
00054
namespace UI
00055 {
00056
00057
00063 enum PreferencesType
00064 {
00065 PREFERENCES_NEVER,
00066 PREFERENCES_USER,
00067 PREFERENCES_ALWAYS
00068 };
00069
00070 }
00071
00072 }
00073
00074
00075
#ifndef DOXYGEN_SHOULD_SKIP_THIS
00076
namespace Glib
00077 {
00078
00079
template <>
00080
class Value<Gnome::UI::
PreferencesType> :
public Glib::Value_Enum<Gnome::UI::PreferencesType>
00081 {
00082
public:
00083
static GType
value_type() G_GNUC_CONST;
00084 };
00085
00086 }
00087 #endif
00088
00089
00090 namespace Gnome
00091 {
00092
00093
namespace UI
00094 {
00095
00096
00097 class AppBar :
public Gtk::HBox
00098 {
00099
public:
00100
#ifndef DOXYGEN_SHOULD_SKIP_THIS
00101
typedef AppBar CppObjectType;
00102
typedef AppBar_Class CppClassType;
00103
typedef GnomeAppBar BaseObjectType;
00104
typedef GnomeAppBarClass BaseClassType;
00105
#endif
00106
00107
virtual ~
AppBar();
00108
00109
#ifndef DOXYGEN_SHOULD_SKIP_THIS
00110
00111
private:
00112
friend class AppBar_Class;
00113
static CppClassType appbar_class_;
00114
00115
00116
AppBar(
const AppBar&);
00117
AppBar& operator=(
const AppBar&);
00118
00119
protected:
00120
explicit AppBar(
const Glib::ConstructParams& construct_params);
00121
explicit AppBar(GnomeAppBar* castitem);
00122
00123
#endif
00124
00125
public:
00126
#ifndef DOXYGEN_SHOULD_SKIP_THIS
00127
static GType get_type() G_GNUC_CONST;
00128
static GType get_base_type() G_GNUC_CONST;
00129
#endif
00130
00132 GnomeAppBar*
gobj() {
return reinterpret_cast<GnomeAppBar*>(gobject_); }
00133
00135 const GnomeAppBar*
gobj()
const {
return reinterpret_cast<GnomeAppBar*>(gobject_); }
00136
00137
00138
public:
00139
00140
00141
protected:
00142
00143
00144
00145
virtual void on_clear_prompt();
00146
virtual void on_user_response();
00147
00148
00149
private:
00150
00151
public:
00152
00153
explicit AppBar(
bool has_progress =
false,
bool has_status =
true, PreferencesType interactivity = PREFERENCES_NEVER);
00154
00155
00156
Gtk::ProgressBar* get_progress();
00157
00158
00159
Gtk::Widget* get_status();
00160
00161
const Gtk::Widget* get_status() const;
00162
00163
00164
void set_default(const Glib::ustring& default_status);
00165
00166
void set_status(const Glib::ustring& status);
00167
00168
void push(const Glib::ustring& status);
00169
00170
void pop();
00171
00172
void clear_stack();
00173
00174
void set_progress_percentage(gfloat percentage);
00175
00176
void refresh();
00177
00178
void prompt(const Glib::ustring& message,
bool modal = true);
00179
00180
void clear_prompt();
00181
00182 Glib::ustring get_response() const;
00183
00184
00189 Glib::SignalProxy0<
void> signal_clear_prompt();
00190
00191
00196 Glib::SignalProxy0<
void> signal_user_response();
00197
00198
00199 };
00200
00201 }
00202 }
00203
00204 namespace Glib
00205 {
00207
Gnome::UI::AppBar*
wrap(GnomeAppBar* object,
bool take_copy =
false);
00208 }
00209
#endif
00210