1 // Copyright 2014 The Chromium 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.
6 * @fileoverview A subclass of the navigation description container
7 * specialising on math objects.
12 goog
.provide('cvox.NavMathDescription');
14 goog
.require('cvox.NavDescription');
18 * Class specialising navigation descriptions for mathematics.
19 * @param {{context: (undefined|string),
21 * userValue: (undefined|string),
22 * annotation: (undefined|string),
23 * earcons: (undefined|Array<number>),
24 * personality: (undefined|Object),
25 * hint: (undefined|string),
26 * category: (undefined|string),
27 * domain: (undefined|string),
28 * style: (undefined|string)}} kwargs The arguments for
29 * the specialised math navigationdescription. See arguments of nav
30 * description plus the following:
31 * domain Domain for translation.
32 * style Style for translation.
34 * @extends {cvox.NavDescription}
36 cvox
.NavMathDescription = function(kwargs
) {
37 goog
.base(this, kwargs
);
39 var newPersonality
= this.personality
? this.personality
: {};
40 var mathDescr
= new Object();
42 mathDescr
['domain'] = kwargs
.domain
? kwargs
.domain
: '';
43 // TODO (sorge) Collate and document styles in an enum structure.
44 mathDescr
['style'] = kwargs
.style
? kwargs
.style
: '';
45 newPersonality
['math'] = mathDescr
;
46 this.personality
= newPersonality
;
48 goog
.inherits(cvox
.NavMathDescription
, cvox
.NavDescription
);