1 #!/home/people/tkys/Eos/util/SGI/bin/bltwish
6 option add *Graph.Tile bgTexture
7 option add *Label.Tile bgTexture
8 option add *Frame.Tile bgTexture
9 option add *Htext.Tile bgTexture
10 option add *TileOffset 0
12 option add *HighlightThickness 0
13 option add *takeFocus yes
14 option add *shadow orange2
15 #option add *titleColor orange2
18 set visual [winfo screenvisual .]
19 if { $visual != "staticgray" } {
20 option add *print.background yellow
21 option add *quit.background red
24 image create photo bgTexture -file ./images/buckskin.gif
28 option add *tile bgTexture
29 option add *psPreview yes
30 option add *psLandscape yes
31 option add *psMaxpect yes
32 option add *psCenter yes
34 htext .header -text {\
35 This is an example of the graph widget. It displays two-variable data
36 with assorted line attributes and symbols. To create a postscript file
38 button $htext(widget).print -text print -command {
39 puts stderr [time {.graph postscript output xy.ps}]
41 $htext(widget) append $htext(widget).print
46 htext .footer -text {Hit the %%
47 button $htext(widget).quit -text quit -command {
48 catch "send GraphConfig after 1 exit"
52 $htext(widget) append $htext(widget).quit
53 %% button when you've seen enough.%%
54 label $htext(widget).logo -bitmap BLT
55 $htext(widget) append $htext(widget).logo -padx 20
60 .graph 1,0 -fill both \
63 table configure . r0 r2 -resize none
67 $graph marker create text -bindtags "fred Text all" -name Test\
68 -text "Move with \nmouse button #2" -coords "3.0 150.0" \
69 -anchor center -bg red
71 $graph element bind all <Enter> {
72 %W legend activate [%W element get current]
75 $graph element bind all <Leave> {
76 %W legend deactivate [%W element get current]
79 $graph marker bind Text <B2-Motion> {
80 set coords [%W invtransform %x %y]
81 catch { %W marker configure [%W marker get current] -coords $coords }
84 $graph marker bind fred <Enter> {
85 set marker [%W marker get current]
86 catch { %W marker configure $marker -fill green}
89 $graph marker bind fred <Leave> {
90 set marker [%W marker get current]
91 catch { %W marker configure $marker -fill ""}
94 # $graph marker create polygon \
95 # -coords { 0 200 1 300 2 200 3 200 4 300 5 200 } \
96 # -name xPolygon -linewidth 0 \
97 # -fill red -outline blue