pub trait AccelLabelExt: IsA<AccelLabel> + 'static {
// Provided methods
fn accel(&self) -> (u32, ModifierType) { ... }
fn accel_widget(&self) -> Option<Widget> { ... }
fn 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(&self, accel_widget: Option<&impl IsA<Widget>>) { ... }
fn accel_closure(&self) -> Option<Closure> { ... }
fn connect_accel_closure_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_accel_widget_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
}Expand description
Provided Methods§
Sourcefn accel(&self) -> (u32, ModifierType)
fn accel(&self) -> (u32, ModifierType)
Gets the keyval and modifier mask set with
set_accel().
§Returns
§accelerator_key
return location for the keyval
§accelerator_mods
return location for the modifier mask
Sourcefn accel_widget(&self) -> Option<Widget>
fn accel_widget(&self) -> Option<Widget>
Fetches the widget monitored by this accelerator label. See
set_accel_widget().
§Returns
the object monitored by the accelerator label, or None.
Sourcefn accel_width(&self) -> u32
fn accel_width(&self) -> u32
Sourcefn set_accel(&self, accelerator_key: u32, accelerator_mods: ModifierType)
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
Sourcefn set_accel_closure(&self, accel_closure: Option<&Closure>)
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 AccelGroupExtManual::connect_accel_group().
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
Sourcefn set_accel_widget(&self, accel_widget: Option<&impl IsA<Widget>>)
fn set_accel_widget(&self, accel_widget: Option<&impl IsA<Widget>>)
fn accel_closure(&self) -> Option<Closure>
fn connect_accel_closure_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId
fn connect_accel_widget_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".