summaryrefslogtreecommitdiff
path: root/offapi/com/sun/star/drawing/AccessibleShape.idl
blob: 122bd44e2b57122b5ed16aaedf0b0893cf93115e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
 * This file is part of the LibreOffice project.
 *
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
 *
 * This file incorporates work covered by the following license notice:
 *
 *   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 .
 */

#ifndef __com_sun_star_drawing_AccessibleShape_idl__
#define __com_sun_star_drawing_AccessibleShape_idl__

#include <com/sun/star/accessibility/XAccessible.idl>
#include <com/sun/star/accessibility/XAccessibleContext.idl>
#include <com/sun/star/accessibility/XAccessibleExtendedComponent.idl>

module com {  module sun {  module star {  module drawing {

/** The <type>AccessibleShape</type> service is implemented by UNO shapes to
    provide accessibility information that describe the shape's features.
    A UNO shape is any object that implements the <type
    scope="::com::sun::star::drawing">XShape</type> interface.

    <p>The content of a draw page is modeled as tree of accessible shapes
    and accessible text paragraphs.  The root of this (sub-)tree is the
    accessible draw document view.  An accessible shape implements either
    this service or one of the "derived" services
    <type>AccessibleGraphicShape</type> or <type>AccessibleOLEShape</type>.
    See the section Children in the description of the
    <type scope="::com::sun::star::accessibility"
    >XAccessibleContext</type> interface support for more details.</p>

    <p>There are two services that extend this one:  the
    <type>AccessibleGraphicShape</type> and the
    <type>AccessibleOLEShape</type> services provide additional interfaces.
    See there for details.</p>

    <p>A shape object is either fully or partially visible on the screen or
    has set the <const scope="::com::sun::star::accessibility"
    >AccessibleStateType::DEFUNC</const> state to indicate that it is no longer
    actively supported by its parent.</p>

    <p>Each shape object that has not set the DEFUNC state has a valid
    parent.  That is either the containing draw page or a group shape or a
    3D scene object.</p>

     @since OOo 1.1.2
*/
service AccessibleShape
{
    /** Base interface for being accessible.  It gives access to the
        <type scope="::com::sun::star::accessibility">XAccessibleContext</type>
        interface.
    */
    interface ::com::sun::star::accessibility::XAccessible;

    /** Give access to the structural information of a shape.

        <p>You can access the following information for the shape being made
        accessible:
        <ul>
        <li>Role: The role of all shapes is <const
            scope="com::sun::star::accessibility"
            >AccessibleRole::SHAPE</const>.</li>
        <li>Name: The name of a shape is its localized type name.</li>
        <li>Description: Descriptions are localized and start with the
            shape's type and style.  After that follow some properties that
            differ from the defaults with respect to the style.
        <li>Children: The children of a shape are either other accessible
            shapes or accessible text paragraphs.  Only group shapes, 3D scene
            shapes, and OLE shapes may contain other shapes as children.
            Some of the shapes may have text paragraphs as (additional)
            children.  See <type scope="::com::sun::star::text"
            >AccessibleParagraphView</type> for details of
            how this text is represented.</li>
        <li>Parent: The parent is either the document view as represented by
            <type>AccessibleDrawDocumentView</type> or a group shape, 3D
            scene shape, or OLE shape.</li>
        <li>Relations: Are set and maintained from the outside.  See the
        service description of the object that has accessible shapes as
        children for details.</li>
        <li>States: The states supported by this service are:
            <ul>
            <li><p><const scope="com::sun::star::accessibility"
                >AccessibleStateType::DEFUNC</const> is set if an accessible
                shape is not visible but still existent for some reason.
                This should not really happen and is a sign that someone,
                e.g. an AT-Tool holds references to such a shape.  The
                reason for this is that either the owner of the accessible
                shape did not remove it from its list of children or that
                the AT-Tool does not care for the events indicating
                this.</p>
                <p>Usually an object that has the <const
                scope="com::sun::star::accessibility"
                >AccessibleStateType::DEFUNC</const> state set has already
                been disposed and subsequent calls to this object result in
                <type scope="::com::sun::star::lang">DisposedException</type>
                exceptions.</p>
                <p>If this state is set then no other of the states below is
                set.  This  is also true for the states that are otherwise
                always set (which  makes "always" more of a sort of
                "normally").</p></li>
            <li><const scope="com::sun::star::accessibility"
                >AccessibleStateType::EDITABLE</const></li> is always set.
                This state is interpreted to mean that not only text but
                also other, graphical, properties of a shape can be modified.
            <li><const scope="com::sun::star::accessibility"
                >AccessibleStateType::ENABLED</const> is always set.</li>
            <li><const scope="com::sun::star::accessibility"
                >AccessibleStateType::FOCUSABLE</const> is always set.</li>
            <li><const scope="com::sun::star::accessibility"
                >AccessibleStateType::FOCUSED</const> is set according to
                whether the shape currently has the focus.</li>
            <li><const scope="com::sun::star::accessibility"
                >AccessibleStateType::MULTI_LINE</const> is set if a shape
                supports the <type scope="::com::sun::star::accessibility"
                >XAccessibleText</type> interface.</li>
            <li><const scope="com::sun::star::accessibility"
                >AccessibleStateType::OPAQUE</const> is set for certain shapes
                with certain attributes like for a filled rectangle.</li>
            <li><const scope="com::sun::star::accessibility"
                >AccessibleStateType::RESIZABLE</const> is always set.</li>
            <li><const scope="com::sun::star::accessibility"
                >AccessibleStateType::SELECTABLE</const> is always set.</li>
            <li><const scope="com::sun::star::accessibility"
                >AccessibleStateType::SELECTED</const> is set according to
                whether the shape is currently selected.</li>
            <li><const scope="com::sun::star::accessibility"
                >AccessibleStateType::SHOWING</const> is always set.</li>
            <li><const scope="com::sun::star::accessibility"
                >AccessibleStateType::VISIBLE</const> is always set.</li>
            </ul>
        <li>Locale: The shape returns the locale of its parent.</li>
        <li>Property change listeners: Property change listeners that are
            registered with a shape are informed of the usual events.</li>
        </ul>
    */
    interface ::com::sun::star::accessibility::XAccessibleContext;

    /** Give access to the graphical representation of a shape.

        <p>The bounding box returned by the <method
        scope="::com::sun::star::accessibility"
        >XAccessibleComponent::getBounds</method> function returns the
        shape's bounding box clipped at its parent's bounding box</p>

        <p>An accessible shape tries as best as it can to return proper
        values for calls to the
        <method scope="::com::sun::star::accessibility"
        >XAccessibleExtendedComponent::getForeground</method> and
        <method scope="::com::sun::star::accessibility"
        >XAccessibleExtendedComponent::getBackground</method> functions.
        If the shape is painted with a uniform and non-transparent color
        then the returned colors may differ from the ones visible on the
        screen.</p>

        <p>Key bindings are not supported at the moment</p>
    */
    interface ::com::sun::star::accessibility::XAccessibleComponent;

    /** Give extended access to the graphical representation of a shape.

        <p>The functions <method
        scope="::com::sun::star::accessibility"
        >XAccessibleExtendedComponent::getFont</method>,
        <method scope="::com::sun::star::accessibility"
        >XAccessibleExtendedComponent::getTitledBorderText</method>, and
        <method scope="::com::sun::star::accessibility"
        >XAccessibleExtendedComponent::getToolTipText</method> are not
        supported and return empty references respectively empty
        strings.</p>

        <p>The support of this interface is optional to reduce overhead in
        case that no text is displayed and color information can not be
        determined with an acceptable cost.</p>
    */
    [optional] interface ::com::sun::star::accessibility::XAccessibleExtendedComponent;
};

}; }; }; };

#endif

/* vim:set shiftwidth=4 softtabstop=4 expandtab: */