#include "wx/dcmemory.h"
-#ifdef __WINDOWS__
+#ifdef __WXMSW__
#include "wx/msw/private.h"
#endif
#include <limits.h>
#include <assert.h>
-#ifdef __GTK__
+#ifdef __WXGTK__
#include "gdk/gdkx.h" // GDK_DISPLAY
#include "gdk/gdkprivate.h" // XImage
#endif
-#ifdef __WINDOWS__
+#ifdef __WXMSW__
#ifdef DrawText
#undef DrawText
// SGI's Display Postscript Previewer
//# define PS_VIEWER_PROG "dps"
# define PS_VIEWER_PROG "xpsview"
-#elif defined(__X__) || defined(__GTK__)
+#elif defined(__X__) || defined(__WXGTK__)
// Front-end to ghostscript
# define PS_VIEWER_PROG "ghostview"
#else
m_pstream = NULL;
-#ifdef __WINDOWS__
+#ifdef __WXMSW__
// Can only send to file in Windows
wxThePrintSetupData->SetPrinterMode(PS_FILE);
#endif
m_filename = file;
m_pstream = NULL;
-#ifdef __WINDOWS__
+#ifdef __WXMSW__
// Can only send to file in Windows
wxThePrintSetupData->SetPrinterMode(PS_FILE);
#endif
void wxPostScriptDC::DrawIcon (const wxIcon& icon, long x, long y)
{
-#if defined(__X__) || defined(__GTK__)
+#if defined(__X__) || defined(__WXGTK__)
wxMemoryDC memDC;
memDC.SelectObject(icon);
Blit(x, y, icon.GetWidth(), icon.GetHeight(), &memDC, 0, 0);
wxRemoveFile (wxThePrintSetupData->GetPrinterFile());
wxRenameFile(tmp_file, wxThePrintSetupData->GetPrinterFile());
-#if defined(__X__) || defined(__GTK__)
+#if defined(__X__) || defined(__WXGTK__)
if (m_ok)
{
switch (wxThePrintSetupData->GetPrinterMode()) {
{
long width, height, x, y;
-#if !defined(__X__) && !defined(__GTK__)
+#if !defined(__X__) && !defined(__WXGTK__)
return FALSE;
#endif
*m_pstream << " currentfile DataString readhexstring pop\n";
*m_pstream << "} bind image\n";
-#if defined(__X__) || defined(__GTK__)
+#if defined(__X__) || defined(__WXGTK__)
/* Output data as hex digits: */
Display *d;
long j, i;
char s[3];
-#ifdef __GTK__
+#ifdef __WXGTK__
d = gdk_display;
cm = ((GdkColormapPrivate*)gdk_colormap_get_system())->xcolormap;
#else
-#ifdef __MOTIF__
+#ifdef __WXMOTIF__
d = source->display;
#else
d = wxGetDisplay();
}
// JC 1.) check for UnderlinePosition
else if(strncmp(line,"UnderlinePosition",17)==0){
- if((sscanf(line,"%s%f",upString,&UnderlinePosition)!=2)
+ if((sscanf(line,"%s%lf",upString,&UnderlinePosition)!=2)
|| (strcmp(upString,"UnderlinePosition")!=0)) {
wxDebugMsg("AFM-file '%s': line '%s' has error (bad UnderlinePosition)\n",
afmName,line);
}
// JC 2.) check for UnderlineThickness
else if(strncmp(line,"UnderlineThickness",18)==0){
- if((sscanf(line,"%s%f",utString,&UnderlineThickness)!=2)
+ if((sscanf(line,"%s%lf",utString,&UnderlineThickness)!=2)
|| (strcmp(utString,"UnderlineThickness")!=0)) {
wxDebugMsg("AFM-file '%s': line '%s' has error (bad UnderlineThickness)\n",
afmName,line);
IMPLEMENT_CLASS(wxPostScriptPrintDialog, wxDialog)
wxPostScriptPrintDialog::wxPostScriptPrintDialog (wxWindow *parent, const wxString& title,
- const wxPoint& pos, const wxSize& size, const long style):
+ const wxPoint& pos, const wxSize& size, long style):
wxDialog(parent, -1, title, pos, size, style)
{
wxBeginBusyCursor();
wxRadioBox *radio0 = new wxRadioBox(this, wxID_PRINTER_ORIENTATION, "Orientation: ", wxPoint(5, yPos), wxSize(-1,-1),
2,orientation,2,0);
- radio0->SetSelection((int)wxThePrintSetupData->GetPrinterOrientation());
+ radio0->SetSelection((int)wxThePrintSetupData->GetPrinterOrientation() - 1);
// @@@ Configuration hook
if (wxThePrintSetupData->GetPrintPreviewCommand() == NULL)
wxRadioBox *radio1 = new wxRadioBox(this, wxID_PRINTER_MODES, "PostScript:",
wxPoint(150, yPos), wxSize(-1,-1), features, print_modes, features, 0);
-#ifdef __WINDOWS__
+#ifdef __WXMSW__
radio1->Enable(0, FALSE);
if (wxThePrintSetupData->GetPrintPreviewCommand() && *wxThePrintSetupData->GetPrintPreviewCommand())
radio1->Enable(2, FALSE);
yPos += 25;
(void) new wxStaticText(this, -1, "X Translation", wxPoint(5, yPos));
- sprintf (buf, "%.2f", wx_printer_translate_x);
+ sprintf (buf, "%.2ld", wx_printer_translate_x);
/* wxTextCtrl *text3 = */ (void) new wxTextCtrl(this, wxID_PRINTER_X_TRANS, buf, wxPoint(100, -1), wxSize(100, -1));
(void) new wxStaticText(this, -1, "Y Translation", wxPoint(120, yPos));
- sprintf (buf, "%.2f", wx_printer_translate_y);
+ sprintf (buf, "%.2ld", wx_printer_translate_y);
/* wxTextCtrl *text4 = */ (void) new wxTextCtrl(this, wxID_PRINTER_Y_TRANS, buf, wxPoint(230, -1), wxSize(100, -1));
Fit ();
wxThePrintSetupData->SetPrinterCommand(WXSTRINGCAST text_prt->GetValue ());
#endif
- wxThePrintSetupData->SetPrinterOrientation((radio0->GetSelection() == PS_LANDSCAPE ? PS_LANDSCAPE : PS_PORTRAIT));
+ wxThePrintSetupData->SetPrinterOrientation((radio0->GetSelection() == 1 ? PS_LANDSCAPE : PS_PORTRAIT));
// C++ wants this
switch ( radio1->GetSelection() ) {
wxThePrintSetupData->SetPrinterOptions("/nonotify/queue=psqueue");
wxThePrintSetupData->SetAFMPath("sys$ps_font_metrics:");
#endif
-#ifdef __WINDOWS__
+#ifdef __WXMSW__
wxThePrintSetupData->SetPrinterCommand("print");
wxThePrintSetupData->SetAFMPath("c:\\windows\\system\\");
wxThePrintSetupData->SetPrinterOptions(NULL);
#endif
-#if !defined(__VMS__) && !defined(__WINDOWS__)
+#if !defined(__VMS__) && !defined(__WXMSW__)
wxThePrintSetupData->SetPrinterCommand("lpr");
wxThePrintSetupData->SetPrinterOptions(NULL);
wxThePrintSetupData->SetAFMPath(NULL);