void COptionsDialog::OnColor (wxCommandEvent& event) { wxColour colour; wxColourData data; wxString colname; char newcolour[128]; if (!m_IsValid) return; colname = m_pComboColors->GetStringSelection(); StrToColor(&colour, gpApp->GetConfig(SZ_SECT_COLORS, colname.mb_str())); data.SetChooseFull(TRUE); data.SetCustomColour(0,colour); data.SetColour(colour); wxColourDialog *dialog = new wxColourDialog(this, &data); dialog->SetTitle(colname); if (dialog->ShowModal() == wxID_OK) { wxColourData retData = dialog->GetColourData(); wxColour col = retData.GetColour(); ColorToStr(newcolour, &col); gpApp->SetConfig(SZ_SECT_COLORS, colname.mb_str(), newcolour); gpApp->ApplyColors(); } dialog->Destroy(); }
void TIniFile::WriteColor(const wxString & Section, const wxString & Ident, wxColour Value) { WriteString(Section, Ident, ColorToStr(Value)); }
std::ostream& ribi::Chess::operator<<(std::ostream& os, const Color c) { os << ColorToStr(c); return os; }
wxColour TIniFile::ReadColor(const wxString & Section, const wxString & Ident, wxColour Default) { return StrToColor(ReadString(Section, Ident, ColorToStr(Default))); }