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 class  ID {
  HEX_GOTO_ADDR , DEBUGGER_STEP_IN , DEBUGGER_STEP_OVER , DEBUGGER_STEP_OUT ,
  DEBUGGER_STEP_BACK , DEBUGGER_BREAK_CONTINUE , DISASM_GOTO_ADDR , DISASM_RUN_TO_ADDR ,
  DISASM_TOGGLE_BREAKPOINT , NUM , INVALID = NUM
}
 
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

enum class openmsx::Shortcuts::ID
strong
Enumerator
HEX_GOTO_ADDR 
DEBUGGER_STEP_IN 
DEBUGGER_STEP_OVER 
DEBUGGER_STEP_OUT 
DEBUGGER_STEP_BACK 
DEBUGGER_BREAK_CONTINUE 
DISASM_GOTO_ADDR 
DISASM_RUN_TO_ADDR 
DISASM_TOGGLE_BREAKPOINT 
NUM 
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 32 of file Shortcuts.hh.

Constructor & Destructor Documentation

◆ Shortcuts() [1/3]

openmsx::Shortcuts::Shortcuts ( )

Definition at line 76 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 143 of file Shortcuts.cc.

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

◆ getDefaultShortcut()

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

Definition at line 86 of file Shortcuts.cc.

References id.

Referenced by saveShortcuts().

◆ getShortcut()

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

Definition at line 91 of file Shortcuts.cc.

References id.

◆ getShortcutDescription()

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

Definition at line 130 of file Shortcuts.cc.

References id.

◆ getShortcutName()

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

Definition at line 111 of file Shortcuts.cc.

References id.

Referenced by saveShortcuts().

◆ getShortcutRepeat()

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

Definition at line 106 of file Shortcuts.cc.

References id.

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 116 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 123 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 81 of file Shortcuts.cc.

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

◆ setShortcut()

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

Definition at line 96 of file Shortcuts.cc.

References ALWAYS_GLOBAL, ALWAYS_LOCAL, and id.

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


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