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...
 
std::optional< Point > const & getStartPoint () const
 The document coordinates where the block selection has been started. More...
 
std::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
 
std::optional< PointmaStartPt
 
std::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::SwBlockCursor ( const SwCursorShell rCursorSh,
const SwPosition rPos 
)
inline

Definition at line 46 of file BlockCursor.hxx.

◆ ~SwBlockCursor()

SwBlockCursor::~SwBlockCursor ( )

Definition at line 23 of file BlockCursor.cxx.

Member Function Documentation

◆ clearPoints()

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.

References maEndPt, and maStartPt.

Referenced by SwCursorShell::CursorToBlockCursor(), SwCursorShell::KillPams(), SwCursorShell::LeftRight(), SwCursorShell::LRMargin(), SwCursorShell::SttEndDoc(), and SwCursorShell::UpDown().

◆ getEndPoint()

std::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.

Referenced by SwCursorShell::RefreshBlockCursor().

◆ getShellCursor()

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 25 of file BlockCursor.cxx.

References maCursor.

Referenced by SwCursorShell::BlockCursorToCursor(), SwCursorShell::CursorToBlockCursor(), SwCursorShell::getShellCursor(), SwCursorShell::KillPams(), SwCursorShell::RefreshBlockCursor(), and SwCursorShell::SttEndDoc().

◆ getStartPoint()

std::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.

Referenced by SwCursorShell::RefreshBlockCursor(), and SwCursorShell::SetCursor().

◆ setEndPoint()

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.

References maEndPt.

Referenced by SwCursorShell::SetCursor().

◆ setStartPoint()

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.

References maStartPt.

Referenced by SwCursorShell::SetCursor().

Member Data Documentation

◆ maCursor

SwShellCursor SwBlockCursor::maCursor
private

Definition at line 41 of file BlockCursor.hxx.

Referenced by getShellCursor().

◆ maEndPt

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

Definition at line 43 of file BlockCursor.hxx.

Referenced by clearPoints(), getEndPoint(), and setEndPoint().

◆ maStartPt

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

Definition at line 42 of file BlockCursor.hxx.

Referenced by clearPoints(), getStartPoint(), and setStartPoint().


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