00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027 #ifndef GNOME_APPBAR_H
00028 #define GNOME_APPBAR_H
00029
00030 #if HAVE_GNOME
00031 #include <vdk/vdkobj.h>
00032 #include <gnome.h>
00033 class VDKForm;
00042 class VDKGnomeAppBar: public VDKObject
00043 {
00044 VDKObject* progress;
00045 public:
00049 VDKReadWriteValueProp<VDKGnomeAppBar, char*> Status;
00053 VDKReadWriteValueProp<VDKGnomeAppBar, char*> Default;
00057 VDKReadWriteValueProp<VDKGnomeAppBar, float> Progress;
00065 VDKGnomeAppBar(VDKForm* owner,
00066 bool has_progress = true,
00067 bool has_status = true,
00068 GnomePreferencesType interact = GNOME_PREFERENCES_USER);
00072 virtual ~VDKGnomeAppBar();
00073
00078 void Push(char* status)
00079 {
00080 gnome_appbar_push(GNOME_APPBAR(widget),status);
00081 }
00085 void Pop()
00086 {
00087 gnome_appbar_pop(GNOME_APPBAR(widget));
00088 }
00092 void Clear()
00093 {
00094 gnome_appbar_clear_stack(GNOME_APPBAR(widget));
00095 }
00099 void Refresh()
00100 {
00101 gnome_appbar_refresh(GNOME_APPBAR(widget));
00102 }
00103 void SetStatus(char* status)
00104 {
00105 gnome_appbar_set_status(GNOME_APPBAR(widget),status);
00106 }
00107 void SetDefault(char* default_status)
00108 {
00109 gnome_appbar_set_default(GNOME_APPBAR(widget),default_status);
00110 }
00111 void SetProgress(float value)
00112 {
00113 if(progress)
00114 gtk_progress_set_percentage(
00115 GTK_PROGRESS(progress->Widget()),value);
00116 }
00117 float GetProgress()
00118 {
00119 if(progress)
00120 return gtk_progress_get_current_percentage(
00121 GTK_PROGRESS(progress->Widget()));
00122 else
00123 return 0.0;
00124 }
00125
00126 };
00127 #endif
00128
00129 #endif