GFC Logo GFC Title Logo
Reference Manual
Main Page  |  Namespace List  |  Alphabetical List  |  Class List  |  File List

scale.hh

Go to the documentation of this file.
00001 /* GFC-UI: GTK+ Foundation Classes (User Interface Library) 00002 * Copyright (C) 2002-2004 The GFC 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 00023 00024 #ifndef GFC_GTK_SCALE_HH 00025 #define GFC_GTK_SCALE_HH 00026 00027 #ifndef GFC_GTK_RANGE_HH 00028 #include <gfc/gtk/range.hh> 00029 #endif 00030 00031 #ifndef __GTK_HSCALE_H__ 00032 #include <gtk/gtkhscale.h> 00033 #endif 00034 00035 #ifndef __GTK_VSCALE_H__ 00036 #include <gtk/gtkvscale.h> 00037 #endif 00038 00039 namespace GFC { 00040 00041 namespace Pango { 00042 class Layout; 00043 } 00044 00045 namespace Gtk { 00046 00056 00057 class Scale : public Range 00058 { 00059 friend class G::Object; 00060 00061 Scale(const Scale&); 00062 Scale& operator=(const Scale&); 00063 00064 protected: 00067 00068 Scale(); 00070 00071 explicit Scale(GtkScale *scale, bool owns_reference = false); 00078 00079 virtual ~Scale() = 0; 00081 00084 00085 typedef G::Signal<char*, double> FormatValueSignalType; 00086 typedef G::SignalProxy<TypeInstance, FormatValueSignalType> FormatValueSignalProxy; 00087 static const FormatValueSignalType format_value_signal; 00094 00096 00097 public: 00100 00101 GtkScale* gtk_scale() const; 00103 00104 operator GtkScale* () const; 00106 00107 int get_digits() const; 00109 00110 bool get_draw_value() const; 00112 00113 PositionType get_value_pos() const; 00116 00117 Pango::Layout* get_layout() const; 00120 00121 void get_layout_offsets(int *x, int *y) const; 00130 00134 00135 void set_digits(int digits); 00141 00142 void set_draw_value(bool draw_value); 00145 00146 void set_value_pos(PositionType pos); 00149 00153 00154 const FormatValueSignalProxy sig_format_value(); 00156 00158 }; 00159 00166 00167 class HScale : public Scale 00168 { 00169 friend class G::Object; 00170 00171 HScale(const HScale&); 00172 HScale& operator=(const HScale&); 00173 00174 protected: 00177 00178 explicit HScale(GtkHScale *hscale, bool owns_reference = false); 00185 00187 00188 public: 00191 00192 HScale(); 00194 00195 explicit HScale(Adjustment& adjustment); 00198 00199 HScale(double min, double max, double step = 1.0); 00208 00209 virtual ~HScale(); 00211 00215 00216 GtkHScale* gtk_hscale() const; 00218 00219 operator GtkHScale* () const; 00221 00223 }; 00224 00231 00232 class VScale : public Scale 00233 { 00234 friend class G::Object; 00235 00236 VScale(const VScale&); 00237 VScale& operator=(const VScale&); 00238 00239 protected: 00242 00243 explicit VScale(GtkVScale *vscale, bool owns_reference = false); 00250 00252 00253 public: 00256 00257 VScale(); 00259 00260 explicit VScale(Adjustment& adjustment); 00263 00264 VScale(double min, double max, double step = 1.0); 00273 00274 virtual ~VScale(); 00276 00280 00281 GtkVScale* gtk_vscale() const; 00283 00284 operator GtkVScale* () const; 00286 00288 }; 00289 00290 } // namespace Gtk 00291 00292 } // namespace GFC 00293 00294 #include <gfc/gtk/inline/scale.inl> 00295 00296 #endif // GFC_GTK_SCALE_HH 00297

Generated on Tue Aug 24 00:34:32 2004 for GFC-UI by doxygen 1.3.8