There seems to be a bug in the version in Ubuntu Edgy (latest stable
version). The compilation fails with an error for a missing file,
/usr/share/pygtk/2.0/defs/gtk-extrafuncs.defs
Touching this file solves the problem, but then fails with more errors.
/home/andrew/software/plplot/plplot/bindings/wxwidgets/wxPLplotstream.cpp:
In constructor 'wxPLplotstream::wxPLplotstream(wxDC*, int, int, long
int)':
/home/andrew/software/plplot/plplot/bindings/wxwidgets/wxPLplotstream.cpp:47:
error: invalid conversion from 'const char*' to 'char*'
/home/andrew/software/plplot/plplot/bindings/wxwidgets/wxPLplotstream.cpp:47:
error: initializing argument 2 of 'int plstream::SetOpt(char*, char*)'
This is with pygtk 2.10.3 on Linux AMD64.
Anyone else having problems?
Andrew
On Sun, Feb 04, 2007 at 11:21:46PM +, Werner Smekal wrote:
Update of /cvsroot/plplot/plplot/bindings/wxwidgets
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16258/bindings/wxwidgets
Added Files:
CMakeLists.txt wxPLplotstream.cpp wxPLplotstream.h
wxPLplotwindow.cpp wxPLplotwindow.h
Log Message:
Initial commit of wxwidgets bindings to plplot. This files provide an
interface to PLplot for wxwidgets applications, similar to the Gnome2
bindings. Basically a inherited class of plstream (wxPLplotstream) and a
widget (wxPLplotWindow) are made available. The wxWidgets bindings are
enabled via -DENABLE_wxwidgets=ON. If the wxWidgets driver is disabled the
bindings are disabled as well, since the wxWidgets bindings depend on the
wxWidgets driver.
--- NEW FILE: wxPLplotwindow.h ---
/* $Id: wxPLplotwindow.h,v 1.1 2007/02/04 23:21:44 smekal Exp $
Copyright (C) 2005 Werner Smekal
This file is part of PLplot.
PLplot is free software; you can redistribute it and/or modify
it under the terms of the GNU General Library Public License as published
by the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
PLplot is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Library General Public License for more details.
You should have received a copy of the GNU Library General Public License
along with PLplot; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
USA
*/
#if !defined( WXPLPLOTWINDOW_H__INCLUDED_ )
#define WXPLPLOTWINDOW_H__INCLUDED_
#include wx/window.h
#include wx/dcmemory.h
#include wxPLplotstream.h
/*! A plot widget which takes care of double buffering and other stuff, but
does not
* provide an own plot API. You have to get a pointer to wxPLplotstream via
the
* GetStream() method to gain access to the PLplot API.
*/
class PLDLLIMPEXP wxPLplotwindow : public wxWindow
{
public:
wxPLplotwindow( wxWindow* parent, wxWindowID id=-1, const wxPoint pos
= wxDefaultPosition,
const wxSize size = wxDefaultSize, long style = 0,
long pl_style = wxPLPLOT_NONE ); //! Constructor.
~wxPLplotwindow( void ); //! Deconstructor.
void RenewPlot( void ); //! Redo plot.
void SavePlot( const wxString driver, const wxString filename );
//! Save plot using a different driver.
wxPLplotstream* GetStream() { return m_stream; } //! Get pointer to
wxPLplotstream of this widget.
protected:
virtual void OnPaint( wxPaintEvent event ); //! Paint event.
virtual void OnErase( wxEraseEvent WXUNUSED(event) ); //! Erase
event.
private:
// variables regarding double buffering
wxMemoryDC* MemPlotDC; //! Pointer to wxMemoryDC, used for double
buffering
int MemPlotDC_width;//! Saved width of MemoryDC, to find out if
size changed.
int MemPlotDC_height; //! Saved height of MemoryDC, to find out if
size changed.
wxBitmap* MemPlotDCBitmap; //! Pointer to bitmap, used for double
buffering.
protected:
wxPLplotstream* m_stream; //! Pointer to the wxPLplotstream
which belongs to this plot widget
DECLARE_EVENT_TABLE()
};
#endif // !defined( WXPLPLOTWINDOW_H__INCLUDED_ )
--- NEW FILE: wxPLplotwindow.cpp ---
/* $Id: wxPLplotwindow.cpp,v 1.1 2007/02/04 23:21:44 smekal Exp $
Copyright (C) 2005 Werner Smekal
This file is part of PLplot.
PLplot is free software; you can redistribute it and/or modify
it under the terms of the GNU General Library Public License as published
by the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
PLplot is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Library General Public License for more details.