25 #include "FXIconList.h" 34 class FXFileAssociations;
39 FILELIST_SHOWHIDDEN = 0x04000000,
40 FILELIST_SHOWDIRS = 0x08000000,
41 FILELIST_SHOWFILES = 0x10000000,
42 FILELIST_SHOWIMAGES = 0x20000000,
43 FILELIST_NO_OWN_ASSOC = 0x40000000,
44 FILELIST_NO_PARENT = 0x80000000
62 FXFileItem():assoc(
nullptr),link(
nullptr),size(0),date(0){}
66 FXFileItem(
const FXString& text,
FXIcon* bi=
nullptr,
FXIcon* mi=
nullptr,
void* ptr=
nullptr):
FXIconItem(text,bi,mi,ptr),assoc(nullptr),link(nullptr),size(0L),date(0L),mode(0){}
93 FXbool
isNavigational()
const {
return (label[0]==
'.' && (label[1]==
'\t' || (label[1]==
'.' && label[2]==
'\t'))); }
151 FXDragAction dropaction;
160 FXbool listItems(FXbool force,FXbool notify);
163 void delete_files(
const FXString& files);
166 static FXint compareSectionNatural(
const FXchar* s1,
const FXchar* s2,FXint s,FXbool ci=
false);
171 long onOpenTimer(
FXObject*,FXSelector,
void*);
172 long onRefreshTimer(
FXObject*,FXSelector,
void*);
173 long onPreviewChore(
FXObject*,FXSelector,
void*);
174 long onDNDEnter(
FXObject*,FXSelector,
void*);
175 long onDNDLeave(
FXObject*,FXSelector,
void*);
176 long onDNDMotion(
FXObject*,FXSelector,
void*);
177 long onDNDDrop(
FXObject*,FXSelector,
void*);
178 long onDNDRequest(
FXObject*,FXSelector,
void*);
179 long onBeginDrag(
FXObject*,FXSelector,
void*);
180 long onEndDrag(
FXObject*,FXSelector,
void*);
181 long onDragged(
FXObject*,FXSelector,
void*);
182 long onClipboardLost(
FXObject*,FXSelector,
void*);
183 long onClipboardRequest(
FXObject*,FXSelector,
void*);
184 long onCmdSetValue(
FXObject*,FXSelector,
void*);
185 long onCmdGetStringValue(
FXObject*,FXSelector,
void*);
186 long onCmdSetStringValue(
FXObject*,FXSelector,
void*);
187 long onCmdDirectoryUp(
FXObject*,FXSelector,
void*);
188 long onUpdDirectoryUp(
FXObject*,FXSelector,
void*);
189 long onCmdSortByName(
FXObject*,FXSelector,
void*);
190 long onUpdSortByName(
FXObject*,FXSelector,
void*);
191 long onCmdSortByType(
FXObject*,FXSelector,
void*);
192 long onUpdSortByType(
FXObject*,FXSelector,
void*);
193 long onCmdSortBySize(
FXObject*,FXSelector,
void*);
194 long onUpdSortBySize(
FXObject*,FXSelector,
void*);
195 long onCmdSortByTime(
FXObject*,FXSelector,
void*);
196 long onUpdSortByTime(
FXObject*,FXSelector,
void*);
197 long onCmdSortByUser(
FXObject*,FXSelector,
void*);
198 long onUpdSortByUser(
FXObject*,FXSelector,
void*);
199 long onCmdSortByGroup(
FXObject*,FXSelector,
void*);
200 long onUpdSortByGroup(
FXObject*,FXSelector,
void*);
201 long onCmdSortReverse(
FXObject*,FXSelector,
void*);
202 long onUpdSortReverse(
FXObject*,FXSelector,
void*);
203 long onCmdSortCase(
FXObject*,FXSelector,
void*);
204 long onUpdSortCase(
FXObject*,FXSelector,
void*);
205 long onCmdSetPattern(
FXObject*,FXSelector,
void*);
206 long onUpdSetPattern(
FXObject*,FXSelector,
void*);
207 long onCmdSetDirectory(
FXObject*,FXSelector,
void*);
208 long onUpdSetDirectory(
FXObject*,FXSelector,
void*);
209 long onCmdToggleHidden(
FXObject*,FXSelector,
void*);
210 long onUpdToggleHidden(
FXObject*,FXSelector,
void*);
211 long onCmdShowHidden(
FXObject*,FXSelector,
void*);
212 long onUpdShowHidden(
FXObject*,FXSelector,
void*);
213 long onCmdHideHidden(
FXObject*,FXSelector,
void*);
214 long onUpdHideHidden(
FXObject*,FXSelector,
void*);
215 long onCmdToggleImages(
FXObject*,FXSelector,
void*);
216 long onUpdToggleImages(
FXObject*,FXSelector,
void*);
217 long onCmdHeader(
FXObject*,FXSelector,
void*);
218 long onUpdHeader(
FXObject*,FXSelector,
void*);
219 long onCmdRefresh(
FXObject*,FXSelector,
void*);
220 long onUpdHaveSel(
FXObject*,FXSelector,
void*);
221 long onCmdCutSel(
FXObject*,FXSelector,
void*);
222 long onCmdCopySel(
FXObject*,FXSelector,
void*);
223 long onCmdPasteSel(
FXObject*,FXSelector,
void*);
224 long onCmdDeleteSel(
FXObject*,FXSelector,
void*);
225 long onCmdDropAsk(
FXObject*,FXSelector,
void*);
226 long onCmdDropCopy(
FXObject*,FXSelector,
void*);
227 long onCmdDropMove(
FXObject*,FXSelector,
void*);
228 long onCmdDropLink(
FXObject*,FXSelector,
void*);
246 ID_OPENTIMER=FXIconList::ID_LAST,
281 virtual void create();
284 virtual void detach();
287 virtual void destroy();
290 FXbool setCurrentFile(
const FXString& file,FXbool notify=
false);
296 FXbool setDirectory(
const FXString& path,FXbool notify=
false);
302 FXString getItemFilename(FXint index)
const;
305 FXString getItemPathname(FXint index)
const;
308 FXbool isItemFile(FXint index)
const;
311 FXbool isItemDirectory(FXint index)
const;
314 FXbool isItemExecutable(FXint index)
const;
317 FXbool isItemSymlink(FXint index)
const;
320 FXbool isItemNavigational(FXint index)
const;
326 FXlong getItemSize(FXint index)
const;
329 FXTime getItemDate(FXint index)
const;
332 FXuint getItemMode(FXint index)
const;
335 FXbool selectMatching(
const FXString& ptrn=
"*",FXuint mode=FXPath::PathName|FXPath::NoEscape,FXbool notify=
false);
338 void setPattern(
const FXString& ptrn=
"*",FXbool notify=
false);
344 void setMatchMode(FXuint mode=FXPath::PathName|FXPath::NoEscape,FXbool notify=
false);
350 void showHiddenFiles(FXbool flag,FXbool notify=
false);
353 FXbool showHiddenFiles()
const;
356 void showOnlyDirectories(FXbool flag,FXbool notify=
false);
359 FXbool showOnlyDirectories()
const;
362 void showOnlyFiles(FXbool flag,FXbool notify=
false);
365 FXbool showOnlyFiles()
const;
368 void showParents(FXbool flag,FXbool notify=
false);
371 FXbool showParents()
const;
374 void showImages(FXbool flag,FXbool notify=
false);
377 FXbool showImages()
const;
380 void setImageSize(FXint size,FXbool notify=
false);
386 void setDraggableFiles(FXbool flag,FXbool notify=
false);
392 void setTimeFormat(
const FXString& fmt,FXbool notify=
false);
398 void setAssociations(
FXFileAssociations* assoc,FXbool owned=
false,FXbool notify=
false);
410 virtual void save(
FXStream& store)
const;
Sticky bit.
Definition: FXIO.h:107
FXbool isBlockdev() const
Return true if this is a block device item.
Definition: FXFileList.h:84
Is directory.
Definition: FXIO.h:98
Write permisson for all.
Definition: FXIO.h:91
FXbool isFifo() const
Return true if this is an FIFO item.
Definition: FXFileList.h:87
FXString getPattern() const
Return wildcard pattern.
Definition: FXFileList.h:341
Is regular file.
Definition: FXIO.h:99
FXint getImageSize() const
Return images preview size.
Definition: FXFileList.h:383
Registers stuff to know about the extension.
Definition: FXFileAssociations.h:36
Delete selected files.
Definition: FXFileList.h:272
void setIconSource(FXIconSource *src)
Change icon loader.
Definition: FXFileList.h:404
Show hidden files.
Definition: FXFileList.h:265
FXbool isSocket() const
Return true if this is a socket.
Definition: FXFileList.h:90
A File List widget provides an icon rich view of the file system.
Definition: FXFileList.h:131
An icon source is a class that loads an icon of any type.
Definition: FXIconSource.h:47
Sort by group name.
Definition: FXFileList.h:259
Refresh immediately.
Definition: FXFileList.h:269
Toggle sort case sensitivity.
Definition: FXFileList.h:261
Reverse sort order.
Definition: FXFileList.h:260
FXIconSource * getIconSource() const
Return icon loader.
Definition: FXFileList.h:407
Base composite.
Definition: FXComposite.h:32
const FXString & getTimeFormat() const
Return file time format.
Definition: FXFileList.h:395
File item.
Definition: FXFileList.h:49
FXTime getDate() const
Return the date for this item, in nanoseconds.
Definition: FXFileList.h:111
Sort by name.
Definition: FXFileList.h:254
A stream is a way to serialize data and objects into a byte stream.
Definition: FXStream.h:81
FXuint getMode() const
Return file mode bits.
Definition: FXFileList.h:117
FXFileAssoc * getAssoc() const
Return the file-association object for this item.
Definition: FXFileList.h:99
Copy selected files to clipboard.
Definition: FXFileList.h:271
Toggle display of hidden files.
Definition: FXFileList.h:267
FXbool isDirectory() const
Return true if this is a directory item.
Definition: FXFileList.h:72
FXFileAssociations * getAssociations() const
Return file associations.
Definition: FXFileList.h:401
FXString getDirectory() const
Return current directory.
Definition: FXFileList.h:299
void setDate(FXTime d)
Set the date for this item, in nanoseconds.
Definition: FXFileList.h:108
Definition: FX4Splitter.h:28
An Icon is an image with two additional server-side resources: a shape bitmap, which is used to mask ...
Definition: FXIcon.h:42
Sort by size.
Definition: FXFileList.h:256
Icon item.
Definition: FXIconList.h:55
Move up one directory.
Definition: FXFileList.h:262
FXlong getSize() const
Return the file size for this item.
Definition: FXFileList.h:105
Sort by owner name.
Definition: FXFileList.h:258
Set directory.
Definition: FXFileList.h:264
FXbool isExecutable() const
Return true if this is an executable item.
Definition: FXFileList.h:75
FXFileItem(const FXString &text, FXIcon *bi=nullptr, FXIcon *mi=nullptr, void *ptr=nullptr)
Constructor.
Definition: FXFileList.h:66
FXuint getMatchMode() const
Return wildcard matching mode.
Definition: FXFileList.h:347
FXbool isChardev() const
Return true if this is a character device item.
Definition: FXFileList.h:81
void setAssoc(FXFileAssoc *a)
Set the file-association object for this item.
Definition: FXFileList.h:96
The FileAssociations object manages file associations between a file extension and a FileAssoc record...
Definition: FXFileAssociations.h:101
void setSize(FXlong s)
Set the file size for this item.
Definition: FXFileList.h:102
void setMode(FXuint m)
Set file mode bits.
Definition: FXFileList.h:114
A Icon List Widget displays a list of items, each with a text and optional icon.
Definition: FXIconList.h:200
Block device.
Definition: FXIO.h:109
Object is the base class for all objects in FOX; in order to receive messages from the user interface...
Definition: FXObject.h:134
FXbool getDraggableFiles() const
Are draggable files.
Definition: FXFileList.h:389
Hidden file.
Definition: FXIO.h:97
FXbool isSymlink() const
Return true if this is a symbolic link item.
Definition: FXFileList.h:78
Socket device.
Definition: FXIO.h:110
Character device.
Definition: FXIO.h:108
Toggle display of images.
Definition: FXFileList.h:268
Hide hidden files.
Definition: FXFileList.h:266
Set match pattern.
Definition: FXFileList.h:263
FXbool isNavigational() const
Return true if item is a special navigational item like '.' or '..'.
Definition: FXFileList.h:93
Cut selected files to clipboard.
Definition: FXFileList.h:270
Sort by type.
Definition: FXFileList.h:255
Sort by access time.
Definition: FXFileList.h:257
FXString provides essential string manipulation capabilities in FOX.
Definition: FXString.h:42
FXbool isFile() const
Return true if this is a file item.
Definition: FXFileList.h:69