OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [tags/] [start/] [insight/] [tix/] [tests/] [xpm/] [compound.tcl] - Blame information for rev 1782

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 578 markom
proc About {} {
2
    return "the compound image type"
3
}
4
 
5
proc Test {} {
6
    set num 3
7
    # Test for create
8
    #
9
    #
10
    test {image create compound -foo} {missing}
11
    test {image create compound -window} {missing}
12
    test {image create compound -window foo} {path name}
13
    test {set image1 [image create compound -window .b]} {path name}
14
 
15
    for {set i 0} {$i < $num} {incr i} {
16
        button .b$i
17
        pack .b$i
18
    }
19
 
20
    # (0) Empty image
21
    #
22
    test {set image0 [image create compound -window .b0]}
23
 
24
    # (1) Simple image
25
    #
26
    test {set image1 [image create compound -window .b1]}
27
 
28
    $image1 add line
29
    $image1 add text -text Hello
30
 
31
    # (2) Two lines
32
    #
33
    test {set image2 [image create compound -window .b2]}
34
 
35
    $image2 add line
36
    $image2 add text -text "Line One"
37
    $image2 add line
38
    $image2 add text -text "Line Two"
39
 
40
 
41
    # Display them
42
    #
43
    for {set i 0} {$i < $num} {incr i} {
44
        .b$i config -image [set image$i]
45
    }
46
 
47
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.