.reference

git-svn-id: svn://ultimatepp.org/upp/trunk@14278 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2020-04-08 12:59:41 +00:00
parent 194a6a7864
commit d6ca5acf06
2 changed files with 6 additions and 7 deletions

View file

@ -1,7 +1,8 @@
description "Demostrates FileSel features that uses separate thread to resolve file image\377";
uses
CtrlLib;
CtrlLib,
plugin/jpg;
file
main.cpp;

View file

@ -1,16 +1,14 @@
#include <CtrlLib/CtrlLib.h>
#include <plugin/jpg/jpg.h>
using namespace Upp;
static void sLoadImage(const String& path, Image& result)
{
result = StreamRaster::LoadFileAny(path);
}
GUI_APP_MAIN
{
FileSel fs;
fs.AllFilesType();
fs.WhenIconLazy = sLoadImage;
fs.WhenIconLazy = [](const String& path, Image& result) {
result = StreamRaster::LoadFileAny(path);
};
fs.ExecuteOpen();
}