CtrlCore: IsAvailableImage, IsClipboardAvailableImage, removed obsolete Palette code in win32

This commit is contained in:
Mirek Fidler 2025-06-20 17:57:16 +02:00
parent 8ff46417bf
commit 69a80d6aef
12 changed files with 68 additions and 115 deletions

View file

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

View 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();
}