OSDN Git Service

Initial revision
[pf3gnuchains/pf3gnuchains4x.git] / tix / tests / general / mwm.tcl
1 # mwm.tcl --
2 #
3 #       Test tixMwm command.
4 #
5 # Copyright (c) 1996, Expert Interface Technologies
6 #
7 # See the file "license.terms" for information on usage and redistribution
8 # of this file, and for a DISCLAIMER OF ALL WARRANTIES.
9 #
10
11 proc About {} {
12     return "Testing tixMwm command"
13 }
14
15 proc Test {} {
16     if ![string compare [info command tixMwm] ""] {
17         puts "(OK) The tixMwm command is not available."
18         return
19     }
20     if ![tixMwm ismwmrunning .] {
21         puts "(OK) Mwm is not running on this display."
22         return
23     }
24     
25     toplevel .d
26     toplevel .e
27
28     test {tixMwm protocol .d add MY_PRINT_HELLO {"Print Hello"  _H Ctrl<Key>H}}
29     wm protocol .d MY_PRINT_HELLO {puts Hello}
30
31     test {tixMwm protocol .e add MY_PRINT_HELLO {"Print Hello"  _H Ctrl<Key>H}}
32     wm protocol .e MY_PRINT_HELLO {puts Hello}
33
34     test {destroy .d}
35
36     test {tixMwm protocol .e add MY_PRINT_HELLO {"Print Hello"  _H Ctrl<Key>H}}
37     wm protocol .e MY_PRINT_HELLO {puts Hello}
38
39     test {tixMwm protocol . delete MY_PRINT_HELLO}
40     wm protocol . MY_PRINT_HELLO {}
41
42     test {tixMwm protocol .e add MY_PRINT_HELLO {"Print Hello"  _H Ctrl<Key>H}}
43     wm protocol .e MY_PRINT_HELLO {puts Hello}
44
45     test {destroy .e}
46 }