Package muntjac :: Package ui :: Module button :: Class ClickShortcut
[hide private]
[frames] | no frames]

Class ClickShortcut

source code

                      object --+            
                               |            
             event.action.Action --+        
                                   |        
event.shortcut_action.ShortcutAction --+    
                                       |    
                          object --+   |    
                                   |   |    
              event.action.IListener --+    
                                       |    
event.shortcut_listener.ShortcutListener --+
                                           |
                                          ClickShortcut

A ShortcutListener specifically made to define a keyboard shortcut that invokes a click on the given button.

Instance Methods [hide private]
 
__init__(self, *args)
Creates a keyboard shortcut for clicking the given button using the shorthand notation defined in ShortcutAction or using the given KeyCode and ModifierKeys.
source code
 
handleAction(self, sender, target) source code

Inherited from event.shortcut_action.ShortcutAction: getKeyCode, getModifiers

Inherited from event.action.Action: __eq__, getCaption, getIcon, setCaption, setIcon

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables [hide private]

Inherited from event.shortcut_action.ShortcutAction: SHORTHAND_CHAR_ALT, SHORTHAND_CHAR_CTRL, SHORTHAND_CHAR_SHIFT

Instance Variables [hide private]

Inherited from event.action.Action (private): _caption, _icon

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, *args)
(Constructor)

source code 

Creates a keyboard shortcut for clicking the given button using the shorthand notation defined in ShortcutAction or using the given KeyCode and ModifierKeys.

Parameters:
  • args - tuple of the form
    • (button, shorthandCaption)
      1. to be clicked when the shortcut is invoked
      2. the caption with shortcut keycode and modifiers indicated
    • (button, keyCode, modifiers)
      1. to be clicked when the shortcut is invoked
      2. KeyCode to react to
      3. optional modifiers for shortcut
    • (button, keyCode)
      1. to be clicked when the shortcut is invoked
      2. KeyCode to react to
Overrides: object.__init__

handleAction(self, sender, target)

source code 
Overrides: event.action.IListener.handleAction