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
         |
         +--ApplicationWithFileHistory
            |
            +--AbstractFileBrowser
               |
               +--FileBrowserV2

Package:
stx:libtool
Category:
Interface-Tools-File
Version:
rev: 1.275 date: 2023/08/03 09:58:12
user: cg
file: FileBrowserV2.st directory: libtool
module: stx stc-classLibrary: libtool

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..

copyright

COPYRIGHT (c) 2002 by eXept Software AG All Rights Reserved This software is furnished under a license and may be used only in accordance with the terms of that license and with the inclusion of the above copyright notice. This software may not be provided or otherwise made available to, or used by, any other person. No title to or ownership of the software is hereby transferred.

toDo

- the tab for the directory description text editor is not changed if the directory description changes to a normal text editor - FileDialog should get a file history - directorycontentsItem isDirectory fails if it is a symbolic link - on sort order change in directory contents browser the columnspec shouldnt not reloaded - check all windowspecs with different font types - multiple select with mouse moving is flickering (see bestFilename in FilenameEditField) - too many system calls on update cycle - stop monitoring task for DirectoryTreebrowser and DirectoryContentsBrowser

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
(comment from inherited method)
flush resources on language changes

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
(comment from inherited method)
default is: no icon (should be redefined by concrete class if an icon is wanted).

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: aFileOrDirectoryPath filterPattern: filterPatternOrNil
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) filterPattern:'*.st'
     FileBrowserV2 openOn:'Makefile' filterPattern:'Mak*'

o  openOn: aDirectoryPath withExtent: extentOrNil
start a new FileBrowserV2 on aDirectoryPath

Usage example(s):

     FileBrowserV2 openOn:(Filename currentDirectory) withExtent:800@600

o  openOn: aDirectoryPath withExtent: extentOrNil filterPattern: filterPatternOrNil
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  openOnFileNamed: aFilename filterPattern: filterPatternOrNil
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' filterPattern:'Mak*'

o  openOnFileNamed: aFilename filterPattern: filterPatternOrNil 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

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  bookmarkHolder
return/create the 'bookmarkHolder' value holder (automatically generated)

o  bookmarkListHolder

o  busyLabelHolder

o  canAddToClassPath

o  canAddToSourcePath

o  canRemoveFromClassPath

o  currentDirectoryDisplayed
Return the directory as Filename that is currently being 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  bookmarkBarVisibleHolder
return/create the 'bookmarkBarVisibleHolder' value holder (automatically generated)

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

o  busyLabelVisibleHolder

o  driveSelectorVisible
systemIsDOS

o  filenameEntryFieldVisibleHolder
aspect for show FileEntryField

o  infoBarVisibleHolder
aspect for showing infoBar

o  previewVisibleHolder
aspect for showing the preview

o  toolBarVisibleHolder
aspect for showing 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

initialization
o  initialize

o  makeDependent

menu accessing
o  editModeInfoLabelMenu

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
(comment from inherited method)
raise an error: must be redefined in concrete subclass(es)

startup & release
o  closeRequest
asks for permission before closing

o  hideFilenameEntryFieldButtonCreated: aButton

o  hideToolBarButtonCreated: aButton

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
the filename editfield

o  postBuildEditModeInfoLabel: aLabel

o  postBuildFilterBox: aWidget

o  postBuildPathViewBox: aWidget

o  postBuildWith: aBuilder
Load user settings

o  postOpenWith: aBuilder
(comment from inherited method)
this is sent after the application's main window is opened.
Can be redefined in subclasses for actions after opening the view.

o  release
(comment from inherited method)
remove all references to objects that may refer to self.
Subclasses may redefine this method but should do a 'super release'.



ST/X 7.7.0.0; WebServer 1.702 at 20f6060372b9.unknown:8081; Sat, 21 Dec 2024 16:16:52 GMT