blob: c4023070d6c7846eb71e3f1e2092181906f2b52f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
/**
* @fileoverview A subclass of the navigation description container
* specialising on math objects.
*
*/
goog.provide('cvox.NavMathDescription');
goog.require('cvox.NavDescription');
/**
* Class specialising navigation descriptions for mathematics.
* @param {{context: (undefined|string),
* text: (string),
* userValue: (undefined|string),
* annotation: (undefined|string),
* earcons: (undefined|Array<number>),
* personality: (undefined|Object),
* hint: (undefined|string),
* category: (undefined|string),
* domain: (undefined|string),
* style: (undefined|string)}} kwargs The arguments for
* the specialised math navigationdescription. See arguments of nav
* description plus the following:
* domain Domain for translation.
* style Style for translation.
* @constructor
* @extends {cvox.NavDescription}
*/
cvox.NavMathDescription = function(kwargs) {
goog.base(this, kwargs);
var newPersonality = this.personality ? this.personality : {};
var mathDescr = new Object();
mathDescr['domain'] = kwargs.domain ? kwargs.domain : '';
// TODO (sorge) Collate and document styles in an enum structure.
mathDescr['style'] = kwargs.style ? kwargs.style : '';
newPersonality['math'] = mathDescr;
this.personality = newPersonality;
};
goog.inherits(cvox.NavMathDescription, cvox.NavDescription);
|