[][src]Trait gtk::AccelLabelExt

pub trait AccelLabelExt: 'static {
    fn get_accel(&self) -> (u32, ModifierType);
fn get_accel_widget(&self) -> Option<Widget>;
fn get_accel_width(&self) -> u32;
fn refetch(&self) -> bool;
fn set_accel(&self, accelerator_key: u32, accelerator_mods: ModifierType);
fn set_accel_closure(&self, accel_closure: Option<&Closure>);
fn set_accel_widget<P: IsA<Widget>>(&self, accel_widget: Option<&P>);
fn get_property_accel_closure(&self) -> Option<Closure>;
fn connect_property_accel_closure_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_property_accel_widget_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId; }

Trait containing all AccelLabel methods.

Implementors

AccelLabel

Required methods

fn get_accel(&self) -> (u32, ModifierType)

Gets the keyval and modifier mask set with AccelLabelExt::set_accel.

accelerator_key

return location for the keyval

accelerator_mods

return location for the modifier mask

fn get_accel_widget(&self) -> Option<Widget>

Fetches the widget monitored by this accelerator label. See AccelLabelExt::set_accel_widget.

Returns

the object monitored by the accelerator label, or None.

fn get_accel_width(&self) -> u32

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

Returns

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

fn refetch(&self) -> bool

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.

fn set_accel(&self, accelerator_key: u32, accelerator_mods: ModifierType)

Manually sets a keyval and modifier mask as the accelerator rendered by self.

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.

accelerator_key

a keyval, or 0

accelerator_mods

the modifier mask for the accel

fn set_accel_closure(&self, accel_closure: Option<&Closure>)

Sets the closure to be monitored by this accelerator label. The closure must be connected to an accelerator group; see AccelGroup::connect. Passing None for accel_closure will dissociate self from its current closure, if any.

accel_closure

the closure to monitor for accelerator changes, or None

fn set_accel_widget<P: IsA<Widget>>(&self, accel_widget: Option<&P>)

Sets the widget to be monitored by this accelerator label. Passing None for accel_widget will dissociate self from its current widget, if any.

accel_widget

the widget to be monitored, or None

fn get_property_accel_closure(&self) -> Option<Closure>

fn connect_property_accel_closure_notify<F: Fn(&Self) + 'static>(
    &self,
    f: F
) -> SignalHandlerId

fn connect_property_accel_widget_notify<F: Fn(&Self) + 'static>(
    &self,
    f: F
) -> SignalHandlerId

Loading content...

Implementors

impl<O: IsA<AccelLabel>> AccelLabelExt for O[src]

Loading content...