update dev300-m58
[ooovba.git] / sw / source / core / crsr / IBlockCursor.hxx
blobc17fc9a6ea34f5a61b535e705bad27af5c634a2d
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: IBlockCursor.hxx,v $
10 * $Revision: 1.3 $
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 ************************************************************************/
31 #ifndef IBLOCKCURSOR_HXX_INCLUDED
32 #define IBLOCKCURSOR_HXX_INCLUDED
34 class SwShellCrsr;
35 class Point;
37 /** Access to the block cursor
39 A block cursor contains a SwShellCrsr and additional information about
40 the rectangle which has been created by pressing the mouse button and
41 moving the mouse.
42 This interface provides access to the SwShellCrsr and to start and end
43 point of the mouse movement.
45 class IBlockCursor
47 public:
48 /** Access to the shell cursor
50 @return SwShellCrsr& which represents the start and end position of the
51 current block selection
53 virtual SwShellCrsr& getShellCrsr() = 0;
55 /** Defines the starting vertex of the block selection
57 @param rPt
58 rPt should contain the document coordinates of the mouse cursor when
59 the block selection starts (MouseButtonDown)
61 virtual void setStartPoint( const Point &rPt ) = 0;
63 /** Defines the ending vertex of the block selection
65 @param rPt
66 rPt should contain the document coordinates of the mouse cursor when
67 the block selection has started and the mouse has been moved (MouseMove)
69 virtual void setEndPoint( const Point &rPt ) = 0;
71 /** The document coordinates where the block selection has been started
73 @return 0, if no start point has been set
75 virtual const Point* getStartPoint() const = 0;
78 /** The document coordinates where the block selection ends (at the moment)
80 @return 0, if no end point has been set
82 virtual const Point* getEndPoint() const = 0;
84 /** Deletion of the mouse created rectangle
86 When start and end points exist, the block cursor depends on this. If the
87 cursor is moved by cursor keys (e.g. up/down, home/end) the mouse rectangle
88 is obsolet and has to be deleted.
90 virtual void clearPoints() = 0;
92 /** Destructor of the block curosr interface
94 virtual ~IBlockCursor() {};
97 #endif // IBLOCKCURSOR_HXX_INCLUDED