[−]Struct gtk::ShortcutsShortcut
A ShortcutsShortcut represents a single keyboard shortcut or gesture
with a short text. This widget is only meant to be used with ShortcutsWindow.
Feature: v3_20
Implements
BoxExt, ContainerExt, WidgetExt, glib::object::ObjectExt, BuildableExt, OrientableExt, WidgetExtManual, BuildableExtManual
Implementations
impl ShortcutsShortcut[src]
pub fn set_property_accel_size_group<P: IsA<SizeGroup> + SetValueOptional>(
&self,
accel_size_group: Option<&P>
)[src]
&self,
accel_size_group: Option<&P>
)
The size group for the accelerator portion of this shortcut.
This is used internally by GTK+, and must not be modified by applications.
pub fn get_property_accelerator(&self) -> Option<GString>[src]
The accelerator(s) represented by this object. This property is used
if ShortcutsShortcut:shortcut-type is set to ShortcutType::Accelerator.
The syntax of this property is (an extension of) the syntax understood by
gtk_accelerator_parse. Multiple accelerators can be specified by separating
them with a space, but keep in mind that the available width is limited.
It is also possible to specify ranges of shortcuts, using ... between the keys.
Sequences of keys can be specified using a + or & between the keys.
Examples:
- A single shortcut:
<ctl>``<alt>delete - Two alternative shortcuts:
<shift>a Home - A range of shortcuts:
<alt>1...<alt>9 - Several keys pressed together: Control_L&Control_R
- A sequence of shortcuts or keys:
<ctl>c+<ctl>x
Use + instead of & when the keys may (or have to be) pressed sequentially (e.g use t+t for 'press the t key twice').
Note that <, > and & need to be escaped as <, > and & when used in .ui files.
pub fn set_property_accelerator(&self, accelerator: Option<&str>)[src]
The accelerator(s) represented by this object. This property is used
if ShortcutsShortcut:shortcut-type is set to ShortcutType::Accelerator.
The syntax of this property is (an extension of) the syntax understood by
gtk_accelerator_parse. Multiple accelerators can be specified by separating
them with a space, but keep in mind that the available width is limited.
It is also possible to specify ranges of shortcuts, using ... between the keys.
Sequences of keys can be specified using a + or & between the keys.
Examples:
- A single shortcut:
<ctl>``<alt>delete - Two alternative shortcuts:
<shift>a Home - A range of shortcuts:
<alt>1...<alt>9 - Several keys pressed together: Control_L&Control_R
- A sequence of shortcuts or keys:
<ctl>c+<ctl>x
Use + instead of & when the keys may (or have to be) pressed sequentially (e.g use t+t for 'press the t key twice').
Note that <, > and & need to be escaped as <, > and & when used in .ui files.
pub fn get_property_action_name(&self) -> Option<GString>[src]
A detailed action name. If this is set for a shortcut
of type ShortcutType::Accelerator, then GTK+ will use
the accelerators that are associated with the action
via GtkApplicationExt::set_accels_for_action, and setting
ShortcutsShortcut::accelerator is not necessary.
Feature: v3_22
pub fn set_property_action_name(&self, action_name: Option<&str>)[src]
A detailed action name. If this is set for a shortcut
of type ShortcutType::Accelerator, then GTK+ will use
the accelerators that are associated with the action
via GtkApplicationExt::set_accels_for_action, and setting
ShortcutsShortcut::accelerator is not necessary.
Feature: v3_22
pub fn get_property_icon(&self) -> Option<Icon>[src]
An icon to represent the shortcut or gesture. This property is used if
ShortcutsShortcut:shortcut-type is set to ShortcutType::Gesture.
For the other predefined gesture types, GTK+ provides an icon on its own.
pub fn set_property_icon<P: IsA<Icon> + SetValueOptional>(
&self,
icon: Option<&P>
)[src]
&self,
icon: Option<&P>
)
An icon to represent the shortcut or gesture. This property is used if
ShortcutsShortcut:shortcut-type is set to ShortcutType::Gesture.
For the other predefined gesture types, GTK+ provides an icon on its own.
pub fn get_property_icon_set(&self) -> bool[src]
true if an icon has been set.
pub fn set_property_icon_set(&self, icon_set: bool)[src]
true if an icon has been set.
pub fn get_property_shortcut_type(&self) -> ShortcutType[src]
The type of shortcut that is represented.
pub fn set_property_shortcut_type(&self, shortcut_type: ShortcutType)[src]
The type of shortcut that is represented.
pub fn get_property_subtitle(&self) -> Option<GString>[src]
The subtitle for the shortcut or gesture.
This is typically used for gestures and should be a short, one-line text that describes the gesture itself. For the predefined gesture types, GTK+ provides a subtitle on its own.
pub fn set_property_subtitle(&self, subtitle: Option<&str>)[src]
The subtitle for the shortcut or gesture.
This is typically used for gestures and should be a short, one-line text that describes the gesture itself. For the predefined gesture types, GTK+ provides a subtitle on its own.
pub fn get_property_subtitle_set(&self) -> bool[src]
true if a subtitle has been set.
pub fn set_property_subtitle_set(&self, subtitle_set: bool)[src]
true if a subtitle has been set.
pub fn get_property_title(&self) -> Option<GString>[src]
The textual description for the shortcut or gesture represented by this object. This should be a short string that can fit in a single line.
pub fn set_property_title(&self, title: Option<&str>)[src]
The textual description for the shortcut or gesture represented by this object. This should be a short string that can fit in a single line.
pub fn set_property_title_size_group<P: IsA<SizeGroup> + SetValueOptional>(
&self,
title_size_group: Option<&P>
)[src]
&self,
title_size_group: Option<&P>
)
The size group for the textual portion of this shortcut.
This is used internally by GTK+, and must not be modified by applications.
pub fn connect_property_accel_size_group_notify<F: Fn(&ShortcutsShortcut) + 'static>(
&self,
f: F
) -> SignalHandlerId[src]
&self,
f: F
) -> SignalHandlerId
pub fn connect_property_accelerator_notify<F: Fn(&ShortcutsShortcut) + 'static>(
&self,
f: F
) -> SignalHandlerId[src]
&self,
f: F
) -> SignalHandlerId
pub fn connect_property_action_name_notify<F: Fn(&ShortcutsShortcut) + 'static>(
&self,
f: F
) -> SignalHandlerId[src]
&self,
f: F
) -> SignalHandlerId
pub fn connect_property_direction_notify<F: Fn(&ShortcutsShortcut) + 'static>(
&self,
f: F
) -> SignalHandlerId[src]
&self,
f: F
) -> SignalHandlerId
pub fn connect_property_icon_notify<F: Fn(&ShortcutsShortcut) + 'static>(
&self,
f: F
) -> SignalHandlerId[src]
&self,
f: F
) -> SignalHandlerId
pub fn connect_property_icon_set_notify<F: Fn(&ShortcutsShortcut) + 'static>(
&self,
f: F
) -> SignalHandlerId[src]
&self,
f: F
) -> SignalHandlerId
pub fn connect_property_shortcut_type_notify<F: Fn(&ShortcutsShortcut) + 'static>(
&self,
f: F
) -> SignalHandlerId[src]
&self,
f: F
) -> SignalHandlerId
pub fn connect_property_subtitle_notify<F: Fn(&ShortcutsShortcut) + 'static>(
&self,
f: F
) -> SignalHandlerId[src]
&self,
f: F
) -> SignalHandlerId
pub fn connect_property_subtitle_set_notify<F: Fn(&ShortcutsShortcut) + 'static>(
&self,
f: F
) -> SignalHandlerId[src]
&self,
f: F
) -> SignalHandlerId
pub fn connect_property_title_notify<F: Fn(&ShortcutsShortcut) + 'static>(
&self,
f: F
) -> SignalHandlerId[src]
&self,
f: F
) -> SignalHandlerId
pub fn connect_property_title_size_group_notify<F: Fn(&ShortcutsShortcut) + 'static>(
&self,
f: F
) -> SignalHandlerId[src]
&self,
f: F
) -> SignalHandlerId
Trait Implementations
impl Clone for ShortcutsShortcut
fn clone(&self) -> ShortcutsShortcut
fn clone_from(&mut self, source: &Self)1.0.0[src]
impl Debug for ShortcutsShortcut
impl Display for ShortcutsShortcut[src]
impl Eq for ShortcutsShortcut
impl Hash for ShortcutsShortcut
fn hash<__H: Hasher>(&self, state: &mut __H)
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher, 1.3.0[src]
H: Hasher,
impl IsA<Box> for ShortcutsShortcut
impl IsA<Buildable> for ShortcutsShortcut
impl IsA<Container> for ShortcutsShortcut
impl IsA<Orientable> for ShortcutsShortcut
impl IsA<Widget> for ShortcutsShortcut
impl Ord for ShortcutsShortcut
fn cmp(&self, other: &ShortcutsShortcut) -> Ordering
#[must_use]fn max(self, other: Self) -> Self1.21.0[src]
#[must_use]fn min(self, other: Self) -> Self1.21.0[src]
#[must_use]fn clamp(self, min: Self, max: Self) -> Self[src]
impl<T: ObjectType> PartialEq<T> for ShortcutsShortcut
impl<T: ObjectType> PartialOrd<T> for ShortcutsShortcut
fn partial_cmp(&self, other: &T) -> Option<Ordering>
#[must_use]fn lt(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]fn le(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]fn gt(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]fn ge(&self, other: &Rhs) -> bool1.0.0[src]
impl StaticType for ShortcutsShortcut
fn static_type() -> Type
Auto Trait Implementations
impl RefUnwindSafe for ShortcutsShortcut
impl !Send for ShortcutsShortcut
impl !Sync for ShortcutsShortcut
impl Unpin for ShortcutsShortcut
impl UnwindSafe for ShortcutsShortcut
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<Super, Sub> CanDowncast<Sub> for Super where
Sub: IsA<Super>,
Super: IsA<Super>,
Sub: IsA<Super>,
Super: IsA<Super>,
impl<T> Cast for T where
T: ObjectType,
T: ObjectType,
fn upcast<T>(self) -> T where
Self: IsA<T>,
T: ObjectType,
Self: IsA<T>,
T: ObjectType,
fn upcast_ref<T>(&self) -> &T where
Self: IsA<T>,
T: ObjectType,
Self: IsA<T>,
T: ObjectType,
fn downcast<T>(self) -> Result<T, Self> where
Self: CanDowncast<T>,
T: ObjectType,
Self: CanDowncast<T>,
T: ObjectType,
fn downcast_ref<T>(&self) -> Option<&T> where
Self: CanDowncast<T>,
T: ObjectType,
Self: CanDowncast<T>,
T: ObjectType,
fn dynamic_cast<T>(self) -> Result<T, Self> where
T: ObjectType,
T: ObjectType,
fn dynamic_cast_ref<T>(&self) -> Option<&T> where
T: ObjectType,
T: ObjectType,
unsafe fn unsafe_cast<T>(self) -> T where
T: ObjectType,
T: ObjectType,
unsafe fn unsafe_cast_ref<T>(&self) -> &T where
T: ObjectType,
T: ObjectType,
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> ObjectExt for T where
T: ObjectType,
T: ObjectType,
fn is<U>(&self) -> bool where
U: StaticType,
U: StaticType,
fn get_type(&self) -> Type
fn get_object_class(&self) -> &ObjectClass
fn set_properties(
&self,
property_values: &[(&str, &dyn ToValue)]
) -> Result<(), BoolError>
&self,
property_values: &[(&str, &dyn ToValue)]
) -> Result<(), BoolError>
fn set_property<'a, N>(
&self,
property_name: N,
value: &dyn ToValue
) -> Result<(), BoolError> where
N: Into<&'a str>,
&self,
property_name: N,
value: &dyn ToValue
) -> Result<(), BoolError> where
N: Into<&'a str>,
fn get_property<'a, N>(&self, property_name: N) -> Result<Value, BoolError> where
N: Into<&'a str>,
N: Into<&'a str>,
unsafe fn set_qdata<QD>(&self, key: Quark, value: QD) where
QD: 'static,
QD: 'static,
unsafe fn get_qdata<QD>(&self, key: Quark) -> Option<&QD> where
QD: 'static,
QD: 'static,
unsafe fn steal_qdata<QD>(&self, key: Quark) -> Option<QD> where
QD: 'static,
QD: 'static,
unsafe fn set_data<QD>(&self, key: &str, value: QD) where
QD: 'static,
QD: 'static,
unsafe fn get_data<QD>(&self, key: &str) -> Option<&QD> where
QD: 'static,
QD: 'static,
unsafe fn steal_data<QD>(&self, key: &str) -> Option<QD> where
QD: 'static,
QD: 'static,
fn block_signal(&self, handler_id: &SignalHandlerId)
fn unblock_signal(&self, handler_id: &SignalHandlerId)
fn stop_signal_emission(&self, signal_name: &str)
fn disconnect(&self, handler_id: SignalHandlerId)
fn connect_notify<F>(&self, name: Option<&str>, f: F) -> SignalHandlerId where
F: 'static + Send + Sync + Fn(&T, &ParamSpec),
F: 'static + Send + Sync + Fn(&T, &ParamSpec),
unsafe fn connect_notify_unsafe<F>(
&self,
name: Option<&str>,
f: F
) -> SignalHandlerId where
F: Fn(&T, &ParamSpec),
&self,
name: Option<&str>,
f: F
) -> SignalHandlerId where
F: Fn(&T, &ParamSpec),
fn notify<'a, N>(&self, property_name: N) where
N: Into<&'a str>,
N: Into<&'a str>,
fn notify_by_pspec(&self, pspec: &ParamSpec)
fn has_property<'a, N>(&self, property_name: N, type_: Option<Type>) -> bool where
N: Into<&'a str>,
N: Into<&'a str>,
fn get_property_type<'a, N>(&self, property_name: N) -> Option<Type> where
N: Into<&'a str>,
N: Into<&'a str>,
fn find_property<'a, N>(&self, property_name: N) -> Option<ParamSpec> where
N: Into<&'a str>,
N: Into<&'a str>,
fn list_properties(&self) -> Vec<ParamSpec>
fn connect<'a, N, F>(
&self,
signal_name: N,
after: bool,
callback: F
) -> Result<SignalHandlerId, BoolError> where
F: Fn(&[Value]) -> Option<Value> + Send + Sync + 'static,
N: Into<&'a str>,
&self,
signal_name: N,
after: bool,
callback: F
) -> Result<SignalHandlerId, BoolError> where
F: Fn(&[Value]) -> Option<Value> + Send + Sync + 'static,
N: Into<&'a str>,
fn connect_local<'a, N, F>(
&self,
signal_name: N,
after: bool,
callback: F
) -> Result<SignalHandlerId, BoolError> where
F: Fn(&[Value]) -> Option<Value> + 'static,
N: Into<&'a str>,
&self,
signal_name: N,
after: bool,
callback: F
) -> Result<SignalHandlerId, BoolError> where
F: Fn(&[Value]) -> Option<Value> + 'static,
N: Into<&'a str>,
unsafe fn connect_unsafe<'a, N, F>(
&self,
signal_name: N,
after: bool,
callback: F
) -> Result<SignalHandlerId, BoolError> where
F: Fn(&[Value]) -> Option<Value>,
N: Into<&'a str>,
&self,
signal_name: N,
after: bool,
callback: F
) -> Result<SignalHandlerId, BoolError> where
F: Fn(&[Value]) -> Option<Value>,
N: Into<&'a str>,
fn emit<'a, N>(
&self,
signal_name: N,
args: &[&dyn ToValue]
) -> Result<Option<Value>, BoolError> where
N: Into<&'a str>,
&self,
signal_name: N,
args: &[&dyn ToValue]
) -> Result<Option<Value>, BoolError> where
N: Into<&'a str>,
fn downgrade(&self) -> WeakRef<T>
fn bind_property<'a, O, N, M>(
&'a self,
source_property: N,
target: &'a O,
target_property: M
) -> BindingBuilder<'a> where
M: Into<&'a str>,
N: Into<&'a str>,
O: ObjectType,
&'a self,
source_property: N,
target: &'a O,
target_property: M
) -> BindingBuilder<'a> where
M: Into<&'a str>,
N: Into<&'a str>,
O: ObjectType,
fn ref_count(&self) -> u32
impl<'a, T> ToGlibContainerFromSlice<'a, *const GList> for T where
T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>,
T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>,
type Storage = (Option<List>, Vec<Stash<'a, <T as GlibPtrDefault>::GlibType, T>>)
fn to_glib_none_from_slice(
t: &'a [T]
) -> (*const GList, <T as ToGlibContainerFromSlice<'a, *const GList>>::Storage)
t: &'a [T]
) -> (*const GList, <T as ToGlibContainerFromSlice<'a, *const GList>>::Storage)
fn to_glib_container_from_slice(
_t: &'a [T]
) -> (*const GList, <T as ToGlibContainerFromSlice<'a, *const GList>>::Storage)
_t: &'a [T]
) -> (*const GList, <T as ToGlibContainerFromSlice<'a, *const GList>>::Storage)
fn to_glib_full_from_slice(_t: &[T]) -> *const GList
impl<'a, T> ToGlibContainerFromSlice<'a, *const GPtrArray> for T where
T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>,
T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>,
type Storage = (Option<PtrArray>, Vec<Stash<'a, <T as GlibPtrDefault>::GlibType, T>>)
fn to_glib_none_from_slice(
t: &'a [T]
) -> (*const GPtrArray, <T as ToGlibContainerFromSlice<'a, *const GPtrArray>>::Storage)
t: &'a [T]
) -> (*const GPtrArray, <T as ToGlibContainerFromSlice<'a, *const GPtrArray>>::Storage)
fn to_glib_container_from_slice(
_t: &'a [T]
) -> (*const GPtrArray, <T as ToGlibContainerFromSlice<'a, *const GPtrArray>>::Storage)
_t: &'a [T]
) -> (*const GPtrArray, <T as ToGlibContainerFromSlice<'a, *const GPtrArray>>::Storage)
fn to_glib_full_from_slice(_t: &[T]) -> *const GPtrArray
impl<'a, T> ToGlibContainerFromSlice<'a, *mut GArray> for T where
T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>,
T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>,
type Storage = (Option<Array>, Vec<Stash<'a, <T as GlibPtrDefault>::GlibType, T>>)
fn to_glib_none_from_slice(
t: &'a [T]
) -> (*mut GArray, <T as ToGlibContainerFromSlice<'a, *mut GArray>>::Storage)
t: &'a [T]
) -> (*mut GArray, <T as ToGlibContainerFromSlice<'a, *mut GArray>>::Storage)
fn to_glib_container_from_slice(
t: &'a [T]
) -> (*mut GArray, <T as ToGlibContainerFromSlice<'a, *mut GArray>>::Storage)
t: &'a [T]
) -> (*mut GArray, <T as ToGlibContainerFromSlice<'a, *mut GArray>>::Storage)
fn to_glib_full_from_slice(t: &[T]) -> *mut GArray
impl<'a, T> ToGlibContainerFromSlice<'a, *mut GList> for T where
T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>,
T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>,
type Storage = (Option<List>, Vec<Stash<'a, <T as GlibPtrDefault>::GlibType, T>>)
fn to_glib_none_from_slice(
t: &'a [T]
) -> (*mut GList, <T as ToGlibContainerFromSlice<'a, *mut GList>>::Storage)
t: &'a [T]
) -> (*mut GList, <T as ToGlibContainerFromSlice<'a, *mut GList>>::Storage)
fn to_glib_container_from_slice(
t: &'a [T]
) -> (*mut GList, <T as ToGlibContainerFromSlice<'a, *mut GList>>::Storage)
t: &'a [T]
) -> (*mut GList, <T as ToGlibContainerFromSlice<'a, *mut GList>>::Storage)
fn to_glib_full_from_slice(t: &[T]) -> *mut GList
impl<'a, T> ToGlibContainerFromSlice<'a, *mut GPtrArray> for T where
T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>,
T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>,
type Storage = (Option<PtrArray>, Vec<Stash<'a, <T as GlibPtrDefault>::GlibType, T>>)
fn to_glib_none_from_slice(
t: &'a [T]
) -> (*mut GPtrArray, <T as ToGlibContainerFromSlice<'a, *mut GPtrArray>>::Storage)
t: &'a [T]
) -> (*mut GPtrArray, <T as ToGlibContainerFromSlice<'a, *mut GPtrArray>>::Storage)
fn to_glib_container_from_slice(
t: &'a [T]
) -> (*mut GPtrArray, <T as ToGlibContainerFromSlice<'a, *mut GPtrArray>>::Storage)
t: &'a [T]
) -> (*mut GPtrArray, <T as ToGlibContainerFromSlice<'a, *mut GPtrArray>>::Storage)
fn to_glib_full_from_slice(t: &[T]) -> *mut GPtrArray
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T[src]
fn clone_into(&self, target: &mut T)[src]
impl<T> ToSendValue for T where
T: ToValue + SetValue + Send + ?Sized,
T: ToValue + SetValue + Send + ?Sized,
fn to_send_value(&self) -> SendValue
impl<T> ToString for T where
T: Display + ?Sized, [src]
T: Display + ?Sized,
impl<T> ToValue for T where
T: SetValue + ?Sized,
T: SetValue + ?Sized,
fn to_value(&self) -> Value
fn to_value_type(&self) -> Type
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,