// -*- c++ -*-
//  Generated by gtkmmproc from /usr/obj/ports/gtkmm-1.2.10/gtkmm-1.2.10/src/build_sources/../button.gen_h -- DO NOT MODIFY!
#ifndef _GTKMM_BUTTON_H
#define _GTKMM_BUTTON_H

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

/* box.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--/bin.h>
#include <gtk/gtkbutton.h>

namespace Gtk {
class Button;
class Button_Class;
}
namespace Gtk { Gtk::Button *wrap (GtkButton *o); }
namespace Gtk
{
  //: Toplevel Button
  //- The button widget is a rectangular clickable widget. You can
  //- decorate it with images, text, or whatever you like.
class Button : public Bin {

public:
  typedef Button          CppObjectType;
  typedef Button_Class    CppClassType;
  typedef GtkButton           BaseObjectType;
  typedef GtkButtonClass      BaseClassType;

private:
  friend class Button_Class;
  static CppClassType button_class;

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

protected:
  void   initialize_class();
  explicit Button(GtkButton *castitem);

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

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

  virtual ~Button();

private:

public:
  //: Create an empty button.
  //- With an empty button, you can {Gtk_Button::add()} a widget
  //- such as a {Gtk::Pixmap::} or {Gtk::Box::}.
  //-
  //- If you just wish to add a {Gtk::Label::},
  //- you may want to
  //- use the {Button(const string &label)} ctor
  //- directly instead.
  Button();



  //: Simple Push Button with label.
  //- Create a button with the given label inside. You won't be able
  //- to add a widget in this button since it already has a {\class Gtk_Label}
  //- in it.
  explicit Button(const string &label,gfloat x=0.5,gfloat y=0.5);

  //: Set the button's relief style.
  //- This effects how the button looks. GtkReliefStyle can be one of {\enum GTK_RELIEF_NORMAL},
  //- {\enum GTK_RELIEF_HALF}, or {\enum GTK_RELIEF_NONE}.
  //- {\example
  //- //This program shows the differences in button styles.
  //-
  //- #include <gtk--/button.h>
  //- #include <gtk--/window.h>
  //- #include <gtk--/box.h>
  //- #include <gtk--/main.h>
  //-
  //- //This custom window will contain 3 buttons, one of
  //- //each style.
  //- class custom_window : public Gtk::Window
  //- {
  //-   Gtk::Button normal, half, none;
  //-   Gtk::HBox some_hbox;
  //-   public:
  //-     custom_window();
  //- };
  //-
  //- //The constructor. Creates the window adds the buttons,
  //- //and sets their style.
  //- custom_window::custom_window()
  //- : Gtk::Window(GTK_WINDOW_TOPLEVEL), some_hbox(true, 2),
  //-   normal("Normal"), half("Half"), none("None")
  //- {
  //-   normal.set_relief(GTK_RELIEF_NORMAL);
  //-   half.set_relief(GTK_RELIEF_HALF);
  //-   none.set_relief(GTK_RELIEF_NONE);
  //-   some_hbox.pack_start(normal, true, true, 0);
  //-   some_hbox.pack_start(half, true, true, 0);
  //-   some_hbox.pack_start(none, true, true, 0);
  //-   add(some_hbox);
  //-   show_all();
  //- }
  //-
  //- int main(int argc, char *argv[])
  //- {
  //-   Gtk::Main main_runner(argc, argv);
  //-   custom_window some_window;
  //-   main_runner.run();
  //- }
  //- }


  void set_relief(GtkReliefStyle newstyle);

  //: Return the button's relief style. (see {Gtk_Button::set_relief()})


  GtkReliefStyle get_relief() const;

  //: Emited on button press.
  //- Triggered when the button is pressed (e.g. the mouse button is
  //- still down, it hasn't been released yet, see next signal)


  //: Triggered when the user has released the mouse button


  //: Emitted on button press and release.
  //- Triggered when the user has pressed and released the mouse button
  //- This is the signal you most likely want to connect.


  //: Triggered when the mouse cursor enters the button


  //: Triggered when the mouse cursor leaves the button

public:

  union
    {
      CppObjectType * button_self;
      Gtk::EmitProxySignal0<void,CppObjectType,BaseObjectType,0,&gtk_button_pressed> pressed;
      Gtk::EmitProxySignal0<void,CppObjectType,BaseObjectType,1,&gtk_button_released> released;
      Gtk::EmitProxySignal0<void,CppObjectType,BaseObjectType,2,&gtk_button_clicked> clicked;
      Gtk::EmitProxySignal0<void,CppObjectType,BaseObjectType,3,&gtk_button_enter> enter;
      Gtk::EmitProxySignal0<void,CppObjectType,BaseObjectType,4,&gtk_button_leave> leave;
    };

protected:
  // impl functions
    virtual void pressed_impl();
    virtual void released_impl();
    virtual void clicked_impl();
    virtual void enter_impl();
    virtual void leave_impl();

};

}


//+ PROPERTIES(Gtk_Button)
//. name: relief
//. type: guint:2
//. get: {get_relief()}
//. set: {set_relief()}
//. desc: Can be set to one of the following values :
//.  {\enum GTK_RELIEF_NORMAL}, {\enum GTK_RELIEF_HALF}, {\enum GTK_RELIEF_NONE}

#endif
