Class: Gtk::AccelLabel

Inherits:
Object
  • Object
show all
Defined in:
(unknown)

Instance Method Summary collapse

Instance Method Details

#accel_closureGObject::Closure

Returns accel-closure.

Returns:

  • (GObject::Closure)

    accel-closure

#accel_closure=(accel_closure) ⇒ GObject::Closure

Parameters:

  • accel_closure (GObject::Closure)

Returns:

  • (GObject::Closure)

    accel-closure

  • (GObject::Closure)

    accel-closure

#accel_widgetGtk::Widget

Returns accel-widget.

Returns:

#accel_widget=(accel_widget) ⇒ Gtk::Widget

Parameters:

Returns:

#accel_widthInteger

Returns the width needed to display the accelerator key(s). This is used by menus to align all of the Gtk::MenuItem widgets, and shouldn’t be needed by applications.

Returns:

  • (Integer)

    the width needed to display the accelerator key(s).

#get_accel(accelerator_key, accelerator_mods) ⇒ nil

Gets the keyval and modifier mask set with gtk_accel_label_set_accel().

Parameters:

  • accelerator_key (Integer)

    return location for the keyval

  • accelerator_mods (Gdk::ModifierType)

    return location for the modifier mask

Returns:

  • (nil)

#new(string) ⇒ Gtk::Widget

Creates a new Gtk::AccelLabel.

Parameters:

  • string (String)

    the label string. Must be non-nil.

Returns:

#refetchTrueClass

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:

  • (TrueClass)

    always returns false.

#set_accel(accelerator_key, accelerator_mods) ⇒ nil

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.

Parameters:

  • accelerator_key (Integer)

    a keyval, or 0

  • accelerator_mods (Gdk::ModifierType)

    the modifier mask for the accel

Returns:

  • (nil)