PlacesDock
A tree view of folders and files.
The root of the tree can be any folder within the list : places, and initially, the first Place in the list is used as the root.
The dock can be used to open files within your application, instead of the more traditional File->Open
dialog. To do so, override openFile.
The default value of places in the constructor are taken from Places.sharedPlaces, which means these favourite places are shared by all Glok applications. If you prefer, your application can keep its own list of favourite places, which can be loaded and saved using Places.loadPlaces and Places.savePlaces.
Constructors
Properties
Which sides of the harbour this Dock can be moved to by the user.
Set this to false
to prevent the user closing this Dock. Closing the Dock programmatically is not affected by this.
The main content of the Dock.
Each side of the Harbour has two sets of Docks, primary
or secondary
. This decides if this Dock is placed in the primary
set if not explicitly specified. See Harbour.add
Determines which side of the Harbour this Dock will be placed if not explicitly specified. See Harbour.add.
Allows an application to use its own dialogs for renaming, copying and deleting files. In most cases the default value (StandardFileDialogFactory) is sufficient.
Filters which files to display in the PlacesDock. The default value is EXCLUDE_HIDDEN_FILES.
Filters which folders to display in the PlacesDock. The default value is EXCLUDE_HIDDEN_FILES.
A list of "favourite" places. Any item in this list can be the root
node of the tree.
Buttons (or other Nodes), which appear in the title-bar of this Dock. Initially, this contains only a close
button. If you want the close button to remain on the far right, then add items at the front of the list.
Appears in to ToggleButton at the side of the Harbour, as well as in the title-bar of the dock.
Functions
This PopupMenu appears when the user right-clicks the Dock's ToggleButton, or the Dock's title.
Expands tree items, so that file is visible in the tree, and then selects it.