Reference Manual

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

# adjustment.h

Go to the documentation of this file.

    00001 /*  Inti: Integrated Foundation Classes
    00002  *  Copyright (C) 2002 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
    00027
    00028 #ifndef INTI_GTK_ADJUSTMENT_H
    00029 #define INTI_GTK_ADJUSTMENT_H
    00030
    00031 #ifndef INTI_GTK_OBJECT_H
    00032 #include <inti/gtk/object.h>
    00033 #endif
    00034
    00035 #ifndef __GTK_ADJUSTMENT_H__
    00036 #include <gtk/gtkadjustment.h>
    00037 #endif
    00038
    00039 namespace Inti {
    00040
    00041 namespace Gtk {
    00042
    00043 class AdjustmentClass;
    00044
    00058
    00059 class Adjustment : public Object
    00060 {
    00061         friend class G::Object;
    00062         friend class AdjustmentClass;
    00063
    00064         Adjustment(const Adjustment&);
    00065         Adjustment& operator=(const Adjustment&);
    00066
    00067 protected:
    00070
    00071         explicit Adjustment(GtkAdjustment *adjustment, bool reference = false);
    00078
    00082
    00083         virtual void on_changed();
    00085
    00086         virtual void on_value_changed();
    00088
    00090 //  Signals
    00091
    00092         typedef G::Signal0<void> ChangedSignalType;
    00093         typedef G::SignalProxy<TypeInstance, ChangedSignalType> ChangedSignalProxy;
    00094         static const ChangedSignalType changed_signal;
    00095
    00096         typedef G::Signal0<void> ValueChangedSignalType;
    00097         typedef G::SignalProxy<TypeInstance, ValueChangedSignalType> ValueChangedSignalProxy;
    00098         static const ValueChangedSignalType value_changed_signal;
    00099
    00100 public:
    00103
    00104         Adjustment();
    00106
    00107         Adjustment(double lower, double upper, double step_increment, double page_increment, double page_size);
    00121
    00122         Adjustment(double value, double lower, double upper, double step_increment, double page_increment, double page_size);
    00133
    00134         virtual ~Adjustment();
    00136
    00140
    00141         GtkAdjustment* gtk_adjustment() const { return (GtkAdjustment*)instance; }
    00143
    00144         GtkAdjustmentClass* gtk_adjustment_class() const;
    00146
    00147         operator GtkAdjustment* () const;
    00149
    00150         double lower() const;
    00152
    00153         double upper() const;
    00155
    00156         double step_increment() const;
    00158
    00159         double page_increment() const;
    00161
    00162         double page_size() const;
    00164
    00165         double get_value() const;
    00167
    00171
    00172         void changed();
    00176
    00177         void value_changed();
    00181
    00182         void clamp_page(double lower, double upper);
    00191
    00192         void set_value(double value);
    00195
    00196         void set_range(double lower, double upper, double step_increment, double page_increment, double page_size);
    00206
    00210
    00211         const ChangedSignalProxy sig_changed()
    00212         {
    00213                 return ChangedSignalProxy(this, &changed_signal);
    00214         }
    00217
    00218         const ValueChangedSignalProxy sig_value_changed()
    00219         {
    00220                 return ValueChangedSignalProxy(this, &value_changed_signal);
    00221         }
    00223
    00225 };
    00226
    00227 } // namespace Gtk
    00228
    00229 } // namespace Inti
    00230
    00231 #endif // INTI_GTK_ADJUSTMENT_H
    00232

Main Page - Footer