| <?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="propertyPanelLetterButton" extends="view" resource="_button_rsc_letter_rsc" |
| x="312" y="24" height="23" width="24" |
| bgcolor="$once{ canvas.getThemeColor('baseMousecolorizer') }" > |
| <attribute name="itemResourceName" value="" type="string" /> |
| <attribute name="currentVal" value="false" type="boolean" /> |
| |
| <attribute name="labelid" value="87" type="number"/> |
| |
| <attribute name="enabled" value="false" type="boolean"/> |
| |
| <handler name="onmouseover"> |
| this.setAttribute('bgcolor',0xFFFFFF); |
| </handler> |
| <handler name="onmouseout"> |
| this.updateByVal(); |
| </handler> |
| <handler name="onclick"> |
| this.currentVal = !this.currentVal; |
| this.updateByVal(); |
| parent.parent.updateProperties(); |
| </handler> |
| <method name="getValue"> |
| return this.currentVal; |
| </method> |
| <method name="setValue" args="bool"> |
| this.currentVal = bool; |
| this.updateByVal(); |
| </method> |
| <method name="updateByVal"> |
| if (this.currentVal){ |
| this.setAttribute('bgcolor',canvas.getThemeColor('basebgcolorizer')); |
| } else { |
| this.setAttribute('bgcolor',canvas.getThemeColor('baseMousecolorizer')); |
| } |
| </method> |
| <view x="2" y="2" resource="$once{ parent.itemResourceName }" /> |
| |
| <view name="_clickEnabled" width="$once{ parent.width }" height="$once{ parent.height }" |
| visibility="${ (parent.enabled) ? 'hidden' : 'visible' }" |
| opacity="0.5" bgcolor="0xFFFFFF" clickable="true" showhandcursor="false" /> |
| |
| <labelTooltip x="2" y="2" labelid="$once{ parent.labelid }" /> |
| |
| </class> |
| |
| </library> |