Class Fox::FXDirList
In: rdoc-sources/FXDirList.rb
Parent: FXTreeList

An FXDirList widget provides a tree-structured view of the file system. It automatically updates itself periodically by re-scanning the file system for any changes. As it scans the displayed directories and files, it automatically determines the icons to be displayed by consulting the file-associations registry settings. A number of messages can be sent to the FXDirList to control the filter pattern, sorting order, case sensitivity, and hidden file display mode. The Directory list widget supports drags and drops of files.

Events

SEL_CLOSED:sent when a folder item is closed; the message data is a reference to the FXDirItem that was closed
SEL_OPENED:sent when a folder item is opened; the message data is a reference to the FXDirItem that was opened

Directory List options

DIRLIST_SHOWFILES:Show files as well as directories
DIRLIST_SHOWHIDDEN:Show hidden files or directories
DIRLIST_NO_OWN_ASSOC:Do not create associations for files

Message identifiers

ID_REFRESH:x
ID_SHOW_FILES:x
ID_HIDE_FILES:x
ID_TOGGLE_FILES:x
ID_SHOW_HIDDEN:x
ID_HIDE_HIDDEN:x
ID_TOGGLE_HIDDEN:x
ID_SET_PATTERN:x
ID_SORT_REVERSE:x

Methods

Attributes

associations  [RW]  File associations [FXFileDict]
currentFile  [RW]  Current file [String]
directory  [RW]  Current directory [String]
matchMode  [RW]  Wildcard matching mode, some combination of file matching flags [Integer]
pattern  [RW]  Wildcard pattern [String]

Public Class methods

Public Instance methods

If state is true, the directory list will show files as well as directories; otherwise, it will only show directories.

Return true if showing files as well as directories

If state is true, the directory list will show hidden files and directories; otherwise, it won‘t.

Return true if showing hidden files and directories

Return true if item is a directory

Return true if item is executable

Return true if item is a file

Return absolute pathname of item

Return the item from the absolute pathname

Scan the directories and update the items if needed, or if force is true.

Set current file. If notify is true, a SEL_CHANGED message is sent to the list‘s message target to indicate that the current item has changed.

Set current directory. If notify is true, a SEL_CHANGED message is sent to the list‘s message target to indicate that the current item has changed.

[Validate]