 |
wxMaxima
|
Go to the documentation of this file.
29 #ifndef ANIMATIONCELL_H
30 #define ANIMATIONCELL_H
34 #include "ImgCellBase.h"
38 #include <wx/filesys.h>
39 #include <wx/fs_arc.h>
40 #include <wx/mstream.h>
41 #include <wx/wfstream.h>
70 int GetPPI()
const override {
if(IsOk())
return m_images[m_displayed]->GetPPI();
else return 0;}
71 size_t GetOriginalWidth()
const override {
if(IsOk())
return m_images[m_displayed]->GetOriginalWidth();
else return 0;}
72 size_t GetOriginalHeight()
const override {
if(IsOk())
return m_images[m_displayed]->GetOriginalHeight();
else return 0;}
74 {
if (IsOk())
return m_images[m_displayed]->GetExtension();
else return wxEmptyString; }
78 int Length()
const {
return m_images.size();}
79 void LoadImages(wxMemoryBuffer imageData);
80 void LoadImages(wxString imageFile);
82 void SetPPI(
int ppi)
override;
87 bool CanExportSVG()
const override {
return (m_images[m_displayed] != NULL) && m_images[m_displayed]->CanExportSVG();}
98 wxCharBuffer m_databuf;
103 const wxString &
GetToolTip(wxPoint point)
const override;
112 void LoadImages(wxArrayString images,
bool deleteRead);
114 int GetDisplayedIndex()
const {
return m_displayed; }
116 wxImage GetBitmap(
int n)
const
117 {
return m_images[n]->GetUnscaledBitmap().ConvertToImage(); }
119 void SetDisplayedIndex(
int ind);
125 wxSize
ToGif(wxString file);
158 bool AnimationRunning()
const {
return m_animationRunning; }
159 void AnimationRunning(
bool run);
161 {
return (!m_images[m_displayed]->
GnuplotSource().empty()); }
163 void GnuplotSource(
int image, wxString gnuplotFilename, wxString dataFilename, std::shared_ptr<wxFileSystem> filesystem)
164 { m_images[image]->GnuplotSource(gnuplotFilename, dataFilename, filesystem); }
168 if (!m_images[m_displayed])
169 return wxEmptyString;
171 return m_images[m_displayed]->GnuplotSource();
177 std::vector<std::shared_ptr<Image>> m_images;
178 std::shared_ptr<wxFileSystem> m_fileSystem;
184 int m_framerate = -1;
186 int m_imageBorderWidth = 0;
193 m_animationRunning =
true;
194 m_drawBoundingBox =
false;
197 bool m_animationRunning : 1 ;
198 bool m_drawBoundingBox : 1 ;
201 int GetImageBorderWidth()
const override {
return m_imageBorderWidth; }
203 void Recalculate(
AFontSize fontsize)
override;
205 void Draw(wxPoint point)
override;
207 wxString ToMatlab()
const override;
208 wxString ToRTF()
const override;
209 wxString ToString()
const override;
210 wxString ToTeX()
const override;
211 wxString ToXML()
const override;
213 double GetMaxWidth()
const override;
214 double GetHeightList()
const override;
215 void SetMaxWidth(
double width)
override;
216 void SetMaxHeight(
double height)
override;
218 void DrawBoundingBox(wxDC &WXUNUSED(dc),
bool WXUNUSED(all) =
false)
override
219 { m_drawBoundingBox =
true; }
222 #endif // ANIMATIONCELL_H
int GetFrameRate() const
Definition: AnimationCell.cpp:127
const wxString & GetToolTip(wxPoint point) const override
Definition: AnimationCell.cpp:542
wxString GnuplotSource() const override
The name of the file with gnuplot commands that created this file.
Definition: AnimationCell.h:166
bool CanExportSVG() const override
Can the current image be exported in SVG format?
Definition: AnimationCell.h:87
bool CopyAnimationToClipboard()
Put the animation on the clipboard.
Definition: AnimationCell.cpp:631
bool CanPopOut() const override
Can this cell be popped out interactively in gnuplot?
Definition: AnimationCell.h:160
bool CopyToClipboard() const override
Copies the cell to the system's clipboard.
Definition: AnimationCell.cpp:603
const CellTypeInfo & GetInfo() override
Returns the information about this cell's type.
static wxDataFormat m_gifFormat
A class that publishes wxm data to the clipboard.
Definition: AnimationCell.h:84
wxSize ToImageFile(wxString file) override
Exports the image the animation currently displays.
Definition: AnimationCell.cpp:485
Definition: CellPointers.h:44
Definition: FontAttribs.h:97
void ReloadTimer()
Definition: AnimationCell.cpp:145
Definition: AnimationCell.h:45
wxSize ToGif(wxString file)
Exports the whole animation as animated gif.
Definition: AnimationCell.cpp:554
void SetPPI(int ppi) override
Set the animation's resolution.
Definition: AnimationCell.cpp:479
Definition: Configuration.h:83
Definition: ImgCellBase.h:40
Definition: GroupCell.h:68
wxString GetExtension() const override
Returns the file name extension that matches the image type.
Definition: AnimationCell.h:73
A class that carries information about the type of a cell.
Definition: Cell.h:90
std::unique_ptr< Cell > Copy(GroupCell *group) const override
int SetFrameRate(int Freq)
Definition: AnimationCell.cpp:170
void ClearCache() override
Definition: AnimationCell.cpp:590
A Gif object for the clipboard.
Definition: AnimationCell.h:90
void StopTimer()
Definition: AnimationCell.cpp:155