LibreOffice Module sw (master)  1
Public Member Functions | Private Attributes | List of all members
SwBlockCursor Class Reference

Access to the block cursor. More...

#include <BlockCursor.hxx>

Collaboration diagram for SwBlockCursor:
[legend]

Public Member Functions

 SwBlockCursor (const SwCursorShell &rCursorSh, const SwPosition &rPos)
 
SwShellCursorgetShellCursor ()
 Access to the shell cursor. More...
 
void setStartPoint (const Point &rPt)
 Defines the starting vertex of the block selection. More...
 
void setEndPoint (const Point &rPt)
 Defines the ending vertex of the block selection. More...
 
boost::optional< Point > const & getStartPoint () const
 The document coordinates where the block selection has been started. More...
 
boost::optional< Point > const & getEndPoint () const
 The document coordinates where the block selection ends (at the moment) More...
 
void clearPoints ()
 Deletion of the mouse created rectangle. More...
 
 ~SwBlockCursor ()
 

Private Attributes

SwShellCursor maCursor
 
boost::optional< PointmaStartPt
 
boost::optional< PointmaEndPt
 

Detailed Description

Access to the block cursor.

A block cursor contains a SwShellCursor and additional information about the rectangle which has been created by pressing the mouse button and moving the mouse.

It's simply an aggregation of a SwShellCursor and a rectangle defined by a start and an end point.

Definition at line 39 of file BlockCursor.hxx.

Constructor & Destructor Documentation

SwBlockCursor::SwBlockCursor ( const SwCursorShell rCursorSh,
const SwPosition rPos 
)
inline

Definition at line 46 of file BlockCursor.hxx.

SwBlockCursor::~SwBlockCursor ( )

Definition at line 23 of file BlockCursor.cxx.

Member Function Documentation

void SwBlockCursor::clearPoints ( )
inline

Deletion of the mouse created rectangle.

When start and end points exist, the block cursor depends on this. If the cursor is moved by cursor keys (e.g. up/down, home/end) the mouse rectangle is obsolete and has to be deleted.

Definition at line 84 of file BlockCursor.hxx.

boost::optional<Point> const& SwBlockCursor::getEndPoint ( ) const
inline

The document coordinates where the block selection ends (at the moment)

Returns
0, if no end point has been set

Definition at line 77 of file BlockCursor.hxx.

References maEndPt.

SwShellCursor & SwBlockCursor::getShellCursor ( )

Access to the shell cursor.

Returns
SwShellCursor& which represents the start and end position of the current block selection

Definition at line 27 of file BlockCursor.cxx.

References maCursor.

Referenced by SwCursorShell::getShellCursor().

boost::optional<Point> const& SwBlockCursor::getStartPoint ( ) const
inline

The document coordinates where the block selection has been started.

Returns
0, if no start point has been set

Definition at line 72 of file BlockCursor.hxx.

References maStartPt.

void SwBlockCursor::setEndPoint ( const Point rPt)
inline

Defines the ending vertex of the block selection.

Parameters
rPtrPt should contain the document coordinates of the mouse cursor when the block selection has started and the mouse has been moved (MouseMove)

Definition at line 67 of file BlockCursor.hxx.

void SwBlockCursor::setStartPoint ( const Point rPt)
inline

Defines the starting vertex of the block selection.

Parameters
rPtrPt should contain the document coordinates of the mouse cursor when the block selection starts (MouseButtonDown)

Definition at line 60 of file BlockCursor.hxx.

Member Data Documentation

SwShellCursor SwBlockCursor::maCursor
private

Definition at line 41 of file BlockCursor.hxx.

Referenced by getShellCursor().

boost::optional<Point> SwBlockCursor::maEndPt
private

Definition at line 43 of file BlockCursor.hxx.

Referenced by getEndPoint().

boost::optional<Point> SwBlockCursor::maStartPt
private

Definition at line 42 of file BlockCursor.hxx.

Referenced by getStartPoint().


The documentation for this class was generated from the following files: