xref: /AOO41X/main/offapi/com/sun/star/view/XViewCursor.idl (revision d1766043198e81d0bcfc626e12893e7b4d7e31ca)
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_view_XViewCursor_idl__
24#define __com_sun_star_view_XViewCursor_idl__
25
26#ifndef __com_sun_star_uno_XInterface_idl__
27#include <com/sun/star/uno/XInterface.idl>
28#endif
29
30
31//=============================================================================
32
33module com {  module sun {  module star {  module view {
34
35//=============================================================================
36
37/** makes it possible to move a cursor up/down/left/right within laid out text.
38
39    @see com::sun::star::table::CellCursor
40    @see com::sun::star::text::TextCursor
41    @see com::sun::star::view::XLineCursor
42 */
43published interface XViewCursor: com::sun::star::uno::XInterface
44{
45    //-------------------------------------------------------------------------
46    /** moves the cursor the specified number of lines down.
47
48        @param nCount
49            specifies the number of lines to go down.
50
51        @param bExpand
52            determines whether the text range of the cursor is expanded (<TRUE/>)
53            or the cursor will be just at the new position after the move (<FALSE/>).
54
55        @returns
56            <TRUE/> if the cursor was moved,
57            or <FALSE/> if it was already in the bottom row.
58     */
59    boolean goDown( [in] short nCount, [in] boolean bExpand );
60
61    //-------------------------------------------------------------------------
62    /** moves the cursor the specified number of lines up.
63
64        @param nCount
65            specifies the number of lines to go up.
66
67        @param bExpand
68            determines whether the text range of the cursor is expanded (<TRUE/>)
69
70        @returns
71            <TRUE/> if the cursor was moved,
72            or <FALSE/> if it was already in the top row.
73     */
74    boolean goUp( [in] short nCount, [in] boolean bExpand );
75
76    //-------------------------------------------------------------------------
77    /** moves the cursor the specified number of characters to the left.
78
79        @param nCount
80            specifies the number of characters to move.
81
82        @param bExpand
83            determines whether the text range of the cursor is expanded (<TRUE/>)
84
85        @returns
86            <TRUE/> if the cursor was moved,
87            or <FALSE/> if it was already at the leftmost position.
88     */
89    boolean goLeft( [in] short nCount, [in] boolean bExpand );
90
91    //-------------------------------------------------------------------------
92    /** moves the cursor the specified number of characters to the right.
93
94        @param nCount
95            specifies the number of characters to move.
96
97        @param bExpand
98            determines whether the text range of the cursor is expanded (<TRUE/>)
99
100        @returns
101            <TRUE/> if the cursor was moved,
102            or <FALSE/> if it was already at the rightmost position.
103     */
104    boolean goRight( [in] short nCount, [in] boolean bExpand );
105
106};
107
108//=============================================================================
109
110}; }; }; };
111
112#endif
113