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

Subversion Repositories or1k

[/] [or1k/] [trunk/] [insight/] [itcl/] [itk/] [examples/] [TextInfo.itk] - Blame information for rev 578

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

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

powered by: WebSVN 2.1.0

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