|
wxMaxima
|
The extra symbols of the Symbols sidebar, and the keyboard shortcuts of every symbol (GH #2578). More...
#include <SymbolShortcutsPanel.h>
Data Structures | |
| struct | Row |
| One row of the table. More... | |
Public Types | |
| enum class | Location { GreekLowercase , GreekUppercase , SymbolsBuiltIn , SymbolsExtra } |
| Where a symbol is shown. | |
Public Member Functions | |
| SymbolShortcutsPanel (wxWindow *parent, const Configuration *configuration) | |
| void | Write (Configuration *configuration) const |
| Stores the extra symbols and the shortcuts in the configuration. | |
| const std::vector< Row > & | GetRows () const |
| The rows, in the order the table shows them. | |
| void | SetSymbolText (int row, const wxString &text) |
| Puts what is typed into a row's "Symbol" cell there. | |
| void | AddRow () |
| Adds an empty row and starts editing its symbol. | |
| void | RemoveRow (int row) |
| Removes a row. | |
| void | SetShortcut (int row, const wxString &shortcut) |
Gives a row's symbol a shortcut, or none if shortcut is empty. | |
| wxString | ExtraSymbols () const |
| The extra symbols Write() stores for these rows. | |
Static Public Member Functions | |
| static Location | Locate (const wxString &symbol, const Configuration *configuration) |
| Which sidebar shows this symbol. | |
| static wxString | LocationName (Location location) |
| The text the "Where" column shows for a location. | |
| 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. | |
The extra symbols of the Symbols sidebar, and the keyboard shortcuts of every symbol (GH #2578).
A table with one row per symbol: the symbol, its keyboard shortcut and which sidebar shows it. A symbol neither sidebar has built in becomes an extra symbol of the Symbols sidebar; one that is built in (α, ∞, ...) only gets its shortcut here. This replaces the text field the extra symbols used to be typed into, which they still are stored as, so older versions of wxMaxima keep reading them.
Nothing is stored before Write() is called, so "Cancel" in the dialogue changes nothing.
|
static |
Which sidebar shows this symbol.
A Greek letter the Greek sidebar currently hides (a Latin lookalike, by default) is an extra symbol: it would be shown nowhere otherwise.
|
static |
The rows Write() would store for this text field content and shortcuts.
How the table is filled from the configuration.
| void SymbolShortcutsPanel::SetShortcut | ( | int | row, |
| const wxString & | shortcut | ||
| ) |
Gives a row's symbol a shortcut, or none if shortcut is empty.
The row that had this shortcut before loses it, as a shortcut types one symbol only.
| void SymbolShortcutsPanel::SetSymbolText | ( | int | row, |
| const wxString & | text | ||
| ) |
Puts what is typed into a row's "Symbol" cell there.
Several symbols typed or pasted at once become a row each. An empty text removes the row. The test types into the table this way.