| <?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="autoLoader" extends="view" align="center" valign="middle" pixellock="true"> |
| |
| <attribute name="maxwidth" value="400" type="number" /> |
| <attribute name="maxsteps" value="22" type="number" /> |
| <attribute name="currentsteps" value="0" type="number" /> |
| |
| <!-- |
| <handler name="oninit"> |
| this.setAttribute("y",Math.round(this.y)); |
| this.setAttribute("y",Math.round(this.y)); |
| </handler> |
| --> |
| |
| <method name="close"> |
| canvas.main_content.setAttribute('visibility','visible'); |
| canvas._mainbgcontentNavi.setAttribute('visibility','visible'); |
| canvas.thishib.loaderVar = null; |
| this.destroy(); |
| </method> |
| |
| <method name="setProgress"> |
| this.currentsteps += 1; |
| if($debug) Debug.write("autoLoader/setProgress ===== ",this.currentsteps); |
| var w = Math.round(((this.maxwidth)/this.maxsteps)*this.currentsteps); |
| this.loadingbar.setAttribute('visibility','visible'); |
| if($debug) Debug.write("autoLoader/setResourceNumber == ",w); |
| this.loadingbar._loading.setAttribute('width',w); |
| </method> |
| |
| <text fontsize="11" name="error" y="20" fgcolor="0x666666"/> |
| <text fontsize="11" name="_src" y="50" align="center" fgcolor="0x666666" visibility="$once{ ($debug) ? 'visible' : 'hidden' }" /> |
| |
| <view name="loadingbar" height="1" pixellock="true" |
| x="-5" y="40" width="$once{ parent.maxwidth+2 }" visibility="hidden"> |
| <view x="1" y="1" width="$once{ parent.width-2 }" height="1" opacity="0.3" |
| bgcolor="$once{ canvas.getThemeColor('styleMenuBarBaseColor') }" /> |
| <view name="_loading" x="1" y="1" width="0" height="1" pixellock="true" |
| bgcolor="$once{ canvas.getThemeColor('styleMenuBarBaseColor') }"/> |
| </view> |
| |
| </class> |
| |
| </library> |