[ Avaa Bypassed ]




Upload:

Command:

hmhc3928@13.59.68.167: ~ $
# -*- mode: TCL; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
#
#	$Id: Init.tcl,v 1.18 2008/02/28 04:35:16 hobbs Exp $
#
# Init.tcl --
#
#	Initializes the Tix library and performes version checking to ensure
#	the Tcl, Tk and Tix script libraries loaded matches with the binary
#	of the respective packages.
#
# Copyright (c) 1993-1999 Ioi Kim Lam.
# Copyright (c) 2000-2001 Tix Project Group.
# Copyright (c) 2004 ActiveState
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
namespace eval ::tix {
}

proc tixScriptVersion {}    { return $::tix_version }
proc tixScriptPatchLevel {} { return $::tix_patchLevel }

proc ::tix::Init {dir} {
    global tix env tix_library tcl_platform auto_path

    if {[info exists tix(initialized)]} {
	return
    }

    if {![info exists tix_library]} {
        # we're running from stand-alone module. 
        set tix_library ""
    } elseif {[file isdir $tix_library]} {
        if {![info exists auto_path] ||
            [lsearch $auto_path $tix_library] == -1} {
            lappend auto_path $tix_library
        }
    }

    # STEP 1: Version checking
    #
    #
    package require Tcl 8.4
    package require -exact Tix 8.4.3

    # STEP 2: Initialize file compatibility modules
    #

    foreach file {
	fs.tcl
	Tix.tcl		Event.tcl
	Balloon.tcl	BtnBox.tcl
	CObjView.tcl	ChkList.tcl
	ComboBox.tcl	Compat.tcl
	Console.tcl	Control.tcl
	DefSchm.tcl	DialogS.tcl
	DirBox.tcl	DirDlg.tcl
	DirList.tcl	DirTree.tcl
	DragDrop.tcl	DtlList.tcl
	EFileBox.tcl	EFileDlg.tcl
	FileBox.tcl	FileCbx.tcl
	FileDlg.tcl	FileEnt.tcl
	FloatEnt.tcl
	Grid.tcl	HList.tcl
	HListDD.tcl	IconView.tcl
	LabEntry.tcl	LabFrame.tcl
	LabWidg.tcl	ListNBk.tcl
	Meter.tcl	MultView.tcl
	NoteBook.tcl	OldUtil.tcl
	OptMenu.tcl	PanedWin.tcl
	PopMenu.tcl	Primitiv.tcl
	ResizeH.tcl	SGrid.tcl
	SHList.tcl	SListBox.tcl
	STList.tcl	SText.tcl
	SWidget.tcl	SWindow.tcl
	Select.tcl	Shell.tcl
	SimpDlg.tcl	StackWin.tcl
	StatBar.tcl	StdBBox.tcl
	StdShell.tcl	TList.tcl
	Tree.tcl
	Utils.tcl	VResize.tcl
	VStack.tcl	VTree.tcl
	Variable.tcl	WInfo.tcl
    } {
	uplevel \#0 [list source [file join $dir $file]]
    }

    # STEP 3: Initialize the Tix application context
    #
    tixAppContext tix

    # DO NOT DO THIS HERE !!
    # This causes the global defaults to be altered, which may not
    # be desirable.  The user can call this after requiring Tix if
    # they wish to use different defaults.
    #
    #tix initstyle

    # STEP 4: Initialize the bindings for widgets that are implemented in C
    #
    foreach w {
	HList TList Grid ComboBox Control FloatEntry
	LabelEntry ScrolledGrid ScrolledListBox
    } {
	tix${w}Bind
    }

    rename ::tix::Init ""
}

# tixWidgetClassEx --
#
#       This procedure is similar to tixWidgetClass, except it
#       performs a [subst] on the class declaration before evaluating
#       it. This gives us a chance to specify platform-specific widget
#       default without using a lot of ugly double quotes.
#
#       The use of subst'able entries in the class declaration should
#       be restrained to widget default values only to avoid producing
#       unreadable code.
#
# Arguments:
# name -	The name of the class to declare.
# classDecl -	Various declarations about the class. See documentation
#               of tixWidgetClass for details.

proc tixWidgetClassEx {name classDecl} {
    tixWidgetClass $name [uplevel [list subst $classDecl]]
}

#
# Deprecated tix* functions
#
interp alias {} tixFileJoin {} file join
interp alias {} tixStrEq {} string equal
proc tixTrue  {args} { return 1 }
proc tixFalse {args} { return 0 }
proc tixStringSub {var fromStr toStr} {
    upvar 1 var var
    set var [string map $var [list $fromStr $toStr]]
}
proc tixGetBoolean {args} {
    set len [llength [info level 0]]
    set nocomplain 0
    if {$len == 3} {
	if {[lindex $args 0] ne "-nocomplain"} {
	    return -code error "wrong \# args:\
		must be [lindex [info level 0] 0] ?-nocomplain? string"
	}
	set nocomplain 1
	set val [lindex $args 1]
    } elseif {$len != 2} {
	return -code error "wrong \# args:\
		must be [lindex [info level 0] 0] ?-nocomplain? string"
    } else {
	set val [lindex $args 0]
    }
    if {[string is boolean -strict $val] || $nocomplain} {
	return [string is true -strict $val]
    } elseif {$nocomplain} {
	return 0
    } else {
	return -code error "\"$val\" is not a valid boolean"
    }
}
interp alias {} tixVerifyBoolean {} tixGetBoolean
proc tixGetInt {args} {
    set len [llength [info level 0]]
    set nocomplain 0
    set trunc      0
    for {set i 1} {$i < $len-1} {incr i} {
	set arg [lindex $args 0]
	if {$arg eq "-nocomplain"} {
	    set nocomplain 1
	} elseif {$arg eq "-trunc"} {
	    set trunc 1
	} else {
	    return -code error "wrong \# args: must be\
		[lindex [info level 0] 0] ?-nocomplain? ?-trunc? string"
	}
    }
    if {$i != $len-1} {
	return -code error "wrong \# args: must be\
		[lindex [info level 0] 0] ?-nocomplain? ?-trunc? string"
    }
    set val [lindex $args end]
    set code [catch {expr {round($val)}} res]
    if {$code} {
	if {$nocomplain} {
	    return 0
	} else {
	    return -code error "\"$val\" cannot be converted to integer"
	}
    }
    if {$trunc} {
	return [expr {int($val)}]
    } else {
	return $res
    }
}
proc tixFile {option filename} {
    set len [string length $option]
    if {$len > 1 && [string equal -length $len $option "tildesubst"]} {
	set code [catch {file normalize $filename} res]
	if {$code == 0} {
	    set filename $res
	}
    } elseif {$len > 1 && [string equal -length $len $option "trimslash"]} {
	# normalize extra slashes
	set filename [file join $filename]
	if {$filename ne "/"} {
	    set filename [string trimright $filename "/"]
	}
    } else {
	return -code error "unknown option \"$option\",\
		must be tildesubst or trimslash"
    }
    return $filename
}

interp alias {} tixRaiseWindow {} raise
#proc tixUnmapWindow {w} { }

#
# if tix_library is not defined, we're running in SAM mode. ::tix::Init
# will be called later by the Tix_Init() C code.
#

if {[info exists tix_library]} {
    ::tix::Init [file dirname [info script]]
}

Filemanager

Name Type Size Permission Actions
bitmaps Folder 0755
html Folder 0755
pref Folder 0755
Balloon.tcl File 12.97 KB 0644
BtnBox.tcl File 2.61 KB 0644
CObjView.tcl File 7.56 KB 0644
ChkList.tcl File 4.97 KB 0644
ComboBox.tcl File 35.42 KB 0644
Compat.tcl File 870 B 0644
Console.tcl File 14.95 KB 0644
Control.tcl File 12.11 KB 0644
DefSchm.tcl File 2.94 KB 0644
DialogS.tcl File 4.2 KB 0644
DirBox.tcl File 5.3 KB 0644
DirDlg.tcl File 2.15 KB 0644
DirList.tcl File 6.9 KB 0644
DirTree.tcl File 8.76 KB 0644
DragDrop.tcl File 3.93 KB 0644
DtlList.tcl File 1002 B 0644
EFileBox.tcl File 11.12 KB 0644
EFileDlg.tcl File 1.68 KB 0644
Event.tcl File 5.11 KB 0644
FileBox.tcl File 14 KB 0644
FileCbx.tcl File 2.42 KB 0644
FileDlg.tcl File 2.13 KB 0644
FileEnt.tcl File 7.15 KB 0644
FloatEnt.tcl File 3.1 KB 0644
Grid.tcl File 21.16 KB 0644
HList.tcl File 17.72 KB 0644
HListDD.tcl File 4.39 KB 0644
IconView.tcl File 5.97 KB 0644
Init.tcl File 6.05 KB 0644
LabEntry.tcl File 2.09 KB 0644
LabFrame.tcl File 1.15 KB 0644
LabWidg.tcl File 3.86 KB 0644
ListNBk.tcl File 3.5 KB 0644
Meter.tcl File 3.04 KB 0644
MultView.tcl File 3.62 KB 0644
NoteBook.tcl File 6.02 KB 0644
OldUtil.tcl File 2.98 KB 0644
OptMenu.tcl File 9.17 KB 0644
PanedWin.tcl File 27.68 KB 0644
PopMenu.tcl File 5.37 KB 0644
Primitiv.tcl File 10.28 KB 0644
README.txt File 987 B 0644
ResizeH.tcl File 12.94 KB 0644
SGrid.tcl File 5.8 KB 0644
SHList.tcl File 3.7 KB 0644
SListBox.tcl File 6.97 KB 0644
STList.tcl File 2.37 KB 0644
SText.tcl File 3.09 KB 0644
SWidget.tcl File 9.52 KB 0644
SWindow.tcl File 6.75 KB 0644
Select.tcl File 7.04 KB 0644
Shell.tcl File 1.06 KB 0644
SimpDlg.tcl File 1.13 KB 0644
StackWin.tcl File 1.95 KB 0644
StatBar.tcl File 1.31 KB 0644
StdBBox.tcl File 1.62 KB 0644
StdShell.tcl File 1.15 KB 0644
TList.tcl File 17.59 KB 0644
Tix.tcl File 9.51 KB 0644
Tree.tcl File 4.57 KB 0644
Utils.tcl File 10.54 KB 0644
VResize.tcl File 4.95 KB 0644
VStack.tcl File 9.42 KB 0644
VTree.tcl File 4.31 KB 0644
Variable.tcl File 2.5 KB 0644
WInfo.tcl File 965 B 0644
fs.tcl File 3.9 KB 0644
libTix.so File 320.71 KB 0755
license.terms File 2.76 KB 0644
pkgIndex.tcl File 122 B 0644