Mercurial > dwindows
diff dwtestoo.cpp @ 2960:1dabe9c6c67b
C++: Step 2 of the std::string transition.
Implement std::string versions of the Connect callback functions.
Add "C" to the name of the UTF8 returning functions.
Reimplement the functions as std::string by default.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Thu, 16 Feb 2023 12:04:52 +0000 |
parents | 217ebbee034f |
children | b9bd130f438a |
line wrap: on
line diff
--- a/dwtestoo.cpp Tue Feb 14 12:42:11 2023 +0000 +++ b/dwtestoo.cpp Thu Feb 16 12:04:52 2023 +0000 @@ -756,7 +756,7 @@ }); copybutton->ConnectClicked([this, copypastefield, entryfield]() -> int { - char *test = copypastefield->GetText(); + char *test = copypastefield->GetCText(); if(test) { this->app->SetClipboard(test); @@ -768,7 +768,7 @@ pastebutton->ConnectClicked([this, copypastefield]() -> int { - char *test = this->app->GetClipboard(); + char *test = this->app->GetCClipboard(); if(test) { copypastefield->SetText(test); this->app->Free(test); @@ -917,7 +917,7 @@ image = new DW::Pixmap(render1, "~/test"); if(!image || !image->GetHPIXMAP()) { - char *appdir = app->GetDir(); + char *appdir = app->GetCDir(); char pathbuff[1025] = {0}; int pos = (int)strlen(appdir); @@ -1211,7 +1211,7 @@ tree->Change(t2, "tree folder 2", foldericon); tree->SetData(t2, DW_INT_TO_POINTER(100)); tree->Expand(t1); - char *title = tree->GetTitle(t1); + char *title = tree->GetCTitle(t1); this->app->Debug("t1 title \"%s\" data %d t2 data %d\n", title, DW_POINTER_TO_INT(tree->GetData(t1)), DW_POINTER_TO_INT(tree->GetData(t2))); this->app->Free(title); @@ -1431,7 +1431,7 @@ mlefore->GetListText(pos, colortext, 100); fore = ComboboxColor(colortext); - char *text = mleback->GetText(); + char *text = mleback->GetCText(); if(text && *text) { @@ -1449,7 +1449,7 @@ mleback->GetListText(pos, colortext, 100); back = ComboboxColor(colortext); - char *text = mlefore->GetText(); + char *text = mlefore->GetCText(); if(text && *text) { @@ -1471,7 +1471,7 @@ fontsize->ConnectValueChanged([this, fontname, container_mle](int size) -> int { - char *font = fontname->GetText(); + char *font = fontname->GetCText(); if(font) { @@ -1699,7 +1699,7 @@ hbox->PackStart(button, FALSE, FALSE, 0); button->ConnectClicked([this, javascript, html]() -> int { - char *script = javascript->GetText(); + char *script = javascript->GetCText(); html->JavascriptRun(script); this->app->Free(script); @@ -1857,7 +1857,7 @@ // Finally try from the platform application directory if(!foldericon && !fileicon) { - char *appdir = app->GetDir(); + char *appdir = app->GetCDir(); char pathbuff[1025] = {0}; int pos = (int)strlen(appdir);