29 #include <wx/wfstream.h>
30 #include <wx/except.h>
46 #include <Carbon/Carbon.h>
47 extern "C" {
void CPSEnableForegroundOperation( ProcessSerialNumber* psn ); }
60 va_start( args, fmt );
61 fprintf( stderr,
"Verbose: " );
62 vfprintf( stderr, fmt, args );
63 fprintf( stderr,
"\n" );
81 va_start( args, fmt );
82 fprintf( stderr,
"Debug: " );
83 vfprintf( stderr, fmt, args );
84 fprintf( stderr,
"\n" );
104 "wxwidgets:wxWidgets Driver:1:wxwidgets:51:wxwidgets\n"
107 "wxpng:wxWidgets PNG Driver:0:wxwidgets:52:wxpng\n"
125 #ifndef ENABLE_DYNDRIVERS
155 throw(
"plD_init_wxwidgets called when a initialization has already occurred." );
162 wxApp::SetInstance(
new wxApp() );
167 throw(
"plD_init_wxWidgets could not initialise wxWidgets" );
173 static PLINT text = 1;
174 static PLINT hrshsym = 0;
175 static char *mfo = NULL;
178 {
"hrshsym",
DRV_INT, &hrshsym,
"Use Hershey symbol set (hrshsym=0|1)" },
179 {
"text",
DRV_INT, &text,
"Use own text routines (text=0|1)" },
180 {
"mfo",
DRV_STR, &mfo,
"output metafile" },
192 device =
new wxPLDevice( pls, mfo, text, hrshsym );
202 catch (
const char *message )
205 plabort(
"error in plD_init_wxwidgets." );
210 plabort(
"unknown error in plD_init_wxwidgets." );
215 #endif // PLD_wxwidgets
227 #ifndef ENABLE_DYNDRIVERS
253 dev = common_init( pls );
267 dev->showGUI =
false;
268 dev->bitmapType = wxBITMAP_TYPE_PNG;
287 throw(
"plD_line_wxwidgets called before initialization." );
288 device->
DrawLine( x1a, y1a, x2a, y2a );
290 catch (
const char* message )
293 plabort(
"error in plD_line_wxwidgets." );
297 plabort(
"unknown error in plD_line_wxwidgets." );
315 throw(
"plD_polyline_wxwidgets called before initialization." );
318 catch (
const char* message )
321 plabort(
"error in plD_polyline_wxwidgets." );
325 plabort(
"unknown error in plD_polyline_wxwidgets." );
345 throw(
"plD_eop_wxwidgets called before initialization." );
349 catch (
const char* message )
352 plabort(
"error in plD_eop_wxwidgets." );
356 plabort(
"unknown error in plD_eop_wxwidgets." );
375 throw(
"plD_wait_wxwidgets called before initialization." );
378 catch (
const char* message )
381 plabort(
"error in plD_wait_wxwidgets." );
385 plabort(
"unknown error in plD_wait_wxwidgets." );
405 throw(
"plD_bop_wxwidgets called before initialization." );
408 catch (
const char* message )
411 plabort(
"error in plD_bop_wxwidgets." );
415 plabort(
"unknown error in plD_bop_wxwidgets." );
441 catch (
const char* message )
444 plabort(
"error in plD_tidy_wxwidgets." );
448 plabort(
"unknown error in plD_tidy_wxwidgets." );
481 catch (
const char* message )
484 plabort(
"error in plD_state_wxwidgets." );
488 plabort(
"unknown error in plD_state_wxwidgets." );
510 throw(
"plD_esc_wxwidgets called before initialization." );
528 device->
SetDC( pls, (wxDC *) ptr );
537 wxSize* size = (wxSize *) ptr;
538 device->
SetSize( pls, size->GetWidth(), size->GetHeight() );
548 device->
Flush( pls );
563 catch (
const char* message )
566 plabort(
"error in plD_tidy_wxwidgets." );
570 plabort(
"unknown error in plD_tidy_wxwidgets." );
int plParseDrvOpts(DrvOpt *acc_opt)
void SetColor(PLStream *pls)
void Flush(PLStream *pls)
void(* plD_line_fp)(struct PLStream_struct *, short, short, short, short)
PLDLLIMPEXP_DRIVER void plD_dispatch_init_wxwidgets(PLDispatchTable *pdt)
void Locate(PLStream *pls, PLGraphicsIn *graphicsIn)
void(* plD_eop_fp)(struct PLStream_struct *)
void(* plD_state_fp)(struct PLStream_struct *, PLINT)
void(* plD_tidy_fp)(struct PLStream_struct *)
void plOpenFile(PLStream *pls)
void SetWidth(PLStream *pls)
PLDLLIMPEXP_DRIVER void plD_dispatch_init_wxpng(PLDispatchTable *pdt)
void(* plD_wait_fp)(struct PLStream_struct *)
void plabort(PLCHAR_VECTOR errormsg)
void FillPolygon(PLStream *pls)
void DrawLine(short x1a, short y1a, short x2a, short y2a)
void ClearBackground(PLStream *pls, PLINT x1=-1, PLINT y1=-1, PLINT x2=-1, PLINT y2=-1)
void plFamInit(PLStream *pls)
void(* plD_polyline_fp)(struct PLStream_struct *, short *, short *, PLINT)
void DrawPolyline(short *xa, short *ya, PLINT npts)
void PreDestructorTidy(PLStream *pls)
void(* plD_esc_fp)(struct PLStream_struct *, PLINT, void *)
void(* plD_bop_fp)(struct PLStream_struct *)
void drawText(PLStream *pls, EscText *args)
#define PLDLLIMPEXP_DRIVER
static PLStream * pls[PL_NSTREAMS]
void FixAspectRatio(bool fix)
void EndPage(PLStream *pls)
#define PLPLOT_wxLogDebug(string)
void SetSize(PLStream *pls, int width, int height)
void SetDC(PLStream *pls, wxDC *dc)
void BeginPage(PLStream *pls)
plD_polyline_fp pl_polyline
void(* plD_init_fp)(struct PLStream_struct *)