Class Index | Cross Index | Namespace Index |
A label which displays an accelerator key to the right of the text.
Contained in: Gtk
Derived from:
Gtk::Label
Derived by:
none
#include <gtk--/accellabel.h>
public function member index: |
||
explicit | AccelLabel | (const string& label); |
guint | get_accel_width | () const; |
GtkAccelLabel* | gtkobj | (); |
const GtkAccelLabel* | gtkobj | () const; |
static bool | isA | (Object* object); |
bool | refetch | (); |
void | set_accel_widget | (Gtk::Widget& accel_widget); |
virtual | ~AccelLabel | (); |
The accelerator key to display is not set explicitly. Instead, the Gtk::AccelLabel displays the
accelerators which have been added to a particular widget. This widget is set by calling
set_accel_widget.
For example, a Gtk::MenuItem widget may have an accelerator added to emit the "activate" signal
when the 'Ctl+S' key combination is pressed. A Gtk::AccelLabel is created and added to the
Gtk::MenuItem, and set_accel_widget is called with the Gtk::MenuItem as the argument. The
Gtk::AccelLabel will now display 'Ctl+S' after its label.
string: The label string.
This should not be needed since the string is automatically updated whenever accelerators are added or removed from the associated widget.