PLplot  5.10.0
wxPLplotwindow Class Reference

A plot widget which takes care of double buffering and other stuff, but does not. More...

#include "wxPLplotwindow.h"

List of all members.

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.
wxPLplotstreamGetStream ()
 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

wxPLplotstreamm_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

Detailed Description

A plot widget which takes care of double buffering and other stuff, but does not.

Definition at line 33 of file wxPLplotwindow.h.


Constructor & Destructor Documentation

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.


Member Function Documentation

int wxPLplotwindow::getBackend ( ) [inline]

Definition at line 44 of file wxPLplotwindow.h.

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.

Redo plot.

Redo the whole plot.

Definition at line 142 of file wxPLplotwindow.cpp.

bool wxPLplotwindow::SavePlot ( const wxString &  driver,
const wxString &  filename 
)

Save plot using a different driver.

Save plot.

Definition at line 154 of file wxPLplotwindow.cpp.


Member Data Documentation

Height of bitmap, only changed if plot gets bigger.

Definition at line 57 of file wxPLplotwindow.h.

Width of bitmap, only changed if plot gets bigger.

Definition at line 56 of file wxPLplotwindow.h.

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.

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.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines