wxMaxima
Classes | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
Cell Class Referenceabstract

#include <Cell.h>

Inheritance diagram for Cell:
Inheritance graph
[legend]
Collaboration diagram for Cell:
Collaboration graph
[legend]

Classes

struct  Range
 
struct  SizeInMillimeters
 For the bitmap export we sometimes want to know how big the result will be... More...
 

Public Member Functions

 Cell (GroupCell *group, Configuration **config)
 
virtual std::unique_ptr< CellCopy (GroupCell *group) const =0
 
virtual const CellTypeInfoGetInfo ()=0
 Returns the information about this cell's type.
 
int Scale_Px (double px) const
 
AFontSize Scale_Px (AFontSize size) const
 
virtual const wxString & GetToolTip (wxPoint point) const
 
virtual ~Cell ()
 Delete this list of cells.
 
int CellsInListRecursive () const
 How many cells does this cell contain? More...
 
wxRect CropToUpdateRegion (wxRect rect) const
 The part of the rectangle rect that is in the region that is currently drawn.
 
bool InUpdateRegion () const
 Is this cell inside the region that is currently drawn?
 
bool SoftLineBreak (bool breakLine=true)
 Do we want this cell to start with a linebreak?
 
bool BreakLineHere () const
 Are we allowed to break a line here?
 
bool HasHardLineBreak () const
 Does this cell begin with a manual linebreak?
 
virtual bool BreakUp ()
 
bool ContainsRect (const wxRect &sm, bool all=true) const
 
bool ContainsPoint (wxPoint point) const
 
virtual void ClearCache ()
 
void ClearCacheList ()
 
void SetConfigurationList (Configuration **config)
 
virtual void SetConfiguration (Configuration **config)
 
ConfigurationGetConfiguration ()
 
virtual void Draw (wxPoint point)
 
void Draw ()
 
void DrawList (wxPoint point)
 
void DrawList ()
 
virtual void DrawBoundingBox (wxDC &WXUNUSED(dc), bool all=false)
 
bool DrawThisCell (wxPoint point)
 
bool DrawThisCell ()
 
void ForceBreakLine (bool force=true)
 
int GetHeight () const
 
int GetWidth () const
 
int GetCenter () const
 
bool HasValidSize () const
 Is the size valid and not pending a recalculation?
 
bool HasStaleSize () const
 Is the size valid, whether a recalculation is pending or not?
 
bool HasValidPosition () const
 Is the position valid?
 
int GetDrop () const
 
CellType GetType () const
 
int GetMaxDrop () const
 
int GetCenterList () const
 
int GetHeightList () const
 
int GetFullWidth () const
 How many pixels is this list of cells wide, if we don't break it into lines?
 
int GetLineWidth () const
 
int GetCurrentX () const
 
int GetCurrentY () const
 
virtual wxRect GetRect (bool all=false) const
 
virtual bool NeedsRecalculation (AFontSize fontSize) const
 True, if something that affects the cell size has changed.
 
virtual wxString GetDiffPart () const
 
virtual void Recalculate (AFontSize fontsize)
 
void RecalculateList (AFontSize fontsize)
 
void FontsChangedList ()
 Tell a whole list of cells that their fonts have changed.
 
void ClearNeedsToRecalculateWidths ()
 
void ResetData ()
 Mark all cached size information as "to be calculated". More...
 
void ResetDataList ()
 
void ResetSize ()
 Mark the cached height and width information as "to be calculated".
 
void ResetCellListSizes ()
 Mark the line and cell list widths and heights as "to be calculated".
 
void ResetCellListSizesList ()
 Mark the line and cell list widths and heights as "to be calculated".
 
void SetZeroSize ()
 
void ResetSizeList ()
 Mark the cached height information of the whole list of cells as "to be calculated".
 
void SetBigSkip (bool skip)
 
bool HasBigSkip () const
 
virtual void SetType (CellType type)
 Sets the text style according to the type.
 
TextStyle GetStyle () const
 
void SetPen (double lineWidth=1.0) const
 Sets the drawing pen to the cell's default foreground color.
 
void SetBrush () const
 Sets the fill brush to the cell's default foreground color.
 
wxColour GetForegroundColor () const
 
void SetHighlight (bool highlight)
 Mark this cell as highlighted (e.G. being in a maxima box)
 
bool GetHighlight () const
 Is this cell highlighted (e.G. inside a maxima box)
 
virtual void SetExponentFlag ()
 
virtual void SetValue (const wxString &WXUNUSED(text))
 
virtual const wxString & GetValue () const
 
Cellfirst () const
 Get the first cell in this list of cells.
 
Celllast () const
 Get the last cell in this list of cells.
 
Range GetCellsInRect (const wxRect &rect) const
 
Range GetListCellsInRect (const wxRect &rect) const
 
virtual Range GetInnerCellsInRect (const wxRect &rect) const
 Select the cells inside this cell described by the rectangle rect.
 
virtual bool IsOperator () const
 Is this cell an operator?
 
bool IsCompound () const
 Do we have an operator in this line - draw () in frac...
 
virtual bool IsShortNum () const
 
GroupCellGetGroup () const
 Returns the group cell this cell belongs to.
 
virtual wxString ListToString () const
 Returns the list's representation as a string.
 
wxString VariablesAndFunctionsList () const
 
virtual wxString ListToMatlab () const
 Convert this list to its LaTeX representation.
 
virtual wxString ListToTeX () const
 Convert this list to its LaTeX representation.
 
virtual wxString ListToXML () const
 Convert this list to a representation fit for saving in a .wxmx file.
 
virtual wxString ListToMathML (bool startofline=false) const
 Convert this list to a MathML representation.
 
virtual wxString ListToOMML (bool startofline=false) const
 Convert this list to an OMML representation.
 
virtual wxString ListToRTF (bool startofline=false) const
 Convert this list to an RTF representation.
 
virtual wxString ToString () const
 Returns the cell's representation as a string.
 
virtual wxString ToRTF () const
 
virtual wxString ToOMML () const
 
virtual wxString ToMatlab () const
 Convert this cell to its Matlab representation.
 
virtual wxString ToTeX () const
 Convert this cell to its LaTeX representation.
 
virtual wxString ToXML () const
 Convert this cell to a representation fit for saving in a .wxmx file.
 
virtual wxString ToMathML () const
 Convert this cell to a representation fit for saving in a .wxmx file.
 
virtual void Unbreak ()
 
virtual void UnbreakList ()
 
CellGetPrevious () const
 
CellGetNext () const
 Get the next cell in the list.
 
CellGetNextToDraw () const
 
virtual void SetNextToDraw (Cell *next)
 
template<typename T , typename Del , typename std::enable_if< std::is_base_of< Cell, T >::value, bool >::type = true>
void SetNextToDraw (const std::unique_ptr< T, Del > &ptr)
 
bool IsComment () const
 
bool IsHidden () const
 
virtual void Hide (bool hide=true)
 
bool IsEditable (bool input=false) const
 
virtual bool CanPopOut () const
 Can this cell be popped out interactively in gnuplot?
 
virtual wxString GnuplotSource () const
 
virtual void ProcessEvent (wxKeyEvent &WXUNUSED(event))
 Processes a key event.
 
virtual bool AddEnding ()
 
virtual void SelectPointText (wxPoint point)
 
virtual void SelectRectText (wxPoint one, wxPoint two)
 
virtual void PasteFromClipboard (bool primary=false)
 
virtual bool CopyToClipboard () const
 
virtual bool CutToClipboard ()
 
virtual void SelectAll ()
 
virtual bool CanCopy () const
 
virtual wxPoint PositionToPoint (int WXUNUSED(pos)=-1)
 
virtual bool IsDirty () const
 
virtual void SwitchCaretDisplay ()
 
virtual void SetFocus (bool WXUNUSED(focus))
 
void SetForeground ()
 Sets the foreground color.
 
virtual bool IsActive () const
 
virtual void SetStyle (TextStyle style)
 Sets the TextStyle of this cell.
 
bool IsMath () const
 Is this cell possibly output of maxima?
 
virtual int GetImageBorderWidth () const
 0 for ordinary cells, 1 for slide shows and diagrams displayed with a 1-pixel border
 
void CopyCommonData (const Cell &cell)
 Copy common data (used when copying a cell)
 
std::unique_ptr< CellCopyList (GroupCell *group) const
 Return a copy of the list of cells beginning with this one.
 
void ClearToolTip ()
 Remove this cell's tooltip.
 
void SetToolTip (wxString &&toolTip)
 Set the tooltip to a given temporary string - the cell will move from it.
 
void SetToolTip (const wxString *tooltip)
 
void AddToolTip (const wxString &tip)
 Add another tooltip to this cell.
 
virtual void SetCurrentPoint (wxPoint point)
 Tells this cell where it is placed on the worksheet.
 
void SetCurrentPoint (int x, int y)
 Tells this cell where it is placed on the worksheet.
 
wxPoint GetCurrentPoint () const
 Where is this cell placed on the worksheet?
 
bool IsBrokenIntoLines () const
 
bool GetSuppressMultiplicationDot () const
 
void SetSuppressMultiplicationDot (bool val)
 
bool GetHidableMultSign () const
 Whether this is a hidable multiplication sign.
 
void SetHidableMultSign (bool val)
 
virtual void SetAltCopyText (const wxString &text)
 
virtual const wxString & GetAltCopyText () const
 Get the text set using SetAltCopyText - may be empty.
 
const wxString & GetLocalToolTip () const
 
- Public Member Functions inherited from Observed
bool IsNull () const
 
bool HasControlBlock () const
 
bool HasOneCellPtr () const
 

Static Public Member Functions

static wxString OMML2RTF (wxXmlNode *node)
 Converts an OMML tag to the corresponding RTF snippet.
 
static wxString OMML2RTF (wxString ommltext)
 Converts OMML math to RTF math.
 
static wxString RTFescape (wxString, bool MarkDown=false)
 Escape a string for RTF.
 
static wxString XMLescape (wxString)
 Escape a string for XML.
 
static std::unique_ptr< CellCopyList (GroupCell *group, const Cell *cell)
 Return a copy of the given list of cells.
 
static std::unique_ptr< CellMakeVisiblyInvalidCell (GroupCell *group, Configuration **config)
 
- Static Public Member Functions inherited from Observed
static size_t GetLiveInstanceCount ()
 
static size_t GetLiveControlBlockInstanceCount ()
 

Protected Member Functions

void BreakUpAndMark ()
 Break up the internal cells of this cell, and mark it as broken up.
 
std::unique_ptr< CellMakeVisiblyInvalidCell () const
 
virtual int GetInnerCellCount () const
 The number of inner cells - for use by the iterators.
 
virtual CellGetInnerCell (int index) const
 
WorksheetGetWorksheet () const
 
virtual void FontsChanged ()
 To be called if the font has changed.
 
CellPointersGetCellPointers () const
 
void InvalidateMaxDrop ()
 

Protected Attributes

wxPoint m_currentPoint {-1, -1}
 
CellPtr< GroupCellm_group
 
CellPtr< Cellm_nextToDraw
 
Configuration ** m_configuration
 
const wxString * m_toolTip
 
int m_height = -1
 The height of this cell.
 
int m_width = -1
 The width of this cell; is recalculated by RecalculateHeight.
 
int m_center = -1
 
AFontSize m_fontSize_Scaled = {}
 The font size is smaller in super- and subscripts.
 
CellType m_type = MC_TYPE_DEFAULT
 
TextStyle m_textStyle = TS_DEFAULT
 

Friends

class CellList
 
class InnerCellIterator
 
template<typename C , typename std::enable_if< std::is_base_of< Cell, C >::value, bool >::type >
auto OnInner (const C *cell)
 Returns an iterable that goes over the inner cells of this cell.
 
template<typename C , typename std::enable_if< std::is_base_of< Cell, C >::value, bool >::type >
auto OnInner (C *cell)
 

Detailed Description

The base class all cell types the worksheet can consist of are derived from

Every Cell is part of two double-linked lists:

Also every list of Cells can be a branch of a tree since every math cell contains a pointer to its parent group cell.

Besides the cell types that are directly user visible there are cells for several kinds of items that are displayed in a special way like abs() statements (displayed as horizontal rules), subscripts, superscripts and exponents. Another important concept realized by a class derived from this one is the group cell that groups all things that are foldable in the gui like:

Attention
Derived classes must test if m_next equals NULL and if it doesn't they have to delete() it.

On systems where wxWidget supports (and is compiled with) accessibility features Cell is derived from wxAccessible which allows every element in the worksheet to identify itself to an eventual screen reader.

Member Function Documentation

◆ AddEnding()

virtual bool Cell::AddEnding ( )
inlinevirtual

Add a semicolon to a code cell, if needed.

Defined in GroupCell and EditorCell

Reimplemented in GroupCell, and EditorCell.

◆ BreakUp()

bool Cell::BreakUp ( )
virtual

Try to split this command into lines to make it fit on the screen

Return values
true= This cell was split into lines.

Reimplemented in FracCell, FunCell, ExptCell, IntCell, SumCell, ParenCell, AbsCell, IntervalCell, LimitCell, ListCell, SqrtCell, ConjugateCell, DiffCell, and LongNumberCell.

◆ CellsInListRecursive()

int Cell::CellsInListRecursive ( ) const

How many cells does this cell contain?

The number of cells the current group contains (-1, if no GroupCell)

◆ ClearCache()

virtual void Cell::ClearCache ( )
inlinevirtual

Clears memory from cached items automatically regenerated when the cell is drawn

The scaled version of the image will be recreated automatically once it is needed.

Reimplemented in ImgCellBase, AnimationCell, and ImgCell.

◆ ClearCacheList()

void Cell::ClearCacheList ( )

Clears the cache of the whole list of cells starting with this one.

For details see ClearCache().

◆ ContainsPoint()

bool Cell::ContainsPoint ( wxPoint  point) const
inline

Is a given point inside this cell?

Parameters
pointThe point to test for collision with this cell

◆ ContainsRect()

bool Cell::ContainsRect ( const wxRect &  sm,
bool  all = true 
) const

Is a part of this cell inside a certain rectangle?

Parameters
smThe rectangle to test for collision with this cell
all
  • true means test this cell and the ones that are following it in the list
  • false means test this cell only.

◆ Copy()

virtual std::unique_ptr<Cell> Cell::Copy ( GroupCell group) const
pure virtual

Create a copy of this cell

This method is purely virtual, which means every child class has to define its own Copy() method.

Implemented in ImgCellBase, FullTestCell, GroupCell, EditorCell, AnimationCell, AbsCell, FunCell, IntervalCell, ParenCell, SetCell, ListCell, ConjugateCell, ExptCell, SqrtCell, SumCell, FracCell, IntCell, LimitCell, ImgCell, TextCell, LabelCell, DigitCell, LongNumberCell, SubSupCell, MatrCell, AtCell, DiffCell, and SubCell.

◆ Draw()

void Cell::Draw ( wxPoint  point)
virtual

Draw this cell

Parameters
pointThe x and y position this cell is drawn at: All top-level cells get their position during recalculation. But for the cells within them the position needs a second step after determining the dimension of the contents of the top-level cell.

Example: The position of the denominator of a fraction can only be determined after the height of denominator and numerator are known.

Draw this cell to dc

To make this work each derived class must draw the content of the cell and then call MathCall::Draw(...).

Reimplemented in ImgCellBase, GroupCell, EditorCell, ImgCell, AbsCell, ParenCell, FunCell, FracCell, ExptCell, IntervalCell, ListCell, SqrtCell, SumCell, SetCell, IntCell, LimitCell, TextCell, SubSupCell, LabelCell, AtCell, DiffCell, MatrCell, DigitCell, LongNumberCell, and SubCell.

◆ DrawBoundingBox()

void Cell::DrawBoundingBox ( wxDC &  WXUNUSEDdc,
bool  all = false 
)
virtual

Draw a rectangle that marks this cell or this list of cells as selected

Parameters
all
  • true: Draw the bounding box around this list of cells
  • false: Draw the bounding box around this cell only
dcThe drawing context the box is drawn in.

◆ DrawList()

void Cell::DrawList ( wxPoint  point)

Draw this list of cells

Parameters
pointThe x and y position this cell is drawn at

◆ DrawThisCell()

bool Cell::DrawThisCell ( wxPoint  point)

Is this cell currently visible in the window?.

◆ ForceBreakLine()

void Cell::ForceBreakLine ( bool  force = true)
inline

Insert (or remove) a forced linebreak at the beginning of this cell.

Parameters
force
  • true: Insert a forced linebreak
  • false: Remove the forced linebreak

◆ GetCellsInRect()

Cell::Range Cell::GetCellsInRect ( const wxRect &  rect) const

Returns the first and last cells within the given rectangle, recursing into the inner cells.

◆ GetCenter()

int Cell::GetCenter ( ) const
inline

Get the distance between the top and the center of this cell.

Remember that (for example with double fractions) the center does not have to be in the middle of a cell even if this object is — by definition — center-aligned.

◆ GetCenterList()

int Cell::GetCenterList ( ) const

Returns the maximum distance between top and center of this line

Note that the center doesn't need to be exactly in the middle of an object. For a fraction for example the center is exactly at the middle of the horizontal line.

◆ GetCurrentX()

int Cell::GetCurrentX ( ) const
inline

Get the x position of the top left of this cell

See m_currentPoint for more details.

◆ GetCurrentY()

int Cell::GetCurrentY ( ) const
inline

Get the y position of the top left of this cell

See m_currentPoint for more details.

◆ GetDrop()

int Cell::GetDrop ( ) const
inline

Get the distance between the center and the bottom of this cell

Remember that (for example with double fractions) the center does not have to be in the middle of an output cell even if the current object is — by definition — center-aligned.

This value is recalculated by Recalculate

◆ GetHeight()

int Cell::GetHeight ( ) const
inline

Get the height of this cell

This value is recalculated by Recalculate()

◆ GetHeightList()

int Cell::GetHeightList ( ) const

Returns the total height of this line

Returns GetCenterList()+GetMaxDrop()

◆ GetInnerCell()

Cell * Cell::GetInnerCell ( int  index) const
protectedvirtual

Retrieve an inner cell with given index which must be less than GetInnerCellCount.

Reimplemented in IterArrayCell< N >, GroupCell, AbsCell, FunCell, IntervalCell, ListCell, ParenCell, ConjugateCell, ExptCell, SqrtCell, SumCell, FracCell, IntCell, LimitCell, LongNumberCell, SubSupCell, AtCell, DiffCell, MatrCell, and SubCell.

◆ GetLineWidth()

int Cell::GetLineWidth ( ) const

How many pixels is the current line of this list of cells wide?

This command returns the real line width when all line breaks are really performed. See GetFullWidth().

◆ GetListCellsInRect()

Cell::Range Cell::GetListCellsInRect ( const wxRect &  rect) const

Returns the first and last cells within the given rectangle, without recursing into the inner cells.

◆ GetMaxDrop()

int Cell::GetMaxDrop ( ) const

Returns the maximum distance between center and bottom of this line

Note that the center doesn't need to be exactly in the middle of an object. For a fraction for example the center is exactly at the middle of the horizontal line.

◆ GetNextToDraw()

Cell* Cell::GetNextToDraw ( ) const
inline

Get the next cell that needs to be drawn

In case of potential 2d objects like fractions either the fraction needs to be drawn as a single 2D object or the nominator, the cell containing the "/" and the denominator are pointed to by GetNextToDraw() as single separate objects.

◆ GetRect()

wxRect Cell::GetRect ( bool  all = false) const
virtual

Get the smallest rectangle this cell fits in

Parameters
all
  • true: Get the rectangle for this cell and the ones that follow it in the list of cells
  • false: Get the rectangle for this cell only.

Reimplemented in GroupCell.

◆ GetSuppressMultiplicationDot()

bool Cell::GetSuppressMultiplicationDot ( ) const
inline

Do we want to begin this cell with a center dot if it is part of a product?

Maxima will represent a product like (a*b*c) by a list like the following: [*,a,b,c]. This would result us in converting (a*b*c) to the following LaTeX code: \left(\cdot a ß\cdot b \cdot c\right) which obviously is one \cdot too many => we need parenthesis cells to set this flag for the first cell in their "inner cell" list.

◆ GetToolTip()

const wxString & Cell::GetToolTip ( wxPoint  point) const
virtual

Returns the ToolTip this cell provides at a given point.

Parameters
pointThe point in worksheet coordinates, must be inside the cell or else an empty string is returned.
Returns
the tooltip text, or empty string if none.

Reimplemented in ImgCellBase, GroupCell, AnimationCell, and ImgCell.

◆ GetType()

CellType Cell::GetType ( ) const
inline

Returns the type of this cell.

◆ GetWidth()

int Cell::GetWidth ( ) const
inline

Get the width of this cell

This value is recalculated by Recalculate()

◆ GnuplotSource()

virtual wxString Cell::GnuplotSource ( ) const
inlinevirtual

Retrieve the gnuplot source data for this image

wxEmptyString means: No such data.

Reimplemented in ImgCellBase, AnimationCell, and ImgCell.

◆ IsBrokenIntoLines()

bool Cell::IsBrokenIntoLines ( ) const
inline

Whether this cell is broken into two or more lines.

Long abs(), conjugate(), fraction and similar cells can be displayed as 2D objects, but will be displayed in their linear form (and therefore broken into lines) if they end up to be wider than the screen. In this case m_isBrokenIntoLines is true.

◆ IsComment()

bool Cell::IsComment ( ) const
inline

Determine if this cell contains text that isn't code

Returns
true, if this is a text cell, a title cell, a section, a subsection or a sub(n)section cell.

◆ IsHidden()

bool Cell::IsHidden ( ) const
inline

Whether this cell is not to be drawn.

Currently the following items fall into this category:

  • parenthesis around fractions or similar things that clearly can be recognized as atoms
  • plus signs within numbers
  • The output in folded GroupCells

◆ Recalculate()

void Cell::Recalculate ( AFontSize  fontsize)
virtual

Recalculate the size of the cell and the difference between top and center

Must set: m_height, m_width, m_center.

Parameters
fontsizeIn exponents, super- and subscripts the font size is reduced. This cell therefore needs to know which font size it has to be drawn at.

Reimplemented in ImgCellBase, EditorCell, ImgCell, AbsCell, ParenCell, FunCell, FracCell, ExptCell, IntervalCell, ListCell, SqrtCell, SumCell, IntCell, LimitCell, TextCell, SubSupCell, LabelCell, AtCell, DiffCell, DigitCell, LongNumberCell, MatrCell, and SubCell.

◆ RecalculateList()

void Cell::RecalculateList ( AFontSize  fontsize)

Recalculate both width and height of this list of cells.

Is faster than a RecalculateHeightList();RecalculateWidths();.

◆ ResetData()

void Cell::ResetData ( )

Mark all cached size information as "to be calculated".

Resets remembered size and position info for this cell and all cells inside it

Resets cached data like width and the height of the current cell as well as the vertical position of the center. Then repeats this with

◆ Scale_Px()

int Cell::Scale_Px ( double  px) const
inline

Scale font sizes and line widths according to the zoom factor.

Is used for displaying/printing/exporting of text/maths

◆ SetAltCopyText()

void Cell::SetAltCopyText ( const wxString &  text)
virtual

What should end up if placing this cell on the clipboard?

AltCopyTexts for example make sense for subCells: a_n looks like a[n], even if both are lookalikes and the cell therefore needs to know what to put on the clipboard if this cell were copied. They also make sense in many other places we may never have thought about. But since we seriously want to save memory space on the ubiuitous TextCells it might be scary to apply this principle to them, at least if you know that text you copy from the internet to a terminal might contain additional commands with TextSize=0...

Reimplemented in TextCell, ExptCell, FunCell, SumCell, SubSupCell, and SubCell.

◆ SetNextToDraw()

virtual void Cell::SetNextToDraw ( Cell next)
inlinevirtual

Tells this cell which one should be the next cell to be drawn

If the cell is displayed as 2d object this sets the pointer to the next cell.

If the cell is broken into lines this sets the pointer of the last of the list of cells this cell is displayed as.

Reimplemented in FracCell, FunCell, ParenCell, AbsCell, IntCell, IntervalCell, SumCell, ListCell, SqrtCell, LimitCell, ConjugateCell, DiffCell, and LongNumberCell.

◆ SetToolTip()

void Cell::SetToolTip ( const wxString *  tooltip)

Set the tooltip of this math cell - it must be exist at least as long as the cell does. Translation results behave that way. I.e. it must be a static string!

◆ ToOMML()

wxString Cell::ToOMML ( ) const
virtual

Returns the cell's representation as OMML

If this method returns wxEmptyString this might mean that this cell is better handled in RTF; The OOML can later be translated to the respective RTF maths commands using OMML2RTF.

Don't know why OMML was implemented in a world that already knows MathML, though.

Reimplemented in FracCell, ParenCell, AbsCell, FunCell, IntCell, IntervalCell, ExptCell, ListCell, SqrtCell, SumCell, TextCell, LimitCell, SubSupCell, MatrCell, AtCell, DiffCell, and SubCell.

◆ ToRTF()

virtual wxString Cell::ToRTF ( ) const
inlinevirtual

Returns the cell's representation as RTF.

If this method returns wxEmptyString this might mean that this cell is better handled in OMML.

Reimplemented in ImgCellBase, GroupCell, EditorCell, ImgCell, and TextCell.

◆ Unbreak()

void Cell::Unbreak ( )
virtual

Undo breaking this cell into multiple lines

Some cells have different representations when they contain a line break. Examples for this are fractions or a set of parenthesis.

This function tries to return a cell to the single-line form.

Reimplemented in SumCell.

◆ UnbreakList()

void Cell::UnbreakList ( )
virtual

Unbreak this line

Some cells have different representations when they contain a line break. Examples for this are fractions or a set of parenthesis.

This function tries to return a list of cells to the single-line form.

◆ VariablesAndFunctionsList()

wxString Cell::VariablesAndFunctionsList ( ) const

Returns all variable and function names used inside this list of cells.

Used for detecting lookalike chars in function and variable names.

Member Data Documentation

◆ m_currentPoint

wxPoint Cell::m_currentPoint {-1, -1}
protected

The point in the work sheet at which this cell begins.

The begin of a cell is defined as

  • x=the left border of the cell
  • y=the vertical center of the cell. Which (per example in the case of a fraction) might not be the physical center but the vertical position of the horizontal line between numerator and denominator.

The current point is recalculated

  • for GroupCells by GroupCell::RecalculateHeight
  • for EditorCells by it's GroupCell's RecalculateHeight and
  • for Cells when they are drawn.

◆ m_group

CellPtr<GroupCell> Cell::m_group
protected

The GroupCell this list of cells belongs to.

◆ m_nextToDraw

CellPtr<Cell> Cell::m_nextToDraw
protected

The next cell in the draw list. This has been factored into Cell temporarily to reduce the change "noise" when it will be subsequently removed.

◆ m_toolTip

const wxString* Cell::m_toolTip
protected

This tooltip is owned by us when m_ownsToolTip is true. Otherwise, it points to a "static" string.


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