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

Subversion Repositories or1k

[/] [or1k/] [trunk/] [insight/] [tix/] [library/] [STList.tcl] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 578 markom
# STList.tcl --
2
#
3
#       This file implements Scrolled TList widgets
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
tixWidgetClass tixScrolledTList {
12
    -classname TixScrolledTList
13
    -superclass tixScrolledWidget
14
    -method {
15
    }
16
    -flag {
17
    }
18
    -configspec {
19
    }
20
    -default {
21
        {.scrollbar                     auto}
22
        {*borderWidth                   1}
23
        {*tlist.background              #c3c3c3}
24
        {*tlist.highlightBackground     #d9d9d9}
25
        {*tlist.relief                  sunken}
26
        {*tlist.takeFocus               1}
27
        {*Scrollbar.background          #d9d9d9}
28
        {*Scrollbar.troughColor         #c3c3c3}
29
        {*Scrollbar.takeFocus           0}
30
        {*Scrollbar.relief              sunken}
31
        {*Scrollbar.width               15}
32
    }
33
}
34
 
35
proc tixScrolledTList:ConstructWidget {w} {
36
    upvar #0 $w data
37
 
38
    tixChainMethod $w ConstructWidget
39
 
40
    set data(w:tlist) \
41
        [tixTList $w.tlist]
42
    set data(w:hsb) \
43
        [scrollbar $w.hsb -orient horizontal]
44
    set data(w:vsb) \
45
        [scrollbar $w.vsb -orient vertical ]
46
 
47
    set data(pw:client) $data(w:tlist)
48
}
49
 
50
proc tixScrolledTList:SetBindings {w} {
51
    upvar #0 $w data
52
 
53
    tixChainMethod $w SetBindings
54
 
55
    $data(w:tlist) config \
56
        -xscrollcommand "$data(w:hsb) set"\
57
        -yscrollcommand "$data(w:vsb) set"\
58
        -sizecmd "tixScrolledWidget:Configure $w"
59
 
60
    $data(w:hsb) config -command "$data(w:tlist) xview"
61
    $data(w:vsb) config -command "$data(w:tlist) yview"
62
}
63
 
64
#----------------------------------------------------------------------
65
#
66
#               option configs
67
#----------------------------------------------------------------------
68
proc tixScrolledTList:config-takefocus {w value} {
69
    upvar #0 $w data
70
 
71
    $data(w:tlist) config -takefocus $value
72
}
73
 
74
#----------------------------------------------------------------------
75
#
76
#               Widget commands
77
#----------------------------------------------------------------------
78
 
79
 
80
#----------------------------------------------------------------------
81
#
82
#               Private Methods
83
#----------------------------------------------------------------------
84
 
85
#----------------------------------------------------------------------
86
# virtual functions to query the client window's scroll requirement
87
#----------------------------------------------------------------------
88
proc tixScrolledTList:GeometryInfo {w mW mH} {
89
    upvar #0 $w data
90
 
91
    return [$data(w:tlist) geometryinfo $mW $mH]
92
}

powered by: WebSVN 2.1.0

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