blob: 47a795572d60eb55850483159464b574541be02a [file] [log] [blame]
rginda6d397402012-01-17 10:58:29 -08001// Copyright (c) 2012 The Chromium OS Authors. All rights reserved.
rginda8ba33642011-12-14 12:31:31 -08002// 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 */
22hterm.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;
rginda87b86462011-12-14 13:48:03 -080029 this.autoCarriageReturn = opt_copy ? opt_copy.autoCarriageReturn : false;
rginda8ba33642011-12-14 12:31:31 -080030 this.specialChars = opt_copy ? opt_copy.specialChars : false;
rginda87b86462011-12-14 13:48:03 -080031 this.cursorVisible = opt_copy ? opt_copy.cursorVisible : false;
rginda6d397402012-01-17 10:58:29 -080032 this.cursorBlink = opt_copy ? opt_copy.cursorBlink : false;
rginda8ba33642011-12-14 12:31:31 -080033 this.insertMode = opt_copy ? opt_copy.insertMode : false;
34 this.reverseVideo = opt_copy ? opt_copy.reverseVideo : false;
35};