Main Page - Header
Author: The Inti Development Team

Reference Manual

Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Namespace Members | Compound Members | File Members

# range.h

Go to the documentation of this file.

    00001 /*  Inti: Integrated Foundation Classes
    00002  *  Copyright (C) 2002-2003 The Inti Development Team.
    00003  *  Copyright (C) 2000 Red Hat, Inc.
    00004  *
    00005  *  This program is free software; you can redistribute it and/or modify
    00006  *  it under the terms of the GNU General Public License as published by
    00007  *  the Free Software Foundation; either version 2 of the License, or
    00008  *  (at your option) any later version.
    00009  *
    00010  *  This program is distributed in the hope that it will be useful,
    00011  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    00012  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    00013  *  GNU Library General Public License for more details.
    00014  *
    00015  *  You should have received a copy of the GNU Library General Public License
    00016  *  along with this program; if not, write to the Free Software
    00017  *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
    00018  */
    00019
    00025
    00026 #ifndef INTI_GTK_RANGE_H
    00027 #define INTI_GTK_RANGE_H
    00028
    00029 #ifndef INTI_GTK_WIDGET_H
    00030 #include <inti/gtk/widget.h>
    00031 #endif
    00032
    00033 #ifndef __GTK_RANGE_H__
    00034 #include <gtk/gtkrange.h>
    00035 #endif
    00036
    00037 namespace Inti {
    00038
    00039 namespace Gtk {
    00040
    00041 class RangeClass;
    00042
    00047
    00048 class Range : public Widget
    00049 {
    00050         friend class G::Object;
    00051         friend class RangeClass;
    00052
    00053         Range(const Range&);
    00054         Range& operator=(const Range&);
    00055
    00056 protected:
    00059
    00060         Range();
    00062
    00063         explicit Range(GtkRange *range, bool reference = false);
    00070
    00071         virtual ~Range() = 0;
    00073
    00075 //  Override this do_ method only when you want to change the default behaviour of GtkRange.
    00076
    00077         virtual void do_get_range_border(GtkBorder *border);
    00078
    00081
    00082         virtual void on_value_changed();
    00084
    00085         virtual void on_adjust_bounds(double new_value);
    00088
    00090 //  Properties
    00091
    00092         typedef G::Property<UpdateType, int> UpdatePolicyPropertyType;
    00093         typedef G::PropertyProxy<G::Object, UpdatePolicyPropertyType> UpdatePolicyPropertyProxy;
    00094         static const UpdatePolicyPropertyType update_policy_property;
    00095
    00096         typedef G::Property<Adjustment*, G::Object*> AdjustmentPropertyType;
    00097         typedef G::PropertyProxy<G::Object, AdjustmentPropertyType> AdjustmentPropertyProxy;
    00098         static const AdjustmentPropertyType adjustment_property;
    00099
    00100         typedef G::Property<bool> InvertedPropertyType;
    00101         typedef G::PropertyProxy<G::Object, InvertedPropertyType> InvertedPropertyProxy;
    00102         static const InvertedPropertyType inverted_property;
    00103
    00104 //  Signals
    00105
    00106         typedef G::Signal0<void> ValueChangedSignalType;
    00107         typedef G::SignalProxy<TypeInstance, ValueChangedSignalType> ValueChangedSignalProxy;
    00108         static const ValueChangedSignalType value_changed_signal;
    00109
    00110         typedef G::Signal1<void, double> AdjustBoundsSignalType;
    00111         typedef G::SignalProxy<TypeInstance, AdjustBoundsSignalType> AdjustBoundsSignalProxy;
    00112         static const AdjustBoundsSignalType adjust_bounds_signal;
    00113
    00114 public:
    00117
    00118         GtkRange* gtk_range() const { return (GtkRange*)instance; }
    00120
    00121         GtkRangeClass* gtk_range_class() const;
    00123
    00124         operator GtkRange* () const;
    00126
    00127         UpdateType get_policy() const;
    00130
    00131         Adjustment* get_adjustment() const;
    00136
    00137         bool get_inverted() const;
    00140
    00141         double get_value() const;
    00143
    00147
    00148         void set_round_digits(int round_digits);
    00150
    00151         void set_update_policy(UpdateType policy);
    00160
    00161         void set_adjustment(Adjustment *adjustment);
    00170
    00171         void set_inverted(bool setting);
    00178
    00179         void set_increments(double step, double page);
    00186
    00187         void set_range(double min, double max);
    00193
    00194         void set_value(double value);
    00200
    00204
    00205         const UpdatePolicyPropertyProxy prop_update_policy()
    00206         {
    00207                 return UpdatePolicyPropertyProxy(this, &update_policy_property);
    00208         }
    00210
    00211         const AdjustmentPropertyProxy prop_adjustment()
    00212         {
    00213                 return AdjustmentPropertyProxy(this, &adjustment_property);
    00214         }
    00217
    00218         const InvertedPropertyProxy prop_inverted()
    00219         {
    00220                 return InvertedPropertyProxy(this, &inverted_property);
    00221         }
    00223
    00227
    00228         const ValueChangedSignalProxy sig_value_changed()
    00229         {
    00230                 return ValueChangedSignalProxy(this, &value_changed_signal);
    00231         }
    00233
    00234         const AdjustBoundsSignalProxy sig_adjust_bounds()
    00235         {
    00236                 return AdjustBoundsSignalProxy(this, &adjust_bounds_signal);
    00237         }
    00240
    00242 };
    00243
    00244 } // namespace Gtk
    00245
    00246 } // namespace Inti
    00247
    00248 #endif // INTI_GTK_RANGE_H
    00249

Main Page - Footer