| 46 | } |
| 47 | |
| 48 | void CgEditor::initialize() |
| 49 | { |
| 50 | StyleClearAll(); |
| 51 | SetLexer(wxSCI_LEX_CPP); |
| 52 | |
| 53 | // Load keywords |
| 54 | wxString path = wxT("../lexers/cg/keywords"); |
| 55 | loadKeywords(path); |
| 56 | |
| 57 | // Load call tips |
| 58 | path = wxT("../lexers/cg/calltips"); |
| 59 | getCallTipManager().load(path); |
| 60 | wxChar trigger('('); |
| 61 | getCallTipManager().addTrigger(trigger); |
| 62 | |
| 63 | // Set styles |
| 64 | StyleSetForeground(wxSCI_C_COMMENT, wxColour(0, 128, 0)); |
| 65 | StyleSetFontAttr(wxSCI_C_COMMENT, 10, "Courier New", false, false, false); |
| 66 | StyleSetForeground(wxSCI_C_COMMENTLINE, wxColour(0, 128, 0)); |
| 67 | StyleSetFontAttr(wxSCI_C_COMMENTLINE, 10, "Courier New", false, false, false); |
| 68 | StyleSetForeground(wxSCI_C_NUMBER, wxColour(0, 0, 128)); |
| 69 | StyleSetFontAttr(wxSCI_C_NUMBER, 10, "Courier New", false, false, false); |
| 70 | StyleSetForeground(wxSCI_C_STRING, wxColour(200, 200, 200)); |
| 71 | StyleSetFontAttr(wxSCI_C_STRING, 10, "Courier New", false, false, false); |
| 72 | StyleSetForeground(wxSCI_C_WORD, wxColour(0, 0, 255)); |
| 73 | StyleSetFontAttr(wxSCI_C_WORD, 10, "Courier New", false, false, false); |
| 74 | StyleSetForeground(wxSCI_C_WORD2, wxColour(136, 0, 0)); |
| 75 | StyleSetFontAttr(wxSCI_C_WORD2, 10, "Courier New", false, false, false); |
| 76 | } |
| 77 | |
| 78 | void CgEditor::OnCharAdded(wxScintillaEvent &event) |
| 79 | { |
nothing calls this directly
no test coverage detected