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

/* $Id: spinbutton.gen_h,v 1.51 2001/02/13 22:00:39 murrayc Exp $ */


/* spinbutton.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--/entry.h>
#include <gtk/gtkspinbutton.h>

namespace Gtk {
class SpinButton;
class SpinButton_Class;
}
namespace Gtk { Gtk::SpinButton *wrap (GtkSpinButton *o); }
namespace Gtk
{
class Adjustment;

//: numeric Entry with up/down buttons
class SpinButton : public Entry
{

public:
  typedef SpinButton          CppObjectType;
  typedef SpinButton_Class    CppClassType;
  typedef GtkSpinButton           BaseObjectType;
  typedef GtkSpinButtonClass      BaseClassType;

private:
  friend class SpinButton_Class;
  static CppClassType spin_button_class;

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

protected:
  void   initialize_class();
  explicit SpinButton(GtkSpinButton *castitem);

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

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

  virtual ~SpinButton();

private:

public:

  //: create instance
  // adjustment: see <A HREF="Gtk_Adjustment.html">Gtk_Adjustment</A> <br>
  // climb_rate: <br>
  // digits: number of decimal digits (has to be < 6)
  SpinButton(gfloat climb_rate=0, gint digits=0);
  SpinButton(Adjustment &adjustment,
		 gfloat climb_rate=0, gint digits=0);




  GtkSpinButtonUpdatePolicy get_update_policy() const;

  guint get_digits() const;

  bool get_numeric() const;

  bool get_wrap() const;

  GtkShadowType get_shadow_type() const;

  bool get_snap_to_ticks() const;

  //: set a new range/value


  void set_adjustment(Gtk::Adjustment& adjustment);



  void set_adjustment(Gtk::Adjustment* adjustment);

  //: get range/value
  Gtk::Adjustment* get_adjustment() const;

  //: set number of decimals

  void set_digits(gint digits);

  //: get value

  gfloat get_value_as_float() const;

  //: get value

  gint get_value_as_int() const;

  //: set value

  void set_value(gfloat value);

  // one of GTK_UPDATE_ALWAYS, GTK_UPDATE_IF_VALID, GTK_UPDATE_SNAP_TO_TICKS

  void set_update_policy(GtkSpinButtonUpdatePolicy policy);


  void set_wrap(bool wrap);


  void set_numeric(bool numeric);


  void spin(GtkSpinType direction,gfloat step);


  void set_shadow_type(GtkShadowType shadow_type);


  void set_snap_to_ticks(bool snap_to_ticks);


  void update();

public:

protected:
  // impl functions

};


}


//+ PROPERTIES(Gtk_SpinButton)
//. name: adjustment
//. type: GtkAdjustment*
//. get:
//. set:
//. desc:

//. name: panel
//. type: GdkWindow*
//. get:
//. set:
//. desc:

//. name: shadow_type
//. type: GtkShadowType
//. get:
//. set:
//. desc:

//. name: timer
//. type: guint32
//. get:
//. set:
//. desc:

//. name: ev_time
//. type: guint32
//. get:
//. set:
//. desc:

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

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

//. name: update_policy
//. type: GtkSpinButtonUpdatePolicy
//. get:
//. set:
//. desc:

//. name: in_child
//. type: guint:2
//. get:
//. set:
//. desc:

//. name: click_child
//. type: guint:2
//. get:
//. set:
//. desc:

//. name: button
//. type: guint:2
//. get:
//. set:
//. desc:

//. name: need_timer
//. type: guint:1
//. get:
//. set:
//. desc:

//. name: timer_calls
//. type: guint:3
//. get:
//. set:
//. desc:

//. name: digits
//. type: guint:3
//. get:
//. set:
//. desc:

//. name: numeric
//. type: guint:1
//. get:
//. set:
//. desc:

//. name: wrap
//. type: guint:1
//. get:
//. set:
//. desc:

//. name: snap_to_ticks
//. type: guint:1
//. get:
//. set:
//. desc:

#endif
