:right-sidebar: True AlternativeTrigger =================================================================== .. currentmodule:: gi.repository.Gtk .. class:: AlternativeTrigger(**properties: ~typing.Any) :no-contents-entry: Superclasses: :class:`~gi.repository.Gtk.ShortcutTrigger`, :class:`~gi.repository.GObject.Object` A ``GtkShortcutTrigger`` that combines two triggers. The ``GtkAlternativeTrigger`` triggers when either of two trigger. This can be cascaded to combine more than two triggers. Constructors ------------ .. rst-class:: interim-class .. class:: AlternativeTrigger :no-index: .. classmethod:: new(first: ~gi.repository.Gtk.ShortcutTrigger, second: ~gi.repository.Gtk.ShortcutTrigger) -> ~gi.repository.Gtk.ShortcutTrigger Creates a ``GtkShortcutTrigger`` that will trigger whenever either of the two given triggers gets triggered. Note that nesting is allowed, so if you want more than two alternative, create a new alternative trigger for each option. :param first: The first trigger that may trigger :param second: The second trigger that may trigger Methods ------- .. rst-class:: interim-class .. class:: AlternativeTrigger :no-index: .. method:: get_first() -> ~gi.repository.Gtk.ShortcutTrigger Gets the first of the two alternative triggers that may trigger ``self``. :obj:`~gi.repository.Gtk.AlternativeTrigger.get_second` will return the other one. .. method:: get_second() -> ~gi.repository.Gtk.ShortcutTrigger Gets the second of the two alternative triggers that may trigger ``self``. :obj:`~gi.repository.Gtk.AlternativeTrigger.get_first` will return the other one. Properties ---------- .. rst-class:: interim-class .. class:: AlternativeTrigger :no-index: .. attribute:: props.first :type: ~gi.repository.Gtk.ShortcutTrigger The first ``GtkShortcutTrigger`` to check. .. attribute:: props.second :type: ~gi.repository.Gtk.ShortcutTrigger The second ``GtkShortcutTrigger`` to check.