void SearchWindow::SetFontColorSettings(const FontColorSettings& settings) { // Since we don't save enough information to reapply styles to the existing text, // clear everything. This is lame, but changing font settings isn't something that // happens often enough for it to really make much difference. Clear(); SetBackgroundColour(settings.GetColors(FontColorSettings::DisplayItem_Default).backColor); m_messageAttr.SetTextColour(settings.GetColors(FontColorSettings::DisplayItem_Default).foreColor); m_messageAttr.SetBackgroundColour(settings.GetColors(FontColorSettings::DisplayItem_Default).backColor); m_messageAttr.SetFont(settings.GetFont(FontColorSettings::DisplayItem_Default)); }
void ProjectExplorerWindow::SetFontColorSettings(const FontColorSettings& settings) { SetBackgroundColour(settings.GetColors(FontColorSettings::DisplayItem_Window).backColor); m_tree->SetBackgroundColour(settings.GetColors(FontColorSettings::DisplayItem_Window).backColor); m_searchBox->SetBackgroundColour(settings.GetColors(FontColorSettings::DisplayItem_Window).backColor); m_searchBox->SetDefaultStyle(wxTextAttr(settings.GetColors(FontColorSettings::DisplayItem_Window).foreColor)); m_infoBox->SetFontColorSettings(settings); m_itemColor = settings.GetColors(FontColorSettings::DisplayItem_WindowMargin).foreColor; m_itemSelectBackground = settings.GetColors(FontColorSettings::DisplayItem_WindowMargin).backColor; Rebuild(); }
void BreakpointsWindow::SetFontColorSettings(const FontColorSettings& settings) { m_breakpointList->SetBackgroundColour(settings.GetColors(FontColorSettings::DisplayItem_Window).backColor); m_breakpointList->SetTextColour(settings.GetColors(FontColorSettings::DisplayItem_Window).foreColor); }
void CodeEdit::SetFontColorSettings(const FontColorSettings& settings) { // For some reason StyleSetFont takes a (non-const) reference, so we need to make // a copy before passing it in. wxFont font = settings.GetFont(); SetSelForeground(true, settings.GetColors(FontColorSettings::DisplayItem_Selection).foreColor); SetSelBackground(true, settings.GetColors(FontColorSettings::DisplayItem_Selection).backColor); StyleSetFont(wxSTC_STYLE_DEFAULT, font); StyleClearAll(); font = settings.GetFont(FontColorSettings::DisplayItem_Default); StyleSetFont(wxSTC_LUA_DEFAULT, font); StyleSetFont(wxSTC_LUA_IDENTIFIER, font); StyleSetForeground(wxSTC_LUA_DEFAULT, settings.GetColors(FontColorSettings::DisplayItem_Default).foreColor); StyleSetBackground(wxSTC_LUA_DEFAULT, settings.GetColors(FontColorSettings::DisplayItem_Default).backColor); StyleSetForeground(wxSTC_STYLE_DEFAULT, settings.GetColors(FontColorSettings::DisplayItem_Default).foreColor); StyleSetBackground(wxSTC_STYLE_DEFAULT, settings.GetColors(FontColorSettings::DisplayItem_Default).backColor); StyleSetForeground(wxSTC_LUA_IDENTIFIER, settings.GetColors(FontColorSettings::DisplayItem_Default).foreColor); StyleSetBackground(wxSTC_LUA_IDENTIFIER, settings.GetColors(FontColorSettings::DisplayItem_Default).backColor); font = settings.GetFont(FontColorSettings::DisplayItem_Comment); StyleSetFont(wxSTC_LUA_COMMENT, font); StyleSetFont(wxSTC_LUA_COMMENTLINE, font); StyleSetFont(wxSTC_LUA_COMMENTDOC, font); StyleSetForeground(wxSTC_LUA_COMMENT, settings.GetColors(FontColorSettings::DisplayItem_Comment).foreColor); StyleSetBackground(wxSTC_LUA_COMMENT, settings.GetColors(FontColorSettings::DisplayItem_Comment).backColor); StyleSetForeground(wxSTC_LUA_COMMENTLINE, settings.GetColors(FontColorSettings::DisplayItem_Comment).foreColor); StyleSetBackground(wxSTC_LUA_COMMENTLINE, settings.GetColors(FontColorSettings::DisplayItem_Comment).backColor); StyleSetForeground(wxSTC_LUA_COMMENTDOC, settings.GetColors(FontColorSettings::DisplayItem_Comment).foreColor); StyleSetBackground(wxSTC_LUA_COMMENTDOC, settings.GetColors(FontColorSettings::DisplayItem_Comment).backColor); font = settings.GetFont(FontColorSettings::DisplayItem_Keyword); StyleSetFont(wxSTC_LUA_WORD2, font); StyleSetForeground(wxSTC_LUA_WORD2, settings.GetColors(FontColorSettings::DisplayItem_Keyword).foreColor); StyleSetBackground(wxSTC_LUA_WORD2, settings.GetColors(FontColorSettings::DisplayItem_Keyword).backColor); font = settings.GetFont(FontColorSettings::DisplayItem_Operator); StyleSetFont(wxSTC_LUA_OPERATOR, font); StyleSetForeground(wxSTC_LUA_OPERATOR, settings.GetColors(FontColorSettings::DisplayItem_Operator).foreColor); StyleSetBackground(wxSTC_LUA_OPERATOR, settings.GetColors(FontColorSettings::DisplayItem_Operator).backColor); font = settings.GetFont(FontColorSettings::DisplayItem_String); StyleSetFont(wxSTC_LUA_STRING, font); StyleSetForeground(wxSTC_LUA_STRING, settings.GetColors(FontColorSettings::DisplayItem_String).foreColor); StyleSetBackground(wxSTC_LUA_STRING, settings.GetColors(FontColorSettings::DisplayItem_String).backColor); StyleSetFont(wxSTC_LUA_STRINGEOL, font); StyleSetForeground(wxSTC_LUA_STRINGEOL, settings.GetColors(FontColorSettings::DisplayItem_String).foreColor); StyleSetBackground(wxSTC_LUA_STRINGEOL, settings.GetColors(FontColorSettings::DisplayItem_String).backColor); StyleSetFont(wxSTC_LUA_LITERALSTRING, font); StyleSetForeground(wxSTC_LUA_LITERALSTRING, settings.GetColors(FontColorSettings::DisplayItem_String).foreColor); StyleSetBackground(wxSTC_LUA_LITERALSTRING, settings.GetColors(FontColorSettings::DisplayItem_String).backColor); StyleSetFont(wxSTC_LUA_CHARACTER, font); StyleSetForeground(wxSTC_LUA_CHARACTER, settings.GetColors(FontColorSettings::DisplayItem_String).foreColor); StyleSetBackground(wxSTC_LUA_CHARACTER, settings.GetColors(FontColorSettings::DisplayItem_String).backColor); font = settings.GetFont(FontColorSettings::DisplayItem_Number); StyleSetFont(wxSTC_LUA_NUMBER, font); StyleSetForeground(wxSTC_LUA_NUMBER, settings.GetColors(FontColorSettings::DisplayItem_Number).foreColor); StyleSetBackground(wxSTC_LUA_NUMBER, settings.GetColors(FontColorSettings::DisplayItem_Number).backColor); StyleSetSize(wxSTC_STYLE_LINENUMBER, font.GetPointSize()); // Set the caret color as the inverse of the background color so it's always visible. SetCaretForeground( GetInverse(settings.GetColors(FontColorSettings::DisplayItem_Default).backColor) ); StyleSetBackground(wxSTC_STYLE_LINENUMBER, settings.GetColors(FontColorSettings::DisplayItem_WindowMargin).backColor); StyleSetForeground(wxSTC_STYLE_LINENUMBER, settings.GetColors(FontColorSettings::DisplayItem_WindowMargin).foreColor); //SetFoldMarginHiColour(true, settings.GetColors(FontColorSettings::DisplayItem_Window).backColor); }