change some APIs for accepting utf8

This commit is contained in:
Jinhao
2015-11-27 01:54:26 +08:00
parent 3b8e113745
commit 12358a5dc0
55 changed files with 517 additions and 483 deletions

View File

@@ -98,7 +98,7 @@ namespace checkbox
{
if (graph.width() > 16 + interval)
{
nana::string title = widget_->caption();
std::wstring title = ::nana::charset(widget_->caption(), ::nana::unicode::utf8);
unsigned pixels = graph.width() - (16 + interval);
@@ -129,18 +129,16 @@ namespace checkbox
bgcolor(API::bgcolor(wd));
}
checkbox::checkbox(window wd, const nana::string& text, bool visible)
checkbox::checkbox(window wd, const std::string& text, bool visible)
{
create(wd, rectangle(), visible);
bgcolor(API::bgcolor(wd));
caption(text);
}
checkbox::checkbox(window wd, const nana::char_t* text, bool visible)
checkbox::checkbox(window wd, const char* text, bool visible)
: checkbox(wd, std::string(text), visible)
{
create(wd, rectangle(), visible);
bgcolor(API::bgcolor(wd));
caption(text);
}
checkbox::checkbox(window wd, const nana::rectangle& r, bool visible)