| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 /** | 4 /** |
| 5 * @interface | 5 * @interface |
| 6 */ | 6 */ |
| 7 UI.TextEditorFactory = function() {}; | 7 UI.TextEditorFactory = function() {}; |
| 8 | 8 |
| 9 UI.TextEditorFactory.prototype = { | 9 UI.TextEditorFactory.prototype = { |
| 10 /** | 10 /** |
| 11 * @param {!UI.TextEditor.Options} options | 11 * @param {!UI.TextEditor.Options} options |
| 12 * @return {!UI.TextEditor} | 12 * @return {!UI.TextEditor} |
| 13 */ | 13 */ |
| 14 createEditor(options) {} | 14 createEditor(options) {} |
| 15 }; | 15 }; |
| 16 | 16 |
| 17 /** | 17 /** |
| 18 * @interface | 18 * @interface |
| 19 * @extends {Common.EventTarget} |
| 19 */ | 20 */ |
| 20 UI.TextEditor = function() {}; | 21 UI.TextEditor = function() {}; |
| 21 | 22 |
| 22 UI.TextEditor.prototype = { | 23 UI.TextEditor.prototype = { |
| 23 | 24 |
| 24 /** | 25 /** |
| 25 * @return {!UI.Widget} | 26 * @return {!UI.Widget} |
| 26 */ | 27 */ |
| 27 widget() {}, | 28 widget() {}, |
| 28 | 29 |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 clearAutocomplete() {}, | 74 clearAutocomplete() {}, |
| 74 | 75 |
| 75 /** | 76 /** |
| 76 * @param {number} lineNumber | 77 * @param {number} lineNumber |
| 77 * @param {number} columnNumber | 78 * @param {number} columnNumber |
| 78 * @return {?{startColumn: number, endColumn: number, type: string}} | 79 * @return {?{startColumn: number, endColumn: number, type: string}} |
| 79 */ | 80 */ |
| 80 tokenAtTextPosition(lineNumber, columnNumber) {} | 81 tokenAtTextPosition(lineNumber, columnNumber) {} |
| 81 }; | 82 }; |
| 82 | 83 |
| 84 /** @enum {symbol} */ |
| 85 UI.TextEditor.Events = { |
| 86 TextChanged: Symbol('TextChanged') |
| 87 }; |
| 88 |
| 83 /** | 89 /** |
| 84 * @typedef {{ | 90 * @typedef {{ |
| 85 * bracketMatchingSetting: (!Common.Setting|undefined), | 91 * bracketMatchingSetting: (!Common.Setting|undefined), |
| 86 * lineNumbers: boolean, | 92 * lineNumbers: boolean, |
| 87 * lineWrapping: boolean, | 93 * lineWrapping: boolean, |
| 88 * mimeType: (string|undefined), | 94 * mimeType: (string|undefined), |
| 89 * autoHeight: (boolean|undefined), | 95 * autoHeight: (boolean|undefined), |
| 90 * padBottom: (boolean|undefined), | 96 * padBottom: (boolean|undefined), |
| 91 * maxHighlightLength: (number|undefined) | 97 * maxHighlightLength: (number|undefined) |
| 92 * }} | 98 * }} |
| 93 */ | 99 */ |
| 94 UI.TextEditor.Options; | 100 UI.TextEditor.Options; |
| 95 | 101 |
| 96 /** | 102 /** |
| 97 * @typedef {{ | 103 * @typedef {{ |
| 98 * substituteRangeCallback: ((function(number, number):?TextUtils.TextRange)
|undefined), | 104 * substituteRangeCallback: ((function(number, number):?TextUtils.TextRange)
|undefined), |
| 99 * suggestionsCallback: ((function(!TextUtils.TextRange, !TextUtils.TextRang
e, boolean=):?Promise.<!UI.SuggestBox.Suggestions>)|undefined), | 105 * suggestionsCallback: ((function(!TextUtils.TextRange, !TextUtils.TextRang
e, boolean=):?Promise.<!UI.SuggestBox.Suggestions>)|undefined), |
| 100 * isWordChar: ((function(string):boolean)|undefined), | 106 * isWordChar: ((function(string):boolean)|undefined), |
| 101 * captureEnter: (boolean|undefined) | 107 * captureEnter: (boolean|undefined) |
| 102 * }} | 108 * }} |
| 103 */ | 109 */ |
| 104 UI.AutocompleteConfig; | 110 UI.AutocompleteConfig; |
| OLD | NEW |