| <?xml version="1.0" standalone="no"?> |
| <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" |
| "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd"> |
| |
| <!-- |
| |
| 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. |
| |
| --> |
| <!-- ========================================================================= --> |
| <!-- Tests support for the cursor property. --> |
| <!-- --> |
| <!-- @author vhardy@apache.org --> |
| <!-- @version $Id$ --> |
| <!-- ========================================================================= --> |
| |
| <?xml-stylesheet type="text/css" href="../../resources/style/test.css" ?> |
| |
| <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" |
| id="body" width="450" height="500" viewBox="0 0 450 500" > |
| |
| <text class="title" x="50%" y="50">Cursor Property</text> |
| |
| <defs> |
| <rect x="-95" y="-16" width="190" height="20" id="cell"/> |
| <g id="row"> |
| <use xlink:href="#cell" /> |
| </g> |
| |
| <use id="oddRow" xlink:href="#row" stroke="black" fill="white" /> |
| <use id="evenRow" xlink:href="#row" stroke="black" fill="#eeeeee" /> |
| <use id="oddRowCursor" xlink:href="#row" stroke="black" fill="crimson" cursor="wait"/> |
| <use id="evenRowCursor" xlink:href="#row" stroke="black" fill="gold" cursor="wait"/> |
| |
| <cursor id="customCursor" x="16" y="16" xlink:href="../../resources/images/hotSpotCenter.png" /> |
| <cursor id="customCursor2" x="32" y="0" xlink:href="../../resources/images/hotSpotNE.png" /> |
| |
| </defs> |
| |
| <g transform="translate(120, 120)" class="label" text-anchor="middle" onmouseover="cursorMoved(evt)"> |
| <use xlink:href="#oddRow" cursor="auto"/> |
| <text>auto</text> |
| <g transform="translate(0,20)" cursor="crosshair"> |
| <use xlink:href="#evenRow"/> |
| <text>crosshair</text> |
| </g> |
| <g transform="translate(0,40)" cursor="default"> |
| <use xlink:href="#oddRow"/> |
| <text>default</text> |
| </g> |
| <g transform="translate(0,60)" cursor="pointer"> |
| <use xlink:href="#evenRow"/> |
| <text>pointer</text> |
| </g> |
| <g transform="translate(0,80)" cursor="move"> |
| <use xlink:href="#oddRow"/> |
| <text>move</text> |
| </g> |
| <g transform="translate(0,100)" cursor="text"> |
| <use xlink:href="#evenRow"/> |
| <text>text</text> |
| </g> |
| <g transform="translate(0,120)" cursor="wait"> |
| <use xlink:href="#oddRow"/> |
| <text>wait</text> |
| </g> |
| <g transform="translate(0,140)" cursor="help"> |
| <use xlink:href="#evenRow"/> |
| <text>help</text> |
| </g> |
| <a cursor="auto"><g transform="translate(0,160)"> |
| <use xlink:href="#oddRow"/> |
| <text><a> cursor=auto</text> |
| </g></a> |
| <a cursor="wait"><g transform="translate(0,180)"> |
| <use xlink:href="#evenRow"/> |
| <text><a> cursor=wait</text> |
| </g></a> |
| <g transform="translate(0,200)"> |
| <use xlink:href="#oddRow"/> |
| <text cursor="auto"><text> cursor=auto</text> |
| </g> |
| <g transform="translate(0,220)"> |
| <use xlink:href="#evenRow"/> |
| <text cursor="wait"><text> cursor=wait</text> |
| </g> |
| <a cursor="auto"><g transform="translate(0,240)"> |
| <use xlink:href="#oddRow"/> |
| <text><a>.. <text />.. <a> cursor=auto</text> |
| </g></a> |
| <g transform="translate(0,260)"> |
| <use xlink:href="#evenRow"/> |
| <a cursor="crosshair"><text><a> <text /> <a> cursor=crosshair</text></a> |
| </g> |
| <g transform="translate(0,280)"> |
| <use xlink:href="#oddRow"/> |
| <text cursor="auto"><text><a fill="blue"><a/></a><text> cursor=auto</text> |
| </g> |
| <g transform="translate(0,300)"> |
| <use xlink:href="#evenRow"/> |
| <text cursor="wait"><text><a fill="blue"><a/></a><text> cursor=wait</text> |
| </g> |
| </g> |
| |
| |
| <g transform="translate(330, 120)" class="label" text-anchor="middle" onmouseover="cursorMoved(evt)"> |
| <g transform="translate(0,0)" cursor="e-resize"> |
| <use xlink:href="#oddRow"/> |
| <text>e-resize</text> |
| </g> |
| |
| <g transform="translate(0,20)" cursor="w-resize"> |
| <use xlink:href="#evenRow"/> |
| <text>w-resize</text> |
| </g> |
| <g transform="translate(0,40)" cursor="ne-resize"> |
| <use xlink:href="#oddRow"/> |
| <text>ne-resize</text> |
| </g> |
| <g transform="translate(0,60)" cursor="nw-resize"> |
| <use xlink:href="#evenRow"/> |
| <text>nw-resize</text> |
| </g> |
| <g transform="translate(0,80)" cursor="n-resize"> |
| <use xlink:href="#oddRow"/> |
| <text>n-resize</text> |
| </g> |
| <g transform="translate(0,100)" cursor="se-resize"> |
| <use xlink:href="#evenRow"/> |
| <text>se-resize</text> |
| </g> |
| <g transform="translate(0,120)" cursor="sw-resize"> |
| <use xlink:href="#oddRow"/> |
| <text>sw-resize</text> |
| </g> |
| <g transform="translate(0,140)" cursor="s-resize"> |
| <use xlink:href="#evenRow"/> |
| <text>s-resize</text> |
| </g> |
| <g transform="translate(0,160)" cursor="url(#badCustom), crosshair"> |
| <use xlink:href="#oddRow"/> |
| <text>Bad url, crosshair</text> |
| </g> |
| <g transform="translate(0,180)" cursor="url(#customCursor), wait"> |
| <use xlink:href="#evenRow"/> |
| <text>Good url, wait</text> |
| </g> |
| <g transform="translate(0,200)" cursor="url(#badCustom), url(#customCursor2), crosshair"> |
| <use xlink:href="#oddRow"/> |
| <text>Bad url, good url, crosshair</text> |
| </g> |
| |
| <g transform="translate(0,220)"> |
| <use xlink:href="#evenRow"/> |
| <use xlink:href="#evenRowCursor" cursor="auto"/> |
| <text><use cursor=auto (wait)></text> |
| </g> |
| <g transform="translate(0,240)"> |
| <use xlink:href="#oddRow"/> |
| <use xlink:href="#oddRowCursor" cursor="crosshair" /> |
| <text><use cursor=crosshair></text> |
| </g> |
| |
| <g transform="translate(0,260)"> |
| <use xlink:href="#evenRow"/> |
| <image x="-93" y="-14" width="186" height="16" xlink:href="cursorImage2.svg" cursor="auto"/> |
| <text><image cursor=auto (wait)></text> |
| </g> |
| <g transform="translate(0,280)"> |
| <use xlink:href="#oddRow"/> |
| <image x="-93" y="-14" width="186" height="16" xlink:href="cursorImage.svg" cursor="crosshair"/> |
| <text><image cursor=crosshair></text> |
| </g> |
| </g> |
| |
| <script type="text/ecmascript"><![CDATA[ |
| function cursorMoved(evt) { |
| if (evt.target.nodeName == "rect") { |
| evt.target.setAttribute("fill", "gold"); |
| } |
| } |
| |
| function onDone() { |
| if (!(regardTestInstance == null)) { |
| regardTestInstance.scriptDone(); |
| } else { |
| alert("This button only works when run in the regard framework"); |
| } |
| } |
| ]]></script> |
| |
| <rect x="25" y="460" width="20" height="20" shape-rendering="crispEdges" fill="red" onclick="evt.target.setAttribute('fill', 'green')" stroke="black"/> |
| <g id="done" transform="translate(70, 458)" cursor="pointer" onclick="onDone()"> |
| <rect rx="5" ry="5" width="60" height="25" fill="#eeeeee" stroke="black" /> |
| <text x="30" y="18" font-size="14" font-weight="bold" text-anchor="middle">Done</text> |
| </g> |
| |
| </svg> |