26#ifndef SYMBOLSHORTCUTSPANEL_H
27#define SYMBOLSHORTCUTSPANEL_H
53 enum class Location { GreekLowercase, GreekUppercase, SymbolsBuiltIn, SymbolsExtra };
68 bool operator==(
const Row &)
const =
default;
77 const std::vector<Row> &
GetRows()
const {
return m_rows; }
93 void SetShortcut(
int row,
const wxString &shortcut);
99 static std::vector<Row>
RowsFor(
const wxString &extraSymbols,
100 const std::vector<wxm::SymbolShortcut> &shortcuts);
107 void OnCellChanged(wxGridEvent &event);
108 void OnCellDClick(wxGridEvent &event);
109 void OnGridKey(wxKeyEvent &event);
111 void EditSelectedShortcut();
113 int SelectedRow()
const;
115 std::vector<Row> m_rows;
Keyboard shortcuts that type a symbol into the worksheet (GH #2578).
The configuration storage for the current worksheet.
Definition: Configuration.h:102
The extra symbols of the Symbols sidebar, and the keyboard shortcuts of every symbol (GH #2578).
Definition: SymbolShortcutsPanel.h:50
static Location Locate(const wxString &symbol, const Configuration *configuration)
Which sidebar shows this symbol.
Definition: SymbolShortcutsPanel.cpp:53
wxString ExtraSymbols() const
The extra symbols Write() stores for these rows.
Definition: SymbolShortcutsPanel.cpp:291
void Write(Configuration *configuration) const
Stores the extra symbols and the shortcuts in the configuration.
Definition: SymbolShortcutsPanel.cpp:300
void SetSymbolText(int row, const wxString &text)
Puts what is typed into a row's "Symbol" cell there.
Definition: SymbolShortcutsPanel.cpp:178
void AddRow()
Adds an empty row and starts editing its symbol.
Definition: SymbolShortcutsPanel.cpp:206
static std::vector< Row > RowsFor(const wxString &extraSymbols, const std::vector< wxm::SymbolShortcut > &shortcuts)
The rows Write() would store for this text field content and shortcuts.
Definition: SymbolShortcutsPanel.cpp:81
void RemoveRow(int row)
Removes a row.
Definition: SymbolShortcutsPanel.cpp:216
void SetShortcut(int row, const wxString &shortcut)
Gives a row's symbol a shortcut, or none if shortcut is empty.
Definition: SymbolShortcutsPanel.cpp:223
const std::vector< Row > & GetRows() const
The rows, in the order the table shows them.
Definition: SymbolShortcutsPanel.h:77
Location
Where a symbol is shown.
Definition: SymbolShortcutsPanel.h:53
static wxString LocationName(Location location)
The text the "Where" column shows for a location.
Definition: SymbolShortcutsPanel.cpp:67
One row of the table.
Definition: SymbolShortcutsPanel.h:65
wxString shortcut
raw, see wxm::SymbolShortcut
Definition: SymbolShortcutsPanel.h:67