GtkAccelLabel
GtkAccelLabel — A label which displays an accelerator key on the right of the text
|
 |
Implemented Interfaces
GtkAccelLabel implements
AtkImplementorIface and GtkBuildable.
Includes
#include <gtk/gtk.h>
Functions
gtk_accel_label_set_accel_closure ()
void
gtk_accel_label_set_accel_closure (GtkAccelLabel *accel_label,
GClosure *accel_closure);
Sets the closure to be monitored by this accelerator label. The closure
must be connected to an accelerator group; see gtk_accel_group_connect().
Passing NULL for accel_closure
will dissociate accel_label
from its
current closure, if any.
gtk_accel_label_set_accel_widget ()
void
gtk_accel_label_set_accel_widget (GtkAccelLabel *accel_label,
GtkWidget *accel_widget);
Sets the widget to be monitored by this accelerator label. Passing NULL for
accel_widget
will dissociate accel_label
from its current widget, if any.
gtk_accel_label_get_accel_width ()
guint
gtk_accel_label_get_accel_width (GtkAccelLabel *accel_label);
Returns the width needed to display the accelerator key(s).
This is used by menus to align all of the GtkMenuItem widgets, and shouldn't
be needed by applications.
Returns
the width needed to display the accelerator key(s).
gtk_accel_label_set_accel ()
void
gtk_accel_label_set_accel (GtkAccelLabel *accel_label,
guint accelerator_key,
GdkModifierType accelerator_mods);
Manually sets a keyval and modifier mask as the accelerator rendered
by accel_label
.
If a keyval and modifier are explicitly set then these values are
used regardless of any associated accel closure or widget.
Providing an accelerator_key
of 0 removes the manual setting.
Since: 3.6
gtk_accel_label_refetch ()
gboolean
gtk_accel_label_refetch (GtkAccelLabel *accel_label);
Recreates the string representing the accelerator keys.
This should not be needed since the string is automatically updated whenever
accelerators are added or removed from the associated widget.
Returns
always returns FALSE.
Types and Values
struct GtkAccelLabel
struct GtkAccelLabel;
The GtkAccelLabel contains private data only, and
should be accessed using the functions below.
Property Details
The “accel-closure” property
“accel-closure” GClosure *
The closure to be monitored for accelerator changes.
Owner: GtkAccelLabel
Flags: Read / Write
The “accel-widget” property
“accel-widget” GtkWidget *
The widget to be monitored for accelerator changes.
Owner: GtkAccelLabel
Flags: Read / Write