• Main Page
  • Namespaces
  • Classes
  • Files
  • File List
  • File Members

wxPLplotwindow.h

Go to the documentation of this file.
00001 // $Id: wxPLplotwindow.h 11760 2011-06-01 19:29:11Z airwin $
00002 //
00003 // Copyright (C) 2005  Werner Smekal
00004 //
00005 // This file is part of PLplot.
00006 //
00007 // PLplot is free software; you can redistribute it and/or modify
00008 // it under the terms of the GNU Library General Public License as published
00009 // by the Free Software Foundation; either version 2 of the License, or
00010 // (at your option) any later version.
00011 //
00012 // PLplot is distributed in the hope that it will be useful,
00013 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00014 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015 // GNU Library General Public License for more details.
00016 //
00017 // You should have received a copy of the GNU Library General Public License
00018 // along with PLplot; if not, write to the Free Software
00019 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
00020 //
00021 
00022 #if !defined ( WXPLPLOTWINDOW_H__INCLUDED_ )
00023 #define WXPLPLOTWINDOW_H__INCLUDED_
00024 
00025 #include <wx/window.h>
00026 #include <wx/dcmemory.h>
00027 
00028 #include "wxPLplotstream.h"
00029 
00030 
00032 //  provide an own plot API. You have to get a pointer to wxPLplotstream via the
00033 //  GetStream() method to gain access to the PLplot API.
00034 //
00035 class PLDLLIMPEXP_WX wxPLplotwindow : public wxWindow
00036 {
00037 public:
00038     wxPLplotwindow( wxWindow * parent, wxWindowID id = -1, const wxPoint& pos = wxDefaultPosition,
00039                     const wxSize& size = wxDefaultSize, long style = 0,
00040                     int pl_style = wxPLPLOT_NONE );                         
00041     ~wxPLplotwindow( void );                                                
00042 
00043     void RenewPlot( void );                                                 
00044     bool SavePlot( const wxString& driver, const wxString& filename );      
00045     wxPLplotstream* GetStream()  { return m_stream; }                       
00046     int getBackend()  { return m_backend; }
00047 
00048 protected:
00049     virtual void OnPaint( wxPaintEvent& event );                
00050     virtual void OnErase( wxEraseEvent & WXUNUSED( event ) );   
00051     virtual void OnSize( wxSizeEvent & WXUNUSED( event ) );     
00052 
00053 private:
00054     // variables regarding double buffering
00055     wxMemoryDC* MemPlotDC;        
00056     int       m_width;            
00057     int       m_height;           
00058     int       bitmapWidth;        
00059     int       bitmapHeight;       
00060     wxBitmap  * MemPlotDCBitmap;  
00061     int       m_backend;
00062 
00063 protected:
00064     wxPLplotstream* m_stream;           
00065 
00066     DECLARE_EVENT_TABLE()
00067 };
00068 
00069 
00070 #endif // !defined( WXPLPLOTWINDOW_H__INCLUDED_ )

Generated on Wed Oct 12 2011 20:42:23 for PLplot by  doxygen 1.7.1