Class: Fox::FXDirList

Inherits:
FXTreeList show all
Defined in:
rdoc-sources/FXDirList.rb

Overview

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

Instance Attribute Summary collapse

Attributes inherited from FXTreeList

#anchorItem, #currentItem, #cursorItem, #firstItem, #font, #helpText, #indent, #lastItem, #lineColor, #listStyle, #numItems, #numVisible, #selBackColor, #selTextColor, #textColor

Attributes inherited from FXScrollArea

#contentHeight, #contentWidth, #horizontalScrollBar, #scrollStyle, #verticalScrollBar, #viewportHeight, #viewportWidth, #xPosition, #yPosition

Attributes inherited from FXWindow

#accelTable, #backColor, #defaultCursor, #dragCursor, #first, #focus, #key, #last, #layoutHints, #next, #numChildren, #owner, #parent, #prev, #root, #selector, #shell, #target, #x, #y

Attributes inherited from FXDrawable

#height, #visual, #width

Attributes inherited from FXId

#app, #userData, #xid

Instance Method Summary collapse

Methods inherited from FXTreeList

#addItemAfter, #addItemBefore, #addItemFirst, #addItemLast, #appendItem, #clearItems, #closeItem, #collapseTree, #deselectItem, #disableItem, #each, #enableItem, #expandTree, #extendSelection, #extractItem, #fillItems, #findItem, #findItemByData, #first, #getItemAt, #getItemClosedIcon, #getItemData, #getItemHeight, #getItemOpenIcon, #getItemText, #getItemWidth, #hitItem, #insertItem, #itemCurrent?, #itemEnabled?, #itemExpanded?, #itemLeaf?, #itemOpened?, #itemSelected?, #itemVisible?, #killSelection, #makeItemVisible, #moveItem, #moveItemAfter, #moveItemBefore, #openItem, #prependItem, #removeItem, #removeItems, #reparentItem, #selectItem, #setCurrentItem, #setItemClosedIcon, #setItemData, #setItemOpenIcon, #setItemText, #sortChildItems, #sortItems, #sortRootItems, #toggleItem, #updateItem

Methods inherited from FXScrollArea

#horizontalScrollable?, #position, #scrollCorner, #setPosition, #verticalScrollable?

Methods inherited from FXComposite

#maxChildHeight, #maxChildWidth

Methods inherited from FXWindow

#acceptDrop, #acquireClipboard, #acquireSelection, #active?, #addHotKey, after?, #after?, before?, #before?, #beginDrag, #canFocus?, #changeFocus, #childAtIndex, #childOf?, #children, #clearDragRectangle, #clearShape, colorType, colorTypeName, commonAncestor, #composeContext, #composite?, #contains?, #containsChild?, #create, #createComposeContext, #cursorPosition, #default?, #defaultHeight, #defaultWidth, deleteType, deleteTypeName, #destroy, #destroyComposeContext, #detach, #didAccept, #disable, #doesSaveUnder?, #dragging?, #dropDisable, #dropEnable, #dropEnabled?, #dropFinished, #dropTarget?, #each_child, #each_child_recursive, #enable, #enabled?, #endDrag, #forceRefresh, #getChildAt, #getDNDData, #getHeightForWidth, #getWidthForHeight, #grab, #grabKeyboard, #grabbed?, #grabbedKeyboard?, #handleDrag, #hasClipboard?, #hasFocus?, #hasSelection?, #height, #height=, #hide, imageType, #inFocusChain?, #indexOfChild, #initial?, #inquireDNDAction, #inquireDNDTypes, #killFocus, #layout, #linkAfter, #linkBefore, #lower, #move, octetType, octetTypeName, #offeredDNDType?, #position, #raiseWindow, #recalc, #releaseClipboard, #releaseSelection, #remHotKey, #removeChild, #repaint, #reparent, #resize, #scroll, #setCursorPosition, #setDNDData, #setDefault, #setDragRectangle, #setFocus, #setInitial, #setShape, #shell?, #show, #shown?, stringType, textType, textTypeName, #tr, #translateCoordinatesFrom, #translateCoordinatesTo, #underCursor?, #ungrab, #ungrabKeyboard, #update, urilistType, urilistTypeName, utf16Type, utf16TypeName, utf8Type, utf8TypeName, #visible=, #width, #width=

Methods included from Responder2

#connect

Methods inherited from FXDrawable

#resize

Methods inherited from FXId

#create, #created?, #destroy, #detach, #runOnUiThread

Methods inherited from FXObject

#bind, #handle, #load, #save, subclasses

Constructor Details

#initialize(p, target = nil, selector = 0, opts = 0, x = 0, y = 0, width = 0, height = 0) ⇒ FXDirList

Returns an initialized FXDirList instance



93
94
# File 'rdoc-sources/FXDirList.rb', line 93

def initialize(p, target=nil, selector=0, opts=0, x=0, y=0, width=0, height=0) # :yields: theDirList
end

Instance Attribute Details

#associationsObject

File associations Fox::FXFileDict



90
91
92
# File 'rdoc-sources/FXDirList.rb', line 90

def associations
  @associations
end

#currentFileObject

Current file [String]



78
79
80
# File 'rdoc-sources/FXDirList.rb', line 78

def currentFile
  @currentFile
end

#directoryObject

Current directory [String]



81
82
83
# File 'rdoc-sources/FXDirList.rb', line 81

def directory
  @directory
end

#matchModeObject

Wildcard matching mode, some combination of file matching flags [Integer]



87
88
89
# File 'rdoc-sources/FXDirList.rb', line 87

def matchMode
  @matchMode
end

#patternObject

Wildcard pattern [String]



84
85
86
# File 'rdoc-sources/FXDirList.rb', line 84

def pattern
  @pattern
end

Instance Method Details

#filesShown=(state) ⇒ Object

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



137
# File 'rdoc-sources/FXDirList.rb', line 137

def filesShown=(state); end

#filesShown?Boolean

Return true if showing files as well as directories

Returns:

  • (Boolean)


131
# File 'rdoc-sources/FXDirList.rb', line 131

def filesShown?; end

#hiddenFilesShown=(state) ⇒ Object

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



146
# File 'rdoc-sources/FXDirList.rb', line 146

def hiddenFilesShown=(state); end

#hiddenFilesShown?Boolean

Return true if showing hidden files and directories

Returns:

  • (Boolean)


140
# File 'rdoc-sources/FXDirList.rb', line 140

def hiddenFilesShown?; end

#itemDirectory?(anItem) ⇒ Boolean

Return true if item is a directory

Returns:

  • (Boolean)


102
# File 'rdoc-sources/FXDirList.rb', line 102

def itemDirectory?(anItem); end

#itemExecutable?(anItem) ⇒ Boolean

Return true if item is executable

Returns:

  • (Boolean)


108
# File 'rdoc-sources/FXDirList.rb', line 108

def itemExecutable?(anItem); end

#itemFile?(anItem) ⇒ Boolean

Return true if item is a file

Returns:

  • (Boolean)


105
# File 'rdoc-sources/FXDirList.rb', line 105

def itemFile?(anItem); end

#itemPathname(anItem) ⇒ Object

Return absolute pathname of item



125
# File 'rdoc-sources/FXDirList.rb', line 125

def itemPathname(anItem); end

#pathnameItem(path) ⇒ Object

Return the item from the absolute pathname



128
# File 'rdoc-sources/FXDirList.rb', line 128

def pathnameItem(path); end

#scan(force = true) ⇒ Object

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



99
# File 'rdoc-sources/FXDirList.rb', line 99

def scan(force=true); end

#setCurrentFile(file, notify = false) ⇒ Object

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.



115
# File 'rdoc-sources/FXDirList.rb', line 115

def setCurrentFile(file, notify=false); end

#setDirectory(path, notify = false) ⇒ Object

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.



122
# File 'rdoc-sources/FXDirList.rb', line 122

def setDirectory(path, notify=false); end