⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ased.tcl

📁 是TCL的另外一个编译(解释)器
💻 TCL
字号:
#!/bin/sh
#\
exec wish "$0" ${1+"$@"}

##############################################################################
# ased.tcl -
#
# This is the startfile for
#
# ASED Tcl/Tk IDE Version 2.0.9.9
#
# Copyright (C) 1999-2002  Andreas Sievers andreas.sievers@t-online.de
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
##############################################################################

package require Tk 8.1

global ASEDsRootDir
global search_var_string search_option_icase search_option_area search_option_match search_option_blink
global EditorData
global clock_var
global textChanged
global conWindow
global langArray

# set ASEDsRootDir [file dirname [info script]]
if { [file type $argv0] == "link" } {
    set ASEDsRootDir [file dirname [file readlink $argv0]]
} else {
    set ASEDsRootDir [file dirname $argv0]
}



set path_to_BWidget [file join $ASEDsRootDir BWidget-1.4.1]
lappend auto_path $path_to_BWidget

package require -exact BWidget 1.4.1
Bitmap::get cut
# this used for loading Bitmap namespace into the interpetator
namespace eval Bitmap {
    lappend path [file join $ASEDsRootDir images]
}

namespace eval Editor {
    variable initDone 0
    variable _wfont
    variable notebook
    variable list_notebook
    variable con_notebook
    variable pw1
    variable pw2
    variable procWindow
    variable markWindow
    variable mainframe
    variable status
    variable prgtext
    variable prgindic
    variable font
    variable font_name
    variable Font_var
    variable FontSize_var
    variable toolbar1  1
    variable toolbar2  0
    variable showConsoleWindow 1
    variable sortProcs 1
    variable showProc 1
    variable checkNestedProc 1
    variable showProcWindow 1
    variable search_var
    variable search_combo
    variable current
    variable last
    variable text_win
    variable index_counter 0
    variable index
    variable slaves
    variable startTime [clock seconds]
    variable options
    variable lineNo
    variable lineEntryCombo
    variable toolbarButtons
    variable searchResults
    variable procMarks
    variable treeMenu
    variable textMenu
    variable serverUp 0
    variable newFileCount 1
}

source [file join $ASEDsRootDir i18n.tcl]
source [file join $ASEDsRootDir create.tcl]
source [file join $ASEDsRootDir asedmain.tcl]
source [file join $ASEDsRootDir editor.tcl]
source [file join $ASEDsRootDir find.tcl]
source [file join $ASEDsRootDir repl.tcl]
source [file join $ASEDsRootDir undo.tcl]
source [file join $ASEDsRootDir asedcon.tcl]
source [file join $ASEDsRootDir manager.tcl]
source [file join $ASEDsRootDir tclparser.tcl]
source [file join $ASEDsRootDir fifDialog.tcl]



proc initASED {argc argv} {
    global tcl_platform
    global auto_path
    global EditorData
    global ASEDsRootDir 
    
    lappend auto_path ..
    
    option add *TitleFrame.font {helvetica 11 bold italic}
    if {"$tcl_platform(platform)" != "windows"} {
        option add *background grey userDefault
    }
    
    wm withdraw .
    wm title . "ASED Tcl/Tk-IDE"
    
    Editor::create
    BWidget::place . 0 0 center
    
    update idletasks
    if {[info exists EditorData(options,mainWinSize)]} {
        wm geom . $EditorData(options,mainWinSize)
        update
    }
    
    after idle {
        wm deiconify .
        raise .
        focus .
        set Editor::initDone 1
    }
    if {$argc >= 1} {
        set cursor [. cget -cursor]
        . configure -cursor watch
        update
        foreach filename $argv {
            if {[file exists $filename]} {
                Editor::openFile $filename
            } elseif {[file exists [file join $EditorData(options,workingDir) $filename]]} {
                Editor::openFile [file join $EditorData(options,workingDir) $filename]
            }
        }
        . configure -cursor $cursor
        update
    } else  {
        if {$EditorData(options,restoreSession)} {
            set cursor [. cget -cursor]
            . configure -cursor watch
            update
            foreach filename $EditorData(options,sessionList) {
                if {[file exists $filename]} {
                    Editor::openFile $filename
                } elseif {[file exists [file join $EditorData(options,workingDir) $filename]]} {
                    Editor::openFile [file join $EditorData(options,workingDir) $filename]
                }
                
            }
            catch {
                NoteBook::raise $Editor::notebook $EditorData(options,recentPage)
                $Editor::current(text) mark set insert $EditorData(options,recentPos)
                $Editor::current(text) see insert
                Editor::selectObject
            } info
            # tk_messageBox -message $info
            . configure -cursor $cursor
            update
        }
    }
    # source [file join $ASEDsRootDir displayWidgetPath.tcl]
}

initASED $argc $argv

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -