mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-08-25 14:22:54 -06:00
.upptst
git-svn-id: svn://ultimatepp.org/upp/trunk@12311 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
4d1f612e3e
commit
2cc0f481fa
2 changed files with 35 additions and 0 deletions
9
upptst/DnDText/DnDText.upp
Normal file
9
upptst/DnDText/DnDText.upp
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
uses
|
||||
CtrlLib;
|
||||
|
||||
file
|
||||
main.cpp;
|
||||
|
||||
mainconfig
|
||||
"" = "GUI";
|
||||
|
||||
26
upptst/DnDText/main.cpp
Normal file
26
upptst/DnDText/main.cpp
Normal 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();
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue