home *** CD-ROM | disk | FTP | other *** search
/ Freelog Special Freeware 31 / FreelogHS31.iso / Texte / scribus / scribus-1.3.3.9-win32-install.exe / tcl / tix8.1 / EFileDlg.tcl < prev    next >
Text File  |  2002-01-24  |  2KB  |  66 lines

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