gtkmm 4.16.0
|
An object describing a keyboard shortcut. More...
#include <gtkmm/shortcut.h>
Public Member Functions | |
Shortcut (Shortcut &&src) noexcept | |
Shortcut & | operator= (Shortcut &&src) noexcept |
~Shortcut () noexcept override | |
GtkShortcut * | gobj () |
Provides access to the underlying C GObject. | |
const GtkShortcut * | gobj () const |
Provides access to the underlying C GObject. | |
GtkShortcut * | gobj_copy () |
Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs. | |
Glib::RefPtr< ShortcutTrigger > | get_trigger () const |
Gets the trigger used to trigger self. | |
void | set_trigger (const Glib::RefPtr< const ShortcutTrigger > & trigger) |
Sets the new trigger for self to be trigger. | |
Glib::RefPtr< ShortcutAction > | get_action () const |
Gets the action that is activated by this shortcut. | |
void | set_action (const Glib::RefPtr< const ShortcutAction > &action) |
Sets the new action for self to be action. | |
void | set_trigger (const Glib::RefPtr< const ShortcutAction > &action) |
Sets the new action for self to be action. | |
Glib::VariantBase | get_arguments () const |
Gets the arguments that are passed when activating the shortcut. | |
void | set_arguments (const Glib::VariantBase &args) const |
Sets the arguments to pass when activating the shortcut. | |
Glib::PropertyProxy< Glib::RefPtr< ShortcutTrigger > > | property_trigger () |
The trigger that triggers this shortcut. | |
Glib::PropertyProxy_ReadOnly< Glib::RefPtr< ShortcutTrigger > > | property_trigger () const |
The trigger that triggers this shortcut. | |
Glib::PropertyProxy< Glib::RefPtr< ShortcutAction > > | property_action () |
The action that gets activated by this shortcut. | |
Glib::PropertyProxy_ReadOnly< Glib::RefPtr< ShortcutAction > > | property_action () const |
The action that gets activated by this shortcut. | |
Glib::PropertyProxy< Glib::VariantBase > | property_arguments () |
Arguments passed to activation. | |
Glib::PropertyProxy_ReadOnly< Glib::VariantBase > | property_arguments () const |
Arguments passed to activation. | |
Static Public Member Functions | |
static GType | get_type () |
Get the GType for this class, for use with the underlying GObject type system. | |
static Glib::RefPtr< Shortcut > | create (const Glib::RefPtr< const ShortcutTrigger > & trigger, const Glib::RefPtr< const ShortcutAction > &action) |
Protected Member Functions | |
Shortcut (const Glib::RefPtr< const ShortcutTrigger > & trigger, const Glib::RefPtr< const ShortcutAction > &action) | |
Related Symbols | |
(Note that these are not member symbols.) | |
Glib::RefPtr< Gtk::Shortcut > | wrap (GtkShortcut *object, bool take_copy=false) |
A Glib::wrap() method for this object. | |
An object describing a keyboard shortcut.
Gtk::Shortcut is the low level object used for managing keyboard shortcuts. It contains a description of how to trigger the shortcut via a Gtk::ShortcutTrigger and a way to activate the shortcut on a widget via Gtk::ShortcutAction.
The actual work is usually done via Gtk::ShortcutController, which decides if and when to activate a shortcut. Using that controller directly however is rarely necessary as various higher level convenience APIs exist on Widgets that make it easier to use shortcuts in GTK.
Gtk::Shortcut does provide functionality to make it easy for users to work with shortcuts, either by providing informational strings for display purposes or by allowing shortcuts to be configured.
|
noexcept |
|
overridenoexcept |
|
explicitprotected |
|
static |
Glib::RefPtr< ShortcutAction > Gtk::Shortcut::get_action | ( | ) | const |
Gets the action that is activated by this shortcut.
Glib::VariantBase Gtk::Shortcut::get_arguments | ( | ) | const |
Gets the arguments that are passed when activating the shortcut.
Glib::RefPtr< ShortcutTrigger > Gtk::Shortcut::get_trigger | ( | ) | const |
Gets the trigger used to trigger self.
|
static |
Get the GType for this class, for use with the underlying GObject type system.
|
inline |
Provides access to the underlying C GObject.
|
inline |
Provides access to the underlying C GObject.
GtkShortcut * Gtk::Shortcut::gobj_copy | ( | ) |
Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
Glib::PropertyProxy< Glib::RefPtr< ShortcutAction > > Gtk::Shortcut::property_action | ( | ) |
The action that gets activated by this shortcut.
Glib::PropertyProxy_ReadOnly< Glib::RefPtr< ShortcutAction > > Gtk::Shortcut::property_action | ( | ) | const |
The action that gets activated by this shortcut.
Glib::PropertyProxy< Glib::VariantBase > Gtk::Shortcut::property_arguments | ( | ) |
Arguments passed to activation.
Glib::PropertyProxy_ReadOnly< Glib::VariantBase > Gtk::Shortcut::property_arguments | ( | ) | const |
Arguments passed to activation.
Glib::PropertyProxy< Glib::RefPtr< ShortcutTrigger > > Gtk::Shortcut::property_trigger | ( | ) |
The trigger that triggers this shortcut.
Glib::PropertyProxy_ReadOnly< Glib::RefPtr< ShortcutTrigger > > Gtk::Shortcut::property_trigger | ( | ) | const |
The trigger that triggers this shortcut.
void Gtk::Shortcut::set_action | ( | const Glib::RefPtr< const ShortcutAction > & | action | ) |
Sets the new action for self to be action.
action | The new action. If the action is nullptr , the nothing action will be used. |
Sets the arguments to pass when activating the shortcut.
args | Arguments to pass when activating self. |
void Gtk::Shortcut::set_trigger | ( | const Glib::RefPtr< const ShortcutAction > & | action | ) |
Sets the new action for self to be action.
action | The new action. If the action is nullptr , the nothing action will be used. |
void Gtk::Shortcut::set_trigger | ( | const Glib::RefPtr< const ShortcutTrigger > & | trigger | ) |
Sets the new trigger for self to be trigger.
trigger | The new trigger. If the trigger is nullptr , the never trigger will be used. |
|
related |
A Glib::wrap() method for this object.
object | The C instance. |
take_copy | False if the result should take ownership of the C instance. True if it should take a new copy or ref. |