mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-05-15 14:16:07 -06:00
.reference
git-svn-id: svn://ultimatepp.org/upp/trunk@14278 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
194a6a7864
commit
d6ca5acf06
2 changed files with 6 additions and 7 deletions
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue