OSDN Git Service

Initial revision
[pf3gnuchains/pf3gnuchains4x.git] / tix / library / SimpDlg.tcl
1 # SimpDlg.tcl --
2 #
3 #       This file implements Simple Dialog 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 tixSimpleDialog {
12     -classname TixSimpleDialog
13     -superclass tixDialogShell
14     -method {}
15     -flag   {
16         -buttons -message -type
17     }
18     -configspec {
19         {-buttons buttons Buttons ""}
20         {-message message Message ""}
21         {-type type Type info}
22     }
23 }
24
25 proc tixSimpleDialog:ConstructWidget {w} {
26     upvar #0 $w data
27
28     tixChainMethod $w ConstructWidget
29
30     frame $w.top
31
32     label $w.top.icon -image [tix getimage $data(-type)]
33     label $w.top.message -text $data(-message)
34
35     pack $w.top.icon    -side left -padx 20 -pady 50 -anchor c
36     pack $w.top.message -side left -padx 10 -pady 50 -anchor c
37
38     frame $w.bot
39
40     pack $w.bot -side bottom -fill x
41     pack $w.top -side top -expand yes -fill both
42 }