[−][src]Trait gtk::AccelGroupExt
Required methods
fn activate<P: IsA<Object>>(
&self,
accel_quark: Quark,
acceleratable: &P,
accel_key: u32,
accel_mods: ModifierType
) -> bool
&self,
accel_quark: Quark,
acceleratable: &P,
accel_key: u32,
accel_mods: ModifierType
) -> bool
Finds the first accelerator in self
that matches
accel_key
and accel_mods
, and activates it.
accel_quark
the quark for the accelerator name
acceleratable
the gobject::Object
, usually a Window
, on which
to activate the accelerator
accel_key
accelerator keyval from a key event
accel_mods
keyboard state mask from a key event
Returns
true
if an accelerator was activated and handled
this keypress
fn disconnect(&self, closure: Option<&Closure>) -> bool
Removes an accelerator previously installed through
AccelGroup::connect
.
Since 2.20 closure
can be None
.
closure
the closure to remove from this accelerator
group, or None
to remove all closures
Returns
true
if the closure was found and got disconnected
fn disconnect_key(&self, accel_key: u32, accel_mods: ModifierType) -> bool
Removes an accelerator previously installed through
AccelGroup::connect
.
accel_key
key value of the accelerator
accel_mods
modifier combination of the accelerator
Returns
true
if there was an accelerator which could be
removed, false
otherwise
fn get_is_locked(&self) -> bool
Locks are added and removed using AccelGroupExt::lock
and
AccelGroupExt::unlock
.
Returns
true
if there are 1 or more locks on the self
,
false
otherwise.
fn get_modifier_mask(&self) -> ModifierType
Gets a gdk::ModifierType
representing the mask for this
self
. For example, gdk::ModifierType::ControlMask
, gdk::ModifierType::ShiftMask
, etc.
Returns
the modifier mask for this accel group.
fn lock(&self)
Locks the given accelerator group.
Locking an acelerator group prevents the accelerators contained
within it to be changed during runtime. Refer to
AccelMap::change_entry
about runtime accelerator changes.
If called more than once, self
remains locked until
AccelGroupExt::unlock
has been called an equivalent number
of times.
fn unlock(&self)
Undoes the last call to AccelGroupExt::lock
on this self
.
fn connect_accel_activate<F: Fn(&Self, &Object, u32, ModifierType) -> bool + 'static>(
&self,
f: F
) -> SignalHandlerId
&self,
f: F
) -> SignalHandlerId
The accel-activate signal is an implementation detail of
AccelGroup
and not meant to be used by applications.
acceleratable
the object on which the accelerator was activated
keyval
the accelerator keyval
modifier
the modifier combination of the accelerator
Returns
true
if the accelerator was activated
fn connect_accel_changed<F: Fn(&Self, u32, ModifierType, &Closure) + 'static>(
&self,
f: F
) -> SignalHandlerId
&self,
f: F
) -> SignalHandlerId
The accel-changed signal is emitted when an entry is added to or removed from the accel group.
Widgets like AccelLabel
which display an associated
accelerator should connect to this signal, and rebuild
their visual representation if the accel_closure
is theirs.
keyval
the accelerator keyval
modifier
the modifier combination of the accelerator
accel_closure
the gobject::Closure
of the accelerator
fn connect_property_is_locked_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
&self,
f: F
) -> SignalHandlerId
fn connect_property_modifier_mask_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
&self,
f: F
) -> SignalHandlerId
Implementors
impl<O: IsA<AccelGroup>> AccelGroupExt for O
[src]
fn activate<P: IsA<Object>>(
&self,
accel_quark: Quark,
acceleratable: &P,
accel_key: u32,
accel_mods: ModifierType
) -> bool
[src]
&self,
accel_quark: Quark,
acceleratable: &P,
accel_key: u32,
accel_mods: ModifierType
) -> bool
fn disconnect(&self, closure: Option<&Closure>) -> bool
[src]
fn disconnect_key(&self, accel_key: u32, accel_mods: ModifierType) -> bool
[src]
fn get_is_locked(&self) -> bool
[src]
fn get_modifier_mask(&self) -> ModifierType
[src]
fn lock(&self)
[src]
fn unlock(&self)
[src]
fn connect_accel_activate<F: Fn(&Self, &Object, u32, ModifierType) -> bool + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_accel_changed<F: Fn(&Self, u32, ModifierType, &Closure) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_property_is_locked_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_property_modifier_mask_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId