#include <YShortcut.h>
Public Member Functions | |
YItemShortcut (YWidget *widget, YItem *item) | |
virtual | ~YItemShortcut () |
YItem * | item () const |
virtual void | setShortcut (char newShortcut) |
virtual bool | isMenuItem () const |
virtual std::string | debugLabel () const |
![]() | |
YShortcut (YWidget *shortcut_widget) | |
virtual | ~YShortcut () |
YWidget * | widget () const |
const char * | widgetClass () const |
bool | isButton () const |
bool | isWizardButton () const |
std::string | shortcutString () |
std::string | cleanShortcutString () |
char | preferred () |
char | shortcut () |
void | clearShortcut () |
bool | conflict () |
void | setConflict (bool newConflictState=true) |
int | distinctShortcutChars () |
bool | hasValidShortcutChar () |
Protected Member Functions | |
virtual std::string | getShortcutString () |
Additional Inherited Members | |
![]() | |
enum | { None = 0 } |
![]() | |
static std::string | cleanShortcutString (std::string shortcutString) |
static char | shortcutMarker () |
static std::string::size_type | findShortcutPos (const std::string &str, std::string::size_type start_pos=0) |
static char | findShortcut (const std::string &str, std::string::size_type start_pos=0) |
static bool | isValid (char c) |
static char | normalized (char c) |
static std::string | getShortcutString (const YWidget *widget) |
![]() | |
YWidget * | _widget |
(not owned) | |
std::string | _shortcutString |
bool | _shortcutStringCached |
is _shortcutString initialized | |
std::string | _cleanShortcutString |
bool | _cleanShortcutStringCached |
always false :facepalm: | |
int | _preferred |
int | _shortcut |
bool | _conflict |
bool | _isButton |
bool | _isWizardButton |
int | _distinctShortcutChars |
Special case for item-based widgets that can have multiple shortcuts like YDumbTab, YMenuBar, YItemSelector. Each instance represents one of those items.
For YMenuBar, only the toplevel items are handled here since only their shortcuts need to be unique within the dialog. Within each menu, shortcut conflicts are resolved separately in YMenuWidget.
|
inlinevirtual |
Destructor.
|
inlinevirtual |
Label of this shortcut suitable for debugging
Reimplemented from YShortcut.
|
protectedvirtual |
Obtain the the shortcut property of this shortcut's widget - the string that contains "&" to designate a shortcut.
Reimplemented from YShortcut.
|
inlinevirtual |
|
inline |
Return the associated item.
|
virtual |