vdk 2.4.0
vdkgnomeappbar.h
1/*
2 * ===========================
3 * VDK Visual Develeopment Kit
4 * Version 1.0.4
5 * December 1999
6 * ===========================
7 *
8 * Copyright (C) 1998, Mario Motta
9 * Developed by Mario Motta <mmotta@guest.net>
10 *
11 * This library is free software; you can redistribute it and/or
12 * modify it under the terms of the GNU Library General Public
13 * License as published by the Free Software Foundation; either
14 * version 2 of the License, or (at your option) any later version.
15 *
16 * This library is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 * Library General Public License for more details.
20 *
21 * You should have received a copy of the GNU Library General Public
22 * License along with this library; if not, write to the Free Software
23 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
24 * 02111-1307, USA.
25 */
26
27#ifndef GNOME_APPBAR_H
28#define GNOME_APPBAR_H
29
30#if HAVE_GNOME
31#include <vdk/vdkobj.h>
32#include <gnome.h>
33class VDKForm;
42class VDKGnomeAppBar: public VDKObject
43{
44 VDKObject* progress;
45 public:
49 VDKReadWriteValueProp<VDKGnomeAppBar, char*> Status;
53 VDKReadWriteValueProp<VDKGnomeAppBar, char*> Default;
57 VDKReadWriteValueProp<VDKGnomeAppBar, float> Progress;
65 VDKGnomeAppBar(VDKForm* owner,
66 bool has_progress = true,
67 bool has_status = true,
68 GnomePreferencesType interact = GNOME_PREFERENCES_USER);
72 virtual ~VDKGnomeAppBar();
73
78 void Push(char* status)
79 {
80 gnome_appbar_push(GNOME_APPBAR(widget),status);
81 }
85 void Pop()
86 {
87 gnome_appbar_pop(GNOME_APPBAR(widget));
88 }
92 void Clear()
93 {
94 gnome_appbar_clear_stack(GNOME_APPBAR(widget));
95 }
99 void Refresh()
100 {
101 gnome_appbar_refresh(GNOME_APPBAR(widget));
102 }
103 void SetStatus(char* status)
104 {
105 gnome_appbar_set_status(GNOME_APPBAR(widget),status);
106 }
107 void SetDefault(char* default_status)
108 {
109 gnome_appbar_set_default(GNOME_APPBAR(widget),default_status);
110 }
111 void SetProgress(float value)
112 {
113 if(progress)
114 gtk_progress_set_percentage(
115 GTK_PROGRESS(progress->Widget()),value);
116 }
117 float GetProgress()
118 {
119 if(progress)
120 return gtk_progress_get_current_percentage(
121 GTK_PROGRESS(progress->Widget()));
122 else
123 return 0.0;
124 }
125
126};
127#endif
128
129#endif
VDKForm widgets, generally the outermost widget container.
Definition: forms.h:69
Definition: vdkobj.h:141
virtual GtkWidget * Widget()
Definition: vdkobj.cc:49