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#ifndef __com_sun_star_text_AccessibleParagraphView_idl__
24#define __com_sun_star_text_AccessibleParagraphView_idl__
25
26#ifndef __com_sun_star_accessibility_XAccessibleContext_idl__
27#include <com/sun/star/accessibility/XAccessibleContext.idl>
28#endif
29
30#ifndef __com_sun_star_accessibility_XAccessibleComponent_idl__
31#include <com/sun/star/accessibility/XAccessibleComponent.idl>
32#endif
33
34#ifndef __com_sun_star_accessibility_XAccessibleEditableText_idl__
35#include <com/sun/star/accessibility/XAccessibleEditableText.idl>
36#endif
37
38#ifndef __com_sun_star_accessibility_XAccessibleEventBroadcaster_idl__
39#include <com/sun/star/accessibility/XAccessibleEventBroadcaster.idl>
40#endif
41
42#ifndef __com_sun_star_accessibility_XAccessibleTextAttributes_idl__
43#include <com/sun/star/accessibility/XAccessibleTextAttributes.idl>
44#endif
45
46//=============================================================================
47
48module com {  module sun {  module star {  module text {
49
50//=============================================================================
51
52/** The accessible view of a paragraph fragment.
53
54
55	 @since OOo 1.1.2
56 */
57published service AccessibleParagraphView
58{
59	/** This interface gives access to a paragraph fragment that is at least
60	  	partially visible on the screen. A paragraph fragment is the portion
61		of a paragraph that is displayed on a single page or a in a single
62		column.
63
64		<ul>
65			<li>The parent returned by
66                <method scope="::com::sun::star::accessibility"
67                >XAccessibleContext::getAccessibleParent</method> is the
68                accessible view of a text document (in this case the
69                paragraph is contained in a page body) or the accessible
70                view of a header, footer, footnote, endnote, table cell,
71                text frame, page or shape.</li>
72            <li>The children returned by
73                <method scope="::com::sun::star::accessibility"
74                >XAccessibleContext::getAccessibleChild</method> are the
75                graphics, text boxes and OLE objects that are bound
76                <em>as</em> character within the paragraph. Graphics, text
77                boxes and OLE objects that are bound to the paragraph or
78                <em>to</em> a character within the paragraph are not
79                children of the paragraph fragment but of the document view
80                itself.</li>
81			<li>The role is either
82                <const scope="::com::sun::star::accessibility"
83                >AccessibleRole::PARAGRAPH</const> or
84                <const scope="::com::sun::star::accessibility"
85                >AccessibleRole::HEADING</const>. The later one is returned
86                if the paragraph's style is contained in the chapter
87                numbering of a text document.
88			<li>The name is "paragraph" or "heading" (or the equivalent term
89				in application's language) with a number appended.
90			<li>The description contains the term "paragraph" (or the equivalent
91				term in application's language) and the first sentence of
92				the paragraph.
93			<li>There are no relations.
94			<li>The following states are supported by the
95				<type scope="::com::sun::star::accessibility"
96                >XAccessibleStateSet</type> returned by
97				<method scope="::com::sun::star::accessibility"
98                >XAccessibleContext::getAccessibleStateSet</method>.
99				<ul>
100					<li><const scope="::com::sun::star::accessibility"
101                        >AccessibleStateType::DEFUNC</const> (indicates that
102                        the document window has been closed or the paragraph
103                        fragment is not existing any longer).
104					<li><const scope="::com::sun::star::accessibility"
105                        >AccessibleStateType::EDITABLE</const>
106					<li><const scope="::com::sun::star::accessibility"
107                        >AccessibleStateType::ENABLED</const> (always
108                        contained)
109					<li><const scope="::com::sun::star::accessibility"
110                        >AccessibleStateType::MULTILINE</const> (always
111                        contained)
112					<li><const scope="::com::sun::star::accessibility"
113                        >AccessibleStateType::MULTISELECTABLE</const>
114                        (always contained)
115					<li><const scope="::com::sun::star::accessibility"
116                        >AccessibleStateType::OPAQUE</const>
117					<li><const scope="::com::sun::star::accessibility"
118                        >AccessibleStateType::SHOWING</const>
119					<li><const scope="::com::sun::star::accessibility"
120                        >AccessibleStateType::VISIBLE</const>
121					<li><const scope="::com::sun::star::accessibility"
122                        >AccessibleStateType::FOCUSED</const>
123				</ul>
124			<li>Depending of the application's region setting, the locale is
125				the western, asian or complex language of the paragraph.
126		</ul>
127
128	 */
129	interface ::com::sun::star::accessibility::XAccessibleContext;
130
131	/** This interface describes the graphical representation of a paragraph
132	  	fragment.
133	 */
134	interface ::com::sun::star::accessibility::XAccessibleComponent;
135
136	/** This interface gives access to a paragraph fragment's text. The text
137	  	contains the paragraph's editable text as well as generated text,
138		like chapter numbers, hyphens or fields. Characters of generated
139		text contribute to the text's character indexing. However, it is not
140		possible to set the caret or start a selection within generated text.
141		<p>For text frames, graphics, etc. that are bound as character some
142		text is generated that contains the objects description.
143		<p>The attributes (or properties) returned by
144        <method scope="::com::sun::star::accessibility"
145        >XAccessibleText::getCharacterAttributes</method>
146		are a sub set of the properties described by the service
147		<type scope="::com::sun::star::style">CharacterProperties</type>. For
148		properties that have asian and complex counterparts, the value that
149		is visible is returned. This can be in fact the western, asian or
150		complex value.  Its not possible to change the value of any property
151		by using
152		<method scope="::com::sun::star::accessibility"
153        >XAccessibleEditableText::setAttributes</method>.
154		<p><em>TODO: If there is a demand, some attributes might be added that
155		tells whether the character at a certain index is editable or generated.
156		</em>
157
158	 */
159	[optional] interface ::com::sun::star::accessibility::XAccessibleEditableText;
160
161	/** This interface is a subset of
162		<type scope="::com::sun::star::accessibility"
163        >XAccessibleEditableText</type> and gives access to a paragraph
164        fragment's text in a read-only mode.  The text contains the
165        paragraph's text (changeable as well as generated text, like chapter
166        numbers, hyphens or fields). Characters of generated text contribute
167        to the text's character indexing.
168		<p>For text frames, graphics, etc. that are bound as character
169		some text is generated that contains the objects description.
170		<p>The attributes (or properties) returned by
171		<method scope="::com::sun::star::accessibility"
172        >XAccessibleText::getCharacterAttributes</method> are a sub set of the properties
173		described by the service
174		<type scope="::com::sun::star::style">CharacterProperties</type>. For
175		properties that have asian and complex counterparts, the value that
176		is visible is returned. This can be in fact the western, asian or
177		complex value.
178        <p><em>TODO: If there is a demand, some attributes might be added
179        that tells whether the character at a certain index is changeable or
180        generated.
181		</em>
182	 */
183    interface ::com::sun::star::accessibility::XAccessibleText;
184
185	/** This interface is for selecting the paragraph's children. Multi
186	    selection is supported only for children that are multi selectable
187		in the GUI, too.
188    */
189	[optional] interface ::com::sun::star::accessibility::XAccessibleSelection;
190
191	/** This is the interface for listeners.
192    */
193	interface ::com::sun::star::accessibility::XAccessibleEventBroadcaster;
194
195        /** This interface gives access to the default attributes of a paragraph
196            and to the run attributes of a certain character in a paragraph
197
198            @since OOo 2.0.4
199        */
200        [optional] interface ::com::sun::star::accessibility::XAccessibleTextAttributes;
201
202};
203
204//=============================================================================
205
206}; }; }; };
207
208#endif
209