xref: /trunk/main/offapi/com/sun/star/accessibility/TextSegment.idl (revision ffd38472365e95f6a578737bc9a5eb0fac624a86)
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
10cdf0e10cSrcweir *
11d1766043SAndrew Rist *   http://www.apache.org/licenses/LICENSE-2.0
12cdf0e10cSrcweir *
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.
19cdf0e10cSrcweir *
20d1766043SAndrew Rist *************************************************************/
21d1766043SAndrew Rist
22d1766043SAndrew Rist
23cdf0e10cSrcweir
24cdf0e10cSrcweir#ifndef __com_sun_star_accessibility_TextSegment_idl__
25cdf0e10cSrcweir#define __com_sun_star_accessibility_TextSegment_idl__
26cdf0e10cSrcweir
27cdf0e10cSrcweirmodule com { module sun { module star { module accessibility {
28cdf0e10cSrcweir
29cdf0e10cSrcweir/** This structure describes a text segment that is embedded in a larger
30cdf0e10cSrcweir    portion of text.  It is used for example by the
31cdf0e10cSrcweir    <type>XAccessibleText</type> interface to describe a text portion that
32cdf0e10cSrcweir    was inserted into or deleted from an accessible text.
33cdf0e10cSrcweir
34cdf0e10cSrcweir    <p>The indices <member>TextSegment::SegmentStart</member> and
35cdf0e10cSrcweir    <member>TextSegment::SegmentEnd</member> refer to the enclosing text.
36cdf0e10cSrcweir    The <member>TextSegment::SegmentText</member> member contains the text
37cdf0e10cSrcweir    between these two indices including the start index but not the end
38cdf0e10cSrcweir    index.  With it you can use this structure without having to
39cdf0e10cSrcweir    access the <type>XAccessibleText</type> interface that represents the
40cdf0e10cSrcweir    enclosing text.</p>
41cdf0e10cSrcweir
42cdf0e10cSrcweir    <p>An empty text segment is expressed by
43cdf0e10cSrcweir    <member>TextSegment::SegmentStart</member> and
44cdf0e10cSrcweir    <member>TextSegment::SegmentEnd</member> set to the same value.  While a
45cdf0e10cSrcweir    value of -1 signals an error (like the request for a word after the last
46cdf0e10cSrcweir    character of a text) all other values define the empty string at that
47cdf0e10cSrcweir    position.</p>
48cdf0e10cSrcweir
49cdf0e10cSrcweir    <p>The <member>SegmentText</member> member is a copy of the
50cdf0e10cSrcweir    corresponding text segment of the enclosing text.  Modifying this
51cdf0e10cSrcweir    structure does not alter the enclosing text.</p>
52cdf0e10cSrcweir
53cdf0e10cSrcweir    @see XAccessibleText
54cdf0e10cSrcweir
55*0d3a54ffSJürgen Schmidt    @since OpenOffice 1.1.2
56cdf0e10cSrcweir*/
57cdf0e10cSrcweir
58cdf0e10cSrcweirpublished struct TextSegment
59cdf0e10cSrcweir{
60cdf0e10cSrcweir    /** A copy of the text segment of the enclosing text delimited by the
61cdf0e10cSrcweir        text indices <member>TextSegment::SegmentStart</member> and
62cdf0e10cSrcweir        <member>TextSegment::SegmentEnd</member>.  Modifying it does not
63cdf0e10cSrcweir        alter the enclosing text.
64cdf0e10cSrcweir    */
65cdf0e10cSrcweir    string SegmentText;
66cdf0e10cSrcweir
67cdf0e10cSrcweir    /** Index of the first character of the text segment represented by this
68cdf0e10cSrcweir        structure.  The index refers to the enclosing text.
69cdf0e10cSrcweir    */
70cdf0e10cSrcweir    long SegmentStart;
71cdf0e10cSrcweir
72cdf0e10cSrcweir    /** Index of the character directly behind the last character of the
73cdf0e10cSrcweir        text segment represented by this structure.  The index refers to the
74cdf0e10cSrcweir        enclosing text.
75cdf0e10cSrcweir    */
76cdf0e10cSrcweir    long SegmentEnd;
77cdf0e10cSrcweir};
78cdf0e10cSrcweir
79cdf0e10cSrcweir}; }; }; };
80cdf0e10cSrcweir
81cdf0e10cSrcweir#endif
82