gtkmm: Gtk::AccelLabel Class Reference

# Gtk::AccelLabel Class Reference
[Widgets]

A label which displays an accelerator key on the right of the text. More...

Inherits Gtk::Label.

Collaboration diagram for Gtk::AccelLabel:
[legend]

List of all members.

## Public Member Functions

virtual | ~AccelLabel ()
GtkAccelLabel* | gobj ()
| Provides access to the underlying C GtkObject.
const GtkAccelLabel* | gobj () const
| Provides access to the underlying C GtkObject.
| AccelLabel ()
| Default constructor to create an AccelLabel object.
| AccelLabel (const Glib::ustring& label, bool mnemonic=false)
| Constructor to create an AccelLabel object with a default label.
void | set_accel_widget (const Widget& accel_widget)
| Sets the widget to be monitored by this accelerator label.
void | unset_accel_widget ()
| Forget the accel widget previously set by set_accel_widget().
Widget* | get_accel_widget ()
| Fetches the widget monitored by this accelerator label.
const Widget* | get_accel_widget () const
| Fetches the widget monitored by this accelerator label.
guint | get_accel_width () const
| Gets the width needed to display this accelerator label.
bool | refetch ()
| Recreates the string representing the accelerator keys.
Glib::PropertyProxy < Gtk::Widget* > | property_accel_widget ()
| The widget to be monitored for accelerator changes.
Glib::PropertyProxy_ReadOnly < Gtk::Widget* > | property_accel_widget () const
| The widget to be monitored for accelerator changes.

## Related Functions

(Note that these are not member functions.)
Gtk::AccelLabel* | wrap (GtkAccelLabel* object, bool take_copy=false)
| A Glib::wrap() method for this object.

## Detailed Description

A label which displays an accelerator key on the right of the text.

Used for menu item labels, for instance.

## Constructor & Destructor Documentation

virtual Gtk::AccelLabel::~AccelLabel | ( |  | ) | `[virtual]`

Gtk::AccelLabel::AccelLabel | ( |  | ) |

Default constructor to create an AccelLabel object.

Gtk::AccelLabel::AccelLabel | ( | const Glib::ustring & | label,
|  | bool | mnemonic = `false` |
| ) |  |  | `[explicit]`

Constructor to create an AccelLabel object with a default label.

Parameters:

  | label | The label string.
  | mnemonic | If true, characters preceded by an underscore (_) will be underlined and used as a keyboard accelerator.

## Member Function Documentation

const Widget* Gtk::AccelLabel::get_accel_widget | ( |  | ) | const

Fetches the widget monitored by this accelerator label.

See set_accel_widget().

Returns:
  The object monitored by the accelerator label, or `0`.

Widget* Gtk::AccelLabel::get_accel_widget | ( |  | ) |

Fetches the widget monitored by this accelerator label.

See set_accel_widget().

Returns:
  The object monitored by the accelerator label, or `0`.

guint Gtk::AccelLabel::get_accel_width | ( |  | ) | const

Gets the width needed to display this accelerator label.

This is used by menus to align all of the Gtk::MenuItem widgets, and shouldn't be needed by applications.

Returns:
  Width of this accelerator label.

const GtkAccelLabel* Gtk::AccelLabel::gobj | ( |  | ) | const`[inline]`

Provides access to the underlying C GtkObject.

Reimplemented from Gtk::Label.

GtkAccelLabel* Gtk::AccelLabel::gobj | ( |  | ) | `[inline]`

Provides access to the underlying C GtkObject.

Reimplemented from Gtk::Label.

Glib::PropertyProxy_ReadOnly<Gtk::Widget*> Gtk::AccelLabel::property_accel_widget | ( |  | ) | const

The widget to be monitored for accelerator changes.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
  A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy<Gtk::Widget*> Gtk::AccelLabel::property_accel_widget | ( |  | ) |

The widget to be monitored for accelerator changes.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
  A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

bool Gtk::AccelLabel::refetch | ( |  | ) |

Recreates the string representing the accelerator keys.

Returns:
  Always returns `false`.

void Gtk::AccelLabel::set_accel_widget | ( | const Widget& | accel_widget | ) |

Sets the widget to be monitored by this accelerator label.

Parameters:

  | accel_widget | The widget to be monitored.

void Gtk::AccelLabel::unset_accel_widget | ( |  | ) |

Forget the accel widget previously set by set_accel_widget().

## Friends And Related Function Documentation

Gtk::AccelLabel* wrap | ( | GtkAccelLabel * | object,
|  | bool | take_copy = `false` |
| ) |  |  | `[related]`

A Glib::wrap() method for this object.

Parameters:

  | object | The C instance.
  | take_copy | False if the result should take ownership of the C instance. True if it should take a new copy or ref.

Returns:
  A C++ instance that wraps this C instance.

The documentation for this class was generated from the following file:

- gtkmm/accellabel.h