wxMaxima
Loading...
Searching...
No Matches
Cell.h
Go to the documentation of this file.
1// -*- mode: c++; c-file-style: "linux"; c-basic-offset: 2; indent-tabs-mode: nil -*-
2//
3// Copyright (C) 2004-2015 Andrej Vodopivec <andrej.vodopivec@gmail.com>
4// Copyright (C) 2014-2018 Gunter Königsmann <wxMaxima@physikbuch.de>
5// Copyright (C) 2020 Kuba Ober <kuba@bertec.com>
6//
7// This program is free software; you can redistribute it and/or modify
8// it under the terms of the GNU General Public License as published by
9// the Free Software Foundation; either version 2 of the License, or
10// (at your option) any later version.
11//
12// This program is distributed in the hope that it will be useful,
13// but WITHOUT ANY WARRANTY; without even the implied warranty of
14// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15// GNU General Public License for more details.
16//
17//
18// You should have received a copy of the GNU General Public License
19// along with this program; if not, write to the Free Software
20// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21//
22// SPDX-License-Identifier: GPL-2.0+
23
29#ifndef CELL_H
30#define CELL_H
31
32#include "../precomp.h"
33#include "CellPtr.h"
34#include "CellIterators.h"
35#include "Configuration.h"
36#include "StringUtils.h"
37#include "TextStyle.h"
38#include "CachedValue.h"
39#include <wx/defs.h>
40#if wxUSE_ACCESSIBILITY
41#include <wx/access.h>
42#endif // wxUSE_ACCESSIBILITY
43#include <algorithm>
44#include <map>
45#include <memory>
46#include <vector>
47#include <type_traits>
50class EditorCell;
51class GroupCell;
52class TextCell;
53class wxXmlNode;
54
55// Forward declarations
56template <typename C, typename std::enable_if<std::is_base_of<Cell, C>::value, bool>::type = true>
57inline auto OnInner(const C *cell);
58template <typename C, typename std::enable_if<std::is_base_of<Cell, C>::value, bool>::type = true>
59inline auto OnInner(C *cell);
60
63enum CellType : int8_t
64{
65 MC_TYPE_DEFAULT,
83};
85std::ostream& operator<<(std::ostream& out, const CellType celltype);
86
87#if wxUSE_ACCESSIBILITY
88class CellAccessible;
89#endif
90
93{
94public:
100 virtual const wxString &GetName() const = 0;
101};
102
146// 120 bytes
147class Cell: public Observed
148{
149#if wxUSE_ACCESSIBILITY
150 friend class CellAccessible;
151#endif
152 friend class CellList;
153
154
155 template <typename C, typename std::enable_if<std::is_base_of<Cell, C>::value, bool>::type>
156 friend inline auto OnInner(const C *cell);
157 template <typename C, typename std::enable_if<std::is_base_of<Cell, C>::value, bool>::type>
158 friend inline auto OnInner(C *cell);
159
160public:
163 // This class can be derived from wxAccessible which has no copy constructor
164 void operator=(const Cell&) = delete;
165 Cell(GroupCell *group, const Cell&) = delete;
166
172 virtual std::unique_ptr<Cell> Copy(GroupCell *group) const = 0;
173
175 virtual const CellTypeInfo &GetInfo() = 0;
176
181 wxCoord Scale_Px(double px) const {return m_configuration->Scale_Px(px);}
186 AFontSize Scale_Px(AFontSize size) const { return m_configuration->Scale_Px(size); }
187
188#if wxUSE_ACCESSIBILITY
189 // The methods whose implementation within Cell should be sufficient are
190 // not virtual. Should that prove not to be the case eventually, they can be
191 // made virtual with due caution.
193 wxAccStatus GetParent (Cell ** parent) const;
195 wxAccStatus GetChild(int childId, Cell **child) const;
197 wxAccStatus HitTest (const wxPoint &pt, int *childId, Cell **child);
198
200 virtual wxAccStatus GetName (int childId, wxString *name) const;
202 virtual wxAccStatus GetDescription(int childId, wxString *description) const;
204 virtual wxAccStatus GetFocus (int *childId, Cell **child) const;
206 virtual wxAccStatus GetDefaultAction(int childId, wxString *actionName) const;
208 virtual wxAccStatus GetLocation (wxRect &rect, int elementId);
210 virtual wxAccStatus GetValue (int childId, wxString *strValue) const;
211 virtual wxAccStatus GetRole (int childId, wxAccRole *role) const;
213 virtual wxAccStatus GetState (int childId, long *state) const;
214#endif
215
216
224 virtual const wxString GetToolTip(wxPoint point) const;
225
233 virtual wxString GetLinkAt(wxPoint point);
234
236 virtual ~Cell();
237
239 unsigned long CellsInListRecursive() const;
240
242 wxRect CropToUpdateRegion(wxRect rect) const;
243
245 bool InUpdateRegion() const;
246
248 void SoftLineBreak(bool breakLine = true) const
249 {
250 bool newBreak = breakLine || m_forceBreakLine;
251 if (m_breakLine != newBreak)
252 {
253 m_breakLine = newBreak;
254 InvalidateListCache();
255 }
256 }
257
262 bool BreakUpCells() const;
263
265 struct WideCell {
266 const Cell *cell;
270 };
271
283 void CollectWideCells(std::vector<WideCell> &wideCells,
284 int clientWidth, int parent = -1) const;
285
287 bool UnBreakUpCells() const;
288
311 void BreakLines_List() const;
312
314 int GetLineIndent() const;
315
317 bool BreakLineHere() const { return m_breakLine || m_forceBreakLine; }
318
320 bool HasHardLineBreak() const { return m_forceBreakLine; }
321
328 virtual bool IsTextContinuation() const { return false; }
329
337 bool IsAtLineBreak() const { return m_atLineBreak; }
338
344 void SetAtLineBreak(bool atLineBreak) const;
345
351 bool IsHiddenMultSign() const;
352
358 bool IsDrawnHidden() const;
359
366 virtual wxCoord GetWidthAtLineBreak() const { return GetWidth(); }
367
372 virtual bool BreakUp() const;
373
388 virtual std::vector<wxCoord> PageBreakCandidates() const { return {}; }
389
390protected:
396 void BreakUpAndMark() const;
397
398protected:
400 wxBitmap BitmapFromSVG(wxString svgData, wxSize size);
401public:
409 bool ContainsRect(const wxRect &sm, bool all = true) const;
410
415 bool ContainsPoint(wxPoint point) const { return GetRect().Contains(point); }
416
422 virtual void ClearCache()
423 {}
424
429 void ClearCacheList();
430
439 virtual void TallyImageLoadFailures(int &WXUNUSED(dataUnavailable),
440 int &WXUNUSED(decodeFailed)) const
441 {}
442
452 void TallyImageLoadFailures_Recursively(int &dataUnavailable,
453 int &decodeFailed) const;
454
458 void TallyImageLoadFailures_RecursivelyList(int &dataUnavailable,
459 int &decodeFailed) const;
463 virtual void SetConfiguration(Configuration *config);
466
467
473 virtual void Draw(wxDC *dc, wxDC *antialiassingDC);
474
480 void DrawList(wxDC *dc, wxDC *adc);
481
489 virtual void DrawBoundingBox(wxDC &WXUNUSED(dc), bool all = false);
490
496 bool DrawThisCell();
497
504 void ForceBreakLine(bool force = true) const
505 {
506 if (m_forceBreakLine != force || m_breakLine != force)
507 {
508 m_forceBreakLine = m_breakLine = force;
509 InvalidateListCache();
510 }
511 }
512
514 wxString GetUUID() const { return m_rareData ? m_rareData->uuid : wxString(); }
516 void SetUUID(const wxString &uuid);
518 void GenerateUUID();
524 bool HasRareCellData() const { return m_rareData != nullptr; }
526 wxString GetExtraXMLAttributes() const;
528 void AddExtraAttribute(const wxString &name, const wxString &value);
529
536 wxCoord GetHeight() const;
537
544 int GetWidth() const;
545
553 wxCoord GetCenter() const;
554
556 bool HasValidSize() const;
558 bool HasStaleSize() const;
560 bool HasValidPosition() const;
561
573 wxCoord GetDrop() const
574 { return GetHeight() - GetCenter(); }
575
580 { return m_type; }
581
588 virtual wxCoord GetMaxDrop() const;
589
596 virtual wxCoord GetCenterList() const;
597
602 virtual wxCoord GetHeightList() const;
603
613 wxCoord SumOfWidths() const;
614
620 wxCoord GetLineWidth() const;
621
626 wxCoord GetCurrentX() const
627 { return m_currentPoint.x; }
628
633 wxCoord GetCurrentY() const
634 { return m_currentPoint.y; }
635
642 virtual wxRect GetRect(bool wholeList = false) const;
643
645 virtual bool NeedsRecalculation(AFontSize fontSize) const;
648
650 void ScheduleRecalculation() const {m_cellCfgCnt_last = m_configuration->CellCfgCnt() - 1 ;}
652 bool ConfigChanged() const {return m_configuration->CellCfgCnt() != m_cellCfgCnt_last;}
659 virtual wxString GetDiffPart() const;
660
668 virtual void Recalculate(AFontSize fontsize) const;
669
680 bool RecalculateList(AFontSize fontsize) const;
681
692 bool RecalculateTracked(AFontSize fontsize) const;
693
703 bool FontSizeMatchesExpectation() const;
704
706 void FontsChangedList();
707
709 void ResetSize_Recursively() const;
710
712 void ResetSize_RecursivelyList() const;
713
715 void ResetSize() const;
716
718 void ResetSizeList() const;
719
721 void SetBigSkip(bool skip) { m_bigSkip = skip; }
723 bool HasBigSkip() const { return m_bigSkip; }
724
726 virtual void SetType(CellType type);
727
729 const TextStyle &GetTextStyle() const
730 { return m_textStyle; }
731
733 // cppcheck-suppress functionStatic
734 // cppcheck-suppress functionConst
735 void SetPen(wxDC *dc, double lineWidth = 1.0) const;
737 void SetBrush(wxDC *dc) const;
746 void DrawAngleBracketsAround(wxDC *dc, wxDC *antialiassingDC, Cell *open,
747 Cell *close, const Cell *contents) const;
748 wxColour GetForegroundColor() const;
749
751 void SetHighlight(bool highlight) { m_highlight = highlight; }
753 bool GetHighlight() const { return m_highlight; }
754
759 virtual void SetIsExponent();
760
765 virtual void SetIsExponentList();
766
771 virtual void SetValue(const wxString &WXUNUSED(text)) {}
773 virtual const wxString &GetValue() const;
774 virtual const wxString GetDisplayedString() const {return GetValue();}
775
777 Cell *first() const;
778
780 Cell *last() const;
781
783 struct Range {
784 Cell *first, *last;
785 };
786
790 Range GetCellsInRect(const wxRect &rect) const;
791
795 Range GetListCellsInRect(const wxRect &rect) const;
796
798 virtual Range GetInnerCellsInRect(const wxRect &rect) const;
799
801 virtual bool IsOperator() const { return false; }
802
804 bool IsCompound() const;
805
807 virtual bool IsShortNum() const { return false; }
808
810 GroupCell *GetGroup() const;
811
814 {
815 public:
816 double x, y;
817 };
818
820 virtual wxString ListToString() const;
821
826 wxString VariablesAndFunctionsList() const;
828 virtual wxString ListToMatlab() const;
830 virtual wxString ListToTeX() const;
835 virtual wxString ListToTypst() const;
837 virtual wxString ListToXML() const;
838
840 virtual wxString ListToMathML(bool startofline = false) const;
841
843 virtual wxString ListToOMML(bool startofline = false) const;
844
846 virtual wxString ListToRTF(bool startofline = false) const;
847
849 virtual wxString ToString() const;
850
856 virtual wxString ToRTF() const
857 { return wxEmptyString; }
858
860 static wxString OMML2RTF(wxXmlNode *node);
861
863 static wxString OMML2RTF(wxString ommltext);
864
874 virtual wxString ToOMML() const;
876 virtual wxString ToMatlab() const;
878 virtual wxString ToTeX() const;
879
888 static wxString TeXGroup(const wxString &tex);
889
897 static bool TeXNeedsGrowingDelimiters(const wxString &tex);
898
905 virtual wxString ToTypst() const;
907 virtual wxString ToXML() const;
908 virtual wxString GetXMLFlags() const;
910 virtual wxString ToMathML() const;
911
913 static wxString RTFescape(wxString, bool MarkDown = false);
914
916 static wxString XMLescape(wxString);
917
918 // cppcheck-suppress functionStatic
919 // cppcheck-suppress functionConst
920
928 virtual void Unbreak() const;
929
937 virtual void UnbreakList() const;
938
940 Cell *GetPrevious() const { return m_previous; }
941
943 Cell *GetNext() const { return m_next.get(); }
944
967 virtual size_t GetBrokenCellCount() const { return GetInnerCellCount(); }
969 virtual Cell *GetBrokenCell(size_t index) const { return GetInnerCell(index); }
970
975 bool IsComment() const
976 {
977 return m_type == MC_TYPE_TEXT || m_type == MC_TYPE_SECTION ||
978 m_type == MC_TYPE_SUBSECTION || m_type == MC_TYPE_SUBSUBSECTION ||
979 m_type == MC_TYPE_HEADING5 || m_type == MC_TYPE_HEADING6 || m_type == MC_TYPE_TITLE;
980 }
981
991 bool IsHidden() const { return m_isHidden; }
992
994 virtual bool FirstLineOnlyEditor() const;
995
997 virtual void Hide(bool hide = true) { m_isHidden = hide; }
998
1003 bool IsEditable(bool input = false) const
1004 {
1005 return (m_type == MC_TYPE_INPUT &&
1006 m_previous && m_previous->m_type == MC_TYPE_MAIN_PROMPT)
1007 || (!input && IsComment());
1008 }
1009
1011 virtual bool CanPopOut() const { return false; }
1012
1017 virtual wxString GnuplotSource() const {return wxEmptyString;}
1018
1020 virtual void ProcessEvent(wxKeyEvent &WXUNUSED(event))
1021 {}
1022
1027 virtual bool AddEnding()
1028 { return false; }
1029
1031 virtual void SelectPointText(wxPoint point);
1032
1034 virtual void SelectRectText(wxPoint one, wxPoint two);
1035
1042 virtual void PasteFromClipboard(bool primary = false);
1043
1047 virtual bool CopyToClipboard() const
1048 { return false; }
1049
1053 virtual bool CutToClipboard()
1054 { return false; }
1055
1057 virtual void SelectAll()
1058 {}
1059
1061 virtual bool CanCopy() const
1062 { return false; }
1063
1065 virtual wxPoint PositionToPoint(size_t WXUNUSED(pos))
1066 { return wxDefaultPosition; }
1067
1069 virtual wxPoint PositionToPoint()
1070 { return wxDefaultPosition; }
1071
1073 virtual bool IsDirty() const
1074 { return false; }
1075
1076 virtual void SwitchCaretDisplay()
1077 {}
1078
1080 virtual void SetFocus(bool WXUNUSED(focus))
1081 {}
1082
1084 void SetTextColor(wxDC *dc);
1085
1087 virtual bool IsActive() const
1088 { return false; }
1089
1091 virtual void SetStyle(TextStyle style)
1092 {
1094 m_textStyle = style;
1095 }
1097 bool IsMath() const;
1098
1100 virtual int GetImageBorderWidth() const { return 0; }
1101
1103 void CopyCommonData(const Cell & cell);
1104
1106 std::unique_ptr<Cell> CopyList(GroupCell *group) const;
1107
1109 static std::unique_ptr<Cell> CopyList(GroupCell *group, const Cell *cell);
1110
1112 void ClearToolTip();
1114 void SetToolTip(const wxString &tooltip) const ;
1118 void SetToolTip(const wxString *toolTip) const;
1120 void AddToolTip(const wxString &tip);
1121
1134
1143 virtual void SetCurrentPoint(wxPoint point) const;
1144
1148 void SetCurrentPoint(int x, int y) const { SetCurrentPoint({x, y}); }
1149
1156 void SetCurrentPointList(wxPoint point);
1157
1164 void SetCurrentPointDrawList(wxPoint point);
1165
1169 wxPoint GetCurrentPoint() const {return m_currentPoint;}
1171
1178 bool IsBrokenIntoLines() const { return m_isBrokenIntoLines; }
1179
1188 bool GetSuppressMultiplicationDot() const { return m_suppressMultiplicationDot; }
1189 void SetSuppressMultiplicationDot(bool val) { m_suppressMultiplicationDot = val; }
1191 bool GetHidableMultSign() const { return m_isHidableMultSign; }
1192 void SetHidableMultSign(bool val) { m_isHidableMultSign = val; }
1193
1204 virtual void SetAltCopyText(const wxString &text);
1206 virtual const wxString &GetAltCopyText() const { return wxm::emptyString; }
1207
1208#if wxUSE_ACCESSIBILITY
1209 CellAccessible *GetAccessible();
1210#endif
1211#if CELL_TEST
1212 void MockBreakUp() { m_isBrokenIntoLines = 1; }
1213#endif
1214
1215 static wxString wxColor2HtmlString(wxColor col);
1216protected:
1217 std::unique_ptr<Cell> MakeVisiblyInvalidCell() const;
1218public:
1219 static std::unique_ptr<Cell> MakeVisiblyInvalidCell(GroupCell *group, Configuration *config);
1220
1221protected:
1222//** Bases and internal members (16 bytes)
1223//**
1224// VTable *__vtable;
1225// Observed __observed;
1226
1227//** 8-byte objects (8 bytes)
1228//**
1242 mutable wxPoint m_currentPoint{-1, -1};
1243
1244protected:
1245//** 8/4-byte objects (40 + 8* bytes)
1246//**
1247
1248private:
1250 mutable std::atomic<std::int_fast32_t> m_cellCfgCnt_last = { -1 };
1260 mutable std::atomic<std::int_fast32_t> m_listCacheCfgCnt = { -1 };
1262 std::unique_ptr<Cell> m_next;
1263
1265 Cell *m_previous = {};
1266
1267#if wxUSE_ACCESSIBILITY
1268 std::unique_ptr<CellAccessible> m_accessible;
1269#endif
1270
1271public:
1272 const wxString &GetLocalToolTip() const;
1273protected:
1276
1279
1282 mutable const wxString *m_toolTip /* initialized in the constructor */;
1283
1284//** 4-byte objects (28 bytes)
1285//**
1286protected:
1314protected:
1315//** 2-byte objects (2 bytes)
1316//**
1320 mutable AFontSize m_fontSize = {};
1328
1329//** 1-byte objects (2 bytes)
1330//**
1331 // The celltype of this object
1332 CellType m_type = MC_TYPE_DEFAULT;
1333 // The text style of this object
1334 TextStyle m_textStyle = TS_MATH;
1335
1336private:
1337//** Bitfield objects (2 bytes)
1338//**
1346 void UpdateListCaches() const;
1347
1349 mutable bool m_ownsToolTip : 1 = false;
1350 bool m_bigSkip : 1 = false;
1351 mutable bool m_isBrokenIntoLines : 1 = false;
1352 bool m_isHidden : 1 = false;
1353 bool m_isHidableMultSign : 1 = false;
1354 bool m_suppressMultiplicationDot : 1 = false;
1356 mutable bool m_breakLine : 1 = false;
1358 mutable bool m_atLineBreak : 1 = false;
1368 struct RareCellData {
1370 wxString uuid;
1372 std::map<wxString, wxString> extraAttributes;
1373 };
1374 std::unique_ptr<RareCellData> m_rareData;
1376 RareCellData &RareData();
1377protected:
1378 mutable bool m_forceBreakLine : 1 = false;
1379 bool m_highlight : 1 = false;
1380
1381protected:
1382 friend class InnerCellIterator;
1384 virtual size_t GetInnerCellCount() const;
1387 virtual Cell *GetInnerCell(size_t index) const;
1388
1390 virtual void FontsChanged() const
1392
1397
1398 void InvalidateListCache() const;
1399};
1400
1401// The static cast here requires Cell to be defined
1402template <typename T>
1403template <typename PtrT, typename std::enable_if<std::is_pointer<PtrT>::value, bool>::type>
1404inline PtrT CellPtr<T>::CastAs() const noexcept { return dynamic_cast<PtrT>(static_cast<Cell*>(base_get())); }
1405
1406#if wxUSE_ACCESSIBILITY
1407class CellAccessible final : public wxAccessible
1408{
1409public:
1410 explicit CellAccessible(Cell *const forCell) : m_cell(forCell) {}
1411
1413 wxAccStatus GetName (int childId, wxString *name) override;
1415 wxAccStatus GetParent (wxAccessible **parent) override;
1417 wxAccStatus GetChildCount (int *childCount) override;
1419 wxAccStatus GetChild (int childId, wxAccessible **child) override;
1421 wxAccStatus HitTest (const wxPoint &pt,
1422 int *childId, wxAccessible **child) override;
1424 wxAccStatus GetDescription(int childId, wxString *description) override;
1426 wxAccStatus GetDefaultAction(int childId, wxString *actionName) override;
1428 wxAccStatus GetFocus (int *childId, wxAccessible **child) override;
1430 wxAccStatus GetLocation (wxRect &rect, int elementId) override;
1432 wxAccStatus GetValue (int childId, wxString *strValue) override;
1433 wxAccStatus GetRole (int childId, wxAccRole *role) override;
1435 wxAccStatus GetState (int childId, long *state) override;
1436private:
1437 Cell *const m_cell;
1438};
1439#endif
1440
1442template <typename C, typename std::enable_if<std::is_base_of<Cell, C>::value, bool>::type = true>
1443inline auto OnList(const C *cell) { return CellListAdapter<const C>(cell); }
1444template <typename C, typename std::enable_if<std::is_base_of<Cell, C>::value, bool>::type = true>
1445inline auto OnList(C *cell) { return CellListAdapter<C>(cell); }
1446
1448template <typename C, typename std::enable_if<std::is_base_of<Cell, C>::value, bool>::type = true>
1449inline auto OnDrawList(const C *cell) { return CellDrawListAdapter<const C>(cell); }
1450template <typename C, typename std::enable_if<std::is_base_of<Cell, C>::value, bool>::type = true>
1451inline auto OnDrawList(C *cell) { return CellDrawListAdapter<C>(cell); }
1452
1454template <typename C, typename std::enable_if<std::is_base_of<Cell, C>::value, bool>::type>
1455inline auto OnInner(const C *cell) { return InnerCellAdapter(const_cast<Cell *>(cell)); }
1456template <typename C, typename std::enable_if<std::is_base_of<Cell, C>::value, bool>::type>
1457inline auto OnInner(C *cell) { return InnerCellAdapter(cell); }
1458
1459inline size_t InnerCellIterator::GetInnerCellCount(const Cell *cell) { return cell->GetInnerCellCount(); }
1460inline Cell *InnerCellIterator::GetInnerCell(const Cell *cell, size_t index) { return cell->GetInnerCell(index); }
1461
1462#endif // CELL_H
Declares "mostly read-only" wrappers around values that are expensive to compute and are thus cached.
Declares the various iterators useful with the Cell class.
Implementation of an observing weak Cell pointer.
auto OnList(const C *cell)
Returns an iterable the goes over the cell list, starting with given, possibly null,...
Definition: Cell.h:1443
std::ostream & operator<<(std::ostream &out, const CellType celltype)
Allow Standard c++ streams to print out our enum values as text.
Definition: Cell.cpp:2056
auto OnDrawList(const C *cell)
Returns an iterable that goes over the cell draw list, starting with given, possibly null,...
Definition: Cell.h:1449
CellType
The supported types of math cells.
Definition: Cell.h:64
@ MC_TYPE_WARNING
A warning output by maxima.
Definition: Cell.h:70
@ MC_TYPE_PROMPT
Maxima questions or lisp prompts.
Definition: Cell.h:67
@ MC_TYPE_SECTION
A section name.
Definition: Cell.h:78
@ MC_TYPE_ASCIIMATHS
Equations displayed in 2D.
Definition: Cell.h:73
@ MC_TYPE_LABEL
An output label generated by maxima.
Definition: Cell.h:68
@ MC_TYPE_GROUP
A group cells that bundles several individual cells together.
Definition: Cell.h:82
@ MC_TYPE_MAIN_PROMPT
Input labels.
Definition: Cell.h:66
@ MC_TYPE_SUBSECTION
A subsection name.
Definition: Cell.h:74
@ MC_TYPE_INPUT
A cell containing code.
Definition: Cell.h:69
@ MC_TYPE_HEADING5
A subsubsection name.
Definition: Cell.h:76
@ MC_TYPE_TITLE
The title of the document.
Definition: Cell.h:79
@ MC_TYPE_SLIDE
An animation created by the with_slider_* maxima commands.
Definition: Cell.h:81
@ MC_TYPE_SUBSUBSECTION
A subsubsection name.
Definition: Cell.h:75
@ MC_TYPE_HEADING6
A subsubsection name.
Definition: Cell.h:77
@ MC_TYPE_TEXT
Text that isn't passed to maxima.
Definition: Cell.h:72
@ MC_TYPE_IMAGE
An image.
Definition: Cell.h:80
@ MC_TYPE_ERROR
An error output by maxima.
Definition: Cell.h:71
auto OnInner(const C *cell)
Returns an iterable that goes over the inner cells of this cell.
Definition: Cell.h:1455
This file declares everything needed for the text style system used to style all the elements on the ...
TextStyle
All text styles known to wxMaxima.
Definition: TextStyle.h:230
int group
Neighbouring sections of the same group aren't separated.
Definition: ToolBarSections.cpp:45
A Type-Safe Fixed-Point Font Size.
Definition: FontAttribs.h:99
Definition: diagrams_c.h:5
A cached integer value.
Definition: CachedValue.h:45
Definition: CellIterators.h:174
Definition: CellIterators.h:75
Definition: CellList.h:151
A weak non-owning pointer that becomes null whenever the observed object is destroyed.
Definition: CellPtr.h:539
A class that carries information about the type of a cell.
Definition: Cell.h:93
virtual const wxString & GetName() const =0
The name of the cell type, e.g.
The base class all cell types the worksheet can consist of are derived from.
Definition: Cell.h:148
bool ConfigChanged() const
Has the configuration changed since the last recalculation of this cell?
Definition: Cell.h:652
bool FontSizeMatchesExpectation() const
Does this cell's font size match what its owner last dictated?
Definition: Cell.cpp:585
virtual wxString ToMatlab() const
Convert this cell to its Matlab representation.
Definition: Cell.cpp:1009
virtual const wxString GetToolTip(wxPoint point) const
Returns the ToolTip this cell provides at a given point.
Definition: Cell.cpp:79
bool InUpdateRegion() const
Is this cell inside the region that is currently drawn?
Definition: Cell.cpp:921
virtual void DrawBoundingBox(wxDC &WXUNUSED(dc), bool all=false)
Draw a rectangle that marks this cell or this list of cells as selected.
Definition: Cell.cpp:949
void SetAtLineBreak(bool atLineBreak) const
Tell this cell whether it is directly before or after a soft line break.
Definition: Cell.cpp:779
bool IsBrokenIntoLines() const
Whether this cell is broken into two or more lines.
Definition: Cell.h:1178
void SetPen(wxDC *dc, double lineWidth=1.0) const
Sets the drawing pen to the cell's default foreground color.
Definition: Cell.cpp:1652
void CopyCommonData(const Cell &cell)
Copy common data (used when copying a cell)
Definition: Cell.cpp:215
virtual void PasteFromClipboard(bool primary=false)
Paste from the clipboard into this cell.
Definition: Cell.cpp:1424
bool IsHidden() const
Whether this cell is not to be drawn.
Definition: Cell.h:991
Range GetCellsInRect(const wxRect &rect) const
Returns the first and last cells within the given rectangle, recursing into the inner cells.
Definition: Cell.cpp:1459
virtual size_t GetInnerCellCount() const
The number of inner cells - for use by the iterators.
Definition: Cell.cpp:2047
void ResetSize_RecursivelyList() const
Mark all cached size information of this cell list as "to be calculated".
Definition: Cell.cpp:1514
virtual int GetImageBorderWidth() const
0 for ordinary cells, 1 for slide shows and diagrams displayed with a 1-pixel border
Definition: Cell.h:1100
virtual wxString ToOMML() const
Returns the cell's representation as OMML.
Definition: Cell.cpp:1337
virtual wxString ToTypst() const
Convert this cell to Typst maths (GH #2687)
Definition: Cell.cpp:1118
void SetBigSkip(bool skip)
Tell this cell to cause an additional vertical space.
Definition: Cell.h:721
bool IsDrawnHidden() const
Is this cell drawn as empty space on the screen?
Definition: Cell.cpp:799
void TallyImageLoadFailures_Recursively(int &dataUnavailable, int &decodeFailed) const
Recursively visits this cell and everything nested inside it (including an image produced by the very...
Definition: Cell.cpp:1519
bool HasBigSkip() const
Does this cell come with an additional vertical space.
Definition: Cell.h:723
virtual void UnbreakList() const
Unbreak this line.
Definition: Cell.cpp:1607
wxRect CropToUpdateRegion(wxRect rect) const
The part of the rectangle rect that is in the region that is currently drawn.
Definition: Cell.cpp:276
void SoftLineBreak(bool breakLine=true) const
Do we want this cell to start with a linebreak?
Definition: Cell.h:248
CellPtr< GroupCell > m_group
The GroupCell this list of cells belongs to.
Definition: Cell.h:1275
virtual wxString ListToMatlab() const
Convert this list to its LaTeX representation.
Definition: Cell.cpp:1011
virtual wxString ListToOMML(bool startofline=false) const
Convert this list to an OMML representation.
Definition: Cell.cpp:1339
GroupCell * GetGroup() const
Returns the group cell this cell belongs to.
Definition: Cell.cpp:291
bool HasRareCellData() const
Whether this cell carries a UUID or unknown XML attributes.
Definition: Cell.h:524
virtual bool IsActive() const
Is this editor cell focused?
Definition: Cell.h:1087
Configuration * GetConfiguration()
Which configuration object is responsible for this cell?
Definition: Cell.h:465
virtual wxString ListToString() const
Returns this cell list's representation as a string.
Definition: Cell.cpp:979
void BreakUpAndMark() const
Break up the internal cells of this cell, and mark it as broken up.
Definition: Cell.cpp:1585
void ForceBreakLine(bool force=true) const
Insert (or remove) a forced linebreak at the beginning of this cell.
Definition: Cell.h:504
virtual wxRect GetRect(bool wholeList=false) const
Get the smallest rectangle this cell fits in.
Definition: Cell.cpp:912
void AddExtraAttribute(const wxString &name, const wxString &value)
Adds an extra XML attribute to this cell.
Definition: Cell.cpp:2106
virtual wxCoord GetHeightList() const
Returns the total height of this line.
Definition: Cell.cpp:408
virtual void FontsChanged() const
To be called if the font has changed.
Definition: Cell.h:1390
virtual wxCoord GetCenterList() const
Returns the maximum distance between top and center of this line.
Definition: Cell.cpp:398
AFontSize m_fontSize_expected
The font size this cell's owner last dictated (via RecalculateTracked()).
Definition: Cell.h:1327
void ClearToolTip()
Remove this cell's tooltip.
Definition: Cell.cpp:475
wxString GetUUID() const
Returns the UUID of this cell.
Definition: Cell.h:514
virtual wxString GetLinkAt(wxPoint point)
The address of the link drawn at the screen coordinate point, if any (GH #2396).
Definition: Cell.cpp:93
wxCoord GetHeight() const
Get the height of this cell.
Definition: Cell.cpp:299
Cell * GetNext() const
Get the next cell in the list.
Definition: Cell.h:943
virtual void SelectAll()
Select all editable text of this cell.
Definition: Cell.h:1057
virtual Cell * GetBrokenCell(size_t index) const
Retrieve a piece of this cell's broken (linear/1D) display; see GetBrokenCellCount().
Definition: Cell.h:969
bool HasValidPosition() const
Has this cell been given a position yet? A negative one counts, too.
Definition: Cell.cpp:649
virtual void Unbreak() const
Undo breaking this cell into multiple lines.
Definition: Cell.cpp:1595
int GetLineIndent() const
If this were the beginning of a line: How far do we need to indent it?
Definition: Cell.cpp:672
void SetCurrentPointList(wxPoint point)
Helper to position a horizontal list of cells.
Definition: Cell.cpp:537
virtual void SetValue(const wxString &WXUNUSED(text))
Allows to change the text a TextCell contains.
Definition: Cell.h:771
wxCoord Scale_Px(double px) const
Scale font sizes and line widths according to the zoom factor.
Definition: Cell.h:181
CachedInteger< wxCoord > m_cachedLineWidth
Cache for GetLineWidth(): the width of only the first display line of the list starting at this cell ...
Definition: Cell.h:1313
virtual void TallyImageLoadFailures(int &WXUNUSED(dataUnavailable), int &WXUNUSED(decodeFailed)) const
Blocks until this cell's own image (if any) has finished loading, then adds 1 to dataUnavailable or d...
Definition: Cell.h:439
bool ContainsPoint(wxPoint point) const
Is a given point inside this cell?
Definition: Cell.h:415
virtual bool IsShortNum() const
True if this cell represents a short number.
Definition: Cell.h:807
CellType GetType() const
Returns the type of this cell.
Definition: Cell.h:579
void SetTextColor(wxDC *dc)
Sets the text color.
Definition: Cell.cpp:1667
virtual bool CanCopy() const
Select Can we copy the editable text of this cell?
Definition: Cell.h:1061
virtual wxString ListToMathML(bool startofline=false) const
Convert this list to a MathML representation.
Definition: Cell.cpp:1154
virtual std::vector< wxCoord > PageBreakCandidates() const
Where a printed page may cut through this cell, if anywhere.
Definition: Cell.h:388
virtual wxString ListToTeX() const
Convert this list to its LaTeX representation.
Definition: Cell.cpp:1105
Cell * GetPrevious() const
Returns a pointer to the previous cell in the current cell list.
Definition: Cell.h:940
virtual const wxString & GetAltCopyText() const
Get the text set using SetAltCopyText - may be empty.
Definition: Cell.h:1206
bool GetHidableMultSign() const
Whether this is a hidable multiplication sign.
Definition: Cell.h:1191
bool HasHardLineBreak() const
Does this cell begin with a manual linebreak?
Definition: Cell.h:320
unsigned long CellsInListRecursive() const
How many cells does this cell contain?
Definition: Cell.cpp:264
virtual bool FirstLineOnlyEditor() const
True, if this GroupCell is folded and its editor shows only its first line.
Definition: Cell.cpp:197
bool IsAtLineBreak() const
Is this cell directly before or after a line break BreakLines_List() added?
Definition: Cell.h:337
virtual wxString ToString() const
Returns the cell's representation as a string.
Definition: Cell.cpp:963
void SetConfigurationList(Configuration *config)
Tell this cell list to use the configuration object config.
Definition: Cell.cpp:661
void AddToolTip(const wxString &tip)
Add another tooltip to this cell.
Definition: Cell.cpp:502
Cell * last() const
Get the last cell in this list of cells.
Definition: Cell.cpp:1574
virtual void ClearCache()
Clears memory from cached items automatically regenerated when the cell is drawn.
Definition: Cell.h:422
bool GetSuppressMultiplicationDot() const
Do we want to begin this cell with a center dot if it is part of a product?
Definition: Cell.h:1188
virtual wxString ListToRTF(bool startofline=false) const
Convert this list to an RTF representation.
Definition: Cell.cpp:1368
virtual void SetIsExponent()
Tell this cell to be an exponent.
Definition: Cell.cpp:527
bool GetHighlight() const
Is this cell highlighted (e.G. inside a maxima box)
Definition: Cell.h:753
static wxString RTFescape(wxString, bool MarkDown=false)
Escape a string for RTF.
Definition: Cell.cpp:1291
bool HasStaleSize() const
Is the size valid, whether a recalculation is pending or not?
Definition: Cell.cpp:645
void SetHighlight(bool highlight)
Mark this cell as highlighted (e.G. being in a maxima box)
Definition: Cell.h:751
bool HasValidSize() const
Is the size valid and not pending a recalculation?
Definition: Cell.cpp:641
virtual wxString ListToTypst() const
Convert this list to Typst maths (GH #2687)
Definition: Cell.cpp:1120
virtual size_t GetBrokenCellCount() const
The number of pieces this cell is displayed as once it IsBrokenIntoLines(), and in what order – see G...
Definition: Cell.h:967
bool IsEditable(bool input=false) const
Is this cell editable?
Definition: Cell.h:1003
wxCoord GetCurrentY() const
Get the y position of the top left of this cell.
Definition: Cell.h:633
virtual void SetIsExponentList()
Tell this list of cells to be an exponent.
Definition: Cell.cpp:521
virtual wxString ListToXML() const
Convert this list to a representation fit for saving in a .wxmx file.
Definition: Cell.cpp:1426
bool BreakLineHere() const
Are we allowed to break a line here?
Definition: Cell.h:317
void ResetSizeList() const
Mark the cached height information of the whole list of cells as "to be calculated".
Definition: Cell.cpp:600
virtual wxString GetDiffPart() const
Get the part for diff tag support.
Definition: Cell.cpp:1451
Range GetListCellsInRect(const wxRect &rect) const
Returns the first and last cells within the given rectangle, without recursing into the inner cells.
Definition: Cell.cpp:1466
static wxString TeXGroup(const wxString &tex)
Makes a piece of LaTeX usable as the base or the argument of ^ or _.
Definition: Cell.cpp:1044
wxCoord GetCenter() const
Get the distance between the top and the center of this cell.
Definition: Cell.cpp:319
CachedInteger< wxCoord > m_cachedMaxDrop
Cache for GetMaxDrop(): the largest drop (height below the center) of the cells on the first display ...
Definition: Cell.h:1307
void SetCurrentPoint(int x, int y) const
Sets the position for the cell and convenience overload.
Definition: Cell.h:1148
void BreakLines_List() const
Break lines in this list of cells.
Definition: Cell.cpp:682
wxPoint m_currentPoint
The point in the work sheet at which this cell begins.
Definition: Cell.h:1242
AFontSize m_fontSize
The unscaled font size.
Definition: Cell.h:1320
bool DrawThisCell()
Is this cell currently visible in the window?
Definition: Cell.cpp:627
void ClearCacheList()
Clears the cache of the whole list of cells starting with this one.
Definition: Cell.cpp:259
virtual void Hide(bool hide=true)
Hide this cell. See IsHidden() for details.
Definition: Cell.h:997
virtual void SelectPointText(wxPoint point)
Select the text at point.
Definition: Cell.cpp:1420
void DrawList(wxDC *dc, wxDC *adc)
Helper to draw a list of cells.
Definition: Cell.cpp:551
virtual wxString ToXML() const
Convert this cell to a representation fit for saving in a .wxmx file.
Definition: Cell.cpp:1135
static bool TeXNeedsGrowingDelimiters(const wxString &tex)
Whether delimiters around this LaTeX need to grow with their contents.
Definition: Cell.cpp:1095
void CollectWideCells(std::vector< WideCell > &wideCells, int clientWidth, int parent=-1) const
Recursively collect all cells that are too wide to fit the line.
Definition: Cell.cpp:872
void SetUUID(const wxString &uuid)
Sets the UUID of this cell.
Definition: Cell.cpp:2110
virtual void SetAltCopyText(const wxString &text)
What should end up if placing this cell on the clipboard?
Definition: Cell.cpp:514
virtual void SelectRectText(wxPoint one, wxPoint two)
Select the text between the two points.
Definition: Cell.cpp:1422
virtual wxString ToMathML() const
Convert this cell to a representation fit for saving in a .wxmx file.
Definition: Cell.cpp:1152
CachedInteger< wxCoord > m_height
The height of this cell.
Definition: Cell.h:1291
bool ContainsRect(const wxRect &sm, bool all=true) const
Is a part of this cell inside a certain rectangle?
Definition: Cell.cpp:1491
wxCoord SumOfWidths() const
How many pixels is this list of cells wide, if we don't break it into lines?
Definition: Cell.cpp:410
wxString VariablesAndFunctionsList() const
Returns all variable and function names used inside this list of cells.
Definition: Cell.cpp:967
virtual ~Cell()
Delete this list of cells.
Definition: Cell.cpp:121
AFontSize Scale_Px(AFontSize size) const
Scale font sizes and line widths according to the zoom factor.
Definition: Cell.h:186
virtual bool IsTextContinuation() const
Does this cell continue the line of text the cell before it holds?
Definition: Cell.h:328
virtual void SetStyle(TextStyle style)
Sets the TextStyle of this cell.
Definition: Cell.h:1091
virtual const CellTypeInfo & GetInfo()=0
Returns the information about this cell's type.
virtual std::unique_ptr< Cell > Copy(GroupCell *group) const =0
Create a copy of this cell.
void ScheduleRecalculation() const
Cause this cell to be recalculated the next time.
Definition: Cell.h:650
wxCoord GetLineWidth() const
How many pixels is the current line of this list of cells wide?
Definition: Cell.cpp:417
virtual wxPoint PositionToPoint()
Locates the cursor in the editable text of this cell.
Definition: Cell.h:1069
void SetToolTip(const wxString &tooltip) const
Set the tooltip to a given string.
Definition: Cell.cpp:482
virtual void SetConfiguration(Configuration *config)
Tell this cell to use the configuration object config.
Definition: Cell.cpp:666
virtual wxString GnuplotSource() const
Retrieve the gnuplot source data for this image.
Definition: Cell.h:1017
virtual wxCoord GetMaxDrop() const
Returns the maximum distance between center and bottom of this line.
Definition: Cell.cpp:403
static wxString XMLescape(wxString)
Escape a string for XML.
Definition: Cell.cpp:1272
virtual void Draw(wxDC *dc, wxDC *antialiassingDC)
Pass 3 (Paint): Renders the cell using pre-calculated coordinates.
Definition: Cell.cpp:433
virtual Cell * GetInnerCell(size_t index) const
Retrieve an inner cell with given index which must be less than GetInnerCellCount.
Definition: Cell.cpp:2049
virtual const wxString & GetValue() const
Gets the text this text cell contains.
Definition: Cell.cpp:1665
Configuration * m_configuration
A pointer to the configuration responsible for this worksheet.
Definition: Cell.h:1278
int GetWidth() const
Get the width of this cell.
Definition: Cell.cpp:309
virtual wxString ToTeX() const
Convert this cell to its LaTeX representation.
Definition: Cell.cpp:1042
void ResetSize() const
Mark the cached height and width information as "to be calculated".
Definition: Cell.cpp:1533
void GenerateUUID()
Generates a new UUID for this cell.
Definition: Cell.cpp:2082
wxPoint GetCurrentPoint() const
Returns the pre-calculated worksheet position of the cell.
Definition: Cell.h:1169
virtual void SetFocus(bool WXUNUSED(focus))
Focus this editor cell.
Definition: Cell.h:1080
wxString GetExtraXMLAttributes() const
Returns a string containing all extra XML attributes.
Definition: Cell.cpp:2093
DocumentCellPointers * GetDocumentCellPointers() const
The document-model half of the cell-pointer registry this cell uses.
Definition: Cell.cpp:71
virtual void ProcessEvent(wxKeyEvent &WXUNUSED(event))
Processes a key event.
Definition: Cell.h:1020
void SetCurrentPointDrawList(wxPoint point)
Helper to position a list of cells using the draw-list logic.
Definition: Cell.cpp:544
virtual void SetCurrentPoint(wxPoint point) const
Pass 2: Arrangement.
Definition: Cell.cpp:533
void TallyImageLoadFailures_RecursivelyList(int &dataUnavailable, int &decodeFailed) const
Same as TallyImageLoadFailures_Recursively(), but for the whole list of cells starting with this one.
Definition: Cell.cpp:1527
wxCoord GetCurrentX() const
Get the x position of the top left of this cell.
Definition: Cell.h:626
virtual wxCoord GetWidthAtLineBreak() const
The width this cell would have if it were at a line break.
Definition: Cell.h:366
bool IsComment() const
Determine if this cell contains text that isn't code.
Definition: Cell.h:975
bool BreakUpCells() const
Cell list: Convert 2d math objects bigger than the screen width into linear form.
Definition: Cell.cpp:803
static wxString OMML2RTF(wxXmlNode *node)
Converts an OMML tag to the corresponding RTF snippet.
Definition: Cell.cpp:1221
bool UnBreakUpCells() const
Convert all maths objects in this call list into their 2D form.
Definition: Cell.cpp:899
virtual void SetType(CellType type)
Sets the text style according to the type.
Definition: Cell.cpp:129
AFontSize m_fontSize_Scaled
The font size is smaller in super- and subscripts.
Definition: Cell.h:1318
virtual Range GetInnerCellsInRect(const wxRect &rect) const
Select the cells inside this cell described by the rectangle rect.
Definition: Cell.cpp:1478
CachedInteger< wxCoord > m_width
The width of this cell; is recalculated by RecalculateHeight.
Definition: Cell.h:1295
ViewCellPointers * GetViewCellPointers() const
The transient view-state half of the cell-pointer registry this cell uses.
Definition: Cell.cpp:75
virtual bool BreakUp() const
Try to split this command into lines to make it fit on the screen.
Definition: Cell.cpp:1583
bool IsCompound() const
Do we have an operator in this line - draw () in frac...
Definition: Cell.cpp:956
wxBitmap BitmapFromSVG(wxString svgData, wxSize size)
Renders a bitmap from svgData at the requested size.
Definition: Cell.cpp:185
void ResetSize_Recursively() const
Mark all cached size information as "to be calculated".
Definition: Cell.cpp:1506
CachedInteger< wxCoord > m_cachedCenterList
Cache for GetCenterList(): the largest center (height above the center) of the cells on the first dis...
Definition: Cell.h:1310
std::unique_ptr< Cell > CopyList(GroupCell *group) const
Return a copy of the list of cells beginning with this one.
Definition: Cell.cpp:239
virtual bool IsDirty() const
Is this cell marked as "from an old maxima run"?
Definition: Cell.h:1073
friend auto OnInner(const C *cell)
Returns an iterable that goes over the inner cells of this cell.
Definition: Cell.h:1455
virtual bool CutToClipboard()
Cut this cell's editable contents to the clipboard.
Definition: Cell.h:1053
virtual bool IsOperator() const
Is this cell an operator?
Definition: Cell.h:801
bool IsMath() const
Is this cell possibly output of maxima?
Definition: Cell.cpp:1696
virtual bool CanPopOut() const
Can this cell be popped out interactively in gnuplot?
Definition: Cell.h:1011
wxCoord GetDrop() const
Get the distance between the center and the bottom of this cell.
Definition: Cell.h:573
CachedInteger< wxCoord > m_center
The distance between the top and the insertion point of this cell.
Definition: Cell.h:1301
virtual void Recalculate(AFontSize fontsize) const
Recalculate the size of the cell and the difference between top and center.
Definition: Cell.cpp:609
void FontsChangedList()
Tell a whole list of cells that their fonts have changed.
Definition: Cell.cpp:283
bool NeedsRecalculation() const
True, if something that affects the cell size has changed.
Definition: Cell.h:647
virtual bool AddEnding()
Add a semicolon to a code cell, if needed.
Definition: Cell.h:1027
const wxString * m_toolTip
This tooltip is owned by us when m_ownsToolTip is true. Otherwise, it points to a "static" string.
Definition: Cell.h:1282
virtual bool CopyToClipboard() const
Copy this cell's editable contents to the clipboard.
Definition: Cell.h:1047
void SetBrush(wxDC *dc) const
Sets the fill brush to the cell's default foreground color.
Definition: Cell.cpp:1660
bool RecalculateTracked(AFontSize fontsize) const
Recalculate this cell at the font size its owner dictates.
Definition: Cell.cpp:567
bool RecalculateList(AFontSize fontsize) const
Recalculate both width and height of this list of cells.
Definition: Cell.cpp:557
const TextStyle & GetTextStyle() const
Get the text style.
Definition: Cell.h:729
Cell * first() const
Get the first cell in this list of cells.
Definition: Cell.cpp:1565
bool IsHiddenMultSign() const
Is this a multiplication sign the user has chosen to hide?
Definition: Cell.cpp:794
void DrawAngleBracketsAround(wxDC *dc, wxDC *antialiassingDC, Cell *open, Cell *close, const Cell *contents) const
Draws the angle brackets of a matrix power (A^⟨n⟩) around its exponent.
Definition: Cell.cpp:1623
virtual wxString ToRTF() const
Returns the cell's representation as RTF.
Definition: Cell.h:856
virtual wxPoint PositionToPoint(size_t WXUNUSED(pos))
Locates a char in the editable text of this cell.
Definition: Cell.h:1065
The configuration storage for the current worksheet.
Definition: Configuration.h:103
std::int_fast32_t CellCfgCnt() const
A counter that increases every time we need to recalculate all worksheet cells.
Definition: Configuration.h:1810
wxCoord Scale_Px(double px) const
Scales a distance [in pixels] according to the zoom factor.
Definition: Configuration.cpp:1499
The document-model half of the cell-pointer registry.
Definition: CellPointers.h:54
This class defines what the user sees as input cell.
Definition: EditorCell.h:67
A cell grouping input (and, if there is one, also the output) cell to a foldable item.
Definition: GroupCell.h:88
Definition: CellIterators.h:268
Iterates the inner cells of a cell.
Definition: CellIterators.h:192
Objects deriving from this class can be observed by the CellPtr.
Definition: CellPtr.h:97
A Text cell.
Definition: TextCell.h:40
The view/interaction half of the cell-pointer registry.
Definition: CellPointers.h:341
A struct that allows to specify a region of a cell list.
Definition: Cell.h:783
For the bitmap export we sometimes want to know how big the result will be...
Definition: Cell.h:814
A cell CollectWideCells() found too wide, and where it was found.
Definition: Cell.h:265
int parent
Index (in the same vector) of the wide cell this one was found in, or -1 for a cell of the draw list ...
Definition: Cell.h:269
int open(const char *, int)
Opens a file descriptor.
int close(int)
Closes the file descriptor fd.