git-svn-id: svn://ultimatepp.org/upp/trunk@12311 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2018-09-27 09:20:39 +00:00
parent 4d1f612e3e
commit 2cc0f481fa
2 changed files with 35 additions and 0 deletions

View file

@ -0,0 +1,9 @@
uses
CtrlLib;
file
main.cpp;
mainconfig
"" = "GUI";

26
upptst/DnDText/main.cpp Normal file
View file

@ -0,0 +1,26 @@
#include <CtrlLib/CtrlLib.h>
using namespace Upp;
struct MyApp : TopWindow {
String text;
void LeftDrag(Point, dword) {
VectorMap<String, ClipData> data;
Append(data, String("Hello world!"));
text = decode(DoDragAndDrop(data, CtrlImg::exclamation()), DND_MOVE, "MOVE",
DND_COPY, "COPY",
"NONE");
Refresh();
}
void Paint(Draw& w) {
w.DrawRect(GetSize(), White());
w.DrawText(10, 10, text, Arial(50));
}
};
GUI_APP_MAIN
{
MyApp().Run();
}