cft.tcl Description

cft - Configurable File Tool

Version:

0.82

Requirements:

tcl/Tk 8.0 or above

Description:

This tool will allow one to mkdir, browse, view, copy, move, delete, duplicate, rename, and convert-ascii files on Unix or Windows systems. It uses the tcl file command to perform the 'file' actions. The graphic extensions recognized are those supported by the core TK image types (.gif, .xbm, .ppm and .pgm). Book-marked directories can be saved by using the book-mark icon on the menu bar. An [X] icon on the toolbar deletes the current directory entry from the book-mark list(see Help Bookmark). The find boxes next to the Directories and Files labels allow one to quickly find directories or files by typing in some matching letters. The down arrow on the keybord allows one to continue the search if the first item found was not the item requested, and more items in the list box contained matching letters. cft can be customized to incorporate commands simply by adding them using the Configure Options menu (see Help under the Configure Options menu). cft can also be extended to open a file with a particular extension with an application of choice using the ADD - Associated File Types (see Help under the Associated File Types menu).

Navigating:

The tool is driven by double-clicking on directories to cd to that directory. A single left-mouse button-click selects a file or directory. A single right-mouse button-click selects a pop-up menu with options. Selecting an option from the pop-up menu completes the operation. Double-clicking on a file opens the file in a browser, or if one of the core image types, a button is created with file's image in it.

History:

cft was originally just a collection tcl proc's to help in day-to-day activities. It occurred to me that at the rate I was adding stuff to the utility, the tool would become unmanageable. I decided, for better or worse, to dump all global references into one large array (PREFS) and concentrate on a simple way of saving user-defined commands. This enabled the tool to become a little more manageable. Since I spend most of my time on Unix systems, I left in chmod, tarit, gzip, and unpackit. I also left in some handy RCS source code control commands that I use every-day.

Platforms Tested: cft has been tested on Solaris, IRIX, Linux, NT, and Windows. With some slight modifications to areas that test for tcl_platform, it could be used on Mac's and other untested platforms.

Known Bugs:
  • File Selection, when dragging and scrolling, does not continue to select Date and Size fields below or above the visible list area.
  • On Windows, the Browse window will not show correct line/column count when scrolling; On Unix the line count could be off by 1 (rounding error). Workaround: Place the cursor on a line and select Mouse-Button-1.
  • Future Work:

  • Add Option to display additional file and directory information.
  • Modify the user-interface to become a little more friendly.
  • Add more functionality.
  • Re-do command line parsing.
  • Work on consolidating functions (especially the RCS ones)
  • Possibly re-code existing procs using itcl.
  • Author : Henry L. Megan hmeg@alpha1.net Copyright Notice: This program is free software; you can redistribute it and/or modify it. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

    List of Functions

    sampleWindowsConfig
    sampleUnixConfig
    envOk
    envCancel
    helpEnv
    envConfig
    convertTextFile
    colorConf
    acceptColorSelection
    getColor
    runCmd
    setFileSelections
    doCmd
    getFilePath
    showOptions
    testOptions
    addOptions
    deleteOption
    updateOptions
    helpOptions
    showFileTypes
    deleteFileTypes
    updateFileTypes
    addFileTypes
    helpFileTypes
    testFileTypes
    addDir
    rmFavoriteDirectory
    setCd
    getUid
    writeInfo
    readInfo
    tagRcsVersion
    getEndpart
    checkTag
    tagOsp
    getStateVersion
    mirrorDir
    buildDir
    loadRcsInfo
    saveRcsInfo
    checkEnv
    findWhich
    helpAbout
    helpBookmark
    unpack
    upb
    rmdb
    downb
    rgtb
    hiloaz
    hilodat
    hilosz
    lohiaz
    lohidat
    lohisz
    refresh_im
    home_im
    dev_im
    mirror_im
    build_im
    cut_im
    copy_im
    paste_im
    rename_im
    mkdir_im
    convert_im
    help_im
    config_im
    delete_im
    dup_im
    browse_im
    search_im
    next_im
    prev_im
    taritMultiple
    tarit
    fileOptions
    goHome
    processDirSelection
    processFileSelection
    BindDragto
    BindMark
    BindSelect
    BindIndex
    BindAllSelect
    cftMain
    GetSpace
    gotoLineNo
    findText
    findNext
    scrollText
    getLineNumber
    helpBrowseFile
    browseFile
    checkDiskSpace
    gtCompare
    ltCompare
    destroyImages
    dispCanvas
    dispFile
    forAllMatches
    forLineMatch
    getDate
    goUp
    identifyFile
    mkDialog
    multiScroll
    readDir
    refresh
    diffTheRcsFile
    viewRcsFileSelected
    rlogFileSelected
    diffRcsFilesSelected
    getFilesSelected
    unlockFilesSelected
    createCheckinMsg
    createFilesSelected
    checkinFilesSelected
    rcsLockFilesSelected
    checkoutFilesSelected
    clearMsgArea
    setMsgArea
    setErrMsg
    diffFilesSelected
    rmFiles
    doIt
    doitCmd
    doItOptions
    getScreenShot
    snapShot
    renameFile
    renameTheFile
    cmdCHMOD
    cmdMKDIR
    cmdRCS_BASE_VER
    cmdDEVELOPMENT_DIR
    cmdBUILD_DIR
    setRCSROOT
    copyTheFile
    duplicateFiles
    browseSelectedFile
    pasteTheFile
    setSortMode
    setWindowPos
    showImage
    shrinkImage

    Function sampleWindowsConfig

    Example configuration file for windows.

    Global parameters

    PREFS


    Function sampleUnixConfig

    Sample configuration file cft running on Unix (Solaris).

    Global parameters

    PREFS


    Function envOk

    Set environment variable Name: with the contents of Value: and exits from the Environment set-up menu.

    Global parameters

    env
    PREFS


    Function envCancel

    Exits from the Environment set-up menu.


    Function helpEnv

    Help info for setting environment variables.

    Global parameters

    PREFS


    Function envConfig

    The Environment Variable Editing menu allows one to customize environment variables, while running cft. Common types of environment variables changes might be CLASSPATH, RCSROOT, and others. To create a new environment variable use the "NEW" button to blank-out the Name and Value entries. To temporarily set the environment variable, use the "OK" button. The "Override" button permanently saves an environment variable entry. The "Re-Set" button removes an "overriden" entry.

    @see helpEnv

    Global parameters

    env
    PREFS
    tcl_platform
    PREFS
    PREFS


    Function convertTextFile

    Convert Text File to native. (i.e. UNIX <-> Dos...If on a Unix system, remove Crtl-M from Dos files, if on Windows, add Crtl-M.

    Global parameters

    PREFS
    Global array containing file selections.


    Function colorConf

    A color configuration menu that provides color control of certain widgets, or their components.

    Global parameters

    PREFS
    Global array containing color configurations.


    Function acceptColorSelection

    Updates, and saves color selection from color configuration menu.

    Parameters

    indx
    Index value of the color-array item to be updated.

    Global parameters

    PREFS
    Global array containing color configurations to be updated.


    Function getColor

    Selects an RGB (8-bit) color using three slider bars for the selection red, blue, and green.

    Parameters

    indx
    Index value of the color-array item to be updated.


    Function runCmd

    Runs any custom command up-to 15 arguments.

    Parameters

    args
    A Text string; arguments separated by a "+"
    mode
    = 1, Run a command from the options pop-up menu.

    = 0, Run a file-associated command.

    num
    Index value from the global PREFS list indicating the selected item.

    Global parameters

    PREFS
    Global array used to determine if the ouput from the command should be "_B" browsed or "_V" viewed.

    NOTE: This could be improved to access args directly.


    Function setFileSelections

    Save file selections from listboxes, into global SEL_FILES

    Global parameters

    PREFS
    Global array used to capture file selections "PREFS(SEL_FILES)"


    Function doCmd

    Parse and run command from either options, or file associations menu; Replace #_FILE_# with the currently selected file and $_UIP_# with the user input dialog entry.

    Parameters

    num
    Index value from the global PREFS list indicating the selected item.
    mode
    = 1, Run a command from the options pop-up menu.

    = 0, Run a file-associated command.

    Global parameters

    PREFS
    Global array used to capture the static part of of the command "PREFS(_X$num)"


    Function getFilePath

    A pop-up file selection menu that is activated when trying to locate a new command

    Parameters

    i
    index value of the command to be inserted
    w
    parent widget.

    Global parameters

    PREFS


    Function showOptions

    A pop-up menu that is activated using the right-mouse-button. New "customized" buttons can be added by using the Configure Options menu and using the "ADD" button.

    @see "Configure Options Help"

    Global parameters

    PREFS
    Global array used to hold all information about each command "PREFS(_N), PREFS(_X), PREFS(_F), etc."
    env
    tcl_platform


    Function testOptions

    Due to differing screen resolutions, available fonts, etc., a test "options" pop-up menu is activated at start-up to determine the width of the options menu. The Height of a row is stored in global PREFS(OPT_H) and the width is stored in PREFS(OPT_W)

    Global parameters

    PREFS


    Function addOptions

    Adds a new blank entry to the options menu. The Name and Settings field must be completed to save the entry.

    Global parameters

    PREFS
    env


    Function deleteOption

    Removes an entry from the options menu.

    Parameters

    index
    PREFS(_N$index),PREFS(_X$index) are set to "" so the value is removed from the menu.

    Global parameters

    PREFS


    Function updateOptions

    Saves options after an add, delete or "OK" button was pressed.

    Global parameters

    PREFS


    Function helpOptions

    Help information for the options menu.

    Global parameters

    PREFS


    Function showFileTypes

    Menu that allows one to associate a file with some action.

    @see "Configure Options Help"

    Global parameters

    PREFS
    env
    tcl_platform


    Function deleteFileTypes

    Deletes entries from the "File Types" association menu.

    Parameters

    index

    Global parameters

    PREFS


    Function updateFileTypes

    Saves file type associations after an add, delete or "OK button

    Global parameters

    PREFS


    Function addFileTypes

    Adds a new blank entry to the file types menu. The Extension and Open With field must be completed to save the entry.

    Global parameters

    PREFS


    Function helpFileTypes

    Help info for the file type association menu.

    Global parameters

    PREFS


    Function testFileTypes

    Global parameters

    PREFS


    Function addDir

    Adds your current working directory as a bookmark entry.

    Global parameters

    PREFS


    Function rmFavoriteDirectory

    Removes bookmarked directory entries.

    Global parameters

    PREFS


    Function setCd

    Go-to a directory from a "bookmark". If directory does not exist, remove it from "bookmark"

    Parameters

    dir
    Directory name from the "bookmark" list.

    Global parameters

    PREFS


    Function getUid

    Get the user login id (unix-only) @reutrn users login id.

    Global parameters

    tcl_platform


    Function writeInfo

    Write state information to .cft.cfg

    Global parameters

    PREFS
    Global array containint all state information.
    env
    environment variables (used to get HOME).


    Function readInfo

    Read-in global parameters from the configuration file.

    Global parameters

    PREFS
    Global array containing all state information.
    env


    Function tagRcsVersion

    Procedure to tag/un-tag RCS files with symbolic name.

    Parameters

    widget
    pop-up dialog to be destroyed.
    on
    1 = tag file with RCS_BASE_VER

    0 = Remove RCS tag from file.

    Global parameters

    PREFS
    env


    Function getEndpart

    Attempt to find the end-part of the path. Assuming that you are in the 'rcsroot' or in your 'development' directory otherwise, return [pwd].

    Global parameters

    PREFS
    env

    Return Value

    A constructed path to that of "pwd".


    Function checkTag

    Check the RCS file for the associated symbolic name (RCS_BASE_VER)

    Global parameters

    PREFS
    env


    Function tagOsp

    Tag RCS file with symbolic name (RCS_BASE_VER)

    Parameters

    mode
    = 1, tag with symbolic name; = 0, un-tag symbolic name

    Global parameters

    PREFS


    Function getStateVersion

    Get state version from 'pwd' .rcsState.

    Parameters

    name
    file name to be checked.

    Global parameters

    PREFS


    Function mirrorDir

    Switch from RCS directory to current working directory and back.

    Global parameters

    env
    PREFS


    Function buildDir

    If PREFS(BUILD_DIR) exists, then switch to that directory...

    Global parameters

    env
    PREFS


    Function loadRcsInfo

    Loads info about RCS file activity, for current working directory.

    Global parameters

    PREFS
    env


    Function saveRcsInfo

    Saves info about RCS file activity, for the current working directory. It is applied for each RCS check-out, check-in session.

    Global parameters

    PREFS


    Function checkEnv

    Check current environment array for "name"

    Parameters

    name
    Name of the environment variable.

    Global parameters

    env

    Return Value

    1 = found

    0 = not found.


    Function findWhich

    Given a command name, search through the $path environment variable for its location.

    Parameters

    cmd
    command name to be found (e.g. grep)

    Global parameters

    tcl_platform
    Determine if on UNIX or Windows.
    env
    environment variables.


    Function helpAbout

    HelpAbout pop-up menu.

    Global parameters

    PREFS


    Function helpBookmark

    Help about bookmarks.

    Global parameters

    PREFS


    Function unpack

    Unpacks .zip, .Z, .gz (on unix-only)

    Global parameters

    PREFS


    Function upb

    Up button; 64-bit encoded gif file.


    Function rmdb

    Remove "bookmark"; 64-bit encoded gif file.


    Function downb

    Down button; 64-bit encoded gif file.


    Function rgtb

    Right button; 64-bit encoded gif file.


    Function hiloaz

    hiloaz: File sort a-z, hi->lo; 64-bit encoded gif file.


    Function hilodat

    Date sort hi->low; 64-bit encoded gif file.


    Function hilosz

    File size sort, hi->lo; 64-bit encoded gif file.


    Function lohiaz

    File sort a-z, lo->hi; 64-bit encoded gif file.


    Function lohidat

    Date sort lo->hi; 64-bit encoded gif file.


    Function lohisz

    File size lo->hi; 64-bit encoded gif file.


    Function refresh_im

    Refresh; 64-bit encoded gif file.


    Function home_im

    home; 64-bit encoded gif file.


    Function dev_im

    dev; 64-bit encoded gif file.


    Function mirror_im

    mirror; 64-bit encoded gif file.


    Function build_im

    build; 64-bit encoded gif file.


    Function cut_im

    cut; 64-bit encoded gif file.


    Function copy_im

    copy; 64-bit encoded gif file.


    Function paste_im

    paste; 64-bit encoded gif file.


    Function rename_im

    rename; 64-bit encoded gif file.


    Function mkdir_im

    mkdir; 64-bit encoded gif file.


    Function convert_im

    convert; 64-bit encoded gif file.


    Function help_im

    help; 64-bit encoded gif file.


    Function config_im

    help; 64-bit encoded gif file.


    Function delete_im

    delete; 64-bit encoded gif file.


    Function dup_im

    duplicate; 64-bit encoded gif file.


    Function browse_im

    browse; 64-bit encoded gif file.


    Function search_im

    search; 64-bit encoded gif file.

    Global parameters

    PREFS


    Function next_im

    next; 64-bit encoded gif file.

    Global parameters

    PREFS


    Function prev_im

    prev; 64-bit encoded gif file.

    Global parameters

    PREFS


    Function taritMultiple

    Tars-up a list files (unix-only)

    Parameters

    type
    "compress" or "gzip" action to be taken after files are tared-up.

    Global parameters

    PREFS


    Function tarit

    Tar and compress files (unix-only)

    If a single file is selected, then the .Z or .gz file takes on the name of the file selected.

    If multiple files are selected, then "doIt type" is called to get the name of the .Z or .gz file and tarit is called a second time "count = 1" to indecate that a PREFS(TAR_FILE_NAME) has been entered.

    Multiple file flow:
  • fileOptions
  • tarit 0 type
  • doIt type
  • taritMultiple type
  • tarit 1 type
  • Parameters

    count
    Indicates who called tarit.
    type
    Either "compress" or "gzip".

    Global parameters

    PREFS


    Function fileOptions

    Pop-up menu with buttons generated from user-defined options.

    Parameters

    type
    Input is either a "file" or "directory" @see Help options for more info Window manager configurations

    Global parameters

    PREFS
    env
    tcl_platform


    Function goHome

    Being a separate proc, this allows one to reset HOME env, while cft is running.

    Global parameters

    env


    Function processDirSelection

    Global parameters

    PREFS


    Function processFileSelection

    Process file selection...

    Global parameters

    PREFS
    tcl_platform
    PREFS(DATA)


    Function BindDragto

    Get cursor's x y position as it it is moving for listbox selection.

    Parameters

    x
    cursor's x screen coordinate.
    y
    cursor's y screen coordinate.
    args
    An array of listbox widgets.


    Function BindMark

    Get marked cursor's x y position for listbox selection.

    Parameters

    x
    cursor's x screen coordinate.
    y
    cursor's y screen coordinate.
    args
    An array of listbox widgets.


    Function BindSelect

    Clear selections, and set selection to nearest y listbox location.

    Parameters

    y
    cursor's y screen coordinate.
    args
    An array of listbox widgets.


    Function BindIndex

    Clear selections, and set all associaed file widgets to the given index.

    Parameters

    ind
    item selected.


    Function BindAllSelect

    Set selections to nearest y listbox location.

    Parameters

    w_in
    widget not bound by this event.
    y
    cursor's y screen coordinate.
    args
    An array of listbox widgets.


    Function cftMain

    cfg Main widget that displays files and directories. Window manager configurations

    Global parameters

    PREFS
    env
    tcl_platform


    Function GetSpace

    Function to get available disk-space. NOTE: Currently a stubb function.


    Function gotoLineNo

    Procedure to set brwose widget to line-number

    Parameters

    widget

    Global parameters

    PREFS


    Function findText

    Find an item in a text widget.

    Parameters

    widget
    text widget.

    Global parameters

    PREFS


    Function findNext

    Find next or previous search item.

    Parameters

    widget
    mo
    mode N = Next, P = Previous.

    Global parameters

    PREFS


    Function scrollText

    This procedure attempts to compute the current line-number while scrolling

    Parameters

    widget
    Text widget to scroll
    args
    y-scroll. Bug: Line calculation does not work with dos-windows/NT

    Global parameters

    PREFS
    tcl_platform


    Function getLineNumber

    Parameters

    w

    Global parameters

    PREFS


    Function helpBrowseFile

    Help browse file.

    Global parameters

    PREFS


    Function browseFile

    Displays either a file or global PREFS(DATA).

    Parameters

    filnam

    Global parameters

    PREFS


    Function checkDiskSpace

    Displays the output from the df program (unix-only)

    Global parameters

    PREFS


    Function gtCompare

    Compare "a" with "b" and return a 0 or 1.

    Parameters

    a
    If a greater than b? return 1
    b
    If b greater than a? return 0

    Return Value

    0 or 1


    Function ltCompare

    Compare "a" with "b" and return a 0 or 1.

    Parameters

    a
    If a less than b? return 1
    b
    If b less than a? return 0

    Return Value

    0 or 1


    Function destroyImages

    Re-set image count and destroy image widget.

    Parameters

    w
    Widget to be destroyed.

    Global parameters

    PREFS(IM_COUNT)
    Image number displayed.


    Function dispCanvas

    Display thumb-nailed sized images on a scrolling canvas widget.

    Global parameters

    PREFS


    Function dispFile

    Make thumb-nail images and put them on a scrolling canvas widget.

    Parameters

    can
    filename

    Global parameters

    PREFS


    Function forAllMatches

    Hilite all instances of "Search for"" in a text widget.

    Parameters

    w
    Text widget.
    pattern
    Search pattern.
    script
    Procedure used to define tags.

    Global parameters

    PREFS


    Function forLineMatch

    Hilite all instances of "Search for"" in the selected file.

    Parameters

    w
    Text widget.
    pattern
    line
    Text from a line.
    script
    Procedure used to define tags.

    Global parameters

    PREFS


    Function getDate

    Return a file date in a displayable format

    Parameters

    value
    Clock-seconds to be converted into a date.


    Function goUp

    Change directory to the level above.

    Global parameters

    PREFS


    Function identifyFile

    Return (lower-case) file extension.

    Parameters

    filename
    File Name to be identified (extension).


    Function mkDialog

    General purpose message pop-up dialog.

    Parameters

    w
    toplevel widget
    msgArgs
    Text message
    args
    Extra buttons, foreground background, etc

    Global parameters

    PREFS


    Function multiScroll

    scrolls multiple list-boxes.

    Parameters

    scroll_list
    list of widgets to scroll Get info on list of args.
    args


    Function readDir

    Update list-boxes with current directory info.

    Parameters

    dirlist
    directory listbox.
    filelist
    file listbox.
    sizelist
    size listbox.
    datelist
    date listbox.

    Global parameters

    PREFS
    tcl_platform


    Function refresh

    Update list-boxes with current file info. global PREFS


    Function diffTheRcsFile

    Procedure rcs-diff using tkdiff.

    Global parameters

    PREFS
    env


    Function viewRcsFileSelected

    Checkout(unlocked) a temporary copy of the RCS ,v files to be browsed.

    Parameters

    file
    RCS file to be browsed.

    Global parameters

    PREFS
    env


    Function rlogFileSelected

    View the output from the RCS rlog command.

    Global parameters

    PREFS
    env


    Function diffRcsFilesSelected

    Cycle through all selected files and perform "tkdiff" on each against the RCS repository.

    Global parameters

    PREFS
    env


    Function getFilesSelected

    Get an unlocked copy (latest version) of a file in the RCS repository.

    Global parameters

    PREFS
    env


    Function unlockFilesSelected

    Unlock the latest copy checked-out

    Global parameters

    PREFS
    env


    Function createCheckinMsg

    Get user's check-in message and issue the check-in commad if "OK" is selected.

    Parameters

    mode
    either "checkin" or "create".

    Global parameters

    PREFS


    Function createFilesSelected

    Create new RCS managed file(s)

    Global parameters

    PREFS
    env


    Function checkinFilesSelected

    Check-in RCS managed files.

    Global parameters

    PREFS
    env


    Function rcsLockFilesSelected

    Lock RCS managed files without getting a copy from the repository.

    Global parameters

    PREFS
    env


    Function checkoutFilesSelected

    Check-out RCS managed files

    Global parameters

    PREFS
    env


    Function clearMsgArea

    Clear out message area

    Global parameters

    PREFS


    Function setMsgArea

    Set a message

    Parameters

    msg
    time

    Global parameters

    PREFS


    Function setErrMsg

    Set an error message

    Parameters

    msg
    time

    Global parameters

    PREFS


    Function diffFilesSelected

    Procedure to display differences between two text files.

    Parameters

    num
    Index count for wich file has been selected.

    Global parameters

    PREFS
    tcl_platform


    Function rmFiles

    Remove files and directories

    Global parameters

    PREFS


    Function doIt

    Pop-up dialog to get arguments for chmod, and mkdir, RCSROOT, etc.

    Parameters

    type

    Global parameters

    PREFS
    env


    Function doitCmd

    Parse the output from the doit_test pop-up dialog, combine static user defined commands and call runCmd.

    Parameters

    num
    Index number for command to run.
    mode
    = 1, Run a command from the options pop-up menu.

    = 0, Run a file-associated command.

    Global parameters

    PREFS


    Function doItOptions

    This pop-up dialog appears when User Input Parameters #_UIP_# is in the command string PREFS(_X).

    Parameters

    num
    Index number for command to run.
    mode
    = 1, Run a command from the options pop-up menu.

    = 0, Run a file-associated command.

    Global parameters

    PREFS


    Function getScreenShot

    (unix-only) runs xwd command.

    Global parameters

    PREFS


    Function snapShot

    (unix-only) Pop-up dialog to get the name of the xwd file, waits 5 seconds and runs getScreenShot.

    Global parameters

    PREFS
    PREFS


    Function renameFile

    Pop-up dialog to get new file name for file rename. It also checks to prevent rename - that will delete an existing file.

    Global parameters

    PREFS


    Function renameTheFile

    Procedure to rename a file.

    Parameters

    w
    re-name widget to delete when finished.

    Global parameters

    PREFS


    Function cmdCHMOD

    (unix-only) procedure to change file permissions.

    Global parameters

    PREFS


    Function cmdMKDIR

    Uses the tcl file command to make a new directory.

    Global parameters

    PREFS


    Function cmdRCS_BASE_VER

    Sets RCS_BASE_VER variable and saves current state.

    Global parameters

    PREFS


    Function cmdDEVELOPMENT_DIR

    Sets DEVELOPMENT_DIR variable and saves current state.

    Global parameters

    PREFS


    Function cmdBUILD_DIR

    Sets BUILD_DIR variable and saves current state.

    Global parameters

    PREFS


    Function setRCSROOT

    Sets RCSROOT variable and saves current state.

    Global parameters

    PREFS
    env


    Function copyTheFile

    Saves items selected from the listbox for a later "paste" operation.

    Parameters

    mode
    0 = cut, 1 = copy.

    Global parameters

    PREFS


    Function duplicateFiles

    Global parameters

    PREFS


    Function browseSelectedFile

    Global parameters

    PREFS


    Function pasteTheFile

    "move" or "copy" files saved in the copy or cut sequence. Uses the tcl file command to "copy" or "rename".

    Global parameters

    PREFS


    Function setSortMode

    Set file sort method.

    Parameters

    mode
    dm = file date max-> min.

    dn = file date min-> max.

    fm = file name max-> min.

    fn = file name min-> max.

    sm = file size max-> min.

    sn = file size min-> max.

    Global parameters

    PREFS


    Function setWindowPos

    Calculate a toplevel's window's relative position to its parent or some other window.

    Parameters

    parent
    parent widget (base coordinates).
    child
    child widget (new coordinates).
    xoff
    x -coordinate offset from the parent.
    yoff
    y -coordinate offset from the parent.

    e.g. Place new toplevel .foo on top of the main window '.' offset 30 pixels in x and y. . .foo 30 30


    Function showImage

    Create a button and display an image on it.

    Parameters

    filename
    .gif,.ppm,.xbm,or .ppm file to be displayed.

    Global parameters

    PREFS


    Function shrinkImage

    Make thumbnail images out of the originals.

    Parameters

    im
    Original image.
    width
    Width of original image.
    height
    Height of original image.