Last change
on this file since 13398 was
12762,
checked in by aballeit, 9 years ago
|
#2283 GUI updates, Tree-chart, MCTS Version 2 (prune leaves)
|
File size:
1.3 KB
|
Line | |
---|
1 | using System;
|
---|
2 | using System.Xml;
|
---|
3 |
|
---|
4 | namespace SharpVectors.Dom.Css
|
---|
5 | {
|
---|
6 | public class CssAbsPrimitiveValue : CssPrimitiveValue
|
---|
7 | {
|
---|
8 | private string _propertyName;
|
---|
9 | private XmlElement _element;
|
---|
10 | private CssPrimitiveValue _cssValue;
|
---|
11 |
|
---|
12 | public CssAbsPrimitiveValue(CssPrimitiveValue cssValue, string propertyName,
|
---|
13 | XmlElement element)
|
---|
14 | {
|
---|
15 | _cssValue = cssValue;
|
---|
16 | _propertyName = propertyName;
|
---|
17 | _element = element;
|
---|
18 | }
|
---|
19 |
|
---|
20 | public override string CssText
|
---|
21 | {
|
---|
22 | get
|
---|
23 | {
|
---|
24 | return _cssValue.CssText;
|
---|
25 | }
|
---|
26 | }
|
---|
27 |
|
---|
28 | public override double GetFloatValue(CssPrimitiveType unitType)
|
---|
29 | {
|
---|
30 | return _cssValue.GetFloatValue(unitType);
|
---|
31 | }
|
---|
32 |
|
---|
33 | public override string GetStringValue()
|
---|
34 | {
|
---|
35 | switch(PrimitiveType)
|
---|
36 | {
|
---|
37 | case CssPrimitiveType.Attr:
|
---|
38 | return _element.GetAttribute(_cssValue.GetStringValue(), String.Empty);
|
---|
39 | default:
|
---|
40 | return _cssValue.GetStringValue();
|
---|
41 | }
|
---|
42 | }
|
---|
43 |
|
---|
44 | public override ICssRect GetRectValue()
|
---|
45 | {
|
---|
46 | return _cssValue.GetRectValue();
|
---|
47 | }
|
---|
48 |
|
---|
49 | public override ICssColor GetRgbColorValue()
|
---|
50 | {
|
---|
51 | return _cssValue.GetRgbColorValue();
|
---|
52 | }
|
---|
53 |
|
---|
54 | public override CssPrimitiveType PrimitiveType
|
---|
55 | {
|
---|
56 | get
|
---|
57 | {
|
---|
58 | return _cssValue.PrimitiveType;
|
---|
59 | }
|
---|
60 | }
|
---|
61 | }
|
---|
62 | }
|
---|
Note: See
TracBrowser
for help on using the repository browser.