merged tag ooo/OOO330_m14
[LibreOffice.git] / offapi / com / sun / star / text / XTextCursor.idl
blobeda255e16ea5851a8bf221caab518f6664d43ca4
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2000, 2010 Oracle and/or its affiliates.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * This file is part of OpenOffice.org.
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.
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).
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.
26 ************************************************************************/
27 #ifndef __com_sun_star_text_XTextCursor_idl__
28 #define __com_sun_star_text_XTextCursor_idl__
30 #ifndef __com_sun_star_text_XTextRange_idl__
31 #include <com/sun/star/text/XTextRange.idl>
32 #endif
35 //=============================================================================
37 module com { module sun { module star { module text {
39 //=============================================================================
41 /** extends a text range by method to modify its position.
43 published interface XTextCursor: com::sun::star::text::XTextRange
45 //-------------------------------------------------------------------------
47 /** sets the end of the position to the start.
49 [oneway] void collapseToStart();
51 //-------------------------------------------------------------------------
53 /** sets the start of the position to the end.
55 [oneway] void collapseToEnd();
57 //-------------------------------------------------------------------------
59 /** determines if the start and end positions are the same.
61 boolean isCollapsed();
63 //-------------------------------------------------------------------------
65 /** moves the cursor the specified number of characters to the left.
67 @param nCount
68 the number of characters to move.
70 @param bExpand
71 specifies if the current selection of the cursor should
72 be expanded or not.
74 @returns
75 <TRUE/> if the command was successfully completed.
76 <FALSE/> otherwise.
78 <p>Note: Even if the command was not completed successfully
79 it may be completed partially. E.g. if it was required to move
80 5 characters but it is only possible to move 3 <FALSE/> will
81 be returned and the cursor moves only those 3 characters.<p>
83 boolean goLeft( [in] short nCount,
84 [in] boolean bExpand );
86 //-------------------------------------------------------------------------
88 /** moves the cursor the specified number of characters to the right.
90 @param nCount
91 the number of characters to move.
93 @param bExpand
94 specifies if the current selection of the cursor should
95 be expanded or not.
97 @returns
98 <TRUE/> if the command was successfully completed.
99 <FALSE/> otherwise.
101 <p>Note: Even if the command was not completed successfully
102 it may be completed partially. E.g. if it was required to move
103 5 characters but it is only possible to move 3 <FALSE/> will
104 be returned and the cursor moves only those 3 characters.<p>
106 boolean goRight( [in] short nCount,
107 [in] boolean bExpand );
109 //-------------------------------------------------------------------------
111 /** moves the cursor to the start of the text.
113 void gotoStart( [in] boolean bExpand );
115 //-------------------------------------------------------------------------
117 /** moves the cursor to the end of the text.
119 void gotoEnd( [in] boolean bExpand );
121 //-------------------------------------------------------------------------
123 /** moves or expands the cursor to a specified <type>TextRange</type>.
125 void gotoRange( [in] com::sun::star::text::XTextRange xRange,
126 [in] boolean bExpand );
130 //=============================================================================
132 }; }; }; };
134 #endif