|
wxMaxima
|
Unicode code points typed as hex numbers, and the names Unicode gives them. More...
#include <functional>#include <optional>#include <wx/string.h>Go to the source code of this file.
Functions | |
| std::optional< long > | wxm::HexCodePoint (const wxString &text) |
| The code point a hexadecimal number names, if it names one. | |
| wxString | wxm::UnicodeCharName (long codePoint) |
| The name UnicodeData.txt gives a code point. | |
| void | wxm::ForEachUnicodeChar (const std::function< bool(long, const wxString &)> &func) |
Calls func(codePoint, name) for each named character in UnicodeData.txt. | |
Unicode code points typed as hex numbers, and the names Unicode gives them.
ESC 61 ESC enters an "a": the ESC popup offers the code point it has been typed so far next to the named ESC codes, and needs to know whether the typed text is a code point and what to call it. The names come from the UnicodeData.txt table the Unicode sidebar uses, which is embedded in the binary (data/UnicodeData.h).
| void wxm::ForEachUnicodeChar | ( | const std::function< bool(long, const wxString &)> & | func | ) |
Calls func(codePoint, name) for each named character in UnicodeData.txt.
In the table's order, which is ascending code points. Control characters and the private-use planes are skipped; the "<..., First>"/"<..., Last>" markers of the other ranges are not. Stops early if func returns false.
| std::optional< long > wxm::HexCodePoint | ( | const wxString & | text | ) |
The code point a hexadecimal number names, if it names one.
| text | A hex number, optionally preceded by "u+" or "U+" ("61", "00be", "U+1D49C"). |
| wxString wxm::UnicodeCharName | ( | long | codePoint | ) |
The name UnicodeData.txt gives a code point.
Decompresses and scans the table, stopping at the code point; the result of the last call is cached, as the popup asks for the same code point while the list is redrawn.