CtrlLib: FileSel lazy and optimized file icon loading

git-svn-id: svn://ultimatepp.org/upp/trunk@2887 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2010-12-05 12:52:28 +00:00
parent 4b01db146b
commit a9a7d6e651
5 changed files with 169 additions and 62 deletions

View file

@ -202,31 +202,31 @@ IMAGE_DATA(65,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)
IMAGE_END_DATA(832, 13)
IMAGE_BEGIN_DATA
IMAGE_DATA(120,156,237,89,65,114,195,48,8,116,59,61,244,152,31,215,135,62,44,63,83,235,38,74,20,4,104,1,217,178,167,222)
IMAGE_DATA(14,147,88,98,1,35,68,100,119,186,76,151,105,79,248,158,166,180,200,2,143,110,30,107,217,209,230,91,54,208,24,57)
IMAGE_DATA(27,232,189,73,177,88,249,82,28,91,248,151,238,223,155,59,58,215,90,219,150,78,132,143,216,176,230,218,131,174,126,246)
IMAGE_DATA(214,12,14,134,200,34,36,128,47,205,167,9,231,83,29,148,203,233,90,184,156,13,43,87,138,195,131,213,55,230,225,113)
IMAGE_DATA(54,131,77,16,217,12,41,195,105,131,227,70,55,243,150,124,206,198,137,53,112,153,62,167,143,182,90,116,1,122,116,245)
IMAGE_DATA(136,141,209,191,76,199,248,85,251,252,253,171,60,55,206,160,69,167,82,231,37,157,68,224,229,107,254,181,248,69,112,201)
IMAGE_DATA(112,64,115,78,207,92,210,28,167,203,217,69,170,116,92,50,144,42,225,244,232,10,83,93,79,213,180,226,81,1,36,3)
IMAGE_DATA(93,117,105,174,181,186,145,39,134,200,19,73,141,86,50,208,85,151,230,90,171,235,225,35,254,145,248,43,24,183,137,246)
IMAGE_DATA(220,198,93,123,246,189,198,71,252,251,209,169,129,114,64,202,27,217,66,92,50,162,231,86,30,61,147,193,189,186,203,162)
IMAGE_DATA(233,104,118,52,95,221,2,207,80,146,17,109,76,232,170,107,21,210,219,191,142,50,25,105,233,55,165,212,157,110,221,249)
IMAGE_DATA(173,253,145,249,251,187,137,55,115,18,87,70,164,39,8,121,133,109,104,213,139,84,245,226,173,189,208,207,200,170,190,152)
IMAGE_DATA(199,17,153,231,147,223,159,127,27,71,133,171,129,64,253,140,195,217,12,32,223,195,154,193,211,158,125,51,148,49,90,249)
IMAGE_DATA(153,67,63,173,155,49,18,63,119,15,244,243,108,6,29,177,52,131,148,222,7,120,78,142,36,148,28,233,123,43,209,89)
IMAGE_DATA(151,126,222,47,160,38,194,114,57,223,133,164,66,242,117,182,241,28,71,26,201,45,204,210,6,141,95,46,126,194,165,54)
IMAGE_DATA(84,126,230,190,242,95,242,0,111,196,87,62,30,191,178,137,59,241,67,77,160,81,3,59,109,2,25,127,205,224,107,116)
IMAGE_DATA(20,34,170,4,206,243,108,58,37,92,175,215,135,228,107,131,141,138,191,192,96,131,229,27,108,84,124,70,96,62,149,147)
IMAGE_DATA(191,62,31,144,253,224,118,50,24,29,133,14,230,215,218,204,207,191,190,198,102,50,132,47,157,6,50,191,149,143,82,191)
IMAGE_DATA(37,92,60,61,248,203,120,41,165,126,61,215,55,127,123,228,91,238,119,24,142,208,12,254,27,184,102,160,129,227,207,203)
IMAGE_DATA(41,10,17,105,51,71,249,204,166,151,164,71,206,78,116,192,22,205,96,46,138,199,195,163,99,218,53,50,151,199,181,152)
IMAGE_DATA(52,187,37,215,195,159,201,134,178,240,41,215,227,191,31,164,202,225,78,17,17,126,196,191,134,22,191,165,131,218,229,174)
IMAGE_DATA(173,187,14,189,167,0,118,122,50,64,158,181,180,103,46,90,76,207,87,71,249,251,67,71,122,9,212,153,207,10,202,215)
IMAGE_DATA(68,227,183,114,215,230,43,167,145,147,175,242,195,53,188,61,118,218,12,142,142,72,49,136,5,200,129,121,145,245,24,71)
IMAGE_DATA(228,126,76,103,249,191,199,139,63,241,242,163,254,189,252,60,110,120,76,169,214,32,176,126,199,197,17,154,129,247,25,243)
IMAGE_DATA(161,159,94,255,177,132,216,225,120,156,157,53,248,106,204,128,13,170,87,234,104,115,107,241,173,241,143,206,127,105,195,91)
IMAGE_DATA(63,156,157,189,191,35,249,1,177,42,192,112,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)
IMAGE_DATA(120,156,237,89,75,114,131,48,12,117,59,93,100,153,27,151,69,15,150,155,185,33,137,131,145,245,179,100,192,158,240,58)
IMAGE_DATA(26,10,214,147,132,108,9,67,194,53,92,67,79,248,11,33,206,50,195,162,155,174,73,118,184,113,201,134,54,70,204,134)
IMAGE_DATA(246,222,168,88,106,249,84,28,123,248,167,238,223,154,59,56,38,205,173,164,227,225,107,108,212,230,218,130,166,126,122,107)
IMAGE_DATA(6,131,193,51,9,81,193,167,198,99,208,243,161,142,150,139,233,214,112,49,27,181,92,42,14,11,54,47,204,225,113,54)
IMAGE_DATA(131,93,224,41,134,152,96,180,129,113,189,197,188,39,31,179,113,98,11,92,195,37,252,200,106,222,9,104,209,213,61,54)
IMAGE_DATA(142,126,50,141,241,84,187,220,255,10,207,194,30,52,235,84,236,56,165,19,1,172,124,206,63,23,63,9,44,25,6,112)
IMAGE_DATA(206,225,158,139,26,195,116,49,187,154,85,122,92,50,52,171,4,211,131,51,12,117,45,171,70,138,135,133,34,25,218,89)
IMAGE_DATA(167,198,164,217,245,188,49,120,222,72,74,72,201,208,206,58,53,38,205,174,133,175,241,175,137,191,64,101,153,112,239,109)
IMAGE_DATA(216,185,165,238,57,190,198,191,29,141,26,40,6,205,242,214,148,16,150,12,239,190,21,71,203,100,96,159,238,146,112,58)
IMAGE_DATA(156,29,206,87,179,192,19,152,100,120,27,147,118,214,185,21,210,218,63,143,60,25,113,238,55,185,148,157,110,219,241,189)
IMAGE_DATA(253,129,241,215,183,137,175,234,36,110,137,105,154,34,148,26,46,6,173,13,204,183,36,165,127,197,68,47,51,178,178,177)
IMAGE_DATA(196,31,84,50,77,39,191,61,63,93,215,74,185,6,172,235,231,80,156,205,64,246,125,100,51,8,193,94,12,33,123,12)
IMAGE_DATA(215,242,19,7,30,107,139,209,19,63,118,15,240,120,54,131,134,152,155,65,252,253,62,192,115,52,36,33,231,224,255,203)
IMAGE_DATA(137,78,186,240,136,55,18,157,13,220,247,58,142,101,71,182,156,39,27,203,117,77,35,121,238,248,66,196,252,75,133,144)
IMAGE_DATA(115,215,113,200,252,196,93,243,151,60,212,20,226,154,175,143,159,42,226,118,124,123,19,144,214,64,183,77,32,225,217,12)
IMAGE_DATA(142,142,2,135,55,137,179,238,237,118,123,75,58,175,217,37,64,254,12,173,13,138,175,181,129,241,107,114,1,249,80,78)
IMAGE_DATA(254,246,252,161,26,194,163,25,244,21,82,129,242,201,88,207,95,63,149,251,230,83,187,129,101,247,192,231,35,215,151,4)
IMAGE_DATA(139,167,5,159,218,25,89,10,98,180,249,195,248,221,54,128,28,35,52,131,79,3,214,12,56,96,252,233,126,80,9,85)
IMAGE_DATA(204,94,254,200,219,229,79,197,30,205,96,202,22,143,133,7,175,113,231,154,177,116,157,139,137,179,155,115,45,252,9,20)
IMAGE_DATA(84,13,31,114,45,254,219,129,90,57,216,46,194,195,247,248,231,32,241,37,29,173,93,236,188,182,234,180,247,228,64,167)
IMAGE_DATA(59,131,88,33,4,127,149,188,229,211,81,250,255,173,67,253,224,221,152,143,138,150,207,9,199,151,114,39,243,153,221,200)
IMAGE_DATA(201,103,249,238,53,188,63,58,109,6,163,195,179,24,200,5,136,97,254,144,5,108,188,175,107,228,181,77,71,249,247,237)
IMAGE_DATA(197,67,172,124,175,127,43,159,250,216,202,188,166,20,115,224,152,191,113,49,66,51,240,252,154,240,208,143,235,31,150,180)
IMAGE_DATA(95,226,33,15,179,179,5,159,141,89,97,3,234,229,58,220,216,86,252,218,248,143,206,127,110,195,186,126,48,59,189,127)
IMAGE_DATA(35,249,7,186,12,193,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)
IMAGE_END_DATA(800, 24)
IMAGE_BEGIN_DATA

View file

@ -230,11 +230,13 @@ bool FileList::Key(dword key, int count) {
void FileList::Insert(int ii,
const String& name, const Image& icon, Font font, Color ink,
bool isdir, int64 length, Time time, Color extink,
const String& desc, Font descfont, Value data, Color uln)
const String& desc, Font descfont, Value data, Color uln,
bool unixexe)
{
Value v;
File& m = CreateRawValue<File>(v);
m.isdir = isdir;
m.unixexe = unixexe;
m.icon = icon;
m.name = name;
m.font = font;
@ -253,11 +255,13 @@ void FileList::Insert(int ii,
void FileList::Set(int ii,
const String& name, const Image& icon, Font font, Color ink,
bool isdir, int64 length, Time time, Color extink,
const String& desc, Font descfont, Value data, Color uln)
const String& desc, Font descfont, Value data, Color uln,
bool unixexe)
{
Value v;
File& m = CreateRawValue<File>(v);
m.isdir = isdir;
m.unixexe = unixexe;
m.icon = icon;
m.name = name;
m.font = font;
@ -273,13 +277,24 @@ void FileList::Set(int ii,
KillEdit();
}
void FileList::SetIcon(int ii, const Image& icon)
{
Value v;
File& m = CreateRawValue<File>(v);
m = Get(ii);
m.icon = icon;
ColumnList::Set(ii, v, !m.isdir);
KillEdit();
}
void FileList::Add(const String& name, const Image& icon, Font font, Color ink,
bool isdir, int64 length, Time time, Color extink,
const String& desc, Font descfont, Value data, Color uln)
const String& desc, Font descfont, Value data, Color uln, bool unixexe)
{
Value v;
File& m = CreateRawValue<File>(v);
m.isdir = isdir;
m.unixexe = unixexe;
m.icon = icon;
m.name = name;
m.font = font;

View file

@ -45,7 +45,7 @@ struct FileIconMaker : ImageMaker {
};
Image GetFileIcon(const char *path, bool dir, bool force, bool large)
Image GetFileIcon(const char *path, bool dir, bool force, bool large, bool quick = false)
{
FileIconMaker m;
String ext = GetFileExt(path);
@ -65,6 +65,10 @@ Image GetFileIcon(const char *path, bool dir, bool force, bool large)
m.exe = true;
else
m.file = "x." + ext;
if(quick) {
m.exe = false;
m.file = "x." + ext;
}
return MakeImage(m);
}
@ -282,7 +286,7 @@ bool MatchSearch(const String& filename, const String& search)
bool Load(FileList& list, const String& dir, const char *patterns, bool dirs,
Callback3<bool, const String&, Image&> WhenIcon, FileSystemInfo& filesystem,
const String& search, bool hidden, bool hiddenfiles)
const String& search, bool hidden, bool hiddenfiles, bool lazyicons)
{
if(dir.IsEmpty()) {
Array<FileSystemInfo::FileInfo> root = filesystem.Find(Null);
@ -323,9 +327,12 @@ bool Load(FileList& list, const String& dir, const char *patterns, bool dirs,
MatchSearch(fi.filename, search) && show) {
#ifdef PLATFORM_X11
Image img = isdrive ? PosixGetDriveImage(fi.filename, false)
: GetFileIcon(dir, fi.filename, fi.is_directory, fi.unix_mode & 0111, false);
: lazyicons ? fi.is_directory ? CtrlImg::Dir() : CtrlImg::File()
: GetFileIcon(dir, fi.filename, fi.is_directory, fi.unix_mode & 0111, false);
#else
Image img = GetFileIcon(AppendFileName(dir, fi.filename), fi.is_directory, false, false);
Image img = lazyicons ? fi.is_directory ? CtrlImg::Dir() : CtrlImg::File()
: GetFileIcon(AppendFileName(dir, fi.filename), fi.is_directory, fi.unix_mode & 0111, false);
// Image img = GetFileIcon(AppendFileName(dir, fi.filename), fi.is_directory, false, false, lazyicons);
#endif
if(IsNull(img))
img = fi.is_directory ? CtrlImg::Dir() : CtrlImg::File();
@ -338,6 +345,9 @@ bool Load(FileList& list, const String& dir, const char *patterns, bool dirs,
: fi.is_directory ? SColorText
: fi.is_hidden ? Blend(SColorMark, Gray, 200)
: SColorMark
#ifdef PLATFORM_X11
, fi.unix_mode & 0111
#endif
);
}
}
@ -345,6 +355,45 @@ bool Load(FileList& list, const String& dir, const char *patterns, bool dirs,
return true;
}
void LazyFileIcons::Do()
{
if(Ctrl::IsWaitingEvent()) {
Restart(5);
return;
}
int tm = GetTickCount();
while(pos < list->GetCount()) {
if(GetTickCount() - tm > ptime) {
ptime = 50;
Restart(0);
return;
}
const FileList::File& f = list->Get(pos);
if(f.icon.IsSame(CtrlImg::Dir()) || f.icon.IsSame(CtrlImg::File())) {
int t0 = GetTickCount();
String n = f.name;
#ifdef PLATFORM_WIN32
list->SetIcon(pos, GetFileIcon(AppendFileName(dir, f.name), f.isdir, f.unixexe, false, quick));
#else
list->SetIcon(pos, GetFileIcon(dir, f.name, f.isdir, f.unixexe, false));
#endif
if(GetTickCount() - t0 > 500)
quick = true;
}
pos++;
}
}
void LazyFileIcons::Start(FileList& list_, const String& dir_)
{
list = &list_;
dir = dir_;
pos = 0;
quick = false;
ptime = 150;
Restart(0);
}
class FileListSortName : public FileList::Order {
public:
virtual bool operator()(const FileList::File& a, const FileList::File& b) const {
@ -500,7 +549,7 @@ void FileSel::SearchLoad()
}
#endif
String emask = GetMask();
if(!UPP::Load(list, d, emask, mode == SELECTDIR, WhenIcon, *filesystem, ~search, ~hidden, ~hiddenfiles)) {
if(!UPP::Load(list, d, emask, mode == SELECTDIR, WhenIcon, *filesystem, ~search, ~hidden, ~hiddenfiles, true)) {
Exclamation(t_("[A3* Unable to read the directory !]&&") + DeQtf((String)~dir) + "&&" +
GetErrorMessage(GetLastError()));
if(!basedir.IsEmpty() && String(~dir).IsEmpty()) {
@ -511,7 +560,8 @@ void FileSel::SearchLoad()
olddir = Null;
SearchLoad();
}
lazyicons.Start(list, d);
places.KillCursor();
if(d.GetCount())
places.FindSetCursor(d);

View file

@ -22,6 +22,7 @@ public:
public:
struct File {
bool isdir;
bool unixexe;
Image icon;
String name;
Font font;
@ -79,18 +80,19 @@ public:
Font font = StdFont(), Color ink = SColorText(),
bool isdir = false, int64 length = 0, Time time = Null, Color extink = Null,
const String& desc = Null, Font descfont = Null, Value data = Null,
Color underline = Null);
Color underline = Null, bool unixexe = false);
void Set(int ii,
const String& name, const Image& icon = Null,
Font font = StdFont(), Color ink = SColorText(),
bool isdir = false, int64 length = 0, Time time = Null, Color extink = Null,
const String& desc = Null, Font descfont = Null, Value data = Null,
Color underline = Null);
Color underline = Null, bool unixexe = false);
void SetIcon(int ii, const Image& icon);
void Add(const String& name, const Image& icon = Null,
Font font = StdFont(), Color ink = SColorText(),
bool isdir = false, int64 length = 0, Time time = Null, Color extink = Null,
const String& desc = Null, Font descfont = Null, Value data = Null,
Color underline = Null);
Color underline = Null, bool unixexe = false);
String GetCurrentName() const;
int Find(const char *name);
@ -113,10 +115,25 @@ public:
bool Load(FileList& list, const String& dir, const char *patterns, bool dirs = false,
Callback3<bool, const String&, Image&> WhenIcon = CNULL,
FileSystemInfo& filesystem = StdFileSystemInfo(), const String& search = String(),
bool hidden = true, bool hiddenfiles = true);
bool hidden = true, bool hiddenfiles = true, bool lazyicons = false);
void SortByName(FileList& list);
void SortByExt(FileList& list);
class LazyFileIcons {
TimeCallback tm;
String dir;
FileList *list;
int pos;
bool quick;
int ptime;
void Do();
void Restart(int delay) { tm.KillSet(delay, callback(this, &LazyFileIcons::Do)); }
public:
void Start(FileList& list_, const String& dir_);
};
String DirectoryUp(String& dir, bool basedir = false);
class FileSel : public WithFileSelectorLayout<TopWindow> {
@ -151,6 +168,7 @@ protected:
Ctrl *preview;
FileList list;
ArrayCtrl places;
LazyFileIcons lazyicons;
enum {
OPEN, SAVEAS, SELECTDIR

View file

@ -195,6 +195,50 @@ filename.&]
the filename.&]
[s3; &]
[s4; &]
[s5;:FileList`:`:Insert`(int`,const String`&`,const Image`&`,Font`,Color`,bool`,int64`,Time`,Color`,const String`&`,Font`,Value`,Color`,bool`): [@(0.0.255) v
oid]_[* Insert]([@(0.0.255) int]_[*@3 ii], [@(0.0.255) const]_[_^String^ String][@(0.0.255) `&
]_[*@3 name], [@(0.0.255) const]_[_^Image^ Image][@(0.0.255) `&]_[*@3 icon]_`=_Null,
[_^Font^ Font]_[*@3 font]_`=_StdFont(), [_^Color^ Color]_[*@3 ink]_`=_SColorText(),
[@(0.0.255) bool]_[*@3 isdir]_`=_[@(0.0.255) false], [_^int64^ int64]_[*@3 length]_`=_[@3 0],
[_^Time^ Time]_[*@3 time]_`=_Null, [_^Color^ Color]_[*@3 extink]_`=_Null,
[@(0.0.255) const]_[_^String^ String][@(0.0.255) `&]_[*@3 desc]_`=_Null,
[_^Font^ Font]_[*@3 descfont]_`=_Null, [_^Value^ Value]_[*@3 data]_`=_Null,
[_^Color^ Color]_[*@3 underline]_`=_Null, [@(0.0.255) bool]_[*@3 unixexe]_`=_[@(0.0.255) fa
lse])&]
[s2;%% Inserts a new file item at specified position.&]
[s3;%% &]
[s4; &]
[s5;:FileList`:`:Set`(int`,const String`&`,const Image`&`,Font`,Color`,bool`,int64`,Time`,Color`,const String`&`,Font`,Value`,Color`,bool`): [@(0.0.255) v
oid]_[* Set]([@(0.0.255) int]_[*@3 ii], [@(0.0.255) const]_[_^String^ String][@(0.0.255) `&]_
[*@3 name], [@(0.0.255) const]_[_^Image^ Image][@(0.0.255) `&]_[*@3 icon]_`=_Null,
[_^Font^ Font]_[*@3 font]_`=_StdFont(), [_^Color^ Color]_[*@3 ink]_`=_SColorText(),
[@(0.0.255) bool]_[*@3 isdir]_`=_[@(0.0.255) false], [_^int64^ int64]_[*@3 length]_`=_[@3 0],
[_^Time^ Time]_[*@3 time]_`=_Null, [_^Color^ Color]_[*@3 extink]_`=_Null,
[@(0.0.255) const]_[_^String^ String][@(0.0.255) `&]_[*@3 desc]_`=_Null,
[_^Font^ Font]_[*@3 descfont]_`=_Null, [_^Value^ Value]_[*@3 data]_`=_Null,
[_^Color^ Color]_[*@3 underline]_`=_Null, [@(0.0.255) bool]_[*@3 unixexe]_`=_[@(0.0.255) fa
lse])&]
[s2;%% Replaces an information about a file item at specified position.&]
[s3;%% &]
[s4; &]
[s5;:FileList`:`:SetIcon`(int`,const Image`&`): [@(0.0.255) void]_[* SetIcon]([@(0.0.255) i
nt]_[*@3 ii], [@(0.0.255) const]_[_^Image^ Image][@(0.0.255) `&]_[*@3 icon])&]
[s2;%% Replaces an icon of file item.&]
[s3;%% &]
[s4; &]
[s5;:FileList`:`:Add`(const String`&`,const Image`&`,Font`,Color`,bool`,int64`,Time`,Color`,const String`&`,Font`,Value`,Color`,bool`): [@(0.0.255) v
oid]_[* Add]([@(0.0.255) const]_[_^String^ String][@(0.0.255) `&]_[*@3 name],
[@(0.0.255) const]_[_^Image^ Image][@(0.0.255) `&]_[*@3 icon]_`=_Null,
[_^Font^ Font]_[*@3 font]_`=_StdFont(), [_^Color^ Color]_[*@3 ink]_`=_SColorText(),
[@(0.0.255) bool]_[*@3 isdir]_`=_[@(0.0.255) false], [_^int64^ int64]_[*@3 length]_`=_[@3 0],
[_^Time^ Time]_[*@3 time]_`=_Null, [_^Color^ Color]_[*@3 extink]_`=_Null,
[@(0.0.255) const]_[_^String^ String][@(0.0.255) `&]_[*@3 desc]_`=_Null,
[_^Font^ Font]_[*@3 descfont]_`=_Null, [_^Value^ Value]_[*@3 data]_`=_Null,
[_^Color^ Color]_[*@3 underline]_`=_Null, [@(0.0.255) bool]_[*@3 unixexe]_`=_[@(0.0.255) fa
lse])&]
[s2;%% Adds a new file item at the end of list.&]
[s3;%% &]
[s4; &]
[s5;:FileList`:`:Get`(int`)const: [@(0.0.255) const]_[_^FileList`:`:File^ File][@(0.0.255) `&
]_[* Get]([@(0.0.255) int]_[*@3 i])_[@(0.0.255) const]&]
[s2;%% Returns the file item structure at specified index.&]
@ -203,30 +247,6 @@ the filename.&]
[s5;:FileList`:`:operator`[`]`(int`)const: [@(0.0.255) const]_[_^FileList`:`:File^ File][@(0.0.255) `&
]_[* operator`[`]]([@(0.0.255) int]_[*@3 i])_[@(0.0.255) const]&]
[s2;%% Same as Get([%-*@3 i]).&]
[s3;%% &]
[s4; &]
[s5;:FileList`:`:Insert`(int`,const String`&`,const Image`&`,Font`,Color`,bool`,int64`,Time`,Color`,const String`&`,Font`,Value`,Color`): [@(0.0.255) v
oid]_[* Insert]([@(0.0.255) int]_[*@3 ii], [@(0.0.255) const]_[_^String^ String][@(0.0.255) `&
]_[*@3 name], [@(0.0.255) const]_[_^Image^ Image][@(0.0.255) `&]_[*@3 icon]_`=_Null,
[_^Font^ Font]_[*@3 font]_`=_StdFont(), [_^Color^ Color]_[*@3 ink]_`=_SColorText(),
[@(0.0.255) bool]_[*@3 isdir]_`=_[@(0.0.255) false], [_^int64^ int64]_[*@3 length]_`=_[@3 0],
[_^Time^ Time]_[*@3 time]_`=_Null, [_^Color^ Color]_[*@3 extink]_`=_Null,
[@(0.0.255) const]_[_^String^ String][@(0.0.255) `&]_[*@3 desc]_`=_Null,
[_^Font^ Font]_[*@3 descfont]_`=_Null, [_^Value^ Value]_[*@3 data]_`=_Null,
[_^Color^ Color]_[*@3 underline]_`=_Null)&]
[s2;%% Inserts a new file item at specified position.&]
[s3;%% &]
[s4; &]
[s5;:FileList`:`:Add`(const String`&`,const Image`&`,Font`,Color`,bool`,int64`,Time`,Color`,const String`&`,Font`,Value`,Color`): [@(0.0.255) v
oid]_[* Add]([@(0.0.255) const]_[_^String^ String][@(0.0.255) `&]_[*@3 name],
[@(0.0.255) const]_[_^Image^ Image][@(0.0.255) `&]_[*@3 icon]_`=_Null,
[_^Font^ Font]_[*@3 font]_`=_StdFont(), [_^Color^ Color]_[*@3 ink]_`=_SColorText(),
[@(0.0.255) bool]_[*@3 isdir]_`=_[@(0.0.255) false], [_^int64^ int64]_[*@3 length]_`=_[@3 0],
[_^Time^ Time]_[*@3 time]_`=_Null, [_^Color^ Color]_[*@3 extink]_`=_Null,
[@(0.0.255) const]_[_^String^ String][@(0.0.255) `&]_[*@3 desc]_`=_Null,
[_^Font^ Font]_[*@3 descfont]_`=_Null, [_^Value^ Value]_[*@3 data]_`=_Null,
[_^Color^ Color]_[*@3 underline]_`=_Null)&]
[s2;%% Adds a new file item at the end of list.&]
[s3; &]
[s4; &]
[s5;:FileList`:`:GetCurrentName`(`)const: [_^String^ String]_[* GetCurrentName]()_[@(0.0.255) c
@ -293,6 +313,10 @@ applications (e.g. file selectors).&]
[s2;%% If true, item contains directory.&]
[s3;%% &]
[s4; &]
[s5;:FileList`:`:File`:`:unixexe: [@(0.0.255) bool]_[* unixexe]&]
[s2;%% If true, item in POSIX has executable rights.&]
[s3; &]
[s4; &]
[s5;:FileList`:`:File`:`:icon: [_^Image^ Image]_[* icon]&]
[s2;%% File icon.&]
[s3;%% &]