Version 5.2.6.1, tag libreoffice-5.2.6.1
[LibreOffice.git] / offapi / com / sun / star / text / XTextCursor.idl
blob42f8465fd0782f7156b18fdf850743b8a778b858
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
19 #ifndef __com_sun_star_text_XTextCursor_idl__
20 #define __com_sun_star_text_XTextCursor_idl__
22 #include <com/sun/star/text/XTextRange.idl>
26 module com { module sun { module star { module text {
29 /** extends a text range by method to modify its position.
31 published interface XTextCursor: com::sun::star::text::XTextRange
34 /** sets the end of the position to the start.
36 void collapseToStart();
39 /** sets the start of the position to the end.
41 void collapseToEnd();
44 /** determines if the start and end positions are the same.
46 boolean isCollapsed();
49 /** moves the cursor the specified number of characters to the left.
51 @param nCount
52 the number of characters to move.
54 @param bExpand
55 specifies if the current selection of the cursor should
56 be expanded or not.
58 @returns
59 `TRUE` if the command was successfully completed.
60 `FALSE` otherwise.
62 <p>Note: Even if the command was not completed successfully
63 it may be completed partially. E.g. if it was required to move
64 5 characters but it is only possible to move 3 `FALSE` will
65 be returned and the cursor moves only those 3 characters.<p>
67 boolean goLeft( [in] short nCount,
68 [in] boolean bExpand );
71 /** moves the cursor the specified number of characters to the right.
73 @param nCount
74 the number of characters to move.
76 @param bExpand
77 specifies if the current selection of the cursor should
78 be expanded or not.
80 @returns
81 `TRUE` if the command was successfully completed.
82 `FALSE` otherwise.
84 <p>Note: Even if the command was not completed successfully
85 it may be completed partially. E.g. if it was required to move
86 5 characters but it is only possible to move 3 `FALSE` will
87 be returned and the cursor moves only those 3 characters.<p>
89 boolean goRight( [in] short nCount,
90 [in] boolean bExpand );
93 /** moves the cursor to the start of the text.
95 void gotoStart( [in] boolean bExpand );
98 /** moves the cursor to the end of the text.
100 void gotoEnd( [in] boolean bExpand );
103 /** moves or expands the cursor to a specified TextRange.
105 void gotoRange( [in] com::sun::star::text::XTextRange xRange,
106 [in] boolean bExpand );
111 }; }; }; };
113 #endif
115 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */