1 // -*- c++ -*-
2 // Generated by gmmproc 2.45.3 -- DO NOT MODIFY!
3 #ifndef _GTKMM_RULER_H
4 #define _GTKMM_RULER_H
5 
6 
7 #ifndef GTKMM_DISABLE_DEPRECATED
8 
9 
10 #include <glibmm/ustring.h>
11 #include <sigc++/sigc++.h>
12 
13 /* $Id: ruler.hg,v 1.1 2003/01/21 13:40:35 murrayc Exp $ */
14 
15 /* ruler.h
16  *
17  * Copyright (C) 1998-2002 The gtkmm Development Team
18  *
19  * This library is free software; you can redistribute it and/or
20  * modify it under the terms of the GNU Lesser General Public
21  * License as published by the Free Software Foundation; either
22  * version 2.1 of the License, or (at your option) any later version.
23  *
24  * This library is distributed in the hope that it will be useful,
25  * but WITHOUT ANY WARRANTY; without even the implied warranty of
26  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
27  * Lesser General Public License for more details.
28  *
29  * You should have received a copy of the GNU Lesser General Public
30  * License along with this library; if not, write to the Free
31  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
32  */
33 
34 #include <gtkmm/widget.h>
35 
36 
37 #ifndef DOXYGEN_SHOULD_SKIP_THIS
38 typedef struct _GtkRuler GtkRuler;
39 typedef struct _GtkRulerClass GtkRulerClass;
40 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
41 
42 
43 namespace Gtk
44 { class Ruler_Class; } // namespace Gtk
45 #ifndef DOXYGEN_SHOULD_SKIP_THIS
46 typedef struct _GtkVRuler GtkVRuler;
47 typedef struct _GtkVRulerClass GtkVRulerClass;
48 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
49 
50 
51 namespace Gtk
52 { class VRuler_Class; } // namespace Gtk
53 #ifndef DOXYGEN_SHOULD_SKIP_THIS
54 typedef struct _GtkHRuler GtkHRuler;
55 typedef struct _GtkHRulerClass GtkHRulerClass;
56 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
57 
58 
59 namespace Gtk
60 { class HRuler_Class; } // namespace Gtk
61 namespace Gtk
62 {
63 
64 //TODO: Inherit/Implement Orientation when we can break ABI.
65 
66 /** Base class for horizontal or vertical rulers.
67  *
68  * NOTE this widget is considered too specialized/little-used for GTK+, and will in the future be moved to some other package. If your application needs this widget, feel free to use it, as the widget does work and is useful in some applications; it's just not of general interest. However, we are not accepting new features for the widget, and it will eventually move out of the GTK+ distribution.
69  * Rulers are used to show the mouse pointer's location in a window. The ruler can either be horizontal or vertical. Within the ruler a small triangle indicates the location of the mouse relative to the horixontal or vertical ruler.
70 
71  * This is an abstract base for Gtk::HRuler and
72  * Gtk::VRuler.  Users should only instantiate those types.
73  *
74  * @ingroup Widgets
75  *
76  * @deprecated This has been removed from gtkmm-3.0 because it was unmaintained and too specialized.
77  * There is no replacement other than using the original GtkRuler and Gtk::Ruler source files in your application.
78  */
79 
80 class Ruler : public Widget
81 {
82   public:
83 #ifndef DOXYGEN_SHOULD_SKIP_THIS
84   typedef Ruler CppObjectType;
85   typedef Ruler_Class CppClassType;
86   typedef GtkRuler BaseObjectType;
87   typedef GtkRulerClass BaseClassType;
88 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
89 
90   virtual ~Ruler();
91 
92 #ifndef DOXYGEN_SHOULD_SKIP_THIS
93 
94 private:
95   friend class Ruler_Class;
96   static CppClassType ruler_class_;
97 
98   // noncopyable
99   Ruler(const Ruler&);
100   Ruler& operator=(const Ruler&);
101 
102 protected:
103   explicit Ruler(const Glib::ConstructParams& construct_params);
104   explicit Ruler(GtkRuler* castitem);
105 
106 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
107 
108 public:
109 #ifndef DOXYGEN_SHOULD_SKIP_THIS
110   static GType get_type()      G_GNUC_CONST;
111 
112 
113   static GType get_base_type() G_GNUC_CONST;
114 #endif
115 
116   ///Provides access to the underlying C GtkObject.
gobj()117   GtkRuler*       gobj()       { return reinterpret_cast<GtkRuler*>(gobject_); }
118 
119   ///Provides access to the underlying C GtkObject.
gobj()120   const GtkRuler* gobj() const { return reinterpret_cast<GtkRuler*>(gobject_); }
121 
122 
123 public:
124   //C++ methods used to invoke GTK+ virtual functions:
125 
126 protected:
127   //GTK+ Virtual Functions (override these to change behaviour):
128 
129   //Default Signal Handlers::
130 
131 
132 private:
133 
134 
135 protected:
136   Ruler();
137 
138 public:
139 
140 
141   /** Sets the desired metric of the ruler.  The possible choices are:
142    * <ul><li>Gtk::PIXELS
143    * <li>Gtk::INCHES
144    * <li>Gtk::CENTIMETERS
145    * </ul>The default metric is Gtk::PIXELS.
146    */
147   void set_metric(MetricType metric =  PIXELS);
148 
149 
150   /** Gets the units used for a Gtk::Ruler. See set_metric().
151    *
152    * @return The units currently used for @a ruler
153    *
154    *  @a Deprecated: 2.24: Gtk::Ruler has been removed from GTK 3 for being
155    * unmaintained and too specialized. There is no replacement.
156    */
157   MetricType get_metric() const;
158 
159 #ifndef GTKMM_DISABLE_DEPRECATED
160 
161   /** Gets the units used for a Gtk::Ruler. See set_metric().
162    *
163    * @deprecated Use the const version
164    *
165    * @return The units currently used for @a ruler
166    *
167    *  @a Deprecated: 2.24: Gtk::Ruler has been removed from GTK 3 for being
168    * unmaintained and too specialized. There is no replacement.
169    */
170   MetricType get_metric();
171 #endif // GTKMM_DISABLE_DEPRECATED
172 
173 
174 #ifndef GTKMM_DISABLE_DEPRECATED
175 
176 //TODO: Remove these when we can break ABI:
177 
178   /** @deprecated Use get_range() instead.
179    */
180    double get_range_lower() const;
181 
182   /** @deprecated Use get_range() instead.
183    */
184    double get_range_upper() const;
185  #endif // GTKMM_DISABLE_DEPRECATED
186 
187 
188   /** sets the range of the ruler.
189    * <i>upper</i> and <i>lower</i> arguments denote the extents of the Ruler.
190    * <i>max_size</i> is the largest number displayed by the ruler.
191    * <i>position</i> gives the initial value of the ruler.
192    * Rulers do not have sane defaults so this function should always be called.
193    */
194   void set_range(double lower, double upper, double position, double max_size);
195 
196   /** Retrieves values indicating the range and current position of a Gtk::Ruler.
197    * See set_range().
198    *
199    *  @a Deprecated: 2.24: Gtk::Ruler has been removed from GTK 3 for being
200    * unmaintained and too specialized. There is no replacement.
201    *
202    * @param lower Location to store lower limit of the ruler, or <tt>0</tt>.
203    * @param upper Location to store upper limit of the ruler, or <tt>0</tt>.
204    * @param position Location to store the current position of the mark on the ruler, or <tt>0</tt>.
205    * @param max_size Location to store the maximum size of the ruler used when calculating
206    * the space to leave for the text, or <tt>0</tt>.
207    */
208   void get_range(double& lower, double& upper, double& position, double& max_size);
209 
210 
211   /** draw tick marks on the ruler
212    */
213   void draw_ticks();
214 
215 
216   /** draw a position indicator on the ruler
217    */
218   void draw_pos();
219 
220     virtual void draw_ticks_vfunc();
221 
222     virtual void draw_pos_vfunc();
223 
224 
225   /** Lower limit of ruler.
226    *
227    * @return A PropertyProxy that allows you to get or set the value of the property,
228    * or receive notification when the value of the property changes.
229    */
230   Glib::PropertyProxy< double > property_lower() ;
231 
232 /** Lower limit of ruler.
233    *
234    * @return A PropertyProxy_ReadOnly that allows you to get the value of the property,
235    * or receive notification when the value of the property changes.
236    */
237   Glib::PropertyProxy_ReadOnly< double > property_lower() const;
238 
239   /** Upper limit of ruler.
240    *
241    * @return A PropertyProxy that allows you to get or set the value of the property,
242    * or receive notification when the value of the property changes.
243    */
244   Glib::PropertyProxy< double > property_upper() ;
245 
246 /** Upper limit of ruler.
247    *
248    * @return A PropertyProxy_ReadOnly that allows you to get the value of the property,
249    * or receive notification when the value of the property changes.
250    */
251   Glib::PropertyProxy_ReadOnly< double > property_upper() const;
252 
253   /** Position of mark on the ruler.
254    *
255    * @return A PropertyProxy that allows you to get or set the value of the property,
256    * or receive notification when the value of the property changes.
257    */
258   Glib::PropertyProxy< double > property_position() ;
259 
260 /** Position of mark on the ruler.
261    *
262    * @return A PropertyProxy_ReadOnly that allows you to get the value of the property,
263    * or receive notification when the value of the property changes.
264    */
265   Glib::PropertyProxy_ReadOnly< double > property_position() const;
266 
267   /** Maximum size of the ruler.
268    *
269    * @return A PropertyProxy that allows you to get or set the value of the property,
270    * or receive notification when the value of the property changes.
271    */
272   Glib::PropertyProxy< double > property_max_size() ;
273 
274 /** Maximum size of the ruler.
275    *
276    * @return A PropertyProxy_ReadOnly that allows you to get the value of the property,
277    * or receive notification when the value of the property changes.
278    */
279   Glib::PropertyProxy_ReadOnly< double > property_max_size() const;
280 
281   /** The metric used for the ruler.
282    *
283    * @return A PropertyProxy that allows you to get or set the value of the property,
284    * or receive notification when the value of the property changes.
285    */
286   Glib::PropertyProxy< MetricType > property_metric() ;
287 
288 /** The metric used for the ruler.
289    *
290    * @return A PropertyProxy_ReadOnly that allows you to get the value of the property,
291    * or receive notification when the value of the property changes.
292    */
293   Glib::PropertyProxy_ReadOnly< MetricType > property_metric() const;
294 
295 
296 };
297 
298 
299 /** Vertical Ruler
300  *
301  * @ingroup Widgets
302  *
303  * @deprecated This has been removed from gtkmm-3.0 because it was unmaintained and too specialized.
304  * There is no replacement other than using the original GtkRuler and Gtk::Ruler source files in your application.
305  */
306 
307 class VRuler : public Ruler
308 {
309   public:
310 #ifndef DOXYGEN_SHOULD_SKIP_THIS
311   typedef VRuler CppObjectType;
312   typedef VRuler_Class CppClassType;
313   typedef GtkVRuler BaseObjectType;
314   typedef GtkVRulerClass BaseClassType;
315 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
316 
317   virtual ~VRuler();
318 
319 #ifndef DOXYGEN_SHOULD_SKIP_THIS
320 
321 private:
322   friend class VRuler_Class;
323   static CppClassType vruler_class_;
324 
325   // noncopyable
326   VRuler(const VRuler&);
327   VRuler& operator=(const VRuler&);
328 
329 protected:
330   explicit VRuler(const Glib::ConstructParams& construct_params);
331   explicit VRuler(GtkVRuler* castitem);
332 
333 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
334 
335 public:
336 #ifndef DOXYGEN_SHOULD_SKIP_THIS
337   static GType get_type()      G_GNUC_CONST;
338 
339 
340   static GType get_base_type() G_GNUC_CONST;
341 #endif
342 
343   ///Provides access to the underlying C GtkObject.
gobj()344   GtkVRuler*       gobj()       { return reinterpret_cast<GtkVRuler*>(gobject_); }
345 
346   ///Provides access to the underlying C GtkObject.
gobj()347   const GtkVRuler* gobj() const { return reinterpret_cast<GtkVRuler*>(gobject_); }
348 
349 
350 public:
351   //C++ methods used to invoke GTK+ virtual functions:
352 
353 protected:
354   //GTK+ Virtual Functions (override these to change behaviour):
355 
356   //Default Signal Handlers::
357 
358 
359 private:
360 
361 
362 public:
363   VRuler();
364 
365 
366 };
367 
368 
369 /** Horizontal Ruler
370  *
371  * @ingroup Widgets
372  *
373  * @deprecated This has been removed from gtkmm-3.0 because it was unmaintained and too specialized.
374  * There is no replacement other than using the original GtkRuler and Gtk::Ruler source files in your application.
375  */
376 
377 class HRuler : public Ruler
378 {
379   public:
380 #ifndef DOXYGEN_SHOULD_SKIP_THIS
381   typedef HRuler CppObjectType;
382   typedef HRuler_Class CppClassType;
383   typedef GtkHRuler BaseObjectType;
384   typedef GtkHRulerClass BaseClassType;
385 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
386 
387   virtual ~HRuler();
388 
389 #ifndef DOXYGEN_SHOULD_SKIP_THIS
390 
391 private:
392   friend class HRuler_Class;
393   static CppClassType hruler_class_;
394 
395   // noncopyable
396   HRuler(const HRuler&);
397   HRuler& operator=(const HRuler&);
398 
399 protected:
400   explicit HRuler(const Glib::ConstructParams& construct_params);
401   explicit HRuler(GtkHRuler* castitem);
402 
403 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
404 
405 public:
406 #ifndef DOXYGEN_SHOULD_SKIP_THIS
407   static GType get_type()      G_GNUC_CONST;
408 
409 
410   static GType get_base_type() G_GNUC_CONST;
411 #endif
412 
413   ///Provides access to the underlying C GtkObject.
gobj()414   GtkHRuler*       gobj()       { return reinterpret_cast<GtkHRuler*>(gobject_); }
415 
416   ///Provides access to the underlying C GtkObject.
gobj()417   const GtkHRuler* gobj() const { return reinterpret_cast<GtkHRuler*>(gobject_); }
418 
419 
420 public:
421   //C++ methods used to invoke GTK+ virtual functions:
422 
423 protected:
424   //GTK+ Virtual Functions (override these to change behaviour):
425 
426   //Default Signal Handlers::
427 
428 
429 private:
430 
431 
432 public:
433   HRuler();
434 
435 
436 };
437 
438 } /* namespace Gtk */
439 
440 
441 namespace Glib
442 {
443   /** A Glib::wrap() method for this object.
444    *
445    * @param object The C instance.
446    * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
447    * @result A C++ instance that wraps this C instance.
448    *
449    * @relates Gtk::Ruler
450    */
451   Gtk::Ruler* wrap(GtkRuler* object, bool take_copy = false);
452 } //namespace Glib
453 
454 
455 namespace Glib
456 {
457   /** A Glib::wrap() method for this object.
458    *
459    * @param object The C instance.
460    * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
461    * @result A C++ instance that wraps this C instance.
462    *
463    * @relates Gtk::VRuler
464    */
465   Gtk::VRuler* wrap(GtkVRuler* object, bool take_copy = false);
466 } //namespace Glib
467 
468 
469 namespace Glib
470 {
471   /** A Glib::wrap() method for this object.
472    *
473    * @param object The C instance.
474    * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
475    * @result A C++ instance that wraps this C instance.
476    *
477    * @relates Gtk::HRuler
478    */
479   Gtk::HRuler* wrap(GtkHRuler* object, bool take_copy = false);
480 } //namespace Glib
481 
482 
483 #endif // GTKMM_DISABLE_DEPRECATED
484 
485 
486 #endif /* _GTKMM_RULER_H */
487 
488