/************************************************************************** * * @@@BUILDINFO@@@ 92documentPrefs-2.jsx 2.0.0.54 08-Feb-2007 * Copyright 2006-2007 Adobe Systems Incorporated * All Rights Reserved. * * NOTICE: All information contained herein is, and remains the property of * Adobe Systems Incorporated and its suppliers, if any. The intellectual * and technical concepts contained herein are proprietary to Adobe Systems * Incorporated and its suppliers and may be covered by U.S. and Foreign * Patents,patents in process,and are protected by trade secret or copyright * law. Dissemination of this information or reproduction of this material * is strictly forbidden unless prior written permission is obtained from * Adobe Systems Incorporated. **************************************************************************/ // Each Prefs object needs five methods: // prefsObject.create (parentPane) - create the pane and return the Pane object. // prefsObject.preProcess() - preprocess the pane just before being shown. // prefsObject.postProcess() - do any work just before the pane is being hidden. // prefsObject.store() - store the preferences. Return true if the Next Time dialog is needed. // prefsObject.toDefault() - set back to default values var documentPrefs = {}; documentPrefs.tabStopSettings = [2, 4, 6, 8, 12, 16]; documentPrefs.langObjs = []; documentPrefs.lineendings = [ 'Macintosh', 'Unix', 'Windows' ]; documentPrefs.create = function (parentPane) { this.pane = parentPane.add ( "group { \ orientation : 'column', \ alignChildren : 'left', \ visible : false, \ alignment : ['left','top'], \ autoReload : Checkbox { \ text : '$$$/ESToolkit/PreferencesDlg/AutoReload=&Automatic Reload of Changed Files', \ helpTip : '$$$/ESToolkit/PreferencesDlg/htAutoReload=Reload files automatically if they changed outside of the editor.' \ }, \ lineNums : Checkbox { \ text : '$$$/ESToolkit/PreferencesDlg/linenumbers=&Display Line Numbers', \ helpTip : '$$$/ESToolkit/PreferencesDlg/htLinenumbers=Display line numbers to the left of text.' \ }, \ wrap : Checkbox { \ text : '$$$/ESToolkit/PreferencesDlg/wraplines=&Word Wrap', \ helpTip : '$$$/ESToolkit/PreferencesDlg/htLinewrap=Wrap lines if the line is too long for the window.' \ }, \ fold : Checkbox { \ text : '$$$/ESToolkit/PreferencesDlg/folding=&Code Collapse', \ helpTip : '$$$/ESToolkit/PreferencesDlg/htFolding=Enables collapsing or expanding of groups of code lines,' \ }, \ fields : Group { \ orientation : 'column', \ alignment : ['fill', 'top'], \ hilite : Group { \ orientation : 'row', \ alignment : ['right', 'top'], \ lbl : StaticText { \ text : '$$$/ESToolkit/PreferencesDlg/hilite=Enable &Syntax Highlighting:' \ }, \ list : DropDownList { \ helpTip : '$$$/ESToolkit/PreferencesDlg/htHilite=Highlight reserved words, comments, etc, with different colors.',\ }, \ }, \ tabs : Group { \ orientation : 'row', \ alignment : ['right', 'top'], \ lbl : StaticText { \ text : '$$$/ESToolkit/PreferencesDlg/tabs=&Tab Stops:' \ }, \ list : DropDownList { \ helpTip : '$$$/ESToolkit/PreferencesDlg/htTabs=The number of spaces between tab stops.', \ }, \ }, \ lfs : Group { \ orientation : 'row', \ alignment : ['right', 'top'], \ lbl : StaticText { \ text : '$$$/ESToolkit/PreferencesDlg/lf=&Line Endings:' \ }, \ list : DropDownList { \ helpTip : '$$$/ESToolkit/PreferencesDlg/htLF=The line feed character sequence.', \ }, \ }, \ } \ }"); this.pane.hiliteList = this.pane.fields.hilite.list; this.pane.tabsList = this.pane.fields.tabs.list; this.pane.lfList = this.pane.fields.lfs.list; this.pane.hiliteList.minimumSize.width = this.pane.tabsList.minimumSize.width = this.pane.lfList.minimumSize.width = 120; this.loaded = false; this.pane.prefsObj = this; this.pane.preProcess = function() { if (!this.prefsObj.loaded) this.prefsObj.load(); } this.pane.postProcess = function() {} this.pane.toDefault = function() { this.autoReload.value = PrefUtils.getDefaultValue( 'prefs.document.autoReload', 'Boolean' ); this.lineNums.value = PrefUtils.getDefaultValue( 'prefs.document.lineNumbers', 'Boolean' ); this.wrap.value = PrefUtils.getDefaultValue( 'prefs.document.wrap', 'Boolean' ); this.fold.value = PrefUtils.getDefaultValue( 'prefs.document.folding', 'Boolean' ); // Load the possible tab stops and select the preferred one var tabs = PrefUtils.getDefaultValue( 'prefs.document.tabs', 'Number' ); for( i=0; i widest) widest = elements[i].preferredSize.width; for (i = 0; i < elements.length; i++) elements[i].preferredSize.width = widest; }