Add basic support for UTF8 in the TextObject.

String expression editor now returns a std::string encoded in UTF8
Add UTF8 tools (and UTF8-CPP header library)
This commit is contained in:
Victor Levasseur
2015-02-14 11:34:46 +01:00
parent 5191f3b50a
commit 41ac0fe2a0
16 changed files with 1940 additions and 9 deletions
+2 -2
View File
@@ -131,7 +131,7 @@ mainFrameWrapper(mainFrameWrapper_)
Connect(ID_BUTTON1,wxEVT_COMMAND_BUTTON_CLICKED,(wxObjectEventFunction)&TextObjectEditor::OnokBtClick);
//*)
textEdit->ChangeValue(object.GetString());
textEdit->ChangeValue(gd::Utf8ToWxString(object.GetString()));
fontEdit->ChangeValue(object.GetFontFilename());
sizeEdit->SetValue(object.GetCharacterSize());
colorBt->SetBackgroundColour(wxColour(object.GetColorR(), object.GetColorG(), object.GetColorB()));
@@ -161,7 +161,7 @@ void TextObjectEditor::AdaptFontColor(wxButton *button)
void TextObjectEditor::OnokBtClick(wxCommandEvent& event)
{
object.SetString(gd::ToString(textEdit->GetValue()));
object.SetString(gd::ToUtf8String(textEdit->GetValue()));
object.SetCharacterSize(sizeEdit->GetValue());
object.SetSmooth(smoothCheck->GetValue());
object.SetColor(static_cast<int>(colorBt->GetBackgroundColour().Red()),