PROGRAM(button);
// A container that can only contain one child, and accepts events.
// draws a bevelbox around itself.
// IMG: GTK.Button("A button")
// IMG: GTK.Button("A button\nwith multiple lines\nof text")
// IMG: GTK.Button()->add(GTK.Image(GDK.Image(0)->set(Image.image(100,40)->test()))->show())
INHERIT(container);
SUBWIDGET(child, widget);
// Returns the (one and only) child of this container.

SIGNAL("pressed", "Called when the button is pressed");
SIGNAL("released", "Called when the button is released");
SIGNAL("clicked", "Called when the button is pressed, and then released");
SIGNAL("enter", "Called when the mouse enters the button");
SIGNAL("leave", "Called when the mouse leaves the button");
FUNCTION(create, "function(string|void:void)")
NAME_ARGS(label_text);
// If a string is supplied, a label is created and added to the button.
{
  if(THIS->obj) error("GTK.Button->create() can only be called once.\n");
  if(args)
  {
    char *s;
    get_all_args("GTK.Button", args, "%s", &s);
    THIS->obj = GTK_OBJECT( gtk_button_new_with_label( s ) );
  } else {
    THIS->obj = GTK_OBJECT( gtk_button_new( ) );
  }
  pgtk__init_this_object();
}
SIMPLE_FUNCTION(pressed);
// Emulate a 'press' event.
SIMPLE_FUNCTION(released);
// Emulate a 'release' event.
SIMPLE_FUNCTION(clicked);
// Emulate a 'clicked' event (press followed by release). 
SIMPLE_FUNCTION(enter);
// Emulate a 'enter' event.
SIMPLE_FUNCTION(leave);
// Emulate a 'leave' event.
SIMPLE_INT_FUNCTION(set_relief);
NAME_ARGS(newstyle);
// One of CONST(GTK_RELIEF)
int COMPLEX_FUNCTION(get_relief);

