1
2
3
4
5
6
7
8
9
10
11
|
1
2
3
4
5
6
7
8
9
10
11
|
-
+
|
# ----------------------------------------------------------------------------
# scrollframe.tcl
# This file is part of Unifix BWidget Toolkit
# $Id: scrollframe.tcl,v 1.4 2003/02/25 09:47:50 hobbs Exp $
# $Id: scrollframe.tcl,v 1.5 2003/10/17 18:33:06 hobbs Exp $
# ----------------------------------------------------------------------------
# Index of commands:
# - ScrollableFrame::create
# - ScrollableFrame::configure
# - ScrollableFrame::cget
# - ScrollableFrame::getframe
# - ScrollableFrame::see
|
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
|
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
|
-
+
-
+
-
+
-
-
+
|
Widget::addmap ScrollableFrame "" .frame {-background {}}
variable _widget
bind BwScrollableFrame <Configure> {ScrollableFrame::_resize %W}
bind BwScrollableFrame <Destroy> {Widget::destroy %W; rename %W {}}
proc ::ScrollableFrame { path args } { return [eval ScrollableFrame::create $path $args] }
Widget::redir_create_command ::ScrollableFrame
proc use {} {}
}
# ----------------------------------------------------------------------------
# Command ScrollableFrame::create
# ----------------------------------------------------------------------------
proc ScrollableFrame::create { path args } {
Widget::init ScrollableFrame $path $args
set canvas [eval canvas $path [Widget::subcget $path :cmd] \
set canvas [eval [list canvas $path] [Widget::subcget $path :cmd] \
-highlightthickness 0 -borderwidth 0 -relief flat]
set frame [eval frame $path.frame [Widget::subcget $path .frame] \
set frame [eval [list frame $path.frame] [Widget::subcget $path .frame] \
-highlightthickness 0 -borderwidth 0 -relief flat]
$canvas create window 0 0 -anchor nw -window $frame -tags win \
-width [Widget::cget $path -areawidth] \
-height [Widget::cget $path -areaheight]
bind $frame <Configure> \
[list ScrollableFrame::_frameConfigure $canvas $frame %w %h]
bindtags $path [list $path BwScrollableFrame [winfo toplevel $path] all]
rename $path ::$path:cmd
proc ::$path { cmd args } \
"return \[eval ScrollableFrame::\$cmd [list $path] \$args\]"
Widget::redir_widget_command $path ScrollableFrame
return $canvas
}
# ----------------------------------------------------------------------------
# Command ScrollableFrame::configure
|