| <?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="whiteboardMiniButton" extends="view" width="250" height="18" y="2" |
| bgcolor="$once{ canvas.getThemeColor('basebgcolorizer') }"> |
| |
| <attribute name="btnName" value="" type="string" /> |
| <attribute name="objRef" value="null" /> |
| |
| <attribute name="zielx" value="200" type="number" /> |
| <attribute name="zielwidth" value="100" type="number" /> |
| |
| <attribute name="isactive" value="true" type="boolean" /> |
| |
| <attribute name="isHidden" value="false" type="boolean" /> |
| |
| <handler name="oninit"> |
| this.calcTextWidth(); |
| parent.onwidth.sendEvent(); |
| </handler> |
| |
| <handler name="onwidth"> |
| if (this.isinited){ |
| this.calcTextWidth(); |
| } |
| </handler> |
| |
| <method name="disableItem"> |
| //if ($debug) Debug.write("disableItem :: set visibility to hidden"); |
| this.isHidden = true; |
| this.setAttribute("visibility","hidden"); |
| //this.destroy(); |
| </method> |
| |
| <method name="enableItem"> |
| this.setAttribute("visibility","visible"); |
| this.isHidden = false; |
| </method> |
| |
| <method name="calcTextWidth"> |
| <![CDATA[ |
| if (this.isHidden) { |
| return; |
| } |
| ////////if ($debug) //Debug.write(this,this._text,this._text.getTextWidth()); |
| if (this._text.getTextWidth()>(this.width-24)) { |
| this._long.setAttribute('visibility','visible'); |
| this._text.setAttribute('width',this.width-26); |
| } else { |
| this._long.setAttribute('visibility','hidden'); |
| this._text.setAttribute('width',this.width-18); |
| } |
| ]]> |
| </method> |
| |
| <handler name="onclick"> |
| if (this.isHidden) { |
| return; |
| } |
| this._minimizebtn_mo.setAttribute('visibility','visible'); |
| this._minimizebtn_dn.setAttribute('visibility','hidden'); |
| if ($debug) Debug.write(" :: onclick :: "); |
| this.sendActiveWindow(this.objRef); |
| </handler> |
| |
| <handler name="onmouseover"> |
| if (this.isHidden) { |
| return; |
| } |
| this._minimizebtn_mo.setAttribute('visibility','visible'); |
| this._minimizebtn_dn.setAttribute('visibility','hidden'); |
| </handler> |
| <handler name="onmouseout"> |
| if (this.isHidden) { |
| return; |
| } |
| if (this.isactive) { |
| this._minimizebtn_mo.setAttribute('visibility','hidden'); |
| this._minimizebtn_dn.setAttribute('visibility','visible'); |
| } else { |
| this._minimizebtn_mo.setAttribute('visibility','hidden'); |
| this._minimizebtn_dn.setAttribute('visibility','hidden'); |
| } |
| </handler> |
| <handler name="onmousedown"> |
| if (this.isHidden) { |
| return; |
| } |
| this._minimizebtn_mo.setAttribute('visibility','hidden'); |
| this._minimizebtn_dn.setAttribute('visibility','visible'); |
| </handler> |
| <handler name="onmouseup"> |
| if (this.isHidden) { |
| return; |
| } |
| this._minimizebtn_mo.setAttribute('visibility','visible'); |
| this._minimizebtn_dn.setAttribute('visibility','hidden'); |
| </handler> |
| |
| <method name="sendActiveWindow" args="win"> |
| this.parent.sendActiveWindow(this,win); |
| </method> |
| |
| <method name="activateSynced"> |
| this.parent.sendActiveWindowSynced(this); |
| </method> |
| |
| <view name="_minimizebtn_mo" width="${ parent.width-2 }" height="16" |
| bgcolor="white" opacity="0.3" visibility="hidden" x="1" y="1" /> |
| |
| <view name="_minimizebtn_dn" width="${ parent.width-2 }" height="16" |
| bgcolor="black" opacity="0.3" visibility="hidden" x="1" y="1" /> |
| |
| |
| <text text="${ parent.btnName }" fgcolor="0xFFFFFF" resize="false" |
| x="1" fontsize="10" name="_text" /> |
| |
| <view y="1" x="${ parent.width-18 }" name="_close" |
| resource="btn_presenter_close" |
| opacity="${ ((canvas.ismoderator) ? 1 : ((canvas.isAllowedToDraw) ? 1 : 0.5 )) }" |
| onmouseover="this.setAttribute('frame',2)" |
| onmouseout="this.setAttribute('frame',1)" |
| onmousedown="this.setAttribute('frame',3)" |
| onmouseup="this.setAttribute('frame',1)" > |
| <handler name="onclick"> |
| <![CDATA[ |
| this.setAttribute('frame',2); |
| canvas._videocontainer._videoviewcontent.closeWhiteboard(); |
| var t = this; |
| canvas.videoComp_lc.closeWhiteboard = function(confirm) { |
| if ($debug) Debug.write("confirm closeWhiteboard:", confirm); |
| if (confirm) { |
| t.parent.parent.removeObject(t.parent); |
| } |
| } |
| ]]> |
| </handler> |
| <labelTooltip labelid="1364" /> |
| </view> |
| |
| <text y="1" name="_long" text="..." fgcolor="0xFFFFFF" |
| x="${ parent.width-28 }" fontsize="10" /> |
| |
| <labelTooltip text="${ parent.btnName }" /> |
| </class> |
| |
| </library> |