29 #include <wx/wfstream.h>
30 #include <wx/except.h>
44 #include <Carbon/Carbon.h>
45 extern "C" {
void CPSEnableForegroundOperation( ProcessSerialNumber* psn ); }
58 va_start( args, fmt );
59 fprintf( stderr,
"Verbose: " );
60 vfprintf( stderr, fmt, args );
61 fprintf( stderr,
"\n" );
79 va_start( args, fmt );
80 fprintf( stderr,
"Debug: " );
81 vfprintf( stderr, fmt, args );
82 fprintf( stderr,
"\n" );
102 "wxwidgets:wxWidgets Driver:1:wxwidgets:51:wxwidgets\n"
105 "wxpng:wxWidgets PNG Driver:0:wxwidgets:52:wxpng\n"
123 #ifndef ENABLE_DYNDRIVERS
152 throw(
"plD_init_wxwidgets called when a initialization has already occurred." );
157 static char *mfo = NULL;
160 {
"hrshsym",
DRV_INT, &
hrshsym,
"Use Hershey symbol set (hrshsym=0|1)" },
161 {
"text",
DRV_INT, &
text,
"Use own text routines (text=0|1)" },
162 {
"mfo",
DRV_STR, &mfo,
"output metafile" },
174 device =
new wxPLDevice( pls, mfo, text, hrshsym );
183 catch (
char *message )
190 plabort(
"unknown error in plD_init_wxwidgets." );
194 #endif // PLD_wxwidgets
206 #ifndef ENABLE_DYNDRIVERS
232 dev = common_init( pls );
246 dev->showGUI =
false;
247 dev->bitmapType = wxBITMAP_TYPE_PNG;
266 throw(
"plD_line_wxwidgets called before initialization." );
267 device->
DrawLine( x1a, y1a, x2a, y2a );
269 catch (
char* message )
275 plabort(
"unknown error in plD_line_wxwidgets." );
293 throw(
"plD_polyline_wxwidgets called before initialization." );
296 catch (
char* message )
302 plabort(
"unknown error in plD_polyline_wxwidgets." );
322 throw(
"plD_eop_wxwidgets called before initialization." );
325 catch (
char* message )
331 plabort(
"unknown error in plD_eop_wxwidgets." );
352 throw(
"plD_bop_wxwidgets called before initialization." );
355 catch (
char* message )
361 plabort(
"unknown error in plD_bop_wxwidgets." );
383 catch (
char* message )
389 plabort(
"unknown error in plD_tidy_wxwidgets." );
423 catch (
char* message )
429 plabort(
"unknown error in plD_state_wxwidgets." );
452 throw(
"plD_esc_wxwidgets called before initialization." );
470 device->
SetDC( pls, (wxDC *) ptr );
479 wxSize* size = (wxSize *) ptr;
480 device->
SetSize( pls, size->GetWidth(), size->GetHeight() );
490 device->
Flush( pls );
505 catch (
char* message )
511 plabort(
"unknown error in plD_tidy_wxwidgets." );