SimpDlg.tcl 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. # -*- mode: TCL; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
  2. #
  3. # $Id: SimpDlg.tcl,v 1.2 2001/12/09 05:04:02 idiscovery Exp $
  4. #
  5. # SimpDlg.tcl --
  6. #
  7. # This file implements Simple Dialog widgets
  8. #
  9. # Copyright (c) 1993-1999 Ioi Kim Lam.
  10. # Copyright (c) 2000-2001 Tix Project Group.
  11. #
  12. # See the file "license.terms" for information on usage and redistribution
  13. # of this file, and for a DISCLAIMER OF ALL WARRANTIES.
  14. #
  15. tixWidgetClass tixSimpleDialog {
  16. -classname TixSimpleDialog
  17. -superclass tixDialogShell
  18. -method {}
  19. -flag {
  20. -buttons -message -type
  21. }
  22. -configspec {
  23. {-buttons buttons Buttons ""}
  24. {-message message Message ""}
  25. {-type type Type info}
  26. }
  27. }
  28. proc tixSimpleDialog:ConstructWidget {w} {
  29. upvar #0 $w data
  30. tixChainMethod $w ConstructWidget
  31. frame $w.top
  32. label $w.top.icon -image [tix getimage $data(-type)]
  33. label $w.top.message -text $data(-message)
  34. pack $w.top.icon -side left -padx 20 -pady 50 -anchor c
  35. pack $w.top.message -side left -padx 10 -pady 50 -anchor c
  36. frame $w.bot
  37. pack $w.bot -side bottom -fill x
  38. pack $w.top -side top -expand yes -fill both
  39. }