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);
170 long onOpenTimer(
FXObject*,FXSelector,
void*);
171 long onRefreshTimer(
FXObject*,FXSelector,
void*);
172 long onPreviewChore(
FXObject*,FXSelector,
void*);
173 long onDNDEnter(
FXObject*,FXSelector,
void*);
174 long onDNDLeave(
FXObject*,FXSelector,
void*);
175 long onDNDMotion(
FXObject*,FXSelector,
void*);
176 long onDNDDrop(
FXObject*,FXSelector,
void*);
177 long onDNDRequest(
FXObject*,FXSelector,
void*);
178 long onBeginDrag(
FXObject*,FXSelector,
void*);
179 long onEndDrag(
FXObject*,FXSelector,
void*);
180 long onDragged(
FXObject*,FXSelector,
void*);
181 long onClipboardLost(
FXObject*,FXSelector,
void*);
182 long onClipboardRequest(
FXObject*,FXSelector,
void*);
183 long onCmdSetValue(
FXObject*,FXSelector,
void*);
184 long onCmdGetStringValue(
FXObject*,FXSelector,
void*);
185 long onCmdSetStringValue(
FXObject*,FXSelector,
void*);
186 long onCmdDirectoryUp(
FXObject*,FXSelector,
void*);
187 long onUpdDirectoryUp(
FXObject*,FXSelector,
void*);
188 long onCmdSortByName(
FXObject*,FXSelector,
void*);
189 long onUpdSortByName(
FXObject*,FXSelector,
void*);
190 long onCmdSortByType(
FXObject*,FXSelector,
void*);
191 long onUpdSortByType(
FXObject*,FXSelector,
void*);
192 long onCmdSortBySize(
FXObject*,FXSelector,
void*);
193 long onUpdSortBySize(
FXObject*,FXSelector,
void*);
194 long onCmdSortByTime(
FXObject*,FXSelector,
void*);
195 long onUpdSortByTime(
FXObject*,FXSelector,
void*);
196 long onCmdSortByUser(
FXObject*,FXSelector,
void*);
197 long onUpdSortByUser(
FXObject*,FXSelector,
void*);
198 long onCmdSortByGroup(
FXObject*,FXSelector,
void*);
199 long onUpdSortByGroup(
FXObject*,FXSelector,
void*);
200 long onCmdSortReverse(
FXObject*,FXSelector,
void*);
201 long onUpdSortReverse(
FXObject*,FXSelector,
void*);
202 long onCmdSortCase(
FXObject*,FXSelector,
void*);
203 long onUpdSortCase(
FXObject*,FXSelector,
void*);
204 long onCmdSetPattern(
FXObject*,FXSelector,
void*);
205 long onUpdSetPattern(
FXObject*,FXSelector,
void*);
206 long onCmdSetDirectory(
FXObject*,FXSelector,
void*);
207 long onUpdSetDirectory(
FXObject*,FXSelector,
void*);
208 long onCmdToggleHidden(
FXObject*,FXSelector,
void*);
209 long onUpdToggleHidden(
FXObject*,FXSelector,
void*);
210 long onCmdShowHidden(
FXObject*,FXSelector,
void*);
211 long onUpdShowHidden(
FXObject*,FXSelector,
void*);
212 long onCmdHideHidden(
FXObject*,FXSelector,
void*);
213 long onUpdHideHidden(
FXObject*,FXSelector,
void*);
214 long onCmdToggleImages(
FXObject*,FXSelector,
void*);
215 long onUpdToggleImages(
FXObject*,FXSelector,
void*);
216 long onCmdHeader(
FXObject*,FXSelector,
void*);
217 long onUpdHeader(
FXObject*,FXSelector,
void*);
218 long onCmdRefresh(
FXObject*,FXSelector,
void*);
219 long onUpdHaveSel(
FXObject*,FXSelector,
void*);
220 long onCmdCutSel(
FXObject*,FXSelector,
void*);
221 long onCmdCopySel(
FXObject*,FXSelector,
void*);
222 long onCmdPasteSel(
FXObject*,FXSelector,
void*);
223 long onCmdDeleteSel(
FXObject*,FXSelector,
void*);
224 long onCmdDropAsk(
FXObject*,FXSelector,
void*);
225 long onCmdDropCopy(
FXObject*,FXSelector,
void*);
226 long onCmdDropMove(
FXObject*,FXSelector,
void*);
227 long onCmdDropLink(
FXObject*,FXSelector,
void*);
245 ID_OPENTIMER=FXIconList::ID_LAST,
280 virtual void create();
283 virtual void detach();
286 virtual void destroy();
289 FXbool setCurrentFile(
const FXString& file,FXbool notify=
false);
295 FXbool setDirectory(
const FXString& path,FXbool notify=
false);
301 FXString getItemFilename(FXint index)
const;
304 FXString getItemPathname(FXint index)
const;
307 FXbool isItemFile(FXint index)
const;
310 FXbool isItemDirectory(FXint index)
const;
313 FXbool isItemExecutable(FXint index)
const;
316 FXbool isItemSymlink(FXint index)
const;
319 FXbool isItemNavigational(FXint index)
const;
325 FXlong getItemSize(FXint index)
const;
328 FXTime getItemDate(FXint index)
const;
331 FXuint getItemMode(FXint index)
const;
334 void setPattern(
const FXString& ptrn,FXbool notify=
false);
340 void setMatchMode(FXuint mode,FXbool notify=
false);
346 void showHiddenFiles(FXbool flag,FXbool notify=
false);
349 FXbool showHiddenFiles()
const;
352 void showOnlyDirectories(FXbool flag,FXbool notify=
false);
355 FXbool showOnlyDirectories()
const;
358 void showOnlyFiles(FXbool flag,FXbool notify=
false);
361 FXbool showOnlyFiles()
const;
364 void showParents(FXbool flag,FXbool notify=
false);
367 FXbool showParents()
const;
370 void showImages(FXbool flag,FXbool notify=
false);
373 FXbool showImages()
const;
376 void setImageSize(FXint size,FXbool notify=
false);
382 void setDraggableFiles(FXbool flag,FXbool notify=
false);
388 void setTimeFormat(
const FXString& fmt,FXbool notify=
false);
394 void setAssociations(
FXFileAssociations* assoc,FXbool owned=
false,FXbool notify=
false);
406 virtual void save(
FXStream& store)
const;
Sticky bit.
Definition: FXIO.h:109
FXbool isBlockdev() const
Return true if this is a block device item.
Definition: FXFileList.h:84
Is directory.
Definition: FXIO.h:100
Write permisson for all.
Definition: FXIO.h:93
FXbool isFifo() const
Return true if this is an FIFO item.
Definition: FXFileList.h:87
FXString getPattern() const
Return wildcard pattern.
Definition: FXFileList.h:337
Is regular file.
Definition: FXIO.h:101
FXint getImageSize() const
Return images preview size.
Definition: FXFileList.h:379
Registers stuff to know about the extension.
Definition: FXFileAssociations.h:36
Delete selected files.
Definition: FXFileList.h:271
void setIconSource(FXIconSource *src)
Change icon loader.
Definition: FXFileList.h:400
Show hidden files.
Definition: FXFileList.h:264
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:258
Refresh immediately.
Definition: FXFileList.h:268
Toggle sort case sensitivity.
Definition: FXFileList.h:260
Reverse sort order.
Definition: FXFileList.h:259
FXIconSource * getIconSource() const
Return icon loader.
Definition: FXFileList.h:403
Base composite.
Definition: FXComposite.h:32
const FXString & getTimeFormat() const
Return file time format.
Definition: FXFileList.h:391
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:253
A stream is a way to serialize data and objects into a byte stream.
Definition: FXStream.h:78
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:270
Toggle display of hidden files.
Definition: FXFileList.h:266
FXbool isDirectory() const
Return true if this is a directory item.
Definition: FXFileList.h:72
FXFileAssociations * getAssociations() const
Return file associations.
Definition: FXFileList.h:397
FXString getDirectory() const
Return current directory.
Definition: FXFileList.h:298
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:255
Icon item.
Definition: FXIconList.h:55
Move up one directory.
Definition: FXFileList.h:261
FXlong getSize() const
Return the file size for this item.
Definition: FXFileList.h:105
Sort by owner name.
Definition: FXFileList.h:257
Set directory.
Definition: FXFileList.h:263
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:343
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:111
Object is the base class for all objects in FOX; in order to receive messages from the user interface...
Definition: FXObject.h:103
FXbool getDraggableFiles() const
Are draggable files.
Definition: FXFileList.h:385
Hidden file.
Definition: FXIO.h:99
FXbool isSymlink() const
Return true if this is a symbolic link item.
Definition: FXFileList.h:78
Socket device.
Definition: FXIO.h:112
Character device.
Definition: FXIO.h:110
Toggle display of images.
Definition: FXFileList.h:267
Hide hidden files.
Definition: FXFileList.h:265
Set match pattern.
Definition: FXFileList.h:262
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:269
Sort by type.
Definition: FXFileList.h:254
Sort by access time.
Definition: FXFileList.h:256
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