27#include "Configuration.h"
29#include <wx/dataobj.h>
48 wxMemoryBuffer m_databuf;
51 explicit DataObject(
const wxDataFormat &format,
const wxMemoryBuffer &data);
52 bool GetDataHere(
void *buf)
const override;
53 size_t GetDataSize()
const override;
59 std::unique_ptr<DataObject>
GetDataObject(
const wxDataFormat &format);
71 int fullWidth,
double scale);
76 void operator=(
const OutCommon&) =
delete;
78 int Scale_Px(
double px)
const {
return m_thisconfig.
Scale_Px(px); }
79 double GetScale()
const {
return m_scale; }
80 const wxString &GetFilename()
const {
return m_filename; }
81 const wxString &GetTempFilename()
const {
return m_tempFilename; }
86 wxSize getPPI()
const {
return m_ppi; }
97 void SetSize(wxSize size) { m_size = size; }
112 void GetMaxPoint(
Cell *tree,
int *width,
int *height)
const;
113 void Recalculate(
Cell *tree)
const;
115 void BreakLines(
Cell *tree)
const;
116 void BreakUpCells(
Cell *tree)
const;
119 wxString m_tempFilename;
121 wxDC *m_recalculationDc = {};
128 double m_scale = 1.0;
130 wxSize m_size = wxDefaultSize;
The base class all cell types the worksheet can consist of are derived from.
Definition: Cell.h:142
The configuration storage for the current worksheet.
Definition: Configuration.h:85
wxCoord Scale_Px(double px) const
Scales a distance [in pixels] according to the zoom factor.
Definition: Configuration.cpp:1398
@ temporary
This configuration is temporary and shouldn't redetect Maxima etc.
Definition: Configuration.h:120
An object that can be filled with output data in given format for the clipboard.
Definition: OutCommon.h:47
A collection of common code used in rendering the cells to a non-default output, e....
Definition: OutCommon.h:43
std::unique_ptr< DataObject > GetDataObject(const wxDataFormat &format)
Returns the representation that can be placed on the clipboard. Removes the file the data was saved i...
Definition: OutCommon.cpp:245
bool ToClipboard(const wxDataFormat &format)
Copies the representation of the list of cells that was passed to SetData() to the clipboard.
Definition: OutCommon.cpp:232
wxSize GetSize() const
Returns the size of the prepared output layout.
Definition: OutCommon.h:95
void SetRecalculationContext(wxDC *context)
Sets the context for the configuration used in recalculating the cell dimensions.
Definition: OutCommon.h:89
wxSize GetScaledSize() const
Returns the size of the prepared output layout multiplied by the scale factor.
Definition: OutCommon.cpp:75
bool PrepareLayout(Cell *tree)
Prepares to render the tree to the output DC, and computes the size of the output.
Definition: OutCommon.cpp:87
wxSize GetInvScaledSize() const
Returns the size of the prepared output layout divided by the scale factor.
Definition: OutCommon.cpp:81
void Draw(Cell *tree)
Recursively draws the cells.
Definition: OutCommon.cpp:182
void SetSize(wxSize size)
Sets the "default" size of the prepared layout.
Definition: OutCommon.h:97
Configuration * GetConfiguration()
Get the configuration for the file/bitmap/... output.
Definition: OutCommon.h:83
const Configuration & GetScreenConfig() const
Get the configuration for the screen output.
Definition: OutCommon.h:85