📄 preferences.tcl
字号:
$sn_options(def,window-alighment) set aligns [list [get_indep String AlighmentHorizontal]\ [get_indep String AlighmentVertical]] Radio& ${win}.aligh \ -variable sn_options(opt_def,window-alighment) \ -labels ${aligns} \ -contents {horizontal vertical} \ -label [get_indep String SplitWindows] \ -labelunderline [get_indep Pos SplitWindows] \ -labelwidth ${xstep} pack ${win}.aligh -fill x -expand y -side top -padx ${padx}\ -pady ${pady} #New Windows set sn_options(opt_def,reuse-window) $sn_options(def,reuse-window) set sn_options(opt_def,window-switchable)\ $sn_options(def,window-switchable) CheckButton& ${win}.reuse \ -label [get_indep String CreateNewWindow] \ -labelunderline [get_indep Pos CreateNewWindow] \ -labelwidth ${xstep} \ -labels [list \ [get_indep String Reusable] \ [get_indep String Switchable] \ ] \ -balloons [list \ [get_indep String NewReusableINFO] \ [get_indep String NewSwitchableINFO] \ ] \ -variables [list \ sn_options(opt_def,reuse-window) \ sn_options(opt_def,window-switchable)] pack ${win}.reuse -side top -fill x -expand y -padx ${padx}\ -pady ${pady} #window size set sn_options(opt_def,window-size) $sn_options(def,window-size) set winsize ${win}.winsize Entry& ${winsize} \ -width 3 \ -labelwidth ${xstep} \ -label [get_indep String WindowSize] \ -underline [get_indep Pos WindowSize] \ -textvariable sn_options(opt_def,window-size) \ -balloon [get_indep String WindowSizeINFO] \ -expand n \ -filter natural pack ${winsize} -side top -anchor nw -fill x label ${winsize}.procent -text "% [get_indep String OfScreenSize]" pack ${winsize}.procent -side left -anchor nw # Internationalization set fr [tixLabelFrame ${Project}.intl -label [get_indep String\ Internationalization]] ${fr} config -background $sn_options(def,layout-bg) set intlframe [${Project}.intl subwidget frame] set sn_options(opt_def,encoding) $sn_options(def,encoding) Combo& ${intlframe}.encodings \ -label [get_indep String Encoding] \ -labelwidth ${xstep} \ -underline [get_indep Pos Encoding] \ -contents [encoding names] \ -entryvariable sn_options(opt_def,encoding) ${intlframe}.encodings selecttext $sn_options(def,encoding) pack ${fr} -side top -fill x pack ${intlframe}.encodings -side top -anchor w -padx 4 -pady 4 lappend AvailTools ${Project} } method RaiseProject {} { #set lastPage proj } method choose_db_dir_cb {cls dir} { ${cls} config -value ${dir} } method choose_db_dir {cls} { Editor&::DirDialog ${this} \ -title [get_indep String Open] \ -script "${this} choose_db_dir_cb ${cls}" \ -prefix choose_db_dir } ##################################################### # editor preferences ##################################################### method AddEditor {nb page} { global sn_options set EditorPage [${nb} subwidget ${page}] set Editor ${EditorPage} #Format set frmt [tixLabelFrame ${Editor}.frm \ -label [get_indep String Format]] ${frmt} config -background $sn_options(def,layout-bg) set win [${Editor}.frm subwidget frame] pack ${frmt} -side top -anchor c -fill x #tab stop set sn_options(opt_def,edit-tabstop) $sn_options(def,edit-tabstop) set tabstop ${win}.tabstop Entry& ${tabstop} \ -width 2 \ -labelwidth 35 \ -label [get_indep String PrefTabStop] \ -underline [get_indep Pos PrefTabStop] \ -textvariable sn_options(opt_def,edit-tabstop) \ -filter natural pack ${tabstop} -side top -anchor nw #Auto Indent delay set sn_options(opt_def,edit-indentwidth)\ $sn_options(def,edit-indentwidth) set indent ${win}.indent Entry& ${indent} \ -width 2 \ -labelwidth 35 \ -label [get_indep String AutoIndentWidth] \ -underline [get_indep Pos AutoIndentWidth] \ -textvariable sn_options(opt_def,edit-indentwidth) \ -filter natural pack ${indent} -side top -anchor nw #wrap set sn_options(opt_def,edit-wrap) $sn_options(def,edit-wrap) set wrap ${win}.wrap set lbls [list [get_indep String None] [get_indep String Char]\ [get_indep String Word]] Radio& ${wrap} \ -labelwidth 35 \ -variable sn_options(opt_def,edit-wrap) \ -labels ${lbls} \ -contents {none char word} \ -label [get_indep String Wrap] \ -labelunderline [get_indep Pos Wrap] pack ${wrap} -side top -expand y -fill x #Work set work [tixLabelFrame ${Editor}.work \ -label [get_indep String Work]] ${work} config -background $sn_options(def,layout-bg) set win [${Editor}.work subwidget frame] pack ${work} -side top -anchor c -fill x #create .bak files set sn_options(opt_def,edit-create-bak)\ $sn_options(def,edit-create-bak) set bak ${win}.bak CheckButton& ${bak} \ -labels [list ""] \ -variables sn_options(opt_def,edit-create-bak) \ -label [get_indep String EditCreateBackFiles] \ -labelunderline [get_indep Pos EditCreateBackFiles] \ -labelwidth 35 pack ${bak} -side top -anchor nw #output file translation set ftrans ${win}.ftrans set sn_options(opt_def,edit-file-translation)\ $sn_options(def,edit-file-translation) Radio& ${ftrans} \ -labelwidth 35 \ -variable sn_options(opt_def,edit-file-translation) \ -labels [list \ [get_indep String KeepLF] \ [get_indep String AutoLF] \ [get_indep String UNIXLF] \ [get_indep String WindowsCRLF] \ [get_indep String MacintoshCR] \ ] \ -contents {keep auto lf crlf cr} \ -balloons [list \ [get_indep String EditorFileTranslationKeepINFO] \ [get_indep String EditorFileTranslationAutoINFO] \ [get_indep String EditorFileTranslationUnixINFO] \ [get_indep String EditorFileTranslationWindowsINFO] \ [get_indep String EditorFileTranslationCRINFO] \ ] \ -label [get_indep String FileTrans] \ -labelunderline [get_indep Pos FileTrans] pack ${ftrans} -side top -expand y -fill x #bracket delay set sn_options(opt_def,edit-bracket-delay)\ $sn_options(def,edit-bracket-delay) set brack ${win}.bracket Entry& ${brack} \ -width 4 \ -labelwidth 35 \ -label [get_indep String EditBracketMatchDelay] \ -underline [get_indep Pos EditBracketMatchDelay] \ -textvariable sn_options(opt_def,edit-bracket-delay) \ -filter natural pack ${brack} -side top -anchor nw #right mouse scroll/edit menu set rmouse ${win}.rmouse set sn_options(opt_def,edit-rightmouse-action)\ $sn_options(def,edit-rightmouse-action) Radio& ${rmouse} \ -labelwidth 35 \ -variable sn_options(opt_def,edit-rightmouse-action) \ -labels [list \ [get_indep String EditM3Menu] \ [get_indep String EditM3Scroll] \ ] \ -contents {menu scroll} \ -label [get_indep String EditM3Sup] \ -labelunderline [get_indep Pos EditM3Sup] pack ${rmouse} -side top -expand y -fill x #Convert Inserted Tabs Into Spaces set sn_options(opt_def,edit-tab-inserts-spaces)\ $sn_options(def,edit-tab-inserts-spaces) set tabspaces ${win}.tabspaces CheckButton& ${tabspaces} \ -labels [list ""]\ -variables sn_options(opt_def,edit-tab-inserts-spaces) \ -label [get_indep String EditorTranslateTabs] \ -labelunderline [get_indep Pos EditorTranslateTabs] \ -labelwidth 35 \ -balloons [list [get_indep String EditorTranslateTabsINFO]] pack ${tabspaces} -side top -anchor nw #more toolbar buttons set sn_options(opt_def,edit-more-buttons)\ $sn_options(def,edit-more-buttons) set morebtns ${win}.morebtns CheckButton& ${morebtns} \ -labels [list ""] \ -variables sn_options(opt_def,edit-more-buttons) \ -label [get_indep String MoreEditorToolbarButtons] \ -labelunderline [get_indep Pos MoreEditorToolbarButtons] \ -labelwidth 35 \ -balloons [list [get_indep String MoreEditorToolbarButtonsINFO]] pack ${morebtns} -side top -anchor nw #External editor for all files set sn_options(opt_def,edit-external-editor)\ $sn_options(def,edit-external-editor) set extedit ${win}.extedit LabelEntryButton& ${extedit} \ -text [get_indep String ExternalEditor] \ -underline [get_indep Pos ExternalEditor] \ -labelwidth 35 \ -anchor nw \ -variable sn_options(opt_def,edit-external-editor) \ -native 1 \ -extensions $sn_options(executable_ext) \ -defaultextension $sn_options(executable_defaultext) pack ${extedit} -side top -anchor nw -fill x lappend AvailTools ${Editor} } method RaiseEditor {} { #set lastPage edit } ##################################################### # Class hierarchy ##################################################### method AddClassHierarchy {nb page} { global sn_options set ClassHierarchyPage [${nb} subwidget ${page}] set ClassHierarchy ${ClassHierarchyPage} #Class browser options set class [tixLabelFrame ${ClassHierarchy}.class \ -label [get_indep String Class]] ${class} config -background $sn_options(def,layout-bg) set win [${ClassHierarchy}.class subwidget frame] pack ${class} -side top -anchor c -fill x #goto Def. or Impl. by selecting a method set sn_options(opt_def,class-goto-imp) $sn_options(def,class-goto-imp) set lbls [list [get_indep String Definition] [get_indep String\ Implementation]] set defimp ${win}.defimp Radio& ${defimp} \ -labelwidth 35 \ -variable sn_options(opt_def,class-goto-imp) \ -labels ${lbls} \ -contents {def imp} \ -label [get_indep String GotoDefImp] \ -labelunderline [get_indep Pos GotoDefImp] pack ${defimp} -side top -expand y -fill x #vertical/horizontal set sn_options(opt_def,class-orientation)\ $sn_options(def,class-orientation) set lbls [list [get_indep String AlighmentHorizontal]\ [get_indep String AlighmentVertical]] set classorient ${win}.classorient Radio& ${classorient} \ -labelwidth 35 \ -variable sn_options(opt_def,class-orientation) \ -labels ${lbls} \ -contents {horizontal vertical} \ -label [get_indep String Orientation] \ -labelunderline [get_indep Pos Orientation] pack ${classorient} -side top -expand y -fill x #members order set sn_options(opt_def,members-order) $sn_options(def,members-order) set lbls [list [get_indep String First] [get_indep String Second]] set memord ${win}.memord Radio& ${memord} \ -labelwidth 35 \ -variable sn_options(opt_def,members-order) \ -labels ${lbls} \ -contents {first second} \ -label [get_indep String MembersOrder] \ -labelunderline [get_indep Pos MembersOrder] pack ${memord} -side top -expand y -fill x #Layout set layout [tixLabelFrame ${ClassHierarchy}.layout \ -label [get_indep String HierarchyLayout]] ${layout} config -background $sn_options(def,layout-bg) set win [${ClassHierarchy}.layout subwidget frame] pack ${layout} -side top -anchor c -fill x #Display order set order ${win}.order set sn_options(opt_def,ctree-view-order)\ $sn_options(def,ctree-view-order) Radio& ${order} \ -labelwidth 35 \ -variable sn_options(opt_def,ctree-view-order) \ -labels [list \ [get_indep String LeftRight] \ [get_indep String Topdown] \ ] \ -contents {0 1} \
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -