Reference Manual
Inti Logo
Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Namespace Members | Compound Members | File Members

progressbar.h

Go to the documentation of this file.
00001 /*  Inti: Integrated Foundation Classes
00002  *  Copyright (C) 2002 The Inti Development Team.
00003  *
00004  *  This program is free software; you can redistribute it and/or modify
00005  *  it under the terms of the GNU General Public License as published by
00006  *  the Free Software Foundation; either version 2 of the License, or
00007  *  (at your option) any later version.
00008  *
00009  *  This program is distributed in the hope that it will be useful,
00010  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012  *  GNU Library General Public License for more details.
00013  *
00014  *  You should have received a copy of the GNU Library General Public License
00015  *  along with this program; if not, write to the Free Software
00016  *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
00017  */
00018  
00024 
00025 #ifndef INTI_GTK_PROGRESS_BAR_H
00026 #define INTI_GTK_PROGRESS_BAR_H
00027 
00028 #ifndef INTI_GTK_WIDGET_H
00029 #include <inti/gtk/widget.h>
00030 #endif
00031 
00032 #ifndef __GTK_PROGRESS_BAR_H__
00033 #include <gtk/gtkprogressbar.h>
00034 #endif
00035 
00036 namespace Inti {
00037 
00038 namespace Gtk {
00039 
00040 class ProgressBarClass;
00041 
00044 
00045 enum ProgressBarOrientation
00046 {
00047         PROGRESS_LEFT_TO_RIGHT = GTK_PROGRESS_LEFT_TO_RIGHT, 
00049 
00050         PROGRESS_RIGHT_TO_LEFT = GTK_PROGRESS_RIGHT_TO_LEFT, 
00052 
00053         PROGRESS_BOTTOM_TO_TOP = GTK_PROGRESS_BOTTOM_TO_TOP, 
00055 
00056         PROGRESS_TOP_TO_BOTTOM = GTK_PROGRESS_TOP_TO_BOTTOM
00058 };
00059 
00081 
00082 class ProgressBar : public Widget
00083 {
00084         friend class G::Object;
00085         friend class ProgressBarClass;
00086 
00087         ProgressBar(const ProgressBar&);
00088         ProgressBar& operator=(const ProgressBar&);
00089         
00090 protected:
00093 
00094         explicit ProgressBar(GtkProgressBar *progress_bar, bool reference = false);
00101 
00103 //  Properties
00104 
00105         typedef G::Property<ProgressBarOrientation, int> OrientationPropertyType;
00106         typedef G::PropertyProxy<G::Object, OrientationPropertyType> OrientationPropertyProxy;
00107         static const OrientationPropertyType orientation_property;
00108 
00109         typedef G::Property<double> FractionPropertyType;
00110         typedef G::PropertyProxy<G::Object, FractionPropertyType> FractionPropertyProxy;
00111         static const FractionPropertyType fraction_property;
00112 
00113         typedef G::Property<double> PulseStepPropertyType;
00114         typedef G::PropertyProxy<G::Object, PulseStepPropertyType> PulseStepPropertyProxy;
00115         static const PulseStepPropertyType pulse_step_property;
00116 
00117         typedef G::Property<String> TextPropertyType;
00118         typedef G::PropertyProxy<G::Object, TextPropertyType> TextPropertyProxy;
00119         static const TextPropertyType text_property;
00120 
00121 public:
00124 
00125         ProgressBar();
00127 
00128         explicit ProgressBar(ProgressBarOrientation orientation);
00131 
00132         virtual ~ProgressBar();
00134 
00138 
00139         GtkProgressBar* gtk_progress_bar() const { return (GtkProgressBar*)instance; }
00141 
00142         GtkProgressBarClass* gtk_progress_bar_class() const;
00144 
00145         operator GtkProgressBar* () const;
00147 
00148         String get_text() const;
00150 
00151         double get_fraction() const;
00154 
00155         double get_pulse_step() const;
00158 
00159         ProgressBarOrientation get_orientation() const;
00161 
00165 
00166         void pulse();
00171 
00172         void set_text(const String& text);
00175 
00176         void set_fraction(double fraction);
00181 
00182         void set_pulse_step(double fraction);
00186 
00187         void set_orientation(ProgressBarOrientation orientation);
00191 
00195 
00196         const OrientationPropertyProxy prop_orientation()
00197         {
00198                 return OrientationPropertyProxy(this, &orientation_property);
00199         }
00201 
00202         const FractionPropertyProxy prop_fraction()
00203         {
00204                 return FractionPropertyProxy(this, &fraction_property);
00205         }
00207 
00208         const PulseStepPropertyProxy prop_pulse_step()
00209         {
00210                 return PulseStepPropertyProxy(this, &pulse_step_property);
00211         }
00213 
00214         const TextPropertyProxy prop_text()
00215         {
00216                 return TextPropertyProxy(this, &text_property);
00217         }
00219 
00221 };
00222 
00223 } // namespace Gtk
00224 
00225 } // namespace Inti
00226 
00227 #endif // INTI_GTK_PROGRESS_BAR_H
00228 
Main Page - Footer


Generated on Sun Sep 14 20:08:03 2003 for Inti by doxygen 1.3.2 written by Dimitri van Heesch, © 1997-2002