#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);
return;
char buf[100];
- char *name;
- char *style = "";
+ const char *name;
+ const char *style = "";
int Style = m_font.GetStyle ();
int Weight = m_font.GetWeight ();
will be first black line *2* units long, then space 4 units, then the
pattern of *3* units black, 4 units space will be repeated.
*/
- static char *dotted = "[2 5] 2";
- static char *short_dashed = "[4 4] 2";
- static char *long_dashed = "[4 8] 2";
- static char *dotted_dashed = "[6 6 2 6] 4";
+ static const char *dotted = "[2 5] 2";
+ static const char *short_dashed = "[4 4] 2";
+ static const char *long_dashed = "[4 8] 2";
+ static const char *dotted_dashed = "[6 6 2 6] 4";
- char *psdash = NULL;
+ const char *psdash = NULL;
switch (m_pen.GetStyle ())
{
case wxDOT:
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();
// 1. construct filename ******************************************
/* MATTHEW: [2] Use wxTheFontNameDirectory */
- char *name;
+ const char *name;
// Julian - we'll need to do this a different way now we've removed the
// font directory system. Must find Stefan's original code.
void wxPostScriptDC::GetSize(int* width, int* height) const
{
- char *paperType = wxThePrintSetupData->GetPaperName();
+ const char *paperType = wxThePrintSetupData->GetPaperName();
if (!paperType)
paperType = "A4 210 x 297 mm";
void wxPostScriptDC::GetSizeMM(long *width, long *height) const
{
- char *paperType = wxThePrintSetupData->GetPaperName();
+ const char *paperType = wxThePrintSetupData->GetPaperName();
if (!paperType)
paperType = "A4 210 x 297 mm";
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);
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);
Append(name, new wxPrintPaperType(name, wmm, hmm, wp, hp));
}
-wxPrintPaperType *wxPrintPaperDatabase::FindPaperType(char *name)
+wxPrintPaperType *wxPrintPaperDatabase::FindPaperType(const char *name)
{
wxNode *node = Find(name);
if (node)