C++ GUI Library

class gui::button

A button is a box with a label that can be clicked by the user.

button(const button &other)

Copy-construct a button from another button. This does not create a new button; instead it creates a new reference to the old button.

button(const widget &other)

Narrows a widget to a button. If the widget is not a button, then std::bad_cast will be thrown.

swap(button &other)

Swap this button reference with another.

operator=(button other)

Assign this button to refer to another.

operator widget()

Upcast to the widget base class.

button(const char *label=0, const boost::function0< void > &listener=boost::function0< void >())

Create a new button with the specified label (a UTF8 string), and an optional callback function for when the button is clicked.

label(const char *text)

Set the label for the button. The text parameter should be a UTF8 string.

clicked_signal()

Returns a reference to the button's "clicked" signal. This signal is generated when the user clicks the button.