WgSlideShow Procedure
Views multiple images in a slide show widget.
Usage
WgSlideShow, File='imagelist.txt'
or
WgSlideShow, Images=['file1.img', 'file2.img', ...., 'fileN.img']
Input Parameters
The File and Images keywords are mutually exclusive and one of them must be provided.
Keywords
Autosize — If set, the drawing area is auto-sized to hold the largest image in the list.
Descriptions — A string array of descriptions for each image. Overrides any descriptions provided by the File keyword. The number of elements of this array must match the number of images.To associate a blank description with a given image use the null string "" or ''. Null strings are replaced by the associated image file's name.
File — String naming the file containing the list of image files and optional descriptions. The image files to read should be listed in column 1 and the optional file descriptions in column 2. If the second column of descriptions is provided, the columns must be delimited by a semicolon (;) and the length of column 2 must equal the length of column 1. To associate a blank description with a given image use the null string "" or ''. Null strings are replaced by the associated image file's name. The File and Images keywords are mutually exclusive, and one of them must be provided.
Images — A string array of image files to view. The Images and File keywords are mutually exclusive, and one of them must be provided.
Noscroll — If set, scroll bars are not used.
Parent — Parent widget for the new shell window. If no parent is specified, the toolkit is initialized and WgSlideShow runs in its own event loop.
Position — Two-element vector containing the position, in pixels, of the upper left corner, [0,0] of the display, of WgSlideShow.
Shell — (Output) The ID of the newly created widget. If the procedure fails, zero (0) is returned..
Title — The title that will appear on the scrolling window. The default title is 'WgSlideShow'
Background — The background color (passed to all widgets).
Foreground — The foreground color (passed to all widgets).
Basecolor — The base color (passed to buttons, radios, and so on).
Font — The font to use for widget text.
Example 1
From the Operating System shell prompt, cd to a PV‑WAVE directory containing .jpg files.
On Windows, from the command prompt:
cd <RW_DIR>\wave\demo\gallery3\data
On UNIX:
cd <RW_DIR>/wave/demo/gallery3/data Where <RW_DIR> is the PV-WAVE installation directory.
Next, enter the following command to create a file of jpeg names:
On Windows, from the command prompt:
dir /B *.jpg > myjpegs.txt
On UNIX:
ls *.jpg > myjpegs.txt Add descriptions to the file list. For example, myjpgs.txt might look like:
rockclimber24.jpg; ''
rose.jpg; this is a rose
teluride24.jpg; ""
veggies.jpg; these are vegetables
Now start PV‑WAVE and from the command line:
CD, !Gallery_Dir + 'data'
WgSlideShow, File='myjpgs.txt', /Auto, /Noscroll,$
Shell=sh, Back='red', Fore='blue', Font='forte,12', $
Title='Hello World'
Example 2
CD, !Gallery_Dir + 'data'
WgSlideShow, Images=['rockclimber24.jpg', 'rose.jpg'], $
Desc=['I love climbing', '']