StatBar.tcl 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. # -*- mode: TCL; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
  2. #
  3. # $Id: StatBar.tcl,v 1.2 2001/12/09 05:04:02 idiscovery Exp $
  4. #
  5. # StatBar.tcl --
  6. #
  7. # The StatusBar of an application.
  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 tixStatusBar {
  16. -classname TixStatusBar
  17. -superclass tixPrimitive
  18. -method {
  19. }
  20. -flag {
  21. -fields
  22. }
  23. -static {
  24. -fields
  25. }
  26. -configspec {
  27. {-fields fields Fields ""}
  28. }
  29. }
  30. #--------------------------
  31. # Create Widget
  32. #--------------------------
  33. proc tixStatusBar:ConstructWidget {w} {
  34. upvar #0 $w data
  35. tixChainMethod $w ConstructWidget
  36. foreach field $data(-fields) {
  37. set name [lindex $field 0]
  38. set width [lindex $field 1]
  39. set data(w:width) [label $w.$name -width $width]
  40. }
  41. }
  42. #----------------------------------------------------------------------
  43. # Public methods
  44. #----------------------------------------------------------------------
  45. #----------------------------------------------------------------------
  46. # Internal commands
  47. #----------------------------------------------------------------------