| <?xml version="1.0" encoding="UTF-8" ?> |
| <!-- |
| Licensed to the Apache Software Foundation (ASF) under one |
| or more contributor license agreements. See the NOTICE file |
| distributed with this work for additional information |
| regarding copyright ownership. The ASF licenses this file |
| to you under the Apache License, Version 2.0 (the |
| "License"); you may not use this file except in compliance |
| with the License. You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, |
| software distributed under the License is distributed on an |
| "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| KIND, either express or implied. See the License for the |
| specific language governing permissions and limitations |
| under the License. |
| |
| --> |
| <library> |
| |
| <class name="basePanel" extends="baseBoundingBorderView" |
| bgcolor="$once{ canvas.getThemeColor('basebgcolorizer') }" > |
| |
| <!--- if this Box should be closeable --> |
| <attribute name="closable" value="false" type="boolean" /> |
| |
| <!--- Title of this window --> |
| <attribute name="title" type="string" value="basePanel" /> |
| |
| <attribute name="labelid" type="number" setter="setLabelId(labelid)" /> |
| <method name="setLabelId" args="_labelid" > |
| this.labelid = _labelid; |
| this.title=canvas.getLabelName(this.labelid); |
| </method> |
| |
| <view width="${ this.parent.width-2 }" height="${ this.parent.height-2 }" x="1" y="1" bgcolor="0xFFFFFF" /> |
| <view x="1" y="1" width="${ this.parent.width-2 }" height="20" > |
| <view width="${ this.parent.parent.width-2 }" y="0" stretches="width" |
| resource="presenter_thumb_rsc" > |
| <handler name="oninit"> |
| <![CDATA[ |
| this.setColor(canvas.getThemeColor('basebgcolorizer')); |
| ]]> |
| </handler> |
| <method name="setTintRGB" args="color, brightness"> |
| <![CDATA[ |
| if (color != "" && color != null){ |
| |
| if (brightness == null) { brightness = 0; } |
| var rgb = color; |
| var red=(rgb >> 16) & 0xFF; |
| var green=(rgb >> 8) & 0xFF; |
| var blue=rgb & 0xFF; |
| |
| this.setColorTransform( { ra : red, ga : green, ba : blue, |
| rb : 0, gb : 0, bb : 0 } ); |
| |
| if($debug) Debug.write("explorerBox/setTintRGB",this); |
| if($debug) Debug.write("explorerBox/setTintRGB", { ra : red, ga : green, ba : blue, rb : 0, gb : 0, bb : 0 } ); |
| } |
| ]]> |
| </method> |
| </view> |
| <text fontsize="11" height="17" x="16" y="1" text="${ this.parent.parent.title }" |
| fgcolor="0xFFFFFF" resize="true" fontstyle="bold" /> |
| <button visible="${ this.parent.parent.closable }" x="${ this.parent.parent.width-23 }" |
| y="1" text="X" height="18" width="20" > |
| <handler name="onmouseup"> |
| this.parent.parent.close(); |
| </handler> |
| </button> |
| <view visible="${ !this.parent.parent.isopen }" x="2" y="3" resource="explorer_button_min_rsc"> |
| <handler name="onmouseover"> |
| this.setAttribute('frame',2); |
| </handler> |
| <handler name="onmouseout"> |
| this.setAttribute('frame',1); |
| </handler> |
| <handler name="onmousedown"> |
| this.setAttribute('frame',3); |
| </handler> |
| <handler name="onmouseup"> |
| this.setAttribute('frame',1); |
| this.parent.parent.toggleopen(); |
| </handler> |
| </view> |
| <view visible="${ this.parent.parent.isopen }" x="2" y="3" resource="explorer_button_max_rsc"> |
| <handler name="onmouseover"> |
| this.setAttribute('frame',2); |
| </handler> |
| <handler name="onmouseout"> |
| this.setAttribute('frame',1); |
| </handler> |
| <handler name="onmousedown"> |
| this.setAttribute('frame',3); |
| </handler> |
| <handler name="onmouseup"> |
| this.setAttribute('frame',1); |
| this.parent.parent.toggleopen(); |
| </handler> |
| </view> |
| </view> |
| |
| </class> |
| |
| </library> |