1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: XTextCursor.idl,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #ifndef __com_sun_star_text_XTextCursor_idl__
31 #define __com_sun_star_text_XTextCursor_idl__
33 #ifndef __com_sun_star_text_XTextRange_idl__
34 #include
<com
/sun
/star
/text
/XTextRange.idl
>
38 //=============================================================================
40 module com
{ module sun
{ module star
{ module text
{
42 //=============================================================================
44 /** extends a text range by method to modify its position.
46 published
interface XTextCursor
: com
::sun
::star
::text
::XTextRange
48 //-------------------------------------------------------------------------
50 /** sets the end of the position to the start.
52 [oneway
] void collapseToStart
();
54 //-------------------------------------------------------------------------
56 /** sets the start of the position to the end.
58 [oneway
] void collapseToEnd
();
60 //-------------------------------------------------------------------------
62 /** determines if the start and end positions are the same.
64 boolean isCollapsed
();
66 //-------------------------------------------------------------------------
68 /** moves the cursor the specified number of characters to the left.
71 the number of characters to move.
74 specifies if the current selection of the cursor should
78 <TRUE/> if the command was successfully completed.
81 <p>Note: Even if the command was not completed successfully
82 it may be completed partially. E.g. if it was required to move
83 5 characters but it is only possible to move 3 <FALSE/> will
84 be returned and the cursor moves only those 3 characters.<p>
86 boolean goLeft
( [in] short nCount
,
87 [in] boolean bExpand
);
89 //-------------------------------------------------------------------------
91 /** moves the cursor the specified number of characters to the right.
94 the number of characters to move.
97 specifies if the current selection of the cursor should
101 <TRUE/> if the command was successfully completed.
104 <p>Note: Even if the command was not completed successfully
105 it may be completed partially. E.g. if it was required to move
106 5 characters but it is only possible to move 3 <FALSE/> will
107 be returned and the cursor moves only those 3 characters.<p>
109 boolean goRight
( [in] short nCount
,
110 [in] boolean bExpand
);
112 //-------------------------------------------------------------------------
114 /** moves the cursor to the start of the text.
116 void gotoStart
( [in] boolean bExpand
);
118 //-------------------------------------------------------------------------
120 /** moves the cursor to the end of the text.
122 void gotoEnd
( [in] boolean bExpand
);
124 //-------------------------------------------------------------------------
126 /** moves or expands the cursor to a specified <type>TextRange</type>.
128 void gotoRange
( [in] com
::sun
::star
::text
::XTextRange xRange
,
129 [in] boolean bExpand
);
133 //=============================================================================