-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathTextInfo.itk
46 lines (39 loc) · 1.48 KB
/
TextInfo.itk
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# ----------------------------------------------------------------------
# EXAMPLE: using mega-widgets as components
# ----------------------------------------------------------------------
# COURSE: Object-Oriented Programming with [incr Tcl]
# AUTHOR: Michael J. McLennan, Bell Labs Innovations
# ======================================================================
# Copyright (c) 1996 Lucent Technologies
# ======================================================================
option add *TextInfo.title "Text" widgetDefault
class TextInfo {
inherit Info
constructor {args} {
itk_component add textArea {
TextDisplay $itk_interior.txt -scrollbar auto
} {
usual
keep -wrap -tabs
rename -font -textfont textFont Font
}
pack $itk_component(textArea) -expand yes -fill both
eval itk_initialize $args
}
public method display {args} {
eval $itk_component(textArea) display $args
}
public method append {args} {
eval $itk_component(textArea) append $args
}
}
usual TextInfo {
keep -background -cursor -foreground -font
keep -activebackground -activeforeground -activerelief
keep -disabledforeground
keep -highlightcolor -highlightthickness
keep -insertbackground -insertborderwidth -insertwidth
keep -insertontime -insertofftime
keep -selectbackground -selectborderwidth -selectforeground
keep -textbackground -troughcolor
}