- Timestamp:
- 06/13/07 17:44:00 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/xAudioHier/Xul_Audio/chrome/content/audio-toolkit/area.xml
r9275 r9276 1 1 <?xml version="1.0"?> 2 3 4 5 2 <bindings xmlns="http://www.mozilla.org/xbl" xmlns:xbl="http://www.mozilla.org/xbl" 6 3 xmlns:html="http://www.w3.org/1999/xhtml" … … 14 11 <svg:rect x="0" y="0" width="1000" height="20" fill="#fff" stroke-width="0" /> 15 12 <svg:rect x="0" y="20" width="1000" height="80" fill="#f6e69d" opacity="0.8" stroke-width="0" /> 13 16 14 <svg:g anonid="area_rules"> 17 15 <svg:line x1="0" x2="1000" y1="20" y2="20" stroke="#aaa" fill="black" stroke-width="1" /> 18 16 </svg:g> 17 19 18 <svg:g anonid="sections"> 20 19 <children /> 21 20 </svg:g> 21 22 22 <svg:svg anonid="cursor" x="0" y="0" width="2%" height="100" viewBox="0 0 10 10" 23 23 preserveAspectRatio="none"> 24 24 <svg:line x1="0" x2="0" y1="0" y2="10" fill="red" stroke-width="2" /> 25 25 </svg:svg> 26 27 26 </content> 28 27 … … 31 30 this._cursor = document.getAnonymousElementByAttribute(this, "anonid", "cursor"); 32 31 ]]></constructor> 32 33 <property name="rootSection"> 34 <getter><![CDATA[ 35 var firstSection = this.firstChild; 36 while(firstSection && firstSection.localName != "section") { 37 firstSection = firstSection.nextSibling; 38 } 39 return firstSection; 40 ]]></getter> 41 </property> 42 43 <property name="inner" readonly="true"> 44 <getter><![CDATA[ 45 return document.getAnonymousNodes(this)[0]; 46 ]]></getter> 47 </property> 48 49 <property name="cursor"> 50 <getter><![CDATA[ 51 return this._cursor.x.baseVal.value; 52 ]]></getter> 53 <setter><![CDATA[ 54 if (val < 0) val = 0; 55 if (val > 1000 ) val = 1000; 56 this._cursor.x.baseVal.value = val; 57 ]]></setter> 58 </property> 59 33 60 <method name="init"> 34 61 <parameter name="audioElt" /> … … 86 113 ]]></body> 87 114 </method> 115 88 116 <method name="updateRatio"> 89 117 <body><![CDATA[ … … 103 131 ]]></body> 104 132 </method> 133 105 134 <method name="drawGraph"> 106 135 <body><![CDATA[ 107 var graph = document.getAnonymousElementByAttribute(this, "anonid", "audiograph");108 if (this._audioElt.srcAudio) {109 graph.drawGraph(this._audioElt.srcAudio, "daim://zoomedGraph", 1, 10000, 80);110 } else {111 graph.hideGraph();112 }136 var graph = document.getAnonymousElementByAttribute(this, "anonid", "audiograph"); 137 if (this._audioElt.srcAudio) { 138 graph.drawGraph(this._audioElt.srcAudio, "daim://zoomedGraph", 1, 10000, 80); 139 } else { 140 graph.hideGraph(); 141 } 113 142 ]]></body> 114 143 </method> 115 <property name="rootSection"> 116 <getter> 117 <![CDATA[ 118 var firstSection = this.firstChild; 119 while(firstSection && firstSection.localName != "section") { 120 firstSection = firstSection.nextSibling; 121 } 122 return firstSection; 123 ]]></getter> 124 </property> 144 125 145 <method name="newSectionWalker"> 126 146 <body><![CDATA[ 127 function sectionFilter(node) {128 if (node.localName == "section")129 return NodeFilter.FILTER_ACCEPT130 else131 return NodeFilter.FILTER_SKIP132 }147 function sectionFilter(node) { 148 if (node.localName == "section") 149 return NodeFilter.FILTER_ACCEPT 150 else 151 return NodeFilter.FILTER_SKIP 152 } 133 153 134 return document.createTreeWalker(this.rootSection, NodeFilter.SHOW_ELEMENT, sectionFilter, false);154 return document.createTreeWalker(this.rootSection, NodeFilter.SHOW_ELEMENT, sectionFilter, false); 135 155 ]]></body> 136 156 </method> 137 <property name="inner" readonly="true"> 138 <getter><![CDATA[ 139 return document.getAnonymousNodes(this)[0]; 140 ]]></getter> 141 </property> 157 </implementation> 142 158 143 144 <property name="cursor">145 <getter><![CDATA[146 return this._cursor.x.baseVal.value;147 ]]></getter>148 <setter><![CDATA[149 if (val < 0) val = 0;150 if (val > 1000 ) val = 1000;151 this._cursor.x.baseVal.value = val;152 ]]></setter>153 </property>154 </implementation>155 156 159 <handlers> 157 160 <handler event="DOMMouseScroll"><![CDATA[ … … 167 170 ]]></handler> 168 171 </handlers> 169 170 172 </binding> 171 173 </bindings>
Note: See TracChangeset
for help on using the changeset viewer.