40#ifndef WORKSHEETCURSOR_H
41#define WORKSHEETCURSOR_H
74 void SetSelectionStart(
GroupCell *start) { m_selectionStart = start; }
75 void SetSelectionEnd(
GroupCell *end) { m_selectionEnd = end; }
78 { m_selectionStart = start; m_selectionEnd = end; }
Implementation of an observing weak Cell pointer.
A weak non-owning pointer that becomes null whenever the observed object is destroyed.
Definition: CellPtr.h:511
A cell grouping input (and, if there is one, also the output) cell to a foldable item.
Definition: GroupCell.h:87
The between-the-cells cursor: active flag, position, selection anchors.
Definition: WorksheetCursor.h:49
void SetPosition(GroupCell *where)
Move the cursor below the given group cell (null = document start).
Definition: WorksheetCursor.h:64
void ClearSelectionAnchors()
Forget the select-with-the-caret gesture.
Definition: WorksheetCursor.h:80
void SetSelectionAnchors(GroupCell *start, GroupCell *end)
Set both ends of the select-with-the-caret gesture at once.
Definition: WorksheetCursor.h:77
void Deactivate()
Deactivate; the position is kept for a later re-activation.
Definition: WorksheetCursor.h:56
GroupCell * SelectionEnd() const
Where a select-with-the-caret gesture currently ends.
Definition: WorksheetCursor.h:73
void Activate()
Make this the active cursor. The caller deactivates the editor cursor.
Definition: WorksheetCursor.h:54
bool IsActive() const
Is this (rather than the in-cell text cursor) the active cursor?
Definition: WorksheetCursor.h:52
GroupCell * Position() const
The group cell the cursor sits below; null = above the first cell.
Definition: WorksheetCursor.h:62
GroupCell * SelectionStart() const
Where a select-with-the-caret gesture started.
Definition: WorksheetCursor.h:71