source: trunk/tester/testview.tcl @ 1966

Last change on this file since 1966 was 1966, checked in by braffert, 13 years ago

Developing regression tester

File size: 1.7 KB
Line 
1# ----------------------------------------------------------------------
2# COMPONENT: testview - display the results of a test
3#
4# Doesn't do anything yet.  TODO: Fill this in later.
5# ======================================================================
6#  AUTHOR:  Ben Rafferty, Purdue University
7#  Copyright (c) 2010  Purdue Research Foundation
8#
9#  See the file "license.terms" for information on usage and
10#  redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
11# ======================================================================
12package require Itk
13
14namespace eval Rappture::Regression::TestView { #forward declaration }
15
16itcl::class Rappture::Regression::TestView {
17    inherit itk::Widget
18
19    public method showDefault {}
20    public method showText {text}
21
22    constructor {args} { #defined later }
23}
24
25# ----------------------------------------------------------------------
26# CONSTRUCTOR
27# ----------------------------------------------------------------------
28itcl::body Rappture::Regression::TestView::constructor {args} {
29    itk_component add txt {
30        text $itk_interior.txt
31    }
32    pack $itk_component(txt) -expand yes -fill both
33    showDefault
34
35    eval itk_initialize $args
36}
37
38itk::usual TestView {
39    keep -background -foreground -font
40}
41
42itcl::body Rappture::Regression::TestView::showDefault {} {
43    $itk_component(txt) configure -state normal
44    $itk_component(txt) delete 0.0 end
45    $itk_component(txt) insert end "Default"
46    $itk_component(txt) configure -state disabled
47}
48
49itcl::body Rappture::Regression::TestView::showText {text} {
50    $itk_component(txt) configure -state normal
51    $itk_component(txt) delete 0.0 end
52    $itk_component(txt) insert end "$text"
53    $itk_component(txt) configure -state disabled
54}
Note: See TracBrowser for help on using the repository browser.