wxMaxima
Loading...
Searching...
No Matches
Data Structures | Public Member Functions
DocumentCellPointers Class Reference

The document-model half of the cell-pointer registry. More...

#include <CellPointers.h>

Data Structures

class  ErrorList
 A list of editor cells containing error messages. More...
 

Public Member Functions

GroupCellGetWorkingGroup (bool resortToLast=false) const
 Returns the cell maxima currently works on. NULL if there isn't such a cell.
 
void SetWorkingGroup (GroupCell *group)
 Sets the cell maxima currently works on. NULL if there isn't such a cell.
 
GroupCellGetLastWorkingGroup () const
 The last group cell maxima was working on (regardless of the current one).
 
bool HasCellsSelected () const
 Are any whole cells (as opposed to text inside an editor) selected?
 
const CellPtr< Cell > & GetSelectionStart () const
 The first cell of the currently selected range of cells, or null. Returned by reference so callers keep the CellPtr conveniences (CastAs<>, auto-nulling) without a raw-pointer copy.
 
const CellPtr< Cell > & GetSelectionEnd () const
 The last cell of the currently selected range of cells, or null.
 
void SetSelectionStart (Cell *cell)
 Set the first cell of the selected range (may be null).
 
void SetSelectionEnd (Cell *cell)
 Set the last cell of the selected range (may be null).
 
EditorCellGetAnswerCell () const
 The editor cell maxima's current question is being answered in, or null.
 
void SetAnswerCell (EditorCell *cell)
 Set the editor cell maxima's current question is answered in.
 
void ClearAnswerCell ()
 Forget the editor cell that held maxima's current question.
 
void ClearAnswerCellIfInGroup (GroupCell *group)
 Forget the question editor if it belongs to group, e.g. because that group's output is being reset or the group is going away.
 
TextCellGetCurrentTextCell () const
 The text cell the text maxima is currently sending us is being appended to.
 
void SetCurrentTextCell (TextCell *cell)
 Set the text cell maxima's incoming text is being appended to (may be null).
 
EditorCellGetActiveCell () const
 The editor cell the blinking text cursor is in, or null.
 
void SetActiveCell (EditorCell *cell)
 Set the editor cell the blinking text cursor is in (may be null).
 
void ClearActiveCell ()
 Forget the editor cell the text cursor was in.
 
const wxString & GetSelectionString () const
 The currently selected string, or empty.
 
void SetSelectionString (const wxString &str)
 Set the currently selected string.
 
void ClearSelectionString ()
 Forget the currently selected string.
 
ErrorListGetErrorList ()
 The list of cells maxima has complained about errors in.
 
const ErrorListGetErrorList () const
 The list of cells maxima has complained about errors in (read-only view).
 

Detailed Description

The document-model half of the cell-pointer registry.

These pointers describe the edited document itself: what is selected, which editor is active or answering maxima's question, which text cell maxima's incoming output is appended to, which group cell maxima is working on, and which group cells hold errors. None of them depend on how the document is displayed, so this half will eventually be owned by WorksheetDocument.

Every stored pointer is a CellPtr, which auto-nulls when its cell is destroyed, so a stale reference reads as null instead of dangling.

Member Function Documentation

◆ GetWorkingGroup()

GroupCell * DocumentCellPointers::GetWorkingGroup ( bool  resortToLast = false) const

Returns the cell maxima currently works on. NULL if there isn't such a cell.

Parameters
resortToLasttrue = if we already have set the cell maxima works on to NULL use the last cell maxima was known to work on.

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