EFileDlg.tcl 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. # -*- mode: TCL; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
  2. #
  3. # $Id: EFileDlg.tcl,v 1.3 2002/01/24 09:13:58 idiscovery Exp $
  4. #
  5. # EFileDlg.tcl --
  6. #
  7. # Implements the Extended File Selection Dialog widget.
  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. foreach fun {tkButtonInvoke} {
  16. if {![llength [info commands $fun]]} {
  17. tk::unsupported::ExposePrivateCommand $fun
  18. }
  19. }
  20. unset fun
  21. tixWidgetClass tixExFileSelectDialog {
  22. -classname TixExFileSelectDialog
  23. -superclass tixDialogShell
  24. -method {}
  25. -flag {
  26. -command
  27. }
  28. -configspec {
  29. {-command command Command ""}
  30. {-title title Title "Select A File"}
  31. }
  32. }
  33. proc tixExFileSelectDialog:ConstructWidget {w} {
  34. upvar #0 $w data
  35. tixChainMethod $w ConstructWidget
  36. set data(w:fsbox) [tixExFileSelectBox $w.fsbox -dialog $w \
  37. -command $data(-command)]
  38. pack $data(w:fsbox) -expand yes -fill both
  39. }
  40. proc tixExFileSelectDialog:config-command {w value} {
  41. upvar #0 $w data
  42. $data(w:fsbox) config -command $value
  43. }
  44. proc tixExFileSelectDialog:SetBindings {w} {
  45. upvar #0 $w data
  46. tixChainMethod $w SetBindings
  47. bind $w <Alt-Key-f> "focus [$data(w:fsbox) subwidget file]"
  48. bind $w <Alt-Key-t> "focus [$data(w:fsbox) subwidget types]"
  49. bind $w <Alt-Key-d> "focus [$data(w:fsbox) subwidget dir]"
  50. bind $w <Alt-Key-o> "tkButtonInvoke [$data(w:fsbox) subwidget ok]"
  51. bind $w <Alt-Key-c> "tkButtonInvoke [$data(w:fsbox) subwidget cancel]"
  52. bind $w <Alt-Key-s> "tkButtonInvoke [$data(w:fsbox) subwidget hidden]"
  53. }