eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'FileBrowserV2':

Home

Documentation
www.exept.de
Everywhere
for:
[back]

Class: FileBrowserV2


Inheritance:

   Object
   |
   +--Model
      |
      +--ApplicationModel
         |
         +--AbstractFileBrowser
            |
            +--FileBrowserV2

Package:
stx:libtool
Category:
Interface-Tools-File
Version:
rev: 1.242 date: 2018/01/16 21:13:20
user: cg
file: FileBrowserV2.st directory: libtool
module: stx stc-classLibrary: libtool
Author:
Christian Penk

Description:


FileBrowserV2 is based on Filebrowser

WARNING: files edited with FileBrowser will have leading spaces (multiple-8)
         being replaced by tabs. If tabs are to be preserved at other
         positions (for example, sendmail-config files) they will be
         corrupt after being written.

[instance variables]:

    checkDelta      <Integer>       number of seconds of check interval
                                    (looks ever so often if shown directory
                                     has changed). You may make this number
                                    higher, if your network-times are
                                    incorrect and thus, the filebrowser
                                    checks too often.

    compressTabs    <Boolean>       if true, leading spaces will be
                                    replaced by tabs when saving text

some of the defaults (long/short list etc.) can be set by the resource file;
see FileBrowser>>initialize for more details..


Class protocol:

class initialization
o  initialize
self installInLauncher. - now done in phase 2

o  installInLauncher
add myself to the launcher menu and toolBar
usage example(s):
     self installInLauncher
     self removeFromLauncher

o  removeFromLauncher
remove myself from the launcher's menu & settings dialog
usage example(s):
     self removeFromLauncher

o  update: something with: aParameter from: changedObject

defaults
o  entryFieldEndStringForMultipleSelection

help specs
o  helpSpec
This resource specification was automatically generated
by the UIHelpTool of ST/X.

image specs
o  applicationIcon

o  closePreviewButtonImage

o  defaultIcon

o  encodingLockIcon

o  hideFilenameEntryFieldIcon

o  hideToolBarIcon

instance creation
o  on: aDirectoryPath
return a new FileBrowserV2 in a pathname.
The browser is not yet open
usage example(s):
     (self on:'/etc') open

o  open
start a new FileBrowserV2 (in the current directory)
usage example(s):
     FileBrowserV2 open.
     FileBrowserV2 openOn:(OrderedCollection with:(Filename currentDirectory asAbsoluteFilename)) withExtent:800@600

o  openIn: aDirectoryPath
backward compatibility

o  openOn: aFileOrDirectoryPath
start a new FileBrowserV2 on aFileOrDirectoryPath.
if it represents a file, it is opened and shown for editing;
if it represents a directory, the directory is shown.
usage example(s):
     FileBrowserV2 openOn:(Filename currentDirectory asAbsoluteFilename)
     FileBrowserV2 openOn:'Makefile'

o  openOn: aDirectoryPath withExtent: extentOrNil
start a new FileBrowserV2 on aDirectoryPath
usage example(s):
     FileBrowserV2 openOn:(Filename currentDirectory) withExtent:800@600

o  openOnDirectory: aDirectoryPath
start a new FileBrowserV2 in a pathname

o  openOnFileNamed: aFilename
start a new FileBrowserV2 on a aFilename.
The browser looks for an appropriate viewer and uses that if one is found;
otherwise, the file is opened for text editing.
usage example(s):
     FileBrowserV2 openOnFileNamed:'Makefile'

o  openOnFileNamed: aFilename editing: editing
start a new FileBrowserV2 on a aFilename;
If editing is true, the browser opens the document as text to be edited;
if false, it looks for an appropriate viewer and uses that if one is found.
usage example(s):
     FileBrowserV2 openOnFileNamed:'Makefile'

o  openWithAspects: someAspects withExtent: extent
start a new FileBrowserV2 taking aspects from a dictionary
(internal interface - only for spawn)

interface specs
o  windowSpec
This resource specification was automatically generated
by the UIPainter of ST/X.
usage example(s):
     UIPainter new openOnClass:FileBrowserV2 andSelector:#windowSpec
     FileBrowserV2 new openInterface:#windowSpec
     FileBrowserV2 open

menu specs
o  editModeInfoLabelMenu
This resource specification was automatically generated
by the MenuEditor of ST/X.
usage example(s):
     MenuEditor new openOnClass:Tools::NewSystemBrowser andSelector:#editModeInfoLabelMenu
     (Menu new fromLiteralArrayEncoding:(Tools::NewSystemBrowser editModeInfoLabelMenu)) startUp

o  encodingMenu
This resource specification was automatically generated
by the MenuEditor of ST/X.
usage example(s):
     MenuEditor new openOnClass:FileBrowserV2 andSelector:#encodingMenu
     (Menu new fromLiteralArrayEncoding:(FileBrowserV2 encodingMenu)) startUp

o  mainMenu
This resource specification was automatically generated
by the MenuEditor of ST/X.
usage example(s):
     MenuEditor new openOnClass:FileBrowserV2 andSelector:#mainMenu
     (Menu new fromLiteralArrayEncoding:(FileBrowserV2 mainMenu)) startUp

o  previewLabelMenu
This resource specification was automatically generated
by the MenuEditor of ST/X.
usage example(s):
     MenuEditor new openOnClass:FileBrowserV2 andSelector:#previewLabelMenu
     (Menu new fromLiteralArrayEncoding:(FileBrowserV2 previewLabelMenu)) startUp

o  toolBarMainMenu
This resource specification was automatically generated
by the MenuEditor of ST/X.
usage example(s):
     MenuEditor new openOnClass:FileBrowserV2 andSelector:#toolBarMainMenu
     (Menu new fromLiteralArrayEncoding:(FileBrowserV2 toolBarMainMenu)) startUp

o  toolBarMainMenu_new
This resource specification was automatically generated
by the MenuEditor of ST/X.
usage example(s):
     MenuEditor new openOnClass:FileBrowserV2 andSelector:#toolBarMainMenu_new
     (Menu new fromLiteralArrayEncoding:(FileBrowserV2 toolBarMainMenu_new)) startUp

o  toolBarMainMenu_old
This resource specification was automatically generated
by the MenuEditor of ST/X.
usage example(s):
     MenuEditor new openOnClass:FileBrowserV2 andSelector:#toolBarMainMenu_old
     (Menu new fromLiteralArrayEncoding:(FileBrowserV2 toolBarMainMenu_old)) startUp


Instance protocol:

actions
o  changeFileBrowserTitleTo: aString

o  doSpawn

o  hideBookmarkBar
hide the bookmarks - called when the button to the left of the toolbar is clicked

o  hideFilenameEntryField

o  hideToolbar
hide the toolbar - called when the button to the left of the toolbar is clicked

o  switchToBookmarkEntry: bookmark

o  toggleFileDetailsFor: anItem

aspects
o  bookmarkBarVisibleHolder
return/create the 'bookmarkBarVisibleHolder' value holder (automatically generated)

o  bookmarkBarVisibleHolder: something
set the 'bookmarkBarVisibleHolder' value holder (automatically generated)

o  bookmarkHolder
return/create the 'bookmarkHolder' value holder (automatically generated)

o  bookmarkListHolder

o  busyLabelHolder

o  canAddToClassPath

o  canAddToSourcePath

o  canRemoveFromClassPath

o  currentDirectoryDisplayed
Return a directory that is currently displayed in the browser

o  cursorColLabelHolder

o  cursorLineAndColumnLabelHolder

o  cursorLineLabelHolder

o  fileEncodingLockImageHolder

o  fileEntryFieldHolder

o  listOfDeviceDrives

o  modeLabelHolder

o  modeLabelMenuHolder

o  selectedDeviceDrive

aspects-visibility
o  busyLabelVisibleHolder

o  driveSelectorVisible
systemIsDOS

o  filenameEntryFieldVisibleHolder
aspect for show FileEntryField

o  infoBarVisibleHolder
aspect for show infoBar

o  previewVisibleHolder
aspect for show preview

o  toolBarVisibleHolder
aspect for show toolbar

change & update
o  currentFileNameHolderChanged
(comment from inherited method)
self currentFileNameHolderChangedForCommon

o  fileEntryFieldHolderChanged
answer := OptionBox

o  selectedDeviceDriveChanged

o  selectedImage

o  showPreview: shownImage

o  update: something with: aParameter from: changedObject
(comment from inherited method)
do here all the things that have to be done for every part of the FileBrowserV2
and the things that have to be done if it runs standalone

o  updateBookmark

o  updatePreview

o  updateToolVisibility
layout bottomOffset - bookmarkBar layout topOffset.

event handling
o  crPressedInPathField

o  processEvent: anEvent
filter keyboard events.
Return true, if I have eaten the event

menu accessing
o  menuFileHistory
initialize the file history menu

queries
o  defaultWindowExtent
use nearly the full screen height, but at least 768px if available.
Keep the width as defined in the windowSpec

o  getAllFilesAsStrings

startup & release
o  closeRequest
asks for permission before closing

o  hideFilenameEntryFieldButtonCreated: aButton

o  hideToolBarButtonCreated: aButton

o  initialize

o  makeDependent

o  onDirectory: aDirectoryPathOrNil

o  openOnDirectory: aDirectoryPath

o  openOnFileNamed: aFilename editing: editing
start a new FileBrowserV2 on a aFilename;
If editing is true, the browser opens the document as text to be edited;
if false, it looks for an appropriate viewer and uses that if one is found.
usage example(s):
     FileBrowserV2 openOnFileNamed:'Make.proto'
     FileBrowserV2 openOnFileNamed:'modules'

o  postBuildDirectoryTree: aWidget

o  postBuildEditField: aWidget

o  postBuildEditModeInfoLabel: aLabel

o  postBuildFilterBox: aWidget

o  postBuildPathViewBox: aWidget

o  postBuildWith: aBuilder
Load user settings

o  postOpenWith: aBuilder

o  release


Demonstration:


    FileBrowserV2 open



ST/X 7.1.0.0; WebServer 1.663 at exept.de:8081; Thu, 23 May 2019 18:51:34 GMT