wxExStyle::wxExStyle( const wxString& no, const wxString& value, const wxString& macro) : m_Value(value) { SetNo(no, macro); }
void wxExStyle::Set(const wxXmlNode* node, const wxString& macro) { SetNo( wxExLexers::Get()->ApplyMacro(node->GetAttribute("no", "0"), macro), macro); m_Value = node->GetNodeContent().Strip(wxString::both); #ifdef wxExUSE_CPP0X const auto it = wxExLexers::Get()->GetThemeMacros().find(m_Value); #else std::map<wxString, wxString>::const_iterator it = wxExLexers::Get()->GetThemeMacros().find(m_Value); #endif if (it != wxExLexers::Get()->GetThemeMacros().end()) { wxString value = it->second; if (value.Contains("default-font")) { const wxFont font(wxConfigBase::Get()->ReadObject(_("Default font"), wxSystemSettings::GetFont(wxSYS_OEM_FIXED_FONT))); value.Replace("default-font", wxString::Format("face:%s,size:%d", font.GetFaceName().c_str(), font.GetPointSize())); const wxFontStyle style = font.GetStyle(); if (style == wxFONTSTYLE_ITALIC || style == wxFONTSTYLE_SLANT) { value += ",italic"; } if (font.GetWeight() == wxFONTWEIGHT_BOLD) { value += ",bold"; } if (font.GetUnderlined()) { value += ",underline"; } } m_Value = value; } if (!IsOk()) { wxLogError(_("Illegal style: %s on line: %d"), m_Value.c_str(), node->GetLineNumber()); } }
void GUIConfirmWindow::SetButtons(std::string yes, std::string no, EventListener* list) { SetYes(yes, list); SetNo(no, list); }