add native_string_type for internal use

This commit is contained in:
Jinhao
2015-12-03 01:49:44 +08:00
parent ed4d2af7dd
commit e8266b5ae8
24 changed files with 185 additions and 85 deletions

View File

@@ -982,22 +982,22 @@ namespace nana
API::refresh_window(*this);
}
std::string combox::_m_caption() const throw()
auto combox::_m_caption() const throw() -> native_string_type
{
internal_scope_guard lock;
auto editor = _m_impl().editor();
if (editor)
return ::nana::charset(editor->text());
return std::string();
return to_native_string(editor->text());
return native_string_type();
}
void combox::_m_caption(std::string&& str)
void combox::_m_caption(native_string_type&& str)
{
internal_scope_guard lock;
auto editor = _m_impl().editor();
if (editor)
editor->text(::nana::charset(str, nana::unicode::utf8));
editor->text(to_native_string(str));
API::refresh_window(*this);
}