1 /** 2 * Copyright (C) 2010-2014 KO GmbH <copyright@kogmbh.com> 3 * 4 * @licstart 5 * This file is part of WebODF. 6 * 7 * WebODF is free software: you can redistribute it and/or modify it 8 * under the terms of the GNU Affero General Public License (GNU AGPL) 9 * as published by the Free Software Foundation, either version 3 of 10 * the License, or (at your option) any later version. 11 * 12 * WebODF is distributed in the hope that it will be useful, but 13 * WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 * GNU Affero General Public License for more details. 16 * 17 * You should have received a copy of the GNU Affero General Public License 18 * along with WebODF. If not, see <http://www.gnu.org/licenses/>. 19 * @licend 20 * 21 * @source: http://www.webodf.org/ 22 * @source: https://github.com/kogmbh/WebODF/ 23 */ 24 25 /*global gui*/ 26 /*jslint emptyblock:true, unparam:true*/ 27 28 /** 29 * @constructor 30 * @struct 31 */ 32 gui.StepInfo = function() { "use strict"; }; 33 34 /** 35 * Visual step iteration direction, taking into account 36 * whether the text block is right-to-left or left to right. 37 * 38 * For left-to-right languages, this maps onto 39 * core.StepDirection as: 40 * LEFT_TO_RIGHT = NEXT 41 * RIGHT_TO_LEFT = PREV 42 * 43 * @enum {!number} 44 */ 45 gui.StepInfo.VisualDirection = { 46 LEFT_TO_RIGHT: 0, 47 RIGHT_TO_LEFT: 1 48 }; 49 50 /** 51 * @type {!core.StepIterator.StepSnapshot} 52 */ 53 gui.StepInfo.prototype.token; 54 55 /** 56 * @return {!Element|!Text} 57 */ 58 gui.StepInfo.prototype.container = function() { "use strict"; }; 59 60 /** 61 * @return {!number} 62 */ 63 gui.StepInfo.prototype.offset = function() { "use strict"; }; 64 65 /** 66 * The direction of iteration from previous to next rect. 67 * 68 * @type {!core.StepDirection} 69 */ 70 gui.StepInfo.prototype.direction; 71 72 /** 73 * The visual direction of iteration accounting for right-to-left 74 * languages. 75 * 76 * @type {!gui.StepInfo.VisualDirection} 77 */ 78 gui.StepInfo.prototype.visualDirection; 79 80 /** 81 * Scanners are stateful objects that are used to locate a step matching certain 82 * parameters within a sequence. This a similar concept to lexical scanners. 83 * 84 * As these are stateful objects, a new instance should be created for every use. 85 * @interface 86 */ 87 gui.VisualStepScanner = function() { "use strict"; }; 88 89 /** 90 * Token for the last step accepted by this scanner 91 * @type {?core.StepIterator.StepSnapshot|undefined} 92 */ 93 gui.VisualStepScanner.prototype.token; 94 95 /** 96 * @param {!gui.StepInfo} stepInfo 97 * @param {?ClientRect} previousRect 98 * @param {?ClientRect} nextRect 99 * @return {!boolean} Return true in terminate iteration 100 */ 101 gui.VisualStepScanner.prototype.process = function(stepInfo, previousRect, nextRect) { "use strict"; };