PLplot  5.15.0
wxPLplotstream.h
Go to the documentation of this file.
1 // Copyright (C) 2015 Phil Rosenberg
2 // Copyright (C) 2005 Werner Smekal
3 //
4 // This file is part of PLplot.
5 //
6 // PLplot is free software; you can redistribute it and/or modify
7 // it under the terms of the GNU Library General Public License as published
8 // by the Free Software Foundation; either version 2 of the License, or
9 // (at your option) any later version.
10 //
11 // PLplot is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 // GNU Library General Public License for more details.
15 //
16 // You should have received a copy of the GNU Library General Public License
17 // along with PLplot; if not, write to the Free Software
18 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 //
20 
21 #if !defined ( WXPLPLOTSTREAM_H__INCLUDED_ )
22 #define WXPLPLOTSTREAM_H__INCLUDED_
23 
24 #include "plstream.h"
25 #include "wxPLplot_nanosec.h"
26 
27 // forward declarations
28 class wxImage;
29 class wxDC;
30 
32 // wxPLPLOT_NONE: no option
33 // wxPLPLOT_DRAWTEXT: use wxWidgets routines to draw text
34 // wxPLPLOT_USE_HERSHEY_SYMBOLS: use hershey symbols to draw symbols instead of font symbols
35 //
36 enum
37 {
41 };
42 
44 // to the plplot API. The documentation of this interface is described in
45 // the PLplot manual, not here.
46 //
48 {
49 public:
50  wxPLplotstream();
51  wxPLplotstream( wxDC * dc, int width, int height, int style = wxPLPLOT_NONE );
52  void Create( wxDC *dc, int width, int height, int style );
53  ~wxPLplotstream();
54  //wxPLplotstream( wxImage *buffer, int width, int height, int style );
55  void set_stream();
56  void SetSize( int width, int height );
57  void RenewPlot();
58  void SetDC( wxDC *dc );
59  void ImportBuffer( void *buffer, size_t size );
60  void AppendBuffer( void *buffer, size_t size );
61  void SetFixedAspectRatio( bool fixed );
62  bool IsValid();
63 
64 private:
65  void InitStream();
66 
67 private:
68  int m_width;
69  int m_height;
70  int m_style;
71  bool m_created;
72 };
73 
74 
75 #endif // !defined( WXPLPLOTSTREAM_H__INCLUDED_ )
#define PLDLLIMPEXP_WX
Definition: pldll.h:109
wxPLplotstream is inherited from plstream, which is the C++ interface
int m_height
Height of dc/plot area.
int m_width
Width of dc/plot area.
static PLINT * buffer
Definition: plfill.c:74
int m_style
style of this plot
virtual void set_stream(void)
Definition: plstream.h:133