mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-05-15 14:16:07 -06:00
CtrlCore: IsAvailableImage, IsClipboardAvailableImage, removed obsolete Palette code in win32
This commit is contained in:
parent
8ff46417bf
commit
69a80d6aef
12 changed files with 68 additions and 115 deletions
9
upptst/IsClipboardAvailable/IsClipboardAvailable.upp
Normal file
9
upptst/IsClipboardAvailable/IsClipboardAvailable.upp
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
uses
|
||||
CtrlLib;
|
||||
|
||||
file
|
||||
main.cpp;
|
||||
|
||||
mainconfig
|
||||
"" = "GUI";
|
||||
|
||||
26
upptst/IsClipboardAvailable/main.cpp
Normal file
26
upptst/IsClipboardAvailable/main.cpp
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
#include <CtrlLib/CtrlLib.h>
|
||||
|
||||
using namespace Upp;
|
||||
|
||||
struct MyApp : TopWindow {
|
||||
TimeCallback tm;
|
||||
|
||||
void Paint(Draw& w) override {
|
||||
w.DrawRect(GetSize(), SColorPaper());
|
||||
if(IsClipboardAvailableImage())
|
||||
w.DrawText(0, 0, "IMAGE");
|
||||
if(IsClipboardAvailableText())
|
||||
w.DrawText(0, 50, "TEXT");
|
||||
if(IsAvailableFiles(Ctrl::Clipboard()))
|
||||
w.DrawText(0, 100, "FILES");
|
||||
}
|
||||
|
||||
MyApp() {
|
||||
tm.Set(-200, [=] { Refresh(); });
|
||||
}
|
||||
};
|
||||
|
||||
GUI_APP_MAIN
|
||||
{
|
||||
MyApp().Run();
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue