diff options
Diffstat (limited to 'src/CGEditor.cpp')
| -rw-r--r-- | src/CGEditor.cpp | 79 |
1 files changed, 78 insertions, 1 deletions
diff --git a/src/CGEditor.cpp b/src/CGEditor.cpp index e55a578..fadbdc8 100644 --- a/src/CGEditor.cpp +++ b/src/CGEditor.cpp @@ -8,6 +8,58 @@ CGEditor::CGEditor() { MT = new MoveTable(&status); MA = new Margin(&status); ME = new Menu(&status); + // Default Standard NagTable: https://en.wikipedia.org/wiki/Numeric_Annotation_Glyphs + status.NagTable[0]=""; + status.NagTable[1]="!"; + status.NagTable[2]="?"; + status.NagTable[3]="!!"; + status.NagTable[4]="??"; + status.NagTable[5]="!?"; + status.NagTable[6]="?!"; + status.NagTable[7]="□"; + status.NagTable[10]="="; + status.NagTable[13]="∞"; + status.NagTable[14]="⩲"; + status.NagTable[15]="⩱"; + status.NagTable[16]="±"; + status.NagTable[17]="∓"; + status.NagTable[18]="+-"; + status.NagTable[19]="-+"; + status.NagTable[22]="⨀"; + status.NagTable[23]="⨀"; + status.NagTable[26]="○"; + status.NagTable[27]="○"; + status.NagTable[32]="⟳"; + status.NagTable[33]="⟳"; + status.NagTable[36]="↑"; + status.NagTable[37]="↑"; + status.NagTable[40]="→"; + status.NagTable[41]="→"; + status.NagTable[44]="⯹"; + status.NagTable[45]="⯹"; + status.NagTable[132]="⇆"; + status.NagTable[133]="⇆"; + status.NagTable[138]="⨁"; + status.NagTable[139]="⨁"; + // Default Non-Standard NagTable: https://en.wikipedia.org/wiki/Numeric_Annotation_Glyphs + status.NagTable[140]="∆"; + status.NagTable[141]="∇"; + status.NagTable[142]="⌓"; + status.NagTable[143]="<="; + status.NagTable[144]="=="; + status.NagTable[145]="RR"; + status.NagTable[146]="N"; + status.NagTable[220]="⬒"; + status.NagTable[221]="⬓"; + status.NagTable[238]="○"; + status.NagTable[239]="⇔"; + status.NagTable[240]="⇗"; + status.NagTable[241]="⊞"; + status.NagTable[242]="⟫"; + status.NagTable[243]="⟪"; + status.NagTable[244]="✕"; + status.NagTable[245]="⊥"; + status.NagTable[254]="∟"; } CGEditor::~CGEditor() { @@ -86,6 +138,15 @@ void CGEditor::CallDrawElement(Element e) { DrawElement(e); } +void CGEditor::SyncCache(){ + MA->SyncCache(); + MT->SyncCache(); + MA->SyncCache(); + SBV->SyncCache(); + SBH->SyncCache(); + ME->SyncCache(); +} + void CGEditor::DrawComponent(Component *c) { for (Element &e : c->GetElements()) { CallDrawElement(e); @@ -103,4 +164,20 @@ bool CGEditor::ProcessEvents(){ return processed; } -} // namespace cgeditor
\ No newline at end of file +std::string CGEditor::GetNAGSymbol(const std::uint8_t id) const{ + for(auto const& pair: status.NagTable){ + if(pair.first == id) + return pair.second; + } + return ""; +} + +std::uint8_t CGEditor::GetNAGId(const std::string& symbol) const{ + for(auto const& pair: status.NagTable){ + if(pair.second == symbol) + return pair.first; + } + return 0; +} + +} // namespace cgeditor |
