libyui
Loading...
Searching...
No Matches
YItemShortcut Class Reference

#include <YShortcut.h>

Inheritance diagram for YItemShortcut:
Collaboration diagram for YItemShortcut:

Public Member Functions

 YItemShortcut (YWidget *widget, YItem *item)
virtual ~YItemShortcut ()
YItemitem () const
virtual void setShortcut (char newShortcut)
virtual bool isMenuItem () const
virtual std::string debugLabel () const
Public Member Functions inherited from YShortcut
 YShortcut (YWidget *shortcut_widget)
virtual ~YShortcut ()
YWidgetwidget () 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

Public Types inherited from YShortcut
enum  { None = 0 }
Static Public Member Functions inherited from YShortcut
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)
Protected Attributes inherited from YShortcut
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

Detailed Description

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.

Constructor & Destructor Documentation

◆ YItemShortcut()

YItemShortcut::YItemShortcut ( YWidget * widget,
YItem * item )

Constructor.

◆ ~YItemShortcut()

virtual YItemShortcut::~YItemShortcut ( )
inlinevirtual

Destructor.

Member Function Documentation

◆ debugLabel()

virtual std::string YItemShortcut::debugLabel ( ) const
inlinevirtual

Label of this shortcut suitable for debugging

Reimplemented from YShortcut.

◆ getShortcutString()

string YItemShortcut::getShortcutString ( )
protectedvirtual

Obtain the the shortcut property of this shortcut's widget - the string that contains "&" to designate a shortcut.

Reimplemented from YShortcut.

◆ isMenuItem()

virtual bool YItemShortcut::isMenuItem ( ) const
inlinevirtual

Returns 'true' if this is a shortcut for a (toplevel) menu item.

Reimplemented from YShortcut.

Reimplemented from YShortcut.

◆ item()

YItem * YItemShortcut::item ( ) const
inline

Return the associated item.

◆ setShortcut()

void YItemShortcut::setShortcut ( char newShortcut)
virtual

Set (override) the shortcut character.

Reimplemented from YShortcut. In this subclass, it will change the internally stored item.

Reimplemented from YShortcut.


The documentation for this class was generated from the following files:
  • /builddir/build/BUILD/libyui-4.6.2-build/libyui-4.6.2/libyui/src/YShortcut.h
  • /builddir/build/BUILD/libyui-4.6.2-build/libyui-4.6.2/libyui/src/YShortcut.cc