26 #ifndef YShortcutManager_h
27 #define YShortcutManager_h
30 #include "YShortcut.h"
119 YWidgetListConstIterator end );
A window in the desktop environment.
Helper class to manage keyboard shortcuts within one dialog and resolve keyboard shortcut conflicts.
YShortcutList _shortcutList
List of all the shortcuts in this dialog.
YDialog * _dialog
The dialog this shortcut manager works on.
int _conflictCount
Counter for shortcut conflicts.
bool _used[sizeof(char)<< 8]
Flags for used shortcut characters.
int _wanted[sizeof(char)<< 8]
Counters for wanted shortcut characters.
YShortcutManager(YDialog *dialog)
Constructor.
void checkShortcuts(bool autoResolve=true)
Check the keyboard shortcuts of all children of this dialog (not for sub-dialogs!).
virtual ~YShortcutManager()
Destructor.
void clearShortcutList()
Delete all members of the internal shortcut list, then empty the list.
void resolveConflict(YShortcut *shortcut)
Pick a new shortcut character for 'shortcut' - one that isn't marked as used in the '_used' array.
unsigned findShortestWidget(const YShortcutList &conflictList)
Find the shortest widget in 'conflictList'.
int findShortestWizardButton(const YShortcutList &conflictList)
Find the shortest wizard button in 'conflictList', if there is any.
void resolveAllConflicts()
Resolve shortcut conflicts.
YDialog * dialog()
Returns the dialog this shortcut manager works on.
int conflictCount()
Returns the number of shortcut conflicts.
void findShortcutWidgets(YWidgetListConstIterator begin, YWidgetListConstIterator end)
Recursively search all widgets between iterators 'begin' and 'end' (not those of any sub-dialogs!...
Helper class for shortcut management: This class holds data about the shortcut for one single widget.