 |
wxMaxima
|
29 #include "ImgCellBase.h"
31 #include <wx/filesys.h>
32 #include <wx/fs_arc.h>
51 void GnuplotSource(wxString sourcefile, wxString datafile, std::shared_ptr<wxFileSystem> filesystem)
52 {
if (m_image) m_image->GnuplotSource(sourcefile,datafile, filesystem); }
56 {
return m_image ? m_image->GnuplotSource() : wxString(); }
58 void LoadImage(wxString image,
bool remove =
true);
61 void SetPPI(
int ppi)
override {m_image->SetPPI(ppi);}
62 int GetPPI()
const override {
return m_image->GetPPI();}
63 size_t GetOriginalWidth()
const override {
return m_image->GetOriginalWidth();}
64 size_t GetOriginalHeight()
const override {
return m_image->GetOriginalHeight();}
66 void ReloadImage(
const wxString &image, std::shared_ptr<wxFileSystem> filesystem);
69 bool CanExportSVG()
const override {
return (m_image != NULL) && m_image->CanExportSVG();}
88 void ClearCache()
override {
if (m_image) m_image->ClearCache(); }
90 const wxString &
GetToolTip(wxPoint point)
const override;
98 void DrawRectangle(
bool draw) { m_drawRectangle = draw; }
102 {
if (m_image)
return m_image->GetExtension();
else return wxEmptyString; }
106 {
return m_origImageFile; }
110 { m_origImageFile = file; }
115 double GetMaxWidth()
const override {
return m_image ? m_image->GetMaxWidth() : -1; }
116 double GetHeightList()
const override {
return m_image ? m_image->GetHeightList() : -1; }
117 void SetMaxWidth(
double width)
override {
if (m_image) m_image->SetMaxWidth(width); }
118 void SetMaxHeight(
double height)
override {
if (m_image) m_image->SetMaxHeight(height); }
122 void Draw(wxPoint point)
override;
125 wxString
ToRTF()
const override;
127 wxString
ToTeX()
const override;
128 wxString
ToXML()
const override;
130 bool CanPopOut()
const override {
return !m_image->GnuplotSource().empty(); }
134 void DrawBoundingBox(wxDC &WXUNUSED(dc),
bool WXUNUSED(all) =
false)
override;
135 int GetImageBorderWidth()
const override {
return m_imageBorderWidth; }
137 std::shared_ptr<Image> m_image;
141 int m_imageBorderWidth = 0;
148 m_drawRectangle =
true;
149 m_drawBoundingBox =
false;
151 bool m_drawRectangle : 1 ;
152 bool m_drawBoundingBox : 1 ;
154 static int s_counter;
156 wxString m_origImageFile;
void ClearCache() override
Definition: ImgCell.h:88
wxString ToMatlab() const override
Convert this cell to its Matlab representation.
Definition: ImgCell.cpp:246
void SetOrigImageFile(wxString file)
Sets the name of the file the image was originally created from.
Definition: ImgCell.h:109
void Draw(wxPoint point) override
Definition: ImgCell.cpp:188
void SetBitmap(const wxBitmap &bitmap)
Sets the bitmap that is shown.
Definition: ImgCell.cpp:125
wxString ToRTF() const override
Definition: ImgCell.cpp:276
wxString GetExtension() const override
Returns the file name extension that matches the image type.
Definition: ImgCell.h:101
ImgCell & operator=(const ImgCell &)=delete
This class can be derived from wxAccessible which has no copy constructor.
const wxString & GetToolTip(wxPoint point) const override
Definition: ImgCell.cpp:146
wxString ToXML() const override
Convert this cell to a representation fit for saving in a .wxmx file.
Definition: ImgCell.cpp:325
Definition: CellPointers.h:44
bool CanPopOut() const override
Can this cell be popped out interactively in gnuplot?
Definition: ImgCell.h:130
wxMemoryBuffer GetCompressedImage() const
Returns the original compressed version of the image.
Definition: ImgCell.h:113
Definition: FontAttribs.h:97
const CellTypeInfo & GetInfo() override
Returns the information about this cell's type.
wxString ToString() const override
Returns the cell's representation as a string.
Definition: ImgCell.cpp:241
Definition: AnimationCell.h:45
void Recalculate(AFontSize fontsize) override
Definition: ImgCell.cpp:158
bool CopyToClipboard() const override
Copies the cell to the system's clipboard.
Definition: ImgCell.cpp:412
wxString ToTeX() const override
Convert this cell to its LaTeX representation.
Definition: ImgCell.cpp:251
Definition: Configuration.h:83
wxSize ToImageFile(wxString filename) override
Definition: ImgCell.cpp:256
bool CanExportSVG() const override
Can this image be exported in SVG format?
Definition: ImgCell.h:69
Definition: ImgCellBase.h:40
wxString GnuplotSource() const override
The name of the file with gnuplot commands that created this file.
Definition: ImgCell.h:55
std::unique_ptr< Cell > Copy(GroupCell *group) const override
Definition: GroupCell.h:68
A class that carries information about the type of a cell.
Definition: Cell.h:90
wxString GetOrigImageFile() const
Returns the name of the file the image was originally created from.
Definition: ImgCell.h:105
void GnuplotSource(wxString sourcefile, wxString datafile, std::shared_ptr< wxFileSystem > filesystem)
Tell the image which gnuplot files it was made from.
Definition: ImgCell.h:51
void SetPPI(int ppi) override
Set the image's resolution.
Definition: ImgCell.h:61