Class: Gtk::PadController
- Inherits:
-
EventController
- Object
- EventController
- Gtk::PadController
- Defined in:
- (unknown)
Instance Method Summary collapse
-
#action_group ⇒ Gio::ActionGroup
Action-group.
- #action_group=(action_group) ⇒ Gio::ActionGroup
-
#initialize(group, pad) ⇒ Gtk::PadController
constructor
Creates a new
GtkPadControllerthat will associate events from pad to actions. -
#pad ⇒ Gdk::Device
Pad.
- #pad=(pad) ⇒ Gdk::Device
-
#set_action(type, index, mode, label, action_name) ⇒ nil
Adds an individual action to controller.
-
#set_action_entries(entries, n_entries) ⇒ nil
A convenience function to add a group of action entries on controller.
Methods inherited from EventController
#current_event, #current_event_device, #current_event_state, #current_event_time, #name, #name=, #propagation_limit, #propagation_limit=, #propagation_phase, #propagation_phase=, #reset, #static_name=, #widget, #widget=
Constructor Details
#initialize(group, pad) ⇒ Gtk::PadController
Creates a new GtkPadController that will associate events from pad to
actions.
A nil pad may be provided so the controller manages all pad devices
generically, it is discouraged to mix GtkPadController objects with
nil and non-nil pad argument on the same toplevel window, as execution
order is not guaranteed.
The GtkPadController is created with no mapped actions. In order to
map pad events to actions, use [methodGtk.PadController.set_action_entries]
or [methodGtk.PadController.set_action].
Be aware that pad events will only be delivered to GtkWindows, so adding
a pad controller to any other type of widget will not have an effect.
Instance Method Details
#action_group ⇒ Gio::ActionGroup
Returns action-group.
#action_group=(action_group) ⇒ Gio::ActionGroup
#pad ⇒ Gdk::Device
Returns pad.
#pad=(pad) ⇒ Gdk::Device
#set_action(type, index, mode, label, action_name) ⇒ nil
Adds an individual action to controller.
This action will only be activated if the given button/ring/strip number in index is interacted while the current mode is mode. -1 may be used for simple cases, so the action is triggered on all modes.
The given label should be considered user-visible, so internationalization rules apply. Some windowing systems may be able to use those for user feedback.
#set_action_entries(entries, n_entries) ⇒ nil
A convenience function to add a group of action entries on controller.
See [structGtk.PadActionEntry] and [methodGtk.PadController.set_action].