25 #include "FXTreeList.h" 32 class FXFileAssociations;
38 DIRLIST_SHOWFILES = 0x08000000,
39 DIRLIST_SHOWHIDDEN = 0x10000000,
40 DIRLIST_NO_OWN_ASSOC = 0x20000000
59 FXDirItem():assoc(
nullptr),link(
nullptr),list(
nullptr),size(0L),date(0),mode(0){}
63 FXDirItem(
const FXString& text,
FXIcon* oi=
nullptr,
FXIcon* ci=
nullptr,
void* ptr=
nullptr):
FXTreeItem(text,oi,ci,ptr),assoc(nullptr),link(nullptr),list(nullptr),size(0),date(0),mode(0){}
142 FXDragAction dropaction;
148 void listItems(FXbool force,FXbool notify);
149 void listRootItems(FXbool force,FXbool notify);
150 FXbool listChildItems(
FXDirItem *par,FXbool force,FXbool notify);
158 long onRefreshTimer(
FXObject*,FXSelector,
void*);
159 long onBeginDrag(
FXObject*,FXSelector,
void*);
160 long onEndDrag(
FXObject*,FXSelector,
void*);
161 long onDragged(
FXObject*,FXSelector,
void*);
162 long onDNDEnter(
FXObject*,FXSelector,
void*);
163 long onDNDLeave(
FXObject*,FXSelector,
void*);
164 long onDNDMotion(
FXObject*,FXSelector,
void*);
165 long onDNDDrop(
FXObject*,FXSelector,
void*);
166 long onDNDRequest(
FXObject*,FXSelector,
void*);
167 long onCmdSetValue(
FXObject*,FXSelector,
void*);
168 long onCmdSetStringValue(
FXObject*,FXSelector,
void*);
169 long onCmdGetStringValue(
FXObject*,FXSelector,
void*);
170 long onCmdToggleHidden(
FXObject*,FXSelector,
void*);
171 long onUpdToggleHidden(
FXObject*,FXSelector,
void*);
172 long onCmdShowHidden(
FXObject*,FXSelector,
void*);
173 long onUpdShowHidden(
FXObject*,FXSelector,
void*);
174 long onCmdHideHidden(
FXObject*,FXSelector,
void*);
175 long onUpdHideHidden(
FXObject*,FXSelector,
void*);
176 long onCmdToggleFiles(
FXObject*,FXSelector,
void*);
177 long onUpdToggleFiles(
FXObject*,FXSelector,
void*);
178 long onCmdShowFiles(
FXObject*,FXSelector,
void*);
179 long onUpdShowFiles(
FXObject*,FXSelector,
void*);
180 long onCmdHideFiles(
FXObject*,FXSelector,
void*);
181 long onUpdHideFiles(
FXObject*,FXSelector,
void*);
182 long onCmdSetPattern(
FXObject*,FXSelector,
void*);
183 long onUpdSetPattern(
FXObject*,FXSelector,
void*);
184 long onCmdSortReverse(
FXObject*,FXSelector,
void*);
185 long onUpdSortReverse(
FXObject*,FXSelector,
void*);
186 long onCmdSortCase(
FXObject*,FXSelector,
void*);
187 long onUpdSortCase(
FXObject*,FXSelector,
void*);
188 long onCmdRefresh(
FXObject*,FXSelector,
void*);
189 long onUpdHaveSel(
FXObject*,FXSelector,
void*);
190 long onCmdDeleteSel(
FXObject*,FXSelector,
void*);
191 long onCmdDropAsk(
FXObject*,FXSelector,
void*);
192 long onCmdDropCopy(
FXObject*,FXSelector,
void*);
193 long onCmdDropMove(
FXObject*,FXSelector,
void*);
194 long onCmdDropLink(
FXObject*,FXSelector,
void*);
202 ID_REFRESHTIMER=FXTreeList::ID_LAST,
226 virtual void create();
229 virtual void detach();
232 virtual void destroy();
235 FXbool setCurrentFile(
const FXString& file,FXbool notify=
false);
241 FXbool setDirectory(
const FXString& path,FXbool notify=
false);
253 FXbool isItemFile(
const FXTreeItem* item)
const;
256 FXbool isItemDirectory(
const FXTreeItem* item)
const;
259 FXbool isItemExecutable(
const FXTreeItem* item)
const;
262 FXbool isItemSymlink(
const FXTreeItem* item)
const;
268 FXlong getItemSize(
const FXTreeItem* item)
const;
271 FXTime getItemDate(
const FXTreeItem* item)
const;
274 FXuint getItemMode(
const FXTreeItem* item)
const;
277 virtual FXbool collapseTree(
FXTreeItem* tree,FXbool notify=
false);
280 virtual FXbool expandTree(
FXTreeItem* tree,FXbool notify=
false);
283 FXbool selectMatching(
const FXString& ptrn=
"*",FXuint mode=FXPath::PathName|FXPath::NoEscape,FXbool notify=
false);
286 void setPattern(
const FXString& ptrn=
"*",FXbool notify=
false);
292 void setMatchMode(FXuint mode=FXPath::PathName|FXPath::NoEscape,FXbool notify=
false);
298 void showFiles(FXbool flag,FXbool notify=
false);
301 FXbool showFiles()
const;
304 void showHiddenFiles(FXbool flag,FXbool notify=
false);
307 FXbool showHiddenFiles()
const;
310 void setAssociations(
FXFileAssociations* assoc,FXbool owned=
false,FXbool notify=
false);
316 void setDraggableFiles(FXbool flag,FXbool notify=
false);
322 virtual void save(
FXStream& store)
const;
Sticky bit.
Definition: FXIO.h:107
FXString getPattern() const
Return wildcard pattern.
Definition: FXDirList.h:289
Refresh immediately.
Definition: FXDirList.h:217
Is directory.
Definition: FXIO.h:98
Write permisson for all.
Definition: FXIO.h:91
FXbool getDraggableFiles() const
Are files draggable.
Definition: FXDirList.h:319
Show hidden files.
Definition: FXDirList.h:211
Is regular file.
Definition: FXIO.h:99
Show files.
Definition: FXDirList.h:208
Tree list Item.
Definition: FXTreeList.h:52
Registers stuff to know about the extension.
Definition: FXFileAssociations.h:36
FXbool isSymlink() const
Return true if this is a symbolic link item.
Definition: FXDirList.h:75
void setAssoc(FXFileAssoc *a)
Set the file-association object for this item.
Definition: FXDirList.h:90
FXbool isChardev() const
Return true if this is a character device item.
Definition: FXDirList.h:78
Hide files.
Definition: FXDirList.h:209
FXbool isFifo() const
Return true if this is an FIFO item.
Definition: FXDirList.h:84
A Tree List Widget organizes items in a hierarchical, tree-like fashion.
Definition: FXTreeList.h:243
FXFileAssoc * getAssoc() const
Return the file-association object for this item.
Definition: FXDirList.h:93
FXTime getDate() const
Return the date for this item, in nanoseconds.
Definition: FXDirList.h:105
Base composite.
Definition: FXComposite.h:32
A stream is a way to serialize data and objects into a byte stream.
Definition: FXStream.h:81
Reverse sort order.
Definition: FXDirList.h:215
FXbool isBlockdev() const
Return true if this is a block device item.
Definition: FXDirList.h:81
FXbool isFile() const
Return true if this is a file item.
Definition: FXDirList.h:66
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
Toggle sort case sensitivity.
Definition: FXDirList.h:216
Directory item.
Definition: FXDirList.h:45
FXuint getMatchMode() const
Return wildcard matching mode.
Definition: FXDirList.h:295
FXDirItem(const FXString &text, FXIcon *oi=nullptr, FXIcon *ci=nullptr, void *ptr=nullptr)
Constructor.
Definition: FXDirList.h:63
Hide hidden files.
Definition: FXDirList.h:212
The FileAssociations object manages file associations between a file extension and a FileAssoc record...
Definition: FXFileAssociations.h:101
FXbool isSocket() const
Return true if this is a socket.
Definition: FXDirList.h:87
FXbool isExecutable() const
Return true if this is an executable item.
Definition: FXDirList.h:72
void setSize(FXlong s)
Set the file size for this item.
Definition: FXDirList.h:96
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
Toggle show files.
Definition: FXDirList.h:210
Toggle display of hidden files.
Definition: FXDirList.h:213
Hidden file.
Definition: FXIO.h:97
void setMode(FXuint m)
Set file mode bits.
Definition: FXDirList.h:108
A Directory List widget provides a tree-structured view of the file system.
Definition: FXDirList.h:124
Socket device.
Definition: FXIO.h:110
Character device.
Definition: FXIO.h:108
FXbool isDirectory() const
Return true if this is a directory item.
Definition: FXDirList.h:69
FXFileAssociations * getAssociations() const
Return file associations.
Definition: FXDirList.h:313
FXuint getMode() const
Return file mode flags.
Definition: FXDirList.h:111
Set match pattern.
Definition: FXDirList.h:214
FXlong getSize() const
Return the file size for this item.
Definition: FXDirList.h:99
FXString provides essential string manipulation capabilities in FOX.
Definition: FXString.h:42
void setDate(FXTime d)
Set the date for this item, in nanoseconds.
Definition: FXDirList.h:102