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_chart_AccessibleChartElement_idl__
29#define __com_sun_star_chart_AccessibleChartElement_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
41
42module com {  module sun {  module star {  module chart {
43
44/** This service is supported by all components that are contained in
45    the view of a chart document that are controlled by the chart.
46    Shapes added by a user via the clipboard are not treated as chart
47    elements.
48
49    <p>The list of objects that implement this service is
50    <type scope="::com::sun::star::chart">ChartTitle</type>,
51    <type scope="::com::sun::star::chart">ChartLegend</type>,
52    <type scope="::com::sun::star::chart">Diagram</type>,
53    <type scope="::com::sun::star::chart">ChartAxis</type>,
54    <type scope="::com::sun::star::chart">ChartDataRowProperties</type>,
55    <type scope="::com::sun::star::chart">ChartDataPointProperties</type>.
56    </p>
57
58    <p>The
59       <type scope="::com::sun::star::accessibility">XAccessibleExtendedComponent</type>
60       is suported by all chart elements.</p>
61
62    @since OOo 1.1.2
63*/
64published service AccessibleChartElement
65{
66    /** Base interface for being accessible.  It gives access to the
67        <type scope="::com::sun::star::accessibility">XAccessibleContext</type>
68        interface.
69    */
70    interface ::com::sun::star::accessibility::XAccessible;
71
72    /** Give access to the structural information of a chart element.
73
74        <p>You can access the following information for the shapes of the above listed types:
75        <dl>
76         <dt>Role</dt>
77             <dd>All chart elements have the role
78             <const scope="::com::sun::star::accessibility">AccessibleRole::SHAPE</const>.
79             </dd>
80         <dt>Name</dt>
81             <dd>For unique elements you get fixed names.  The unique
82             elements are the titles, legend, diagram and axes.  The
83             names you get for them are "main-title", "sub-title",
84             "(x|y|z)-axis-title", "legend", "diagram", "(x|y|z)-axis"
85             and "second-(x|y)-axis", respectively.</dd>
86         <dt>Description</dt>
87             <dd>Descriptions contain a list of selected
88             attributes.  These attributes are, if applicable:
89             foreground and background color, line width, font name and
90             size.  The purpose of these attributes is to give a rough
91             description of the more simple geometric shapes.  The list
92             is very restricted in order to avoid overwhelming or
93             confusing the user.</dd>
94         <dt>Children</dt>
95             <dd>The <type scope="::com::sun::star::chart">Diagram</type> and
96             the <type scope="::com::sun::star::chart">ChartLegend</type>
97             contain children, all other objects in a chart do not, i.e., are
98             leaves in the document representation tree.</dd>
99         <dt>Parent</dt>
100             <dd>Because the <code>setParent</code> method from the JAA has
101             been removed, the reference to the parent has to be provided in an
102             implementation specific way.</dd>
103         <dt>Relations</dt>
104             <dd>They are not used at the moment.</dd>
105
106         <dt>States</dt>
107             <dd>The states supported by this service are:
108             <ul>
109
110              <li><const scope="::com::sun::star::accessibility">AccessibleStateType::DEFUNC</const>
111                  is set if an object was removed.  This indicates that the user
112                  should release all references to the accessible object.  If
113                  this state is set then no other of the states below is set.
114                  </li>
115              <li><const scope="::com::sun::star::accessibility">AccessibleStateType::EDITABLE</const></li>
116              <li><const scope="::com::sun::star::accessibility">AccessibleStateType::ENABLED</const>
117                  is always set.<sup>&dagger;</sup></li>
118              <li><const scope="::com::sun::star::accessibility">AccessibleStateType::MULTILINE</const>
119                  is set for all titles.</li>
120              <li><const scope="::com::sun::star::accessibility">AccessibleStateType::OPAQUE</const>
121                  is set for all elements that do have a transparency
122                  attributes set to 0% and no transparency gradient.</li>
123              <li><const scope="::com::sun::star::accessibility">AccessibleStateType::RESIZABLE</const>
124                  Is set for the diagram object only.  All other chart elements may not be resized.</li>
125              <li><const scope="::com::sun::star::accessibility">AccessibleStateType::SELECTABLE</const></li>
126              <li><const scope="::com::sun::star::accessibility">AccessibleStateType::SELECTED</const></li>
127              <li><const scope="::com::sun::star::accessibility">AccessibleStateType::SHOWING</const>
128                  is always set.<sup>&dagger;</sup></li>
129              <li><const scope="::com::sun::star::accessibility">AccessibleStateType::VISIBLE</const>
130                  is always set.<sup>&dagger;</sup></li>
131             </ul>
132             <sup>&dagger;</sup>always, except if the state
133             <const scope="::com::sun::star::accessibility">AccessibleStateType::DEFUNC</const>
134             is set.</dd>
135         <dt>Locale</dt>
136             <dd>is supported.</dd>
137         <dt>Property change listeners</dt>
138             <dd>Property change listeners that are registered with a chart
139             element are informed if the size or position or an attribute
140             changed.  The last point needs a short explanation: An attribute
141             change is signaled even if that attribute is not part of the
142             shape's description and is therefore not explicitly represented by
143             the UAA.</dd>
144        </dl>
145    */
146    interface ::com::sun::star::accessibility::XAccessibleContext;
147
148    /** Give access to the graphical representation of a chart element.
149
150    <p>The coordinate oriented methods <code>contains</code>,
151        <code>getAccessibleAt</code>, <code>getBounds</code>,
152        <code>getLocation</code>, <code>getLocationOnScreen</code>, and
153        <code>getSize</code> work on pixel coordinates.  (To transform between
154        the internal 100th of mm and pixels a chart element has to have access
155        to information that allows it to do so.  These information are the
156        enclosing window's size in pixel, 100th of mm, and its own relative
157        position in one or the other coordinate system).</p>
158
159        <p>Focus handling depends on support of the
160        <type scope="::com::sun::star::accessibility">XAccessibleText</type> and
161        <type scope="::com::sun::star::accessibility">XAccessibleEditableText</type>
162        interfaces.</p>
163
164        <p>Key bindings are not supported at the moment</p>
165    */
166    interface ::com::sun::star::accessibility::XAccessibleComponent;
167
168    /** Give extended access to the graphical representation of a chart element.
169
170        <p>This interface is used primarily to provide the predominant
171        foreground and background colors and&mdash;if applicable, i.e. the
172        <type scope="::com::sun::star::accessibility">XAccessibleText</type>
173        interface is supported&mdash;information about the font used to display
174        text.</p>
175
176        <p>The foreground and background colors may in some cases be directly
177        taken from the object.  In other cases, for example when a gradient or a
178        texture is used, they have to be interpolated.  The color returned may
179        not be appropriate in all cases.</p>
180
181        <p>Specifying the font used for displaying text depends on the
182        transformation of UNO API font information into the Java&trade; format.
183        However, if the UAA is used directly, this is of course not an
184        issue.</p>
185
186        <p>The support of this interface is optional to reduce overhead in case
187        that no text is displayed and color information can not be determined
188        with an acceptable cost.</p>
189    */
190    [optional] interface ::com::sun::star::accessibility::XAccessibleExtendedComponent;
191};
192
193}; }; }; };
194
195#endif
196