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