WInfo.tcl 965 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. # -*- mode: TCL; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
  2. #
  3. # $Id: WInfo.tcl,v 1.2 2001/12/09 05:04:02 idiscovery Exp $
  4. #
  5. # WInfo.tcl --
  6. #
  7. # This file implements the command tixWInfo, which return various
  8. # information about a Tix widget.
  9. #
  10. # Copyright (c) 1993-1999 Ioi Kim Lam.
  11. # Copyright (c) 2000-2001 Tix Project Group.
  12. #
  13. # See the file "license.terms" for information on usage and redistribution
  14. # of this file, and for a DISCLAIMER OF ALL WARRANTIES.
  15. #
  16. proc tixWInfo {option w} {
  17. upvar #0 $w data
  18. case $option {
  19. tix {
  20. # Is this a Tix widget?
  21. #
  22. return [info exists data(className)]
  23. }
  24. compound {
  25. # Is this a compound widget?
  26. # Currently this is the same as "tixWinfo tix" because only
  27. # Tix compilant compound widgets are supported
  28. return [info exists data(className)]
  29. }
  30. class {
  31. if {[info exists data(className)]} {
  32. return $data(className)
  33. } else {
  34. return ""
  35. }
  36. }
  37. }
  38. }