rginda | 8ba3364 | 2011-12-14 12:31:31 -0800 | [diff] [blame^] | 1 | // Copyright (c) 2011 The Chromium OS Authors. All rights reserved. |
| 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
| 5 | /** |
| 6 | * @fileoverview This file implements the hterm.Options class, |
| 7 | * which stores current operating conditions for the terminal. This object is |
| 8 | * used instead of a series of parameters to allow saving/restoring of cursor |
| 9 | * conditions easily, and to provide an easy place for common configuration |
| 10 | * options. |
| 11 | * |
| 12 | * Original code by Cory Maccarrone. |
| 13 | */ |
| 14 | |
| 15 | /** |
| 16 | * Constructor for the hterm.Options class, optionally acting as a copy |
| 17 | * constructor. |
| 18 | * |
| 19 | * @param {hterm.Options=} opt_copy Optional instance to copy. |
| 20 | * @constructor |
| 21 | */ |
| 22 | hterm.Options = function(opt_copy) { |
| 23 | // All attributes in this class are public to allow easy access by the |
| 24 | // terminal. |
| 25 | |
| 26 | this.wraparound = opt_copy ? opt_copy.wraparound : true; |
| 27 | this.reverseWraparound = opt_copy ? opt_copy.reverseWraparound : false; |
| 28 | this.originMode = opt_copy ? opt_copy.originMode : false; |
| 29 | this.autoLinefeed = opt_copy ? opt_copy.autoLinefeed : true; |
| 30 | this.specialChars = opt_copy ? opt_copy.specialChars : false; |
| 31 | this.cursorVisible = opt_copy ? opt_copy.cursorVisible : true; |
| 32 | this.cursorBlink = opt_copy ? opt_copy.cursorBlink : true; |
| 33 | this.insertMode = opt_copy ? opt_copy.insertMode : false; |
| 34 | this.reverseVideo = opt_copy ? opt_copy.reverseVideo : false; |
| 35 | }; |