// -*- c++ -*-
//  Generated by gtkmmproc from ./../adjustment.gen_h -- DO NOT MODIFY!
#ifndef _GTKMM_ADJUSTMENT_H
#define _GTKMM_ADJUSTMENT_H

/* $Id: adjustment.gen_h,v 1.42 2000/02/13 02:22:09 kenelson Exp $ */

/* adjustment.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--/data.h>
#include <gtk/gtkadjustment.h>

namespace Gtk {
class Adjustment;
class Adjustment_Class;
}
namespace Gtk { Gtk::Adjustment *wrap (GtkAdjustment *o); }
namespace Gtk
{
/* gtkadjustment.h */
//: Value-within-Range Type, e.g. for spinbuttons
class Adjustment : public Data {

public:
  typedef Adjustment          CppObjectType;
  typedef Adjustment_Class    CppClassType;
  typedef GtkAdjustment           BaseObjectType;
  typedef GtkAdjustmentClass      BaseClassType;

private:
  friend class Adjustment_Class;
  static CppClassType adjustment_class;

  Adjustment(const Adjustment&);
  Adjustment& operator=(const Adjustment&); // not implemented

protected:
  void   initialize_class();
  explicit Adjustment(GtkAdjustment *castitem);

public:
  static GtkType get_type();
  GtkAdjustment* gtkobj()             { return (GtkAdjustment*)(gtkobject); }
  const GtkAdjustment* gtkobj() const { return (GtkAdjustment*)(gtkobject); }
  static bool isA(Object *checkcast);

  // Hook for proxies
  static const char* const signal_names[];

  virtual ~Adjustment();

private:

public:

  friend class Range;
  friend class HScrollbar;
  friend class VScrollbar;

  //: create new instance
  Adjustment(gfloat value,
	     gfloat lower,
	     gfloat upper,
	     gfloat step_increment=1,
	     gfloat page_increment=10,
	     gfloat page_size=0);




  //:


  //:


  //:

  void clamp_page(gfloat lower,gfloat upper);

  //: set to a specific value

  void set_value(gfloat value);

  //: get current value
  gfloat get_value()          const {return gtkobj()->value;}

  //: other internal fields accessors
  gfloat get_lower()          const {return gtkobj()->lower;}
  gfloat get_upper()          const {return gtkobj()->upper;}
  gfloat get_step_increment() const {return gtkobj()->step_increment;}
  gfloat get_page_increment() const {return gtkobj()->page_increment;}
  gfloat get_page_size()      const {return gtkobj()->page_size;}

  void set_lower(gfloat lower)           {gtkobj()->lower = lower; changed();}
  void set_upper(gfloat upper)           {gtkobj()->upper = upper; changed();}
  void set_step_increment(gfloat incr)   {gtkobj()->step_increment = incr; changed();}
  void set_page_increment(gfloat incr)   {gtkobj()->page_increment = incr; changed();}
  void set_page_size(gfloat size)        {gtkobj()->page_size = size; changed();}

public:

  union
    {
      CppObjectType * adjustment_self;
      Gtk::EmitProxySignal0<void,CppObjectType,BaseObjectType,0,&gtk_adjustment_changed> changed;
      Gtk::EmitProxySignal0<void,CppObjectType,BaseObjectType,1,&gtk_adjustment_value_changed> value_changed;
    };

protected:
  // impl functions
    virtual void changed_impl();
    virtual void value_changed_impl();

};

}


//+ PROPERTIES(Gtk_Adjustment)
//. name: lower
//. type: gfloat
//. get:
//. set:
//. desc:

//. name: upper
//. type: gfloat
//. get:
//. set:
//. desc:

//. name: value
//. type: gfloat
//. get:
//. set:
//. desc:

//. name: step_increment
//. type: gfloat
//. get:
//. set:
//. desc:

//. name: page_increment
//. type: gfloat
//. get:
//. set:
//. desc:

//. name: page_size
//. type: gfloat
//. get:
//. set:
//. desc:

#endif
