亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? filesel.tcl

?? 很不錯的tcl編程實例
?? TCL
字號:
#
# fileselect.tcl --
# simple file selector.
#
# Mario Jorge Silva			          msilva@cs.Berkeley.EDU
# University of California Berkeley                 Ph:    +1(510)642-8248
# Computer Science Division, 571 Evans Hall         Fax:   +1(510)642-5775
# Berkeley CA 94720                                 
# 

# Layout:
#
#  file:                  +----+
#  ____________________   | OK |
#                         +----+
#
#  +------------------+    Cancel
#  | ..               |S
#  | file1            |c
#  | file2            |r
#  |                  |b
#  | filen            |a
#  |                  |r
#  +------------------+
#  currrent-directory
#
# Copyright 1993 Regents of the University of California
# Permission to use, copy, modify, and distribute this
# software and its documentation for any purpose and without
# fee is hereby granted, provided that this copyright
# notice appears in all copies.  The University of California
# makes no representations about the suitability of this
# software for any purpose.  It is provided "as is" without
# express or implied warranty.
#

# Copyright 1996

# Slight modifications to and adoption to Tk4.0 were made to this
# fileselectionbox code by Lakshmi Sastry, Rutherford Appleton Laboratory,
# chilton, Didcot, OXON, OX11 0QX, UK.

# You can now type in a non-existing file name as well. This file name is
# returned for the application to open a new file to write to 

# AGOCG Tcl/Tk Cookbook
# Authors

# Lakshmi Sastry
# Computing and Information Systems Department
# Rutherford Appleton Laboratory, Chilton, Didcot. OX11 0QX
# lakshmi.sastry@rl.ac.uk

#                         and

# Venkat VSS Sastry
# Department of Applied Mathematics and Operational Research
# Cranfield University, RMCS Shrivenham, Swindon, SN6 8LA
# sastry@rmcs.cran.ac.uk

# Permission to use, copy, modify, and distribute this
# software and its documentation for any purpose and without
# fee is hereby granted, provided that this copyright
# notice appears in all copies.
  
# The authors, RAL, RMCS Shrivenham, Cranfield University and AGOCG
# make no representations about the suitability of this
# software for any purpose.  It is provided "as is" without
# express or implied warranty. Likewise they accept no responsibility
# whatsoever for any public domain software modules used (which are
# hereby acknowledged) in this software 


# names starting with "fileselect" are reserved by this module
# no other names used.

# use the "option" command for further configuration

option add *Listbox*font \
    "-*-helvetica-medium-r-normal-*-12-*-*-*-p-*-iso8859-1" startupFile
option add *Entry*font \
    "-*-helvetica-medium-r-normal-*-12-*-*-*-p-*-iso8859-1" startupFile
option add *Label*font \
    "-*-helvetica-medium-r-normal-*-12-*-*-*-p-*-iso8859-1" startupFile


# this is the default proc  called when "OK" is pressed
# to indicate yours, give it as the first arg to "fileselect"

proc fileselect.default.cmd {f} {
global fileselect
set fileselect(selectedfile) $f
#puts stderr "selected file $f"
 
}


# this is the default proc called when error is detected
# indicate your own pro as an argument to fileselect

proc fileselect.default.errorHandler {errorMessage} {
    puts stdout "error: $errorMessage"
    catch { cd ~ }
}

# this is the proc that creates the file selector box

proc fileselect {
    {cmd fileselect.default.cmd} 
    {purpose "Open file:"} 
    {w .fileSelectWindow} 
    {errorHandler fileselect.default.errorHandler}} {

    catch {destroy $w}

    toplevel $w
    grab $w
    wm title $w "Select File"


    # path independent names for the widgets
    global fileselect
    global selected
    set fileselect(entry) $w.file.eframe.entry
    set fileselect(list) $w.file.sframe.list 
    set fileselect(scroll) $w.file.sframe.scroll
    set fileselect(ok) $w.bframe.okframe.ok
    set fileselect(cancel) $w.bframe.cancel
    set fileselect(dirlabel) $w.file.dirlabel

    # widgets
    frame $w.file -bd 10 
    frame $w.bframe -bd 10
    pack append $w \
        $w.file {left filly} \
        $w.bframe {left expand frame n}

    frame $w.file.eframe
    frame $w.file.sframe
    label $w.file.dirlabel -anchor e -width 24 -text [pwd] 

    pack append $w.file \
        $w.file.eframe {top frame w} \
	$w.file.sframe {top fillx} \
	$w.file.dirlabel {top frame w}


    label $w.file.eframe.label -anchor w -width 24 -text $purpose
    entry $w.file.eframe.entry -relief sunken 

    pack append $w.file.eframe \
		$w.file.eframe.label {top expand frame w} \
                $w.file.eframe.entry {top fillx frame w} 


    scrollbar $w.file.sframe.yscroll -relief sunken \
	 -command "$w.file.sframe.list yview"
    listbox $w.file.sframe.list -relief sunken -selectmode single \
	-yscroll "$w.file.sframe.yscroll set" 
    #$fileselect(list) configure -selectmode single
    pack append $w.file.sframe \
        $w.file.sframe.yscroll {right filly} \
 	$w.file.sframe.list {left expand fill} 

    # buttons
    frame $w.bframe.okframe -borderwidth 2 -relief sunken
 
    button $w.bframe.okframe.ok -text OK -relief raised -padx 10 \
        -command "fileselect.ok.cmd $w $cmd $errorHandler"

    button $w.bframe.cancel -text cancel -relief raised -padx 10 \
        -command "fileselect.cancel.cmd $w"
    pack append $w.bframe.okframe $w.bframe.okframe.ok {padx 10 pady 10}

    pack append $w.bframe $w.bframe.okframe {expand padx 20 pady 20}\
                          $w.bframe.cancel {top}

    # Fill the listbox with a list of the files in the directory (run
    # the "/bin/ls" command to get that information).
    # to not display the "." files, remove the -a option and fileselect
    # will still work
 
    $fileselect(list) insert end ".."
    foreach i [exec /bin/ls -a [pwd]] {
        if {[string compare $i "."] != 0 && \
	    [string compare $i ".."] != 0 } {
            $fileselect(list) insert end $i
        }
    }

   # Set up bindings for the browser.
    bind $fileselect(entry) <Return> {eval $fileselect(ok) invoke} 
    bind $fileselect(entry) <Control-c> {eval $fileselect(cancel) invoke}

    bind $fileselect(list) <Button-1> {
        # puts stderr "button 1 release"
	set x [$fileselect(list) curselection]
	$fileselect(entry) delete 0 end
	$fileselect(entry) insert 0 [%W get [%W nearest %y]]
    }

    bind $fileselect(list) <Key> {
	set x [$fileselect(list) curselection]
        $fileselect(entry) delete 0 end
	$fileselect(entry) insert 0 [%W get [%W nearest %y]]
    }

    bind $fileselect(list) <Double-ButtonPress-1> {
        # puts stderr "double button 1"
       	set x [$fileselect(list) curselection]
	$fileselect(entry) delete 0 end
	$fileselect(entry) insert 0 [%W get [%W nearest %y]]
	$fileselect(ok) invoke
    }

    bind $fileselect(list) <Return> {
	set x [$fileselect(list) curselection]
	$fileselect(entry) delete 0 end
	$fileselect(entry) insert 0 [%W get [%W nearest %y]]
	$fileselect(ok) invoke
    }

    # set kbd focus to entry widget

    focus $fileselect(entry)

}


# auxiliary button procedures

proc fileselect.cancel.cmd {w} {
    # puts stderr "Cancel"
    destroy $w
}

proc fileselect.ok.cmd {w cmd errorHandler} {
    global fileselect
   global selected
    set selected [$fileselect(entry) get]
        # some nasty file names may cause "file isdirectory" to return an error
    set sts [catch { 
	file isdirectory $selected
    }  errorMessage ]

    if { $sts != 0 } then {
	$errorHandler $errorMessage
	destroy $w
	return

    }

    # clean the text entry and prepare the list
      $fileselect(entry) delete 0 end
      $fileselect(list) delete 0 end
      $fileselect(list) insert end ".."

    # perform globbing on the selection. 
    # If globing returns an error (no match) check if a non-null name is
    # entered. If name string is non-empty return it as a new file name
    # else give an error message.
    # If resulting list length > 1, put the list on the file listbox and return
    # If globing expands to a list of filenames in multiple directories,
    # the indicated regexp is invalid and the error handler is called instead.
set globlist 0

    set sts [catch {
	set globlist [glob [list $selected]]
    } errorMessage ]

    if { $sts != 0 } then {
	if { [llength $globlist] == 1 } {
		destroy $w
		$cmd $selected
		return 
	} else {

	$errorHandler $errorMessage
	destroy $w
	return

   	 }

	
    } 

    if {[llength $globlist] > 1} {
	if {[regexp "/" $globlist] != 0} {
	    $errorHandler [list "Invalid regular expression, " $selected, "."]
	    destroy $w
	    return
	}
	foreach i $globlist {
	    if {[string compare $i "."] != 0 && \
		[string compare $i ".."] != 0} {
		$fileselect(list) insert end $i
	    }
	}
	return
    }

    # selection may be a directory. Expand it.

    if {[file isdirectory $selected] != 0} {
	cd $selected
	set dir [pwd]
	$fileselect(dirlabel) configure -text $dir

#	foreach i [exec /bin/ls -a $dir] {
#	    if {[string compare $i "."] != 0 && \
#		[string compare $i ".."] != 0} {
#		$fileselect(list) insert end $i
#	    }
	}
	return
    }

    destroy $w
    $cmd $selected
	
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
视频一区二区欧美| 欧美日韩www| 欧美一区二区女人| 一区二区中文视频| 国产美女一区二区三区| 欧美日韩精品一区二区三区四区| 久久久久久一二三区| 五月综合激情网| 成人高清视频在线| 国产三级一区二区| 中文字幕永久在线不卡| 韩国成人在线视频| 91精品中文字幕一区二区三区| 亚洲欧美视频在线观看| 国产传媒一区在线| 久久亚洲一区二区三区四区| 青草av.久久免费一区| 欧美日韩在线三区| 一级精品视频在线观看宜春院 | 国产精品天美传媒| 男男gaygay亚洲| 欧美日韩国产一区| 亚洲chinese男男1069| thepron国产精品| 国产精品亲子乱子伦xxxx裸| 国产一区二区三区观看| 精品国产1区二区| 极品美女销魂一区二区三区| 精品入口麻豆88视频| 男女性色大片免费观看一区二区| 欧美日韩精品综合在线| 婷婷六月综合亚洲| 欧美精品一二三| 青青草原综合久久大伊人精品优势| 欧美日韩在线播放三区四区| 亚洲综合在线视频| 欧美日韩国产免费| 日本午夜一本久久久综合| 91精品国产欧美一区二区18| 奇米亚洲午夜久久精品| 久久影院午夜论| 国产99久久久国产精品潘金网站| 国产亚洲一区二区在线观看| 国产91在线观看丝袜| 亚洲视频一二三区| 色婷婷国产精品综合在线观看| 一区二区三区国产精华| 欧美日韩国产一区| 精品影视av免费| 国产精品三级久久久久三级| 色又黄又爽网站www久久| 亚洲午夜私人影院| 日韩精品一区二区在线观看| 国产不卡在线视频| 一区二区三区四区不卡在线| 欧美三级视频在线观看| 激情五月婷婷综合网| 国产精品短视频| 欧美绝品在线观看成人午夜影视| 捆绑变态av一区二区三区| 久久久美女毛片| 91国偷自产一区二区三区成为亚洲经典| 亚洲电影中文字幕在线观看| 欧美精品一区二区三区高清aⅴ| 成人精品一区二区三区四区| 一个色妞综合视频在线观看| 精品国产一区二区在线观看| 99精品国产视频| 九九精品视频在线看| 亚洲激情五月婷婷| 欧美精品一区二区三区蜜桃| 色狠狠综合天天综合综合| 久久99精品视频| 亚洲男同性视频| 久久先锋资源网| 欧美卡1卡2卡| 一本一本久久a久久精品综合麻豆| 青椒成人免费视频| 一区二区三区国产精华| 国产亚洲综合性久久久影院| 欧美巨大另类极品videosbest| 国产91在线观看| 日本在线不卡一区| 亚洲欧美日韩国产另类专区| 欧美精品一区二区三区视频| 欧美日韩国产精品成人| 99国产一区二区三精品乱码| 欧美午夜片在线看| 豆国产96在线|亚洲| 奇米影视一区二区三区小说| 亚洲一区二区三区激情| 国产精品不卡一区| 久久无码av三级| 日韩三级伦理片妻子的秘密按摩| 色天使色偷偷av一区二区| 懂色av一区二区三区蜜臀| 国精产品一区一区三区mba视频 | 国产视频一区二区三区在线观看| 欧美日韩精品免费| 在线观看视频91| 色综合久久天天| 99在线视频精品| 成人午夜激情片| 粉嫩高潮美女一区二区三区 | 国产日韩v精品一区二区| 在线成人免费视频| 欧美少妇一区二区| 欧美亚洲高清一区| 日本电影亚洲天堂一区| 成人一级黄色片| 国产91高潮流白浆在线麻豆 | 国产日韩精品一区二区三区在线| 精品国产乱码久久久久久浪潮| 91精品在线一区二区| 91精品国产综合久久蜜臀| 91麻豆精品国产91久久久使用方法 | 日韩中文字幕麻豆| 午夜电影一区二区三区| 午夜精品视频一区| 无码av免费一区二区三区试看 | 色婷婷一区二区| 欧美四级电影网| 欧美日韩精品欧美日韩精品一综合| 色综合 综合色| 欧美人牲a欧美精品| 欧美精品v国产精品v日韩精品 | 欧美久久久一区| 精品久久久久久久一区二区蜜臀| 精品少妇一区二区三区日产乱码| 欧美精品一区二区精品网| 久久网站热最新地址| 国产精品国模大尺度视频| 亚洲黄色免费电影| 日本欧美大码aⅴ在线播放| 经典三级视频一区| 99精品国产91久久久久久| 欧美日韩激情在线| 久久免费偷拍视频| 亚洲免费观看在线观看| 日本成人在线电影网| 国产成人av电影在线观看| jlzzjlzz亚洲女人18| 欧美丰满少妇xxxxx高潮对白| 欧美电影免费观看高清完整版在线| 久久婷婷成人综合色| 亚洲精品自拍动漫在线| 人人精品人人爱| 99久久99久久精品免费观看| 欧美日韩成人在线一区| 国产农村妇女精品| 婷婷综合在线观看| 成人激情动漫在线观看| 欧美丰满一区二区免费视频 | 久久免费看少妇高潮| 一级日本不卡的影视| 韩国成人福利片在线播放| 91福利在线观看| 亚洲精品一区在线观看| 亚洲一卡二卡三卡四卡| 国产白丝精品91爽爽久久| 欧美理论电影在线| 国产精品国产三级国产aⅴ无密码 国产精品国产三级国产aⅴ原创 | 成人黄页在线观看| 日韩欧美一二三| 亚洲猫色日本管| 国产成人综合在线播放| 91精品国产综合久久小美女| 亚洲色图都市小说| 国产在线国偷精品免费看| 欧美精选在线播放| 亚洲欧美成人一区二区三区| 国内精品免费在线观看| 欧美日韩一区二区三区免费看| 欧美国产精品久久| 紧缚捆绑精品一区二区| 欧美日韩美少妇| 一区二区成人在线观看| 99久久婷婷国产综合精品电影 | 欧美精品一区二区三区视频| 五月天激情综合| 欧美在线观看一区| 亚洲精品视频在线看| 99国产精品国产精品毛片| 国产亚洲视频系列| 蜜桃精品视频在线| 91麻豆精品91久久久久同性| 亚洲成人福利片| 欧美性生活大片视频| 亚洲男人天堂av网| 99re视频这里只有精品| 中文字幕视频一区二区三区久| 国产麻豆成人精品| 久久久青草青青国产亚洲免观| 老司机一区二区| 久久综合九色欧美综合狠狠| 精品亚洲成av人在线观看| 精品国产免费视频| 国产福利一区二区| 亚洲国产精品成人综合| 成人免费看的视频|