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

📄 multiview.tcl

📁 This Source-Navigator, an IDE for C/C++/Fortran/Java/Tcl/PHP/Python and a host of other languages.
💻 TCL
📖 第 1 页 / 共 5 页
字号:
    }    method EditObject {{scope ""} {sym ""} {cls ""} {file ""} {from ""} {type\      ""} {prm ""} {to ""} {always 1}} {        global sn_sep        #to look in the database, use sn_sep        set lbl [string trim "${cls}${sn_sep}${sym}" " \t${sn_sep}"]        if {${lbl} == "" && ${file} == ""} {            bell            return        }        #we must try to find the correct symbol, so we have to        #accept the parameter list also.        set cnt [read_matched_from_db "" ${scope} -exact ${lbl} ${type} ${prm}\          ${file} ${from} ${to} 0]        if {${cnt} == "" && ${file} == ""} {            set cnt [read_matched_from_db "" ${scope} -exact ${lbl}]        }        if {${cnt} != ""} {            set file [lindex [split [lindex ${cnt} 0] \t] 4]            set from [lindex [split [lindex ${cnt} 0] \t] 5]        }        if {${file} != ""} {            #use blank as separator            set lbl [string trim "${cls} ${sym}"]            sn_edit_file [list 0 ${lbl} ${scope}] ${file} ${from} 1        } else {            bell            return        }    }    #####################################################    # X reference    #####################################################    method AddXReference {nb page} {        global sn_options	itk_component add xref_page {	    ${nb} subwidget ${page}	} { }	itk_component add xrefpaned {	    tixPanedWindow $itk_component(xref_page).paned\		    -paneborderwidth 0\		    -orientation $sn_options(def,window-alighment)	} { }	itk_component add xrefpane {	    $itk_component(xrefpaned) add xref	} { }	itk_component add xref {	    XRef& $itk_component(xrefpane).xref\		    -symbols $itk_component(symbolcombo)\		    -symbols_filter ${SymbolsFilter}\		    -menu $itk_component(xref_menu)\		    -toolbar $itk_component(toolbar)\		    -message_var [itcl::scope message]\		    -doubleclickcommand [itcl::code ${this} EditObject] \		    -parent ${this}	} { }        pack $itk_component(xref) -fill both -expand y        pack $itk_component(xrefpaned) -fill both -expand y        lappend AvailTools $itk_component(xref)	# Just creating it, might not want to use it just yet.	$itk_component(xref) deactivate    }    method RaiseXReference {} {        Activate $itk_component(xref_page) $itk_component(xrefpaned)\		$itk_component(xrefpane) $itk_component(xref)    }    #####################################################    # Include    #####################################################    method AddInclude {nb page} {        global sn_options	itk_component add include_page {	    ${nb} subwidget ${page}	} { }	itk_component add includepaned {	    tixPanedWindow $itk_component(include_page).paned\		    -paneborderwidth 0\		    -orientation $sn_options(def,window-alighment)	} { }	itk_component add includepane {	    $itk_component(includepaned) add inc	} { }        itk_component add include {	    Include& $itk_component(includepane).incbr\		    -symbols $itk_component(symbolcombo)\		    -symbols_filter ${SymbolsFilter}\		    -menu $itk_component(include_menu)\		    -toolbar $itk_component(toolbar)\		    -mesg_area $itk_component(message) \		    -parent $this	} { }        pack $itk_component(include) -fill both -expand y        pack $itk_component(includepaned) -fill both -expand y        lappend AvailTools $itk_component(include)	# Just creating it, might not want to use it just yet.	$itk_component(include) deactivate    }    method RaiseInclude {} {        Activate $itk_component(include_page) $itk_component(includepaned)\		$itk_component(includepane) $itk_component(include)    }    #####################################################    # Retriever    #####################################################    method AddRetriever {nb page} {        global sn_options	itk_component add retriever_page {	    ${nb} subwidget ${page}	} { }	itk_component add retrieverpaned {	    tixPanedWindow $itk_component(retriever_page).paned\		    -paneborderwidth 0\		    -orientation $sn_options(def,window-alighment)	} { }	itk_component add retrieverpane {	    $itk_component(retrieverpaned) add retr	} { }        itk_component add retriever {	    Retr& $itk_component(retrieverpane).retr\		    -symbols $itk_component(symbolcombo)\		    -symbols_filter ${SymbolsFilter}\		    -menu RetrieverMenu\		    -toolbar $itk_component(toolbar)\		    -mesg_area $itk_component(message) \		    -parent $this	} { }        pack $itk_component(retriever) -fill both -expand y        pack $itk_component(retrieverpaned) -fill both -expand y        lappend AvailTools $itk_component(retriever)	# Just creating it, might not want to use it just yet.	$itk_component(retriever) deactivate    }    method RaiseRetriever {} {        Activate $itk_component(retriever_page) $itk_component(retrieverpaned)\		$itk_component(retrieverpane) $itk_component(retriever)    }    method retr {} {        return $itk_component(retriever)    }    #####################################################    # Grep    #####################################################    method AddGrep {nb page} {        global sn_options	itk_component add grep_page {	    ${nb} subwidget ${page}	} {}	itk_component add greppaned {	    tixPanedWindow $itk_component(grep_page).paned \		    -paneborderwidth 0 \		    -orientation $sn_options(def,window-alighment)	} {}        itk_component add greppane {	    $itk_component(greppaned) add grep	}        itk_component add grep {	    Grep $itk_component(greppane).grep \		    -symbols $itk_component(symbolcombo) \		    -symbols_filter ${SymbolsFilter} \		    -menu GrepMenu \		    -toolbar $itk_component(toolbar) \		    -mesg_area $itk_component(message) \		    -parent $this	} {}        pack $itk_component(grep) -fill both -expand y        pack $itk_component(greppaned) -fill both -expand y        lappend AvailTools $itk_component(grep)	# Just creating it, might not want to use it just yet.	$itk_component(grep) deactivate    }    method RaiseGrep {} {        Activate $itk_component(grep_page) $itk_component(greppaned)\		$itk_component(greppane) $itk_component(grep)    }    #####################################################    # Make    #####################################################    # FIXME: This currently isn't used, but it should probably    #        be used (at some point).    method AddMake {nb page} {        global sn_options        itk_component add make_page {	    ${nb} subwidget ${page}	} { }	itk_component add makepaned {	    tixPanedWindow $itk_component(make_page).paned\		    -paneborderwidth 0\		    -orientation $sn_options(def,window-alighment)	} { }	itk_component add makepane {	    $itk_component(makepaned) add make	} { }        itk_component add make {	    Make $itk_component(makepane).make\		    -symbols $itk_component(symbolcombo)\		    -symbols_filter ${SymbolsFilter}\		    -menu MakeMenu\		    -toolbar $itk_component(toolbar)\		    -mesg_area $itk_component(message)	} { }        pack $itk_component(make) -fill both -expand y        pack $itk_component(makepaned) -fill both -expand y        lappend AvailTools $itk_component(make)    }    method RaiseMake {} {        Activate $itk_component(make_page) $itk_component(makepaned)\		$itk_component(makepane) $itk_component(make)    }    method AddMenu {} {        global sn_options        set state normal	itk_component add menu {	    menu $itk_component(hull).menu -tearoff 0	} {}        ## File menu        ####################		itk_component add file_menu {	    menu $itk_component(menu).file -tearoff 0 -postcommand\		    [itcl::code ${this} file_post $itk_component(menu).file]	} {}        $itk_component(file_menu) configure -font $sn_options(def,layout-font)        $itk_component(menu) add cascade -label [get_indep String EditFile]\		-menu $itk_component(file_menu) -underline [get_indep Pos EditFile]        $itk_component(file_menu) add command\		-label [get_indep String EditNewFile]\		-underline [get_indep Pos EditNewFile] -accelerator "Ctrl+N"\		-command [itcl::code ${this} file_new]        $itk_component(file_menu) add command\		-label [get_indep String Open]\		-underline [get_indep Pos Open] -accelerator "Ctrl+O"\		-command [itcl::code ${this} file_open]        $itk_component(file_menu) add separator        #Add project menu        AddProjectMenuEntries $itk_component(file_menu) ${this} 1        $itk_component(file_menu) add separator        #File commands        $itk_component(file_menu) add command\		-accelerator "Ctrl+S"\		-label [get_indep String EditSave]\		-underline [get_indep Pos EditSave]\		-command "[itcl::code ${this} file_save]"        $itk_component(file_menu) add command\		-label [get_indep String EditSaveFileAs]\		-underline [get_indep Pos EditSaveFileAs]\		-command [itcl::code ${this} file_saveas]        $itk_component(file_menu) add command\		-accelerator "$sn_options(sys,alt-accelpref)+S"\		-label [get_indep String EditFastSave]\		-underline [get_indep Pos EditFastSave]\		-command "[itcl::code ${this} file_fastsave]"        $itk_component(file_menu) add command\		-accelerator "$sn_options(sys,alt-accelpref)+A"\		-label [get_indep String EditSaveAll]\		-underline [get_indep Pos EditSaveAll]\		-command "[itcl::code ${this} file_saveall]"        $itk_component(file_menu) add command\		-label [get_indep String Revert]\		-underline [get_indep Pos Revert]\		-command [itcl::code ${this} file_revert]        $itk_component(file_menu) add separator        $itk_component(file_menu) add command\		-label [get_indep String Print]\		-accelerator "Ctrl+P" -underline [get_indep Pos Print]\		-command [itcl::code ${this} file_print]        $itk_component(file_menu) add separator        #close window        $itk_component(file_menu) add command\		-command [itcl::code ${this} windows_close $itk_component(file_menu)]\		-label [get_indep String WindowsClose] -accelerator "Ctrl+W"\		-underline [get_indep Pos WindowsClose]        $itk_component(file_menu) add command -label [get_indep String Exit]\		-underline [get_indep Pos Exit] -accelerator "Ctrl+Q"\		-command " sn_exit "        ## Edit menu        #############	itk_component add edit_menu {	    menu $itk_component(menu).edit -tearoff 0\		    -postcommand [itcl::code ${this} edit_post $itk_component(menu).edit]	} {}        $itk_component(edit_menu) configure -font $sn_options(def,layout-font)        $itk_component(menu) add cascade -label [get_indep String EditEdit]\		-menu $itk_component(edit_menu) -underline [get_indep Pos EditEdit]        $itk_component(edit_menu) add command\		-label [get_indep String EditUndo]\		-underline [get_indep Pos EditUndo] -accelerator "Ctrl+Z"\		-command [itcl::code ${this} edit_undo] -state ${state}        $itk_component(edit_menu) add command\		-label [get_indep String EditRedo]\		-underline [get_indep Pos EditRedo] -accelerator "Ctrl+Y"\		-command [itcl::code ${this} edit_redo] -state ${state}        $itk_component(edit_menu) add separator        $itk_component(edit_menu) add command\		-label [get_indep String EditCut]\		-underline [get_indep Pos EditCut] -accelerator "Ctrl+X"\		-command [itcl::code ${this} edit_cut] -state ${state}        $itk_component(edit_menu) add command\		-label [get_indep String EditCopy]\		-underline [get_indep Pos EditCopy] -accelerator "Ctrl+C"\		-command [itcl::code ${this} edit_copy]        $itk_component(edit_menu) add command\		-label [get_indep String EditPaste]\		-underline [get_indep Pos EditPaste] -accelerator "Ctrl+V"\		-state ${state}\		-command [itcl::code ${this} edit_paste]        $itk_component(edit_menu) add command\		-label [get_indep String EditDelete]\		-underline [get_indep Pos EditDelete] -accelerator "Ctrl+D"\		-command [itcl::code ${this} edit_delete] -state ${state}        $itk_component(edit_menu) add command\		-label [get_indep String SelectAll]\		-underline [get_indep Pos SelectAll]\		-command [itcl::code ${this} edit_selectall]        $itk_component(edit_menu) add command\		-label [get_indep String EditClear]\		-underline [get_indep Pos EditClear]\		-command [itcl::code ${this} edit_clear]\		-state ${state}        $itk_component(edit_menu) add separator        $itk_component(edit_menu) add command\		-label [get_indep String EditInsertFile]\		-underline [get_indep Pos EditInsertFile]\		-command [itcl::code ${this} edit_insert]        $itk_component(edit_menu) add separator        $itk_component(edit_menu) add command\		-label [get_indep String EditIdent]\		-underline [get_indep Pos EditIdent] -accelerator "Ctrl+>"\		-command "[itcl::code ${this} edit_indent indent]"        $itk_component(edit_menu) add command\		-label [get_indep String EditOutdent]\		-underline [get_indep Pos EditOutdent] -accelerator "Ctrl+<"\		-command "[itcl::code ${this} edit_indent outdent]"        $itk_component(edit_menu) add separator

⌨️ 快捷键说明

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