CComponentsText: add switch for utf8 disable/enable

This commit is contained in:
2015-07-12 18:38:32 +02:00
committed by Jacek Jendrzej
parent 37c863d141
commit ccdaacb0a0
3 changed files with 8 additions and 1 deletions

View File

@@ -63,6 +63,8 @@ class CComponentsText : public CComponentsItem, public CBox
///status: cached text string, mainly required to compare with current text
std::string ct_old_text;
bool ct_utf8_encoded;
///status: current text string is sent to CTextBox object
bool ct_text_sent;
///property: send to CTextBox object enableBackgroundPaint(true)
@@ -170,6 +172,9 @@ class CComponentsText : public CComponentsItem, public CBox
if (ct_textbox)
ct_textbox->enableSaveScreen(mode);
}
///enable/disable utf8 encoding
void enableUTF8(bool enable = true){ct_utf8_encoded = enable;}
void disableUTF8(bool enable = false){enableUTF8(enable);}
};