Sophie

Sophie

distrib > Mandriva > 9.1 > ppc > media > main > by-pkgid > ca81b57b553ae75608ba0fc5e7925e4e > files > 523

libgtkmm1.2-devel-1.2.10-1mdk.ppc.rpm

/* $Id: ruler.gen_h,v 1.31 2001/07/15 13:33:38 murrayc Exp $ */

/* ruler.h
 *
 * Copyright (C) 1998-1999 The Gtk-- Development Team
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Library General Public
 * License as published by the Free Software Foundation; either
 * version 2 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Library General Public License for more details.
 *
 * You should have received a copy of the GNU Library General Public
 * License along with this library; if not, write to the Free
 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 */

#include <gtk--/widget.h>
#include <gtk/gtkruler.h>
#include <gtk/gtkhruler.h>
#include <gtk/gtkvruler.h>


namespace Gtk {
//: Abstract Ruler
//- Ruler is an abstraction used as the base for Gtk_HRuler and
//- Gtk_VRuler.  Users should only instantiate those types.
class Ruler : public Widget {


public:
  typedef Ruler          CppObjectType;
  typedef GtkRuler            BaseObjectType;

public:
  //: Returns the underlaying gtk+ object.
  GtkRuler* gtkobj();
  const GtkRuler* gtkobj() const;

  //: Returns true if object is this type.
  static bool isA(Gtk::Object *object);

  virtual ~Ruler();

private:

public:




  //: Gets the metric of the ruler.
  GtkMetricType get_metric() const;

  //: Sets the desired metric of the ruler.  The possible choices are:
  //- {\enum GTK_PIXELS}, {\enum GTK_INCHES}, or {\enum GTK_CENTIMETERS}.
  //- The default metric is {\enum GTK_PIXELS}.

  void set_metric(GtkMetricType metric=GTK_PIXELS);



  gfloat get_range_lower() const;


  gfloat get_range_upper() const;

  //: sets the range of the ruler.
  //- upper, lower: The extents of the Ruler.
  //-
  //- max_size: The largest number displayed by the ruler.
  //-
  //- position: The initial value of the ruler.
  //-
  //- Rulers do not have sane defaults so this function should always be called.



  void set_range(gfloat lower,gfloat upper,gfloat position,gfloat max_size);

  //: Draw tick marks on the ruler.

  void draw_ticks();

  //: Draw a position indicator on the ruler.

  void draw_pos();

protected:
  Ruler();



protected:
  // impl functions

};


//: A vertical ruler.
//- The {\class Gtk::VRuler} widget is a widget arranged vertically
//- creating a ruler that is utilized around other widgets such as a
//- text widget. The ruler is used to show
//- the location of the mouse on the window and to show the size of
//- the window in specified units. The available units of measurement are {\enum GTK_PIXELS},
//- {\enum GTK_INCHES} and {\enum GTK_CENTIMETERS}. {\enum GTK_PIXELS} is the default.
class VRuler : public Ruler {


public:
  typedef VRuler          CppObjectType;
  typedef GtkVRuler            BaseObjectType;

public:
  //: Returns the underlaying gtk+ object.
  GtkVRuler* gtkobj();
  const GtkVRuler* gtkobj() const;

  //: Returns true if object is this type.
  static bool isA(Gtk::Object *object);

  virtual ~VRuler();

private:

public:
  VRuler();





protected:
  // impl functions

};


//: A Horizontal ruler.
//- The HRuler widget is a widget arranged horizontally creating a ruler
//- that is utilized around other widgets such as a text widget. The
//- ruler is used to show the location of the mouse on the window and to
//- show the size of the window in specified units. The available units
//- of measurement are {\enum GTK_PIXELS}, {\enum GTK_INCHES} and
//- {\enum GTK_CENTIMETERS}. {\enum GTK_PIXELS} is the default.
class HRuler : public Ruler {


public:
  typedef HRuler          CppObjectType;
  typedef GtkHRuler            BaseObjectType;

public:
  //: Returns the underlaying gtk+ object.
  GtkHRuler* gtkobj();
  const GtkHRuler* gtkobj() const;

  //: Returns true if object is this type.
  static bool isA(Gtk::Object *object);

  virtual ~HRuler();

private:

public:
  HRuler();





protected:
  // impl functions

};


//+ PROPERTIES(Gtk_Ruler)
//. name: backing_store
//. type: GdkPixmap*
//. get:
//. set:
//. desc:

//. name: non_gr_exp_gc
//. type: GdkGC*
//. get:
//. set:
//. desc:

//. name: metric
//. type: GtkRulerMetric*
//. get:
//. set:
//. desc:

//. name: slider_size
//. type: gint
//. get:
//. set:
//. desc:

//. name: lower
//. type: gfloat
//. get:
//. set:
//. desc: The upper limit of the ruler (in points)

//. name: upper
//. type: gfloat
//. get:
//. set:
//. desc: The lower limit of the ruler

//. name: position
//. type: gfloat
//. get:
//. set:
//. desc: The position of the mark on the ruler

//. name: max_size
//. type: gfloat
//. get:
//. set:
//. desc: The maximum size of the ruler

}