1/************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. 19 * 20 *************************************************************/ 21 22 23 24#ifndef __com_sun_star_drawing_AccessibleShape_idl__ 25#define __com_sun_star_drawing_AccessibleShape_idl__ 26 27#ifndef __com_sun_star_accessibility_XAccessible_idl__ 28#include <com/sun/star/accessibility/XAccessible.idl> 29#endif 30#ifndef __com_sun_star_accessibility_XAccessibleContext_idl__ 31#include <com/sun/star/accessibility/XAccessibleContext.idl> 32#endif 33#ifndef __com_sun_star_accessibility_XAccessibleExtendedComponent_idl__ 34#include <com/sun/star/accessibility/XAccessibleExtendedComponent.idl> 35#endif 36 37module com { module sun { module star { module drawing { 38 39/** The <type>AccessibleShape</type> service is implemented by UNO shapes to 40 provide accessibility information that describe the shapes' features. 41 A UNO shape is any object that implements the <type 42 scope="::com::sun::star::drawing">XShape</type> interface. 43 44 <p>The content of a draw page is modelled as tree of accessible shapes 45 and accessible text paragraphs. The root of this (sub-)tree is the 46 accessible draw document view. An accessible shape implements either 47 this service or one of the 'derived' services 48 <type>AccessibleGraphicShape</type> or <type>AccessibleOLEShape</type>. 49 See the section Children in the description of the 50 <type scope="::com::sun::star::accessibility" 51 >XAccessibleContext</type> interface support for more details.</p> 52 53 <p>There are two services that extend this one: the 54 <type>AccessibleGraphicShape</type> and the 55 <type>AccessibleOLEShape</type> services provide additional interfaces. 56 See there for details.</p> 57 58 <p>A shape object is either fully or partially visible on the screen or 59 has set the <const scope="::com::sun::star::accessibility" 60 >AccessibleStateType::DEFUNC</const> state to indicate that it is no longer 61 actively supported by its parent.</p> 62 63 <p>Each shape object that has not set the DEFUNC state has a valid 64 parent. That is either the containing draw page or a group shape or a 65 3D scene object.</p> 66 67 @since OpenOffice 1.1.2 68*/ 69published service AccessibleShape 70{ 71 /** Base interface for being accessible. It gives access to the 72 <type scope="::com::sun::star::accessibility">XAccessibleContext</type> 73 interface. 74 */ 75 interface ::com::sun::star::accessibility::XAccessible; 76 77 /** Give access to the structural information of a shape. 78 79 <p>You can access the following information for the shape being made 80 accessible: 81 <ul> 82 <li>Role: The role of all shapes is <const 83 scope="com::sun::star::accessibility" 84 >AccessibleRole::SHAPE</const>.</li> 85 <li>Name: The name of a shape is its localized type name.</li> 86 <li>Description: Descriptions are localized and start with the 87 shape's type and style. After that follow some properties that 88 differ from the defaults with respect to the style. 89 <li>Children: The children of a shape are either other accessible 90 shapes or accessible text paragraphs. Only group shapes, 3D scene 91 shapes, and OLE shapes may contain other shapes as children. 92 Some of the shapes may have text paragraphs as (additional) 93 children. See <type scope="::com::sun::star::text" 94 >AccessibleParagraphView</type> for details of 95 how this text is represented.</li> 96 <li>Parent: The parent is either the document view as represented by 97 <type>AccessibleDrawDocumentView</type> or a group shape, 3D 98 scene shape, or OLE shape.</li> 99 <li>Relations: Are set and maintained from the outside. See the 100 service description of the object that has accessible shapes as 101 children for details.</li> 102 <li>States: The states supported by this service are: 103 <ul> 104 <li><p><const scope="com::sun::star::accessibility" 105 >AccessibleStateType::DEFUNC</const> is set if an accessible 106 shape is not visible but still existent for some reason. 107 This should not really happen and is a sign that someone, 108 e.g. an AT-Tool holds references to such a shape. The 109 reason for this is that either the owner of the accessible 110 shape did not remove it from its list of children or that 111 the AT-Tool does not care for the events indicating 112 this.</p> 113 <p>Usually an object that has the <const 114 scope="com::sun::star::accessibility" 115 >AccessibleStateType::DEFUNC</const> state set has already 116 been disposed and subsequent calls to this object result in 117 <type scope="::com::sun::star::lang">DisposedException</type> 118 exceptions.</p> 119 <p>If this state is set then no other of the states below is 120 set. This is also true for the states that are otherwise 121 allways set (which makes 'allways' more of a sort of 122 'normally').</p></li> 123 <li><const scope="com::sun::star::accessibility" 124 >AccessibleStateType::EDITABLE</const></li> is always set. 125 This state is interpreted to mean that not only text but 126 also other, graphical, properties of a shape can be modified. 127 <li><const scope="com::sun::star::accessibility" 128 >AccessibleStateType::ENABLED</const> is always set.</li> 129 <li><const scope="com::sun::star::accessibility" 130 >AccessibleStateType::FOCUSABLE</const> is always set.</li> 131 <li><const scope="com::sun::star::accessibility" 132 >AccessibleStateType::FOCUSED</const> is set according to 133 whether the shape currently has the focus.</li> 134 <li><const scope="com::sun::star::accessibility" 135 >AccessibleStateType::MULTI_LINE</const> is set if a shape 136 supports the <type scope="::com::sun::star::accessibility" 137 >XAccessibleText</type> interface.</li> 138 <li><const scope="com::sun::star::accessibility" 139 >AccessibleStateType::OPAQUE</const> is set for certain shapes 140 with certain attributes like for a filled rectangle.</li> 141 <li><const scope="com::sun::star::accessibility" 142 >AccessibleStateType::RESIZABLE</const> is always set.</li> 143 <li><const scope="com::sun::star::accessibility" 144 >AccessibleStateType::SELECTABLE</const> is always set.</li> 145 <li><const scope="com::sun::star::accessibility" 146 >AccessibleStateType::SELECTED</const> is set according to 147 whether the shape is currently selected.</li> 148 <li><const scope="com::sun::star::accessibility" 149 >AccessibleStateType::SHOWING</const> is always set.</li> 150 <li><const scope="com::sun::star::accessibility" 151 >AccessibleStateType::VISIBLE</const> is always set.</li> 152 </ul> 153 <li>Locale: The shape returns the locale of its parent.</li> 154 <li>Property change listeners: Property change listeners that are 155 registered with a shape are informed of the usual events.</li> 156 </ul> 157 */ 158 interface ::com::sun::star::accessibility::XAccessibleContext; 159 160 /** Give access to the graphical representation of a shape. 161 162 <p>The bounding box returned by the <method 163 scope="::com::sun::star::accessibility" 164 >XAccessibleComponent::getBounds</method> function returns the 165 shape's bounding box clipped at its parent's bounding box</p> 166 167 <p>An accessible shape tries as best as it can to return proper 168 values for calls to the 169 <method scope="::com::sun::star::accessibility" 170 >XAccessibleExtendedComponent::getForeground</method> and 171 <method scope="::com::sun::star::accessibility" 172 >XAccessibleExtendedComponent::getBackground</method> functions. 173 If the shape is painted with a uniform and non-transparent color 174 then the returned colors may differ from the ones visible on the 175 screen.</p> 176 177 <p>Key bindings are not supported at the moment</p> 178 */ 179 interface ::com::sun::star::accessibility::XAccessibleComponent; 180 181 /** Give extended access to the graphical representation of a shape. 182 183 <p>The functions <method 184 scope="::com::sun::star::accessibility" 185 >XAccessibleExtendedComponent::getFont</method>, 186 <method scope="::com::sun::star::accessibility" 187 >XAccessibleExtendedComponent::getTitledBorderText</method>, and 188 <method scope="::com::sun::star::accessibility" 189 >XAccessibleExtendedComponent::getToolTipText</method> are not 190 supported and return empty references respectively empty 191 strings.</p> 192 193 <p>The support of this interface is optional to reduce overhead in 194 case that no text is displayed and color information can not be 195 determined with an acceptable cost.</p> 196 */ 197 [optional] interface ::com::sun::star::accessibility::XAccessibleExtendedComponent; 198}; 199 200}; }; }; }; 201 202#endif 203