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

📄 sninit.tcl

📁 This Source-Navigator, an IDE for C/C++/Fortran/Java/Tcl/PHP/Python and a host of other languages.
💻 TCL
📖 第 1 页 / 共 4 页
字号:
                set sn_options(def,select-fg) black                set sn_options(def,select-bg) yellow            } else {                set sn_options(def,select-fg) white                set sn_options(def,select-bg) black            }        }        #select color for check- and radio-buttons        if {$tcl_platform(platform) == "windows"} {            set sn_options(def,checkbutton-select) white        } else {            set sn_options(def,checkbutton-select) Seagreen        }        #we use the same keybindings for unix&windows        set sn_options(sys,alt-traverse) "Shift-Control"        set sn_options(sys,alt-accelpref) "Ctrl+Shift"        if {$tcl_platform(platform) == "windows"} {            define_font global/balloon -family ansi            set sn_options(def,balloon-font) ansi            set sn_options(def,balloon-fg) SystemInfoText            set sn_options(def,balloon-bg) SystemInfoBackground        } else {            set sn_options(def,balloon-font)\              "-*-Helvetica-Medium-R-Normal--*-$sn_options(def,balloon-font-size)-*-*-*-*-iso8859-1"            set sn_options(def,balloon-fg) black            set sn_options(def,balloon-bg) lightyellow        }        #lines to draw between tree items        #dark blue        #set sn_options(def,canv-line-fg)        "#00008b"        set sn_options(def,canv-line-fg) black        #dark red        set sn_options(def,xref-used-by-fg) "#8b0000"        set sn_options(def,tree-select-line) red        #SeaGreen        set sn_options(def,xref-branch-fg) "#2e8b57"        #SeaGreen        set sn_options(def,xref-list-branch-fg) "#2e8b57"        #text editor        #external editor        set sn_options(def,edit-external-editor) ""        set sn_options(noname_file) "(noname)"        if {$tcl_platform(platform) == "windows"} {            # get font size from a system font.            set sys_font_info [font actual system]            set size [lindex ${sys_font_info} [expr ([lsearch ${sys_font_info}\              "-size"]+1)]]            set sn_options(def,edit-font) "{Courier} ${size}"            set sn_options(def,edit-fg) SystemWindowText            set sn_options(def,edit-bg) SystemWindow        } else {            set sn_options(def,edit-font) $sn_options(def,default-font)            set sn_options(def,edit-fg) black            set sn_options(def,edit-bg) white        }        set sn_options(def,color_fu) red        set sn_options(def,color_fd) "indian red"        set sn_options(def,color_su) $sn_options(def,color_fu)        set sn_options(def,color_rem) SeaGreen        #auto-reparse by saving or opening a file.        set sn_options(def,auto-reparse) 1        #auto-save a file when toggling to another location.        #Files are then automatically saved without prompt.        set sn_options(def,auto-save) 0        #use by default the normal editor color for strings, customer        #could change it.        #using magenta as string color        #IMPORTANT: This variables are accessed on C/Level in exint.c        #IF YOU CHANGE THIS NAMES, YOU HAVE TO UPDATE IT IN exint.c        set sn_options(def,color_str) "#7d007d"        set sn_options(def,color_key) blue        set sn_options(def,color_cont) blue        set sn_options(def,color_cl) maroon        set sn_options(def,color_t) "indian red"        set sn_options(def,color_e) gold        set sn_options(def,color_ec) "sky blue"        set sn_options(def,color_md) $sn_options(def,color_fd)        set sn_options(def,color_fr) "indian red"        set sn_options(def,color_mi) $sn_options(def,color_fu)        set sn_options(def,color_iv) brown        set sn_options(def,color_gv) goldenrod        set sn_options(def,color_lv) turquoise3        set sn_options(def,color_con) goldenrod        set sn_options(def,color_com) coral        set sn_options(def,color_cov) "indian red"        set sn_options(def,color_ma) "dark orange"        set sn_options(def,bracketmatch-bg) DodgerBlue        #default editor settings (global)        set sn_options(def,edit-wrap) none        set sn_options(def,edit-rightmouse-action) menu        set sn_options(def,edit-bracket-delay) 500        set sn_options(def,edit-more-buttons) 0        #editor settings that affect the current project, but could be        #stored as default for new projects.        set sn_options(def,edit-create-bak) 0        set sn_options(def,edit-indentwidth) 8        set sn_options(def,edit-tabstop) 8        set sn_options(def,edit-overwrite-mode) 0        set sn_options(def,edit-file-translation) "keep"        #insert Spaces on Tabs        set sn_options(def,edit-tab-inserts-spaces) 0        set sn_options(def,edit-mark-current-position) 1        #editor synchronization        set Switch_Is_Enabled 1        #class hierarchy&browser        #left to right        set sn_options(def,ctree-view-order) 0        set sn_options(def,ctree-layout) tree        set sn_options(def,ctree-vertspace) 60        set sn_options(def,ctree-horizspace) 10        if {$tcl_platform(platform) == "windows"} {            # get font size from a system font.            # use printer friendly fonts for MS Windows            set sys_font_info [font actual system]            set size [lindex ${sys_font_info} [expr ([lsearch ${sys_font_info}\              "-size"]+1)]]            set sn_options(def,abstract-font) "{Courier} ${size} bold"            set sn_options(def,ctree-font) "{Courier} ${size}"        } else {            set sn_options(def,abstract-font) $sn_options(def,bold-font)            set sn_options(def,ctree-font) $sn_options(def,default-font)        }        #selecting a member goto Def. or Impl.        set sn_options(def,class-goto-imp) "imp"        set sn_options(def,class-font) $sn_options(def,default-font)        set sn_options(def,public-font) $sn_options(def,default-font)        set sn_options(def,protected-font) $sn_options(def,default-font)        set sn_options(def,private-font) $sn_options(def,default-font)        set sn_options(def,class-orientation) vertical        set sn_options(def,members-order) first        #include        set sn_options(def,include_font) $sn_options(def,default-font)        #left to right        set sn_options(def,include-disporder) 0        set sn_options(def,include-layout) tree        set sn_options(def,include-vertspace) 60        set sn_options(def,include-horizspace) 10        #force SN to look for the location of included headers        set sn_options(def,include-locatefiles) 1        set sn_options(include-source-directories) ""        #xref        sn_add_option sys xref yes "logical" "sn_xref_option_trigger"        set sn_options(both,xref-create) "-x"        set sn_options(both,xref-locals) ""        set sn_options(def,xref-font) $sn_options(def,default-font)        set sn_options(def,xref-branch-font) $sn_options(def,default-font)        #left to right        set sn_options(def,xref-disp-order) 0        set sn_options(def,xref-layout) isi        set sn_options(def,xref-vertspace) 60        set sn_options(def,xref-horizspace) 10        set sn_options(def,edit-xref-highlight) 0        #bell after finished xref        set sn_options(def,xref-bell) 0        set sn_options(both,xref-accept-param) 0        set sn_options(both,xref-accept-static) 0        set sn_options(both,xref-disp-param) 0        set sn_options(both,xref-draw-rect) 0        #grep history        set sn_options(history,grep,file) ""        set sn_options(def,grep-font) $sn_options(def,default-font)        set sn_options(def,grep-found-font) $sn_options(def,default-font)        if {$sn_options(iscolor)} {            set sn_options(def,grep-found-fg) blue            set sn_options(def,grep-found-bg) white        } else {            set sn_options(def,grep-found-fg) black            set sn_options(def,grep-found-bg) white        }        #if the user wants to highlight all matches in an grep-editor        #combination.        set sn_options(def,grep-mark-all) 0        #networking        sn_add_option def html-viewer "netscape -remote openURL(%s)"        #option needs to be there for backward compatibility.        set sn_options(def,send-bugs-via-mail) 0        #make        sn_add_option both make-command "make"        set sn_options(make-lastdir) ""        #printer page format        if {[info exists env(TZ)] && [regexp {.*(WET|MET).*} $env(TZ)]} {            set sn_options(def,page-format) "A4"            # West and midle Europe        } else {            set sn_options(def,page-format) "Letter"        }        set sn_options(def,page-formats) [join {  {Letter 8.5 11 inch} \          {Legal 8.5 14 inch}  {A4 21 29.7 cm}  {A3 29.7 42 cm}  {A2 42 59.4\          cm} } ";"]        #printer colors        set sn_options(def,print-form-bg) White        set sn_options(def,print-form-fg) White        if {$tcl_platform(platform) == "windows"} {            sn_add_option def ascii-print-command {print}            #option not availiable on windows            set sn_options(def,print-command) ""            sn_add_option def browser-spacing 0 "integer"            set sn_options(def,null_dev) "NUL:"        } else {            sn_add_option def ascii-print-command {pr -h "%s" -l66 -o4 | lpr}            sn_add_option def browser-spacing 2 "integer"            sn_add_option def print-command "lpr"            set sn_options(def,null_dev) "/dev/null"        }        #database settings        set sn_options(db_files_prefix) ""        set sn_options(db_del_type) 0        # 1= soft-, 0=real delete        #default geometry        set sn_options(def,wm_geometry) 0        set sn_options(Scann_Files_At_Once) 50        set sn_options(def,canvas-tree-jump) 0        #scopes supported in SN.        set sn_options(def,ignored-directories) ""        set sn_options(def,wm-deiconify-withdraw) 0        # use 1 for window manager bug workaround.        #raise make window when it's finished.        set sn_options(def,make-raise) 1        set sn_options(def,balloon-undisp-delay) 5000        # in miliseconds        set sn_options(def,balloon-disp-delay) 500        # in miliseconds        if {$tcl_platform(platform) == "windows"} {            if {[info exists env(USERPROFILE)]} {                set sn_options(profile_dir) [file join $env(USERPROFILE) .sn]            } else {                set sn_options(profile_dir) [file join C:/ .sn]            }        } else {            set sn_options(profile_dir) [file join ${HOME} .sn]        }        sn_log "User profile directory <$sn_options(profile_dir)>"        set sn_projects_list(filename) [file join $sn_options(profile_dir)\          nav_projs.lst]        set sn_options(def,localhost) "127.0.0.1"        set sn_options(sys,builtin-highlighting) {c++ java tcl chill python}        set sn_options(sys,language-with-xref) {c++ java tcl fortran chill}        #######################################        ## new variables for multi functional #        #######################################        set sn_options(def,reuse-window) 1        set sn_options(def,window-alighment) vertical        set sn_options(def,window-switchable) 1        set sn_options(def,window-size) 65        #debugger settings        sn_add_option def gdb-command "insight"        set sn_options(gdb-program) ""        set sn_options(gdb-workdir) ""        set sn_options(gdb-xterm) ""        #macro files        set sn_options(macrofiles) ""        sn_add_option sys macrofile "" "string" sn_macrofiles_trigger        sn_add_option sys replace-macrofiles ""\          "string" sn_rep_macrofiles_trigger        #retriever flags        set sn_options(ignored_words) ""        set sn_options(donot_display) 0        #history for make        set sn_options(make_history_cmd) ""        set sn_options(make_history_dir) ""        #editor search/replace default parameters        set sn_options(search) ""        set sn_options(search,str) ""        set sn_options(search,nocase) "-nocase"        set sn_options(search,method) "-exact"        #history & history stack        set sn_history(stacksize) 20        set sn_history(size) 20        set sn_history(project_size) 10        set sn_history(scopes) {edit ctree class xref inc retr grep}        #levels of directories to add        set sn_options(def,scan-recursive) -1        #rcs        sn_add_option both rcs-type "rcs"        #default language        sn_add_option def language "english" "" "" "" {sn_language}        #default encoding        sn_add_option def system-encoding "iso8859-1"        sn_add_option def encoding "iso8859-1"        #default database permissions        set sn_options(both,db-perms) 0660        #add project file to be in read-only mode        sn_add_option "sys" project-file "" string sn_readonly_trigger "" "" yes        #export project directory to be in read-only mode        if {[catch {set curdir [pwd]}]} {            set curdir $env(HOME)        }        sn_add_option "sys" project-dir ${curdir} string sn_readonly_trigger\          "" "" yes        #export project name        sn_add_option "sys" project-name "" string sn_readonly_trigger "" "" yes        #to modify the parser extension list, marked        #as sys to be not saved (only dummy)        sn_add_option sys parser-ext "" "string" sn_parser_extension_trigger        #add a flag to reparse the project on startup (even in batchmode)        sn_add_option sys reparse no logical    }}catch {rename bgerror old_bgerror}proc bgerror {err} {    global sn_options    global errorInfo    global auto_path    # Be sure to release any grabs that might be present on the    # screen, since they could make it impossible for the user    # to interact with the stack trace.    if {[grab current .] != ""} {        grab release [grab current .]    }    sn_log "Error string: ${err}"    sn_log "Stack Trace: ${errorInfo}"    display_bug_report ${err} ${errorInfo}}# Replacement for sn_CreateInterp in sninit.c# Create a new interpreter and pass in the commands# to run in the new interpreterproc create_interp {cmds} {        # Create slave interp, we need to name the slave interp  # ourselves so that interp names are unique and do not get  # reused as slave interps are created and deleted. This  # makes it possible for an external application to track  # individual project interps when connected to sourcenav-main.  # FIXME: Yeah, I know, globals are evil!  global sn_interp_numslaves  if {! [info exists sn_interp_numslaves]} {

⌨️ 快捷键说明

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