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