Main Page
Widgets
Namespaces
Book
Gtk::Button Class Reference
[Widgets ]
A widget that creates a signal when clicked on.
More...
Inheritance diagram for Gtk::Button:
[legend ] List of all members.
Detailed Description
A widget that creates a signal when clicked on.
This widget is generally used with a signal handler that is called when the button is pressed. It can hold any valid child widget. The most commonly used child is the Gtk::Label .
Examples:
book/buttons/button/buttons.h , and thread/dispatcher.cc .
Constructor & Destructor Documentation
virtual Gtk::Button::~Button
(
)
[virtual]
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 Gtk::Button(const Glib::ustring& label) ctor directly instead.
Gtk::Button::Button
(
const Glib::ustring &
label ,
bool
mnemonic = false
)
[explicit]
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 Gtk::Label in it
Gtk::Button::Button
(
const StockID &
stock_id
)
[explicit]
Member Function Documentation
void Gtk::Button::clicked
(
)
void Gtk::Button::enter
(
)
Fetches the text from the label of the button, as set by set_label() .
If the label text has not been set the return value will be 0
. This will be the case if you create an empty button with new() to use as a container.
Returns: The text of the label widget. This string is owned by the widget and must not be modified or freed.
bool Gtk::Button::get_use_stock
(
)
const
Returns whether the button label is a stock item.
Returns: true
if the button label is used to select a stock item instead of being used directly as the label text.
bool Gtk::Button::get_use_underline
(
)
const
Returns whether an embedded underline in the button label indicates a mnemonic.
See set_use_underline() .
Returns: true
if an embedded underline in the button label indicates the mnemonic accelerator keys.
const GtkButton* Gtk::Button::gobj
(
)
const [inline]
GtkButton* Gtk::Button::gobj
(
)
[inline]
void Gtk::Button::leave
(
)
virtual void Gtk::Button::on_activate
(
)
[protected, virtual]
virtual void Gtk::Button::on_clicked
(
)
[protected, virtual]
virtual void Gtk::Button::on_enter
(
)
[protected, virtual]
virtual void Gtk::Button::on_leave
(
)
[protected, virtual]
virtual void Gtk::Button::on_pressed
(
)
[protected, virtual]
virtual void Gtk::Button::on_released
(
)
[protected, virtual]
void Gtk::Button::pressed
(
)
void Gtk::Button::released
(
)
Sets the text of the label of the button to str .
This text is also used to select the stock item if set_use_stock() is used.
This will also clear any previously set labels.
Parameters:
void Gtk::Button::set_use_stock
(
bool
use_stock = true
)
If true, the label set on the button is used as a stock id to select the stock item for the button.
Parameters:
use_stock true
if the button should use a stock item.
void Gtk::Button::set_use_underline
(
bool
use_underline = true
)
If true, an underline in the text of the button label indicates the next character should be used for the mnemonic accelerator key.
Parameters:
use_underline true
if underlines in the text indicate mnemonics.
Prototype: void activate()
Prototype: void released()
Friends And Related Function Documentation
Gtk::Button* wrap
(
GtkButton*
object ,
bool
take_copy = false
)
[related]
The documentation for this class was generated from the following file:
Generated for gtkmm by
Doxygen 1.3-rc1 © 1997-2001