xref: /trunk/main/offapi/com/sun/star/text/XWordCursor.idl (revision d1766043)
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_XWordCursor_idl__
24#define __com_sun_star_text_XWordCursor_idl__
25
26#ifndef __com_sun_star_text_XTextCursor_idl__
27#include <com/sun/star/text/XTextCursor.idl>
28#endif
29
30
31//=============================================================================
32
33 module com {  module sun {  module star {  module text {
34
35//=============================================================================
36
37/** makes it possible to move a cursor word by word.
38 */
39published interface XWordCursor: com::sun::star::text::XTextCursor
40{
41	//-------------------------------------------------------------------------
42
43	/** determines if the cursor is positioned at the start of a word.
44	 */
45	boolean isStartOfWord();
46
47	//-------------------------------------------------------------------------
48
49	/** determines if the cursor is positioned at the end of a word.
50	 */
51	boolean isEndOfWord();
52
53	//-------------------------------------------------------------------------
54
55	/** moves the cursor to the next word.
56
57        <p>Note: the function returning <true/> does not necessarily mean
58        that the cursor is located at the next word, or any word at all!
59        This may happen for example if it travels over empty paragraphs.</p>
60
61        @returns
62            <true/> if the cursor was moved. It returns <false/> it the
63            cursor can not advance further.
64	 */
65	boolean gotoNextWord( [in] boolean bExpand );
66
67	//-------------------------------------------------------------------------
68
69	/** moves the cursor to the previous word.
70
71        <p>Note: the function returning <true/> does not necessarily mean
72        that the cursor is located at the previous word, or any word at all!
73        This may happen for example if it travels over empty paragraphs.</p>
74
75        @returns
76            <true/> if the cursor was moved. It returns <false/> it the
77            cursor can not advance further.
78	 */
79	boolean gotoPreviousWord( [in] boolean bExpand );
80
81	//-------------------------------------------------------------------------
82
83	/** moves the cursor to the end of the current word.
84
85        @returns
86            <true/> if the cursor is now at the end of a word,
87            <false/> otherwise. If <false/> was returned the cursor
88            will remain at its original position.
89	 */
90	boolean gotoEndOfWord( [in] boolean bExpand );
91
92	//-------------------------------------------------------------------------
93
94	/** moves the cursor to the start of the current word.
95
96        @returns
97            <true/> if the cursor is now at the start of a word,
98            <false/> otherwise. If <false/> was returned the cursor
99            will remain at its original position.
100     */
101	boolean gotoStartOfWord( [in] boolean bExpand );
102
103};
104
105//=============================================================================
106
107}; }; }; };
108
109#endif
110