| Bsoft 2.0.5 Bernard's software package

Functions
bshow_file.tcl File Reference

Procedures to manage file I/O. More...

Go to the source code of this file.

## Functions
| setupFileMenu
| Menu for opening and closing image files and quiting. More...
| fileDialog operation
| Selects a file for reading or writing using a standard dialog. More...
| openNode tree node
| Populates a file browser tree node. More...
| setupFileBrowser w
| Points the file browser to the current directory. More...
| openFileFromTree wtree
| Opens a file indicated by a double-click in the file browser. More...
| fileBrowserWindow w
| Sets up the file browser window. More...
| loadImage filename img_num
| Loads the selected file into a photo image for display. More...
| relativePath cdir path
| Derives the relative path from an absolute one relative to a given directory. More...
| getInfo filename
| Loads the information for the current image file into a text window for display. More...
| writePostScript
| Writes the current canvas to a postscript file. More...

## Detailed Description

Procedures to manage file I/O.

Author
  Bernard Heymann

Date
  Created: 20010516
  Modified: 20191112

Definition in file bshow_file.tcl.

## Function Documentation

## ◆ fileBrowserWindow()

fileBrowserWindow |  |  | w

Sets up the file browser window.

Parameters

  w | Window name.

Definition at line 204 of file bshow_file.tcl.

## ◆ fileDialog()

fileDialog |  |  | operation

Selects a file for reading or writing using a standard dialog.

Parameters

  operation | "open", "save" or "saveAs".

Definition at line 67 of file bshow_file.tcl.

## ◆ getInfo()

getInfo |  |  | filename

Loads the information for the current image file into a text window for display.

Parameters

  filename | Image file name.

Definition at line 391 of file bshow_file.tcl.

## ◆ loadImage()

loadImage |  |  | filename img_num

Loads the selected file into a photo image for display.

Parameters

  filename | Image file name.
  img_num | Sub-image number.

Definition at line 263 of file bshow_file.tcl.

## ◆ openFileFromTree()

openFileFromTree |  |  | wtree

Opens a file indicated by a double-click in the file browser.

Parameters

  wtree | File browser tree.

Definition at line 176 of file bshow_file.tcl.

## ◆ openNode()

openNode |  |  | tree node

Populates a file browser tree node.

Parameters

  tree | File browser tree.
  node | File browser node.

Definition at line 109 of file bshow_file.tcl.

## ◆ relativePath()

relativePath |  |  | cdir path

Derives the relative path from an absolute one relative to a given directory.

Parameters

  cdir | Current directory.
  path | Absolute path to convert.

Definition at line 361 of file bshow_file.tcl.

## ◆ setupFileBrowser()

setupFileBrowser |  |  | w

Points the file browser to the current directory.

Parameters

  w | File browser tree.

Definition at line 157 of file bshow_file.tcl.

## ◆ setupFileMenu()

setupFileMenu

Menu for opening and closing image files and quiting.

Definition at line 16 of file bshow_file.tcl.

## ◆ writePostScript()

writePostScript

Writes the current canvas to a postscript file.

Definition at line 436 of file bshow_file.tcl.