Class: Fox::FXDirBox

Inherits:
FXTreeListBox show all
Defined in:
rdoc-sources/FXDirBox.rb

Overview

A Directory Box widget allows the user to select parts of a file path. First, it is filled with a string comprising a file path, like “/a/b/c”. Then, the user can select “/a/b/c”, “/a/b”, “/a”, and “/” from the drop-down list. The entries in the drop-down list are automatically provided with icons by consulting the file-associations registry settings. The Directory Box sends SEL_CHANGED and SEL_COMMAND messages, with the string containing the full path to the selected item.

Options

DIRBOX_NO_OWN_ASSOC

do not create associations for files

Events

The following messages are sent by FXDirBox to its target:

SEL_CHANGED

sent when the current item changes; the message data is the new current directory.

SEL_COMMAND

sent when the current item changes; the message data is the new current directory.

Instance Attribute Summary collapse

Attributes inherited from FXTreeListBox

#currentItem, #firstItem, #font, #helpText, #lastItem, #listStyle, #numItems, #numVisible, #tipText

Attributes inherited from FXPacker

#baseColor, #borderColor, #borderWidth, #frameStyle, #hSpacing, #hiliteColor, #packingHints, #padBottom, #padLeft, #padRight, #padTop, #shadowColor, #vSpacing

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 FXTreeListBox

#addItemAfter, #addItemBefore, #addItemFirst, #addItemLast, #appendItem, #clearItems, #each, #extractItem, #fillItems, #findItem, #findItemByData, #first, #getItemClosedIcon, #getItemData, #getItemOpenIcon, #getItemText, #insertItem, #itemCurrent?, #itemLeaf?, #moveItem, #paneShown?, #prependItem, #removeItem, #removeItems, #setCurrentItem, #setItemClosedIcon, #setItemData, #setItemOpenIcon, #setItemText, #sortChildItems, #sortItems, #sortRootItems

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 = FRAME_SUNKEN|FRAME_THICK|TREELISTBOX_NORMAL, x = 0, y = 0, width = 0, height = 0, padLeft = DEFAULT_PAD, padRight = DEFAULT_PAD, padTop = DEFAULT_PAD, padBottom = DEFAULT_PAD) ⇒ FXDirBox

Return an initialized FXDirBox instance.



31
32
# File 'rdoc-sources/FXDirBox.rb', line 31

def initialize(p, target=nil, selector=0, opts=FRAME_SUNKEN|FRAME_THICK|TREELISTBOX_NORMAL, x=0, y=0, width=0, height=0, padLeft=DEFAULT_PAD, padRight=DEFAULT_PAD, padTop=DEFAULT_PAD, padBottom=DEFAULT_PAD) # :yields: theDirBox
end

Instance Attribute Details

#associationsObject

File associations Fox::FXFileDict



28
29
30
# File 'rdoc-sources/FXDirBox.rb', line 28

def associations
  @associations
end

#directoryObject

Current directory [String]



25
26
27
# File 'rdoc-sources/FXDirBox.rb', line 25

def directory
  @directory
end

Instance Method Details

#getAssociationsObject

Return file associations (an FXFileDict instance).



52
# File 'rdoc-sources/FXDirBox.rb', line 52

def getAssociations(); end

#getDirectoryObject

Return current directory



42
# File 'rdoc-sources/FXDirBox.rb', line 42

def getDirectory(); end

#setAssociations(assoc) ⇒ Object

Change file associations, where assoc is an FXFileDict instance.



47
# File 'rdoc-sources/FXDirBox.rb', line 47

def setAssociations(assoc); end

#setDirectory(pathname) ⇒ Object

Set current directory



37
# File 'rdoc-sources/FXDirBox.rb', line 37

def setDirectory(pathname); end