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