openMSX
Classes | Public Types | Public Member Functions | Static Public Member Functions | List of all members
openmsx::Shortcuts Class Reference

#include <Shortcuts.hh>

Classes

struct  Shortcut
 
struct  ShortcutWithRepeat
 

Public Types

enum  ID {
  HEX_GOTO_ADDR , DEBUGGER_STEP_IN , DEBUGGER_STEP_OVER , DEBUGGER_STEP_OUT ,
  DEBUGGER_STEP_BACK , DEBUGGER_BREAK_CONTINUE , DISASM_GOTO_ADDR , NUM_SHORTCUTS ,
  INVALID = NUM_SHORTCUTS
}
 
enum class  Type { LOCAL , GLOBAL , ALWAYS_LOCAL , ALWAYS_GLOBAL }
 

Public Member Functions

 Shortcuts ()
 
 Shortcuts (const Shortcuts &)=delete
 
 Shortcuts (Shortcuts &&)=delete
 
Shortcutsoperator= (const Shortcuts &)=delete
 
Shortcutsoperator= (Shortcuts &&)=delete
 
 ~Shortcuts ()=default
 
const ShortcutgetShortcut (ID id) const
 
void setShortcut (ID id, const Shortcut &shortcut)
 
void setDefaultShortcuts ()
 
bool checkShortcut (const ShortcutWithRepeat &shortcut) const
 
bool checkShortcut (ID id) const
 
template<typename XmlStream >
void saveShortcuts (XmlStream &xml) const
 

Static Public Member Functions

static bool getShortcutRepeat (ID id)
 
static zstring_view getShortcutName (ID id)
 
static zstring_view getShortcutDescription (ID id)
 
static std::optional< IDparseShortcutName (std::string_view name)
 
static std::optional< TypeparseType (std::string_view name)
 
static const ShortcutgetDefaultShortcut (ID id)
 

Detailed Description

Definition at line 15 of file Shortcuts.hh.

Member Enumeration Documentation

◆ ID

Enumerator
HEX_GOTO_ADDR 
DEBUGGER_STEP_IN 
DEBUGGER_STEP_OVER 
DEBUGGER_STEP_OUT 
DEBUGGER_STEP_BACK 
DEBUGGER_BREAK_CONTINUE 
DISASM_GOTO_ADDR 
NUM_SHORTCUTS 
INVALID 

Definition at line 18 of file Shortcuts.hh.

◆ Type

enum class openmsx::Shortcuts::Type
strong
Enumerator
LOCAL 
GLOBAL 
ALWAYS_LOCAL 
ALWAYS_GLOBAL 

Definition at line 30 of file Shortcuts.hh.

Constructor & Destructor Documentation

◆ Shortcuts() [1/3]

openmsx::Shortcuts::Shortcuts ( )

Definition at line 70 of file Shortcuts.cc.

References setDefaultShortcuts().

◆ Shortcuts() [2/3]

openmsx::Shortcuts::Shortcuts ( const Shortcuts )
delete

◆ Shortcuts() [3/3]

openmsx::Shortcuts::Shortcuts ( Shortcuts &&  )
delete

◆ ~Shortcuts()

openmsx::Shortcuts::~Shortcuts ( )
default

Member Function Documentation

◆ checkShortcut() [1/2]

bool openmsx::Shortcuts::checkShortcut ( const ShortcutWithRepeat shortcut) const

◆ checkShortcut() [2/2]

bool openmsx::Shortcuts::checkShortcut ( ID  id) const

Definition at line 144 of file Shortcuts.cc.

References checkShortcut(), getShortcutRepeat(), id, and NUM_SHORTCUTS.

◆ getDefaultShortcut()

const Shortcuts::Shortcut & openmsx::Shortcuts::getDefaultShortcut ( Shortcuts::ID  id)
static

Definition at line 80 of file Shortcuts.cc.

References id, and NUM_SHORTCUTS.

Referenced by saveShortcuts().

◆ getShortcut()

const Shortcuts::Shortcut & openmsx::Shortcuts::getShortcut ( Shortcuts::ID  id) const

Definition at line 86 of file Shortcuts.cc.

References id, and NUM_SHORTCUTS.

◆ getShortcutDescription()

zstring_view openmsx::Shortcuts::getShortcutDescription ( ID  id)
static

Definition at line 129 of file Shortcuts.cc.

References id, and NUM_SHORTCUTS.

◆ getShortcutName()

zstring_view openmsx::Shortcuts::getShortcutName ( Shortcuts::ID  id)
static

Definition at line 109 of file Shortcuts.cc.

References id, and NUM_SHORTCUTS.

Referenced by saveShortcuts().

◆ getShortcutRepeat()

bool openmsx::Shortcuts::getShortcutRepeat ( ID  id)
static

Definition at line 103 of file Shortcuts.cc.

References id, and NUM_SHORTCUTS.

Referenced by checkShortcut().

◆ operator=() [1/2]

Shortcuts & openmsx::Shortcuts::operator= ( const Shortcuts )
delete

◆ operator=() [2/2]

Shortcuts & openmsx::Shortcuts::operator= ( Shortcuts &&  )
delete

◆ parseShortcutName()

std::optional< Shortcuts::ID > openmsx::Shortcuts::parseShortcutName ( std::string_view  name)
static

Definition at line 115 of file Shortcuts.cc.

References ranges::find().

Referenced by openmsx::SettingsParser::text().

◆ parseType()

std::optional< Shortcuts::Type > openmsx::Shortcuts::parseType ( std::string_view  name)
static

Definition at line 122 of file Shortcuts.cc.

References GLOBAL, and LOCAL.

Referenced by openmsx::SettingsParser::attribute().

◆ saveShortcuts()

template<typename XmlStream >
void openmsx::Shortcuts::saveShortcuts ( XmlStream &  xml) const
inline

◆ setDefaultShortcuts()

void openmsx::Shortcuts::setDefaultShortcuts ( )

Definition at line 75 of file Shortcuts.cc.

Referenced by openmsx::SettingsConfig::loadSetting(), and Shortcuts().

◆ setShortcut()

void openmsx::Shortcuts::setShortcut ( ID  id,
const Shortcut shortcut 
)

Definition at line 92 of file Shortcuts.cc.

References ALWAYS_GLOBAL, ALWAYS_LOCAL, id, and NUM_SHORTCUTS.

Referenced by openmsx::SettingsConfig::loadSetting().


The documentation for this class was generated from the following files: