1*b1cdbd2cSJim Jagielski/************************************************************** 2*b1cdbd2cSJim Jagielski * 3*b1cdbd2cSJim Jagielski * Licensed to the Apache Software Foundation (ASF) under one 4*b1cdbd2cSJim Jagielski * or more contributor license agreements. See the NOTICE file 5*b1cdbd2cSJim Jagielski * distributed with this work for additional information 6*b1cdbd2cSJim Jagielski * regarding copyright ownership. The ASF licenses this file 7*b1cdbd2cSJim Jagielski * to you under the Apache License, Version 2.0 (the 8*b1cdbd2cSJim Jagielski * "License"); you may not use this file except in compliance 9*b1cdbd2cSJim Jagielski * with the License. You may obtain a copy of the License at 10*b1cdbd2cSJim Jagielski * 11*b1cdbd2cSJim Jagielski * http://www.apache.org/licenses/LICENSE-2.0 12*b1cdbd2cSJim Jagielski * 13*b1cdbd2cSJim Jagielski * Unless required by applicable law or agreed to in writing, 14*b1cdbd2cSJim Jagielski * software distributed under the License is distributed on an 15*b1cdbd2cSJim Jagielski * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*b1cdbd2cSJim Jagielski * KIND, either express or implied. See the License for the 17*b1cdbd2cSJim Jagielski * specific language governing permissions and limitations 18*b1cdbd2cSJim Jagielski * under the License. 19*b1cdbd2cSJim Jagielski * 20*b1cdbd2cSJim Jagielski *************************************************************/ 21*b1cdbd2cSJim Jagielski 22*b1cdbd2cSJim Jagielski 23*b1cdbd2cSJim Jagielski 24*b1cdbd2cSJim Jagielski#ifndef __com_sun_star_accessibility_XAccessibleHyperlink_idl__ 25*b1cdbd2cSJim Jagielski#define __com_sun_star_accessibility_XAccessibleHyperlink_idl__ 26*b1cdbd2cSJim Jagielski 27*b1cdbd2cSJim Jagielski#ifndef __com_sun_star_accessibility_XAccessibleAction_idl__ 28*b1cdbd2cSJim Jagielski#include <com/sun/star/accessibility/XAccessibleAction.idl> 29*b1cdbd2cSJim Jagielski#endif 30*b1cdbd2cSJim Jagielski#ifndef __com_sun_star_lang_IndexOutOfBoundsException_idl__ 31*b1cdbd2cSJim Jagielski#include <com/sun/star/lang/IndexOutOfBoundsException.idl> 32*b1cdbd2cSJim Jagielski#endif 33*b1cdbd2cSJim Jagielski 34*b1cdbd2cSJim Jagielskimodule com { module sun { module star { module accessibility { 35*b1cdbd2cSJim Jagielski 36*b1cdbd2cSJim Jagielski/** Implement this interface to represent a hyperlink or a group of 37*b1cdbd2cSJim Jagielski hyperlinks. 38*b1cdbd2cSJim Jagielski 39*b1cdbd2cSJim Jagielski <p>Single hyperlinks correspond to simple <a href> tags. Groups 40*b1cdbd2cSJim Jagielski of hyperlinks are contained in client side image maps. Linked objects 41*b1cdbd2cSJim Jagielski and anchors are implementation dependent. This interface inherits the 42*b1cdbd2cSJim Jagielski <type>XAccessibleAction</type> interface. Especially that interface's 43*b1cdbd2cSJim Jagielski <member>XAccessibleAction::getActionCount</member> method is needed to 44*b1cdbd2cSJim Jagielski obtain a maximum value for the indices passed to the 45*b1cdbd2cSJim Jagielski <member>XAccessibleHyperlink::getAccessibleActionAnchor</member> and 46*b1cdbd2cSJim Jagielski <member>XAccessibleHyperlink::getAccessibleActionObject</member> 47*b1cdbd2cSJim Jagielski methods.</p> 48*b1cdbd2cSJim Jagielski 49*b1cdbd2cSJim Jagielski <p>Furhtermore, the object that implements this interface has to be 50*b1cdbd2cSJim Jagielski connected implicitely or explicitely with an object that implements the 51*b1cdbd2cSJim Jagielski the <type>XAccessibleText</type> interface. The 52*b1cdbd2cSJim Jagielski <member>XAccessibleHyperlink::getStartIndex</member> and 53*b1cdbd2cSJim Jagielski <member>XAccessibleHyperlink::getEndIndex</member> methods return 54*b1cdbd2cSJim Jagielski indices with respect to the text exposed by that interface.</p> 55*b1cdbd2cSJim Jagielski 56*b1cdbd2cSJim Jagielski @since OpenOffice 1.1.2 57*b1cdbd2cSJim Jagielski*/ 58*b1cdbd2cSJim Jagielskipublished interface XAccessibleHyperlink : 59*b1cdbd2cSJim Jagielski ::com::sun::star::accessibility::XAccessibleAction 60*b1cdbd2cSJim Jagielski{ 61*b1cdbd2cSJim Jagielski /** Returns an object that represents the link anchor, as appropriate 62*b1cdbd2cSJim Jagielski for that link. 63*b1cdbd2cSJim Jagielski 64*b1cdbd2cSJim Jagielski <p>For an HTML link for example, this method would return the string 65*b1cdbd2cSJim Jagielski enclosed by the <&a href> tag.</p> 66*b1cdbd2cSJim Jagielski 67*b1cdbd2cSJim Jagielski @param nIndex 68*b1cdbd2cSJim Jagielski This index identifies the anchor when, as in the case of an 69*b1cdbd2cSJim Jagielski image map, there is more than one link represented by this 70*b1cdbd2cSJim Jagielski object. The valid maximal index can be determinded by calling 71*b1cdbd2cSJim Jagielski the <member>XAccessibleAction::getActionCount</member> method. 72*b1cdbd2cSJim Jagielski 73*b1cdbd2cSJim Jagielski @return 74*b1cdbd2cSJim Jagielski If the index is not valid then an exception is thrown. 75*b1cdbd2cSJim Jagielski Otherwise it returns an implementation dependent value. 76*b1cdbd2cSJim Jagielski */ 77*b1cdbd2cSJim Jagielski any getAccessibleActionAnchor ([in] long nIndex) 78*b1cdbd2cSJim Jagielski raises (::com::sun::star::lang::IndexOutOfBoundsException); 79*b1cdbd2cSJim Jagielski 80*b1cdbd2cSJim Jagielski /** Returns an object that represents the link anchor, as appropriate 81*b1cdbd2cSJim Jagielski for that link. 82*b1cdbd2cSJim Jagielski 83*b1cdbd2cSJim Jagielski <p>For an HTML link for example, this method would return the URL of 84*b1cdbd2cSJim Jagielski the <&a href> tag.</p> 85*b1cdbd2cSJim Jagielski 86*b1cdbd2cSJim Jagielski @param nIndex 87*b1cdbd2cSJim Jagielski This index identifies the action object when, as in the case of 88*b1cdbd2cSJim Jagielski an image map, there is more than one link represented by this 89*b1cdbd2cSJim Jagielski object. The valid maximal index can be determinded by calling 90*b1cdbd2cSJim Jagielski the <member>XAccessibleAction::getActionCount</member> method. 91*b1cdbd2cSJim Jagielski 92*b1cdbd2cSJim Jagielski @return 93*b1cdbd2cSJim Jagielski If the index is not valid then an exception is thrown. 94*b1cdbd2cSJim Jagielski Otherwise it returns an implementation dependent value. 95*b1cdbd2cSJim Jagielski */ 96*b1cdbd2cSJim Jagielski any getAccessibleActionObject ([in] long nIndex) 97*b1cdbd2cSJim Jagielski raises (::com::sun::star::lang::IndexOutOfBoundsException); 98*b1cdbd2cSJim Jagielski 99*b1cdbd2cSJim Jagielski /** Returns the index at which the textual representation of the 100*b1cdbd2cSJim Jagielski hyperlink (group) starts. 101*b1cdbd2cSJim Jagielski 102*b1cdbd2cSJim Jagielski <p>The returned value relates to the <type>XAccessibleText</type> 103*b1cdbd2cSJim Jagielski interface that ownes this hyperlink.</p> 104*b1cdbd2cSJim Jagielski 105*b1cdbd2cSJim Jagielski @return 106*b1cdbd2cSJim Jagielski The index relates to the text exposed by the 107*b1cdbd2cSJim Jagielski <type>XAccessibleHypertext</type> interface. 108*b1cdbd2cSJim Jagielski */ 109*b1cdbd2cSJim Jagielski long getStartIndex (); 110*b1cdbd2cSJim Jagielski 111*b1cdbd2cSJim Jagielski /** Returns the index at which the textual rerpesentation of the 112*b1cdbd2cSJim Jagielski hyperlink (group) ends. 113*b1cdbd2cSJim Jagielski 114*b1cdbd2cSJim Jagielski <p>The returned value relates to the <type>XAccessibleText</type> 115*b1cdbd2cSJim Jagielski interface that ownes this hyperlink.</p> 116*b1cdbd2cSJim Jagielski 117*b1cdbd2cSJim Jagielski @return 118*b1cdbd2cSJim Jagielski The index relates to the text exposed by the 119*b1cdbd2cSJim Jagielski <type>XAccessibleText</type> interface. 120*b1cdbd2cSJim Jagielski */ 121*b1cdbd2cSJim Jagielski long getEndIndex (); 122*b1cdbd2cSJim Jagielski 123*b1cdbd2cSJim Jagielski /** Returns whether the document referenced by this links is 124*b1cdbd2cSJim Jagielski still valid. 125*b1cdbd2cSJim Jagielski 126*b1cdbd2cSJim Jagielski <p>This is a volatile state that may change without further warning 127*b1cdbd2cSJim Jagielski like e.g. sending an appropriate event.</p> 128*b1cdbd2cSJim Jagielski 129*b1cdbd2cSJim Jagielski @return 130*b1cdbd2cSJim Jagielski Returns <TRUE/> if the referenced document is still valid and 131*b1cdbd2cSJim Jagielski <FALSE/> otherwise. 132*b1cdbd2cSJim Jagielski */ 133*b1cdbd2cSJim Jagielski boolean isValid (); 134*b1cdbd2cSJim Jagielski}; 135*b1cdbd2cSJim Jagielski 136*b1cdbd2cSJim Jagielski}; }; }; }; 137*b1cdbd2cSJim Jagielski 138*b1cdbd2cSJim Jagielski#endif 139