blob: de6ddaae257a8c0579a0ce0480a50db4aa8a5771 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
|
############################################################################
#
# File: iview.icn
#
# Subject: Program to display image files
#
# Author: Ralph E. Griswold
#
# Date: January 22, 1995
#
############################################################################
#
# This file is in the public domain.
#
############################################################################
#
# This program is modeled after the Unix xview(1) utility. It takes
# a list of image files on the command line and displays them in
# order. The character "n" typed when the mouse cursor is in the
# image window goes to the next image. The character "q" terminates
# the display.
#
# This program can, of course, only display image types that Icon
# understands.
#
############################################################################
#
# Requires: Version 9 graphics
#
############################################################################
#
# Links: wopen
#
############################################################################
link wopen
procedure main(args)
local name, posx, posy
posx := posy := 20
every name := !args do {
WOpen("image=" || name, "posx=" || posx, "posy=" || posy) | {
write(&errout, "*** cannot open image: ", name)
next
}
repeat {
case Event() of {
"n": {
posx := WAttrib("posx")
posy := WAttrib("posy")
WClose()
break
}
"q": exit()
}
}
}
end
|