diff --git a/Tutorial/GacUI_Controls/TextEditor/Main.cpp b/Tutorial/GacUI_Controls/TextEditor/Main.cpp index 0f404509..19f1aa57 100644 --- a/Tutorial/GacUI_Controls/TextEditor/Main.cpp +++ b/Tutorial/GacUI_Controls/TextEditor/Main.cpp @@ -23,4 +23,91 @@ void GuiMain() demo::MainWindow window; window.MoveToScreenCenter(); GetApplication()->Run(&window); +} + +/*********************************************************************** +OpenUrl +***********************************************************************/ + +void OpenUrl(const WString& url) +{ + ShellExecute(NULL, L"OPEN", url.Buffer(), NULL, NULL, SW_MAXIMIZE); +} + +/*********************************************************************** +SetTokenizer +***********************************************************************/ + +class XmlColorizer : public GuiTextBoxRegexColorizer +{ +public: + XmlColorizer() + { + text::ColorEntry entry = GetCurrentTheme()->GetDefaultTextBoxColorEntry(); + SetDefaultColor(entry); + + entry.normal.text = Color(0, 128, 0); + AddToken(L"/