PLplot
5.10.0
|
A plot widget which takes care of double buffering and other stuff, but does not. More...
#include "wxPLplotwindow.h"
Public Member Functions | |
wxPLplotwindow (wxWindow *parent, wxWindowID id=-1, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=0, int pl_style=wxPLPLOT_NONE) | |
Constructor. | |
~wxPLplotwindow (void) | |
Deconstructor. | |
void | RenewPlot (void) |
Redo plot. | |
bool | SavePlot (const wxString &driver, const wxString &filename) |
Save plot using a different driver. | |
wxPLplotstream * | GetStream () |
Get pointer to wxPLplotstream of this widget. | |
int | getBackend () |
Protected Member Functions | |
virtual void | OnPaint (wxPaintEvent &event) |
Paint event. | |
virtual void | OnErase (wxEraseEvent &WXUNUSED(event)) |
Erase event. | |
virtual void | OnSize (wxSizeEvent &WXUNUSED(event)) |
Size event. | |
Protected Attributes | |
wxPLplotstream * | m_stream |
Pointer to the wxPLplotstream which belongs to this plot widget. | |
Private Attributes | |
wxMemoryDC * | MemPlotDC |
Pointer to wxMemoryDC, used for double buffering. | |
int | m_width |
Saved width of plot, to find out if size changed. | |
int | m_height |
Saved height of plot, to find out if size changed. | |
int | bitmapWidth |
Width of bitmap, only changed if plot gets bigger. | |
int | bitmapHeight |
Height of bitmap, only changed if plot gets bigger. | |
wxBitmap * | MemPlotDCBitmap |
Pointer to bitmap, used for double buffering. | |
int | m_backend |
A plot widget which takes care of double buffering and other stuff, but does not.
Definition at line 33 of file wxPLplotwindow.h.
wxPLplotwindow::wxPLplotwindow | ( | wxWindow * | parent, |
wxWindowID | id = -1 , |
||
const wxPoint & | pos = wxDefaultPosition , |
||
const wxSize & | size = wxDefaultSize , |
||
long | style = 0 , |
||
int | pl_style = wxPLPLOT_NONE |
||
) |
Constructor.
Constructor allocates wxMemoryDC, a wxPLplotstream and initializes parameters.
Definition at line 37 of file wxPLplotwindow.cpp.
Deconstructor.
Deconstructor takes care that all is deleted in the correct order.
Definition at line 72 of file wxPLplotwindow.cpp.
int wxPLplotwindow::getBackend | ( | ) | [inline] |
Definition at line 44 of file wxPLplotwindow.h.
wxPLplotstream* wxPLplotwindow::GetStream | ( | ) | [inline] |
Get pointer to wxPLplotstream of this widget.
Definition at line 43 of file wxPLplotwindow.h.
void wxPLplotwindow::OnErase | ( | wxEraseEvent & | WXUNUSEDevent | ) | [protected, virtual] |
Erase event.
Together with "SetBackgroundStyle( wxBG_STYLE_CUSTOM );" in the constructor this method.
Definition at line 135 of file wxPLplotwindow.cpp.
void wxPLplotwindow::OnPaint | ( | wxPaintEvent & | event | ) | [protected, virtual] |
Paint event.
In the OnPaint Method we check if the Windows was resized (will be moved to OnSize() sometimes.
Definition at line 91 of file wxPLplotwindow.cpp.
void wxPLplotwindow::OnSize | ( | wxSizeEvent & | WXUNUSEDevent | ) | [protected, virtual] |
Size event.
Definition at line 98 of file wxPLplotwindow.cpp.
bool wxPLplotwindow::SavePlot | ( | const wxString & | driver, |
const wxString & | filename | ||
) |
int wxPLplotwindow::bitmapHeight [private] |
Height of bitmap, only changed if plot gets bigger.
Definition at line 57 of file wxPLplotwindow.h.
int wxPLplotwindow::bitmapWidth [private] |
Width of bitmap, only changed if plot gets bigger.
Definition at line 56 of file wxPLplotwindow.h.
int wxPLplotwindow::m_backend [private] |
Definition at line 59 of file wxPLplotwindow.h.
int wxPLplotwindow::m_height [private] |
Saved height of plot, to find out if size changed.
Definition at line 55 of file wxPLplotwindow.h.
wxPLplotstream* wxPLplotwindow::m_stream [protected] |
Pointer to the wxPLplotstream which belongs to this plot widget.
Definition at line 62 of file wxPLplotwindow.h.
int wxPLplotwindow::m_width [private] |
Saved width of plot, to find out if size changed.
Definition at line 54 of file wxPLplotwindow.h.
wxMemoryDC* wxPLplotwindow::MemPlotDC [private] |
Pointer to wxMemoryDC, used for double buffering.
Definition at line 53 of file wxPLplotwindow.h.
wxBitmap* wxPLplotwindow::MemPlotDCBitmap [private] |
Pointer to bitmap, used for double buffering.
Definition at line 58 of file wxPLplotwindow.h.