wxUSE_SPLINES markup and other cleanings.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35514 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
// Name: dcps.h
|
// Name: wx/generic/dcps.h
|
||||||
// Purpose: wxPostScriptDC class
|
// Purpose: wxPostScriptDC class
|
||||||
// Author: Julian Smart and others
|
// Author: Julian Smart and others
|
||||||
// Modified by:
|
// Modified by:
|
||||||
@@ -66,8 +66,9 @@ public:
|
|||||||
void DoDrawRoundedRectangle(wxCoord x, wxCoord y, wxCoord width, wxCoord height, double radius = 20);
|
void DoDrawRoundedRectangle(wxCoord x, wxCoord y, wxCoord width, wxCoord height, double radius = 20);
|
||||||
void DoDrawEllipse(wxCoord x, wxCoord y, wxCoord width, wxCoord height);
|
void DoDrawEllipse(wxCoord x, wxCoord y, wxCoord width, wxCoord height);
|
||||||
|
|
||||||
|
#if wxUSE_SPLINES
|
||||||
void DoDrawSpline(wxList *points);
|
void DoDrawSpline(wxList *points);
|
||||||
|
#endif // wxUSE_SPLINES
|
||||||
bool DoBlit(wxCoord xdest, wxCoord ydest, wxCoord width, wxCoord height,
|
bool DoBlit(wxCoord xdest, wxCoord ydest, wxCoord width, wxCoord height,
|
||||||
wxDC *source, wxCoord xsrc, wxCoord ysrc, int rop = wxCOPY, bool useMask = false,
|
wxDC *source, wxCoord xsrc, wxCoord ysrc, int rop = wxCOPY, bool useMask = false,
|
||||||
wxCoord xsrcMask = wxDefaultCoord, wxCoord ysrcMask = wxDefaultCoord);
|
wxCoord xsrcMask = wxDefaultCoord, wxCoord ysrcMask = wxDefaultCoord);
|
||||||
|
@@ -1,8 +1,9 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
// Name: gprint.h
|
// Name: wx/gtk/gnome/gprint.h
|
||||||
// Author: Robert Roebling
|
// Author: Robert Roebling
|
||||||
// Purpose: GNOME printing support
|
// Purpose: GNOME printing support
|
||||||
// Created: 09/20/04
|
// Created: 09/20/04
|
||||||
|
// RCS-ID: $Id$
|
||||||
// Copyright: Robert Roebling
|
// Copyright: Robert Roebling
|
||||||
// Licence: wxWindows Licence
|
// Licence: wxWindows Licence
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
@@ -39,25 +40,25 @@ class wxGnomePrintNativeData: public wxPrintNativeDataBase
|
|||||||
public:
|
public:
|
||||||
wxGnomePrintNativeData();
|
wxGnomePrintNativeData();
|
||||||
virtual ~wxGnomePrintNativeData();
|
virtual ~wxGnomePrintNativeData();
|
||||||
|
|
||||||
virtual bool TransferTo( wxPrintData &data );
|
virtual bool TransferTo( wxPrintData &data );
|
||||||
virtual bool TransferFrom( const wxPrintData &data );
|
virtual bool TransferFrom( const wxPrintData &data );
|
||||||
|
|
||||||
virtual bool Ok() const { return true; }
|
virtual bool Ok() const { return true; }
|
||||||
|
|
||||||
GnomePrintConfig* GetPrintConfig() { return m_config; }
|
GnomePrintConfig* GetPrintConfig() { return m_config; }
|
||||||
void SetPrintJob( GnomePrintJob *job ) { m_job = job; }
|
void SetPrintJob( GnomePrintJob *job ) { m_job = job; }
|
||||||
GnomePrintJob* GetPrintJob() { return m_job; }
|
GnomePrintJob* GetPrintJob() { return m_job; }
|
||||||
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
GnomePrintConfig *m_config;
|
GnomePrintConfig *m_config;
|
||||||
GnomePrintJob *m_job;
|
GnomePrintJob *m_job;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
DECLARE_DYNAMIC_CLASS(wxGnomePrintNativeData)
|
DECLARE_DYNAMIC_CLASS(wxGnomePrintNativeData)
|
||||||
};
|
};
|
||||||
|
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
// wxGnomePrintFactory
|
// wxGnomePrintFactory
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
@@ -66,22 +67,22 @@ class wxGnomePrintFactory: public wxPrintFactory
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
virtual wxPrinterBase *CreatePrinter( wxPrintDialogData *data );
|
virtual wxPrinterBase *CreatePrinter( wxPrintDialogData *data );
|
||||||
|
|
||||||
virtual wxPrintPreviewBase *CreatePrintPreview( wxPrintout *preview,
|
virtual wxPrintPreviewBase *CreatePrintPreview( wxPrintout *preview,
|
||||||
wxPrintout *printout = NULL,
|
wxPrintout *printout = NULL,
|
||||||
wxPrintDialogData *data = NULL );
|
wxPrintDialogData *data = NULL );
|
||||||
virtual wxPrintPreviewBase *CreatePrintPreview( wxPrintout *preview,
|
virtual wxPrintPreviewBase *CreatePrintPreview( wxPrintout *preview,
|
||||||
wxPrintout *printout,
|
wxPrintout *printout,
|
||||||
wxPrintData *data );
|
wxPrintData *data );
|
||||||
|
|
||||||
virtual wxPrintDialogBase *CreatePrintDialog( wxWindow *parent,
|
virtual wxPrintDialogBase *CreatePrintDialog( wxWindow *parent,
|
||||||
wxPrintDialogData *data = NULL );
|
wxPrintDialogData *data = NULL );
|
||||||
virtual wxPrintDialogBase *CreatePrintDialog( wxWindow *parent,
|
virtual wxPrintDialogBase *CreatePrintDialog( wxWindow *parent,
|
||||||
wxPrintData *data );
|
wxPrintData *data );
|
||||||
|
|
||||||
virtual wxPageSetupDialogBase *CreatePageSetupDialog( wxWindow *parent,
|
virtual wxPageSetupDialogBase *CreatePageSetupDialog( wxWindow *parent,
|
||||||
wxPageSetupDialogData * data = NULL );
|
wxPageSetupDialogData * data = NULL );
|
||||||
|
|
||||||
virtual bool HasPrintSetupDialog();
|
virtual bool HasPrintSetupDialog();
|
||||||
virtual wxDialog *CreatePrintSetupDialog( wxWindow *parent, wxPrintData *data );
|
virtual wxDialog *CreatePrintSetupDialog( wxWindow *parent, wxPrintData *data );
|
||||||
virtual bool HasOwnPrintToFile();
|
virtual bool HasOwnPrintToFile();
|
||||||
@@ -89,7 +90,7 @@ public:
|
|||||||
virtual wxString CreatePrinterLine();
|
virtual wxString CreatePrinterLine();
|
||||||
virtual bool HasStatusLine();
|
virtual bool HasStatusLine();
|
||||||
virtual wxString CreateStatusLine();
|
virtual wxString CreateStatusLine();
|
||||||
|
|
||||||
virtual wxPrintNativeDataBase *CreatePrintNativeData();
|
virtual wxPrintNativeDataBase *CreatePrintNativeData();
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -109,7 +110,7 @@ public:
|
|||||||
{ return m_printDialogData.GetPrintData(); }
|
{ return m_printDialogData.GetPrintData(); }
|
||||||
wxPrintDialogData& GetPrintDialogData()
|
wxPrintDialogData& GetPrintDialogData()
|
||||||
{ return m_printDialogData; }
|
{ return m_printDialogData; }
|
||||||
|
|
||||||
wxDC *GetPrintDC();
|
wxDC *GetPrintDC();
|
||||||
|
|
||||||
virtual int ShowModal();
|
virtual int ShowModal();
|
||||||
@@ -118,7 +119,7 @@ public:
|
|||||||
virtual bool TransferDataToWindow();
|
virtual bool TransferDataToWindow();
|
||||||
virtual bool TransferDataFromWindow();
|
virtual bool TransferDataFromWindow();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// Implement some base class methods to do nothing to avoid asserts and
|
// Implement some base class methods to do nothing to avoid asserts and
|
||||||
// GTK warnings, since this is not a real wxDialog.
|
// GTK warnings, since this is not a real wxDialog.
|
||||||
virtual void DoSetSize(int WXUNUSED(x), int WXUNUSED(y),
|
virtual void DoSetSize(int WXUNUSED(x), int WXUNUSED(y),
|
||||||
@@ -126,10 +127,10 @@ private:
|
|||||||
int WXUNUSED(sizeFlags) = wxSIZE_AUTO) {}
|
int WXUNUSED(sizeFlags) = wxSIZE_AUTO) {}
|
||||||
virtual void DoMoveWindow(int WXUNUSED(x), int WXUNUSED(y),
|
virtual void DoMoveWindow(int WXUNUSED(x), int WXUNUSED(y),
|
||||||
int WXUNUSED(width), int WXUNUSED(height)) {}
|
int WXUNUSED(width), int WXUNUSED(height)) {}
|
||||||
|
|
||||||
void Init();
|
void Init();
|
||||||
wxPrintDialogData m_printDialogData;
|
wxPrintDialogData m_printDialogData;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
DECLARE_DYNAMIC_CLASS(wxGnomePrintDialog)
|
DECLARE_DYNAMIC_CLASS(wxGnomePrintDialog)
|
||||||
};
|
};
|
||||||
@@ -153,7 +154,7 @@ public:
|
|||||||
virtual bool TransferDataToWindow();
|
virtual bool TransferDataToWindow();
|
||||||
virtual bool TransferDataFromWindow();
|
virtual bool TransferDataFromWindow();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// Implement some base class methods to do nothing to avoid asserts and
|
// Implement some base class methods to do nothing to avoid asserts and
|
||||||
// GTK warnings, since this is not a real wxDialog.
|
// GTK warnings, since this is not a real wxDialog.
|
||||||
virtual void DoSetSize(int WXUNUSED(x), int WXUNUSED(y),
|
virtual void DoSetSize(int WXUNUSED(x), int WXUNUSED(y),
|
||||||
@@ -161,9 +162,9 @@ private:
|
|||||||
int WXUNUSED(sizeFlags) = wxSIZE_AUTO) {}
|
int WXUNUSED(sizeFlags) = wxSIZE_AUTO) {}
|
||||||
virtual void DoMoveWindow(int WXUNUSED(x), int WXUNUSED(y),
|
virtual void DoMoveWindow(int WXUNUSED(x), int WXUNUSED(y),
|
||||||
int WXUNUSED(width), int WXUNUSED(height)) {}
|
int WXUNUSED(width), int WXUNUSED(height)) {}
|
||||||
|
|
||||||
wxPageSetupDialogData m_pageDialogData;
|
wxPageSetupDialogData m_pageDialogData;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
DECLARE_DYNAMIC_CLASS(wxGnomePageSetupDialog)
|
DECLARE_DYNAMIC_CLASS(wxGnomePageSetupDialog)
|
||||||
};
|
};
|
||||||
@@ -183,9 +184,9 @@ public:
|
|||||||
bool prompt = true);
|
bool prompt = true);
|
||||||
virtual wxDC* PrintDialog(wxWindow *parent);
|
virtual wxDC* PrintDialog(wxWindow *parent);
|
||||||
virtual bool Setup(wxWindow *parent);
|
virtual bool Setup(wxWindow *parent);
|
||||||
|
|
||||||
GnomePrintContext *GetPrintContext() { return m_gpc; }
|
GnomePrintContext *GetPrintContext() { return m_gpc; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
GnomePrintContext *m_gpc;
|
GnomePrintContext *m_gpc;
|
||||||
bool m_native_preview;
|
bool m_native_preview;
|
||||||
@@ -204,9 +205,9 @@ class wxGnomePrintDC: public wxDC
|
|||||||
public:
|
public:
|
||||||
wxGnomePrintDC( wxGnomePrinter *printer );
|
wxGnomePrintDC( wxGnomePrinter *printer );
|
||||||
~wxGnomePrintDC();
|
~wxGnomePrintDC();
|
||||||
|
|
||||||
bool Ok() const;
|
bool Ok() const;
|
||||||
|
|
||||||
virtual void BeginDrawing() {}
|
virtual void BeginDrawing() {}
|
||||||
virtual void EndDrawing() {}
|
virtual void EndDrawing() {}
|
||||||
|
|
||||||
@@ -223,15 +224,17 @@ public:
|
|||||||
void DoDrawRectangle(wxCoord x, wxCoord y, wxCoord width, wxCoord height);
|
void DoDrawRectangle(wxCoord x, wxCoord y, wxCoord width, wxCoord height);
|
||||||
void DoDrawRoundedRectangle(wxCoord x, wxCoord y, wxCoord width, wxCoord height, double radius = 20.0);
|
void DoDrawRoundedRectangle(wxCoord x, wxCoord y, wxCoord width, wxCoord height, double radius = 20.0);
|
||||||
void DoDrawEllipse(wxCoord x, wxCoord y, wxCoord width, wxCoord height);
|
void DoDrawEllipse(wxCoord x, wxCoord y, wxCoord width, wxCoord height);
|
||||||
|
#if wxUSE_SPLINES
|
||||||
void DoDrawSpline(wxList *points);
|
void DoDrawSpline(wxList *points);
|
||||||
|
#endif // wxUSE_SPLINES
|
||||||
|
|
||||||
bool DoBlit(wxCoord xdest, wxCoord ydest, wxCoord width, wxCoord height,
|
bool DoBlit(wxCoord xdest, wxCoord ydest, wxCoord width, wxCoord height,
|
||||||
wxDC *source, wxCoord xsrc, wxCoord ysrc, int rop = wxCOPY, bool useMask = false,
|
wxDC *source, wxCoord xsrc, wxCoord ysrc, int rop = wxCOPY, bool useMask = false,
|
||||||
wxCoord xsrcMask = wxDefaultCoord, wxCoord ysrcMask = wxDefaultCoord);
|
wxCoord xsrcMask = wxDefaultCoord, wxCoord ysrcMask = wxDefaultCoord);
|
||||||
void DoDrawIcon( const wxIcon& icon, wxCoord x, wxCoord y );
|
void DoDrawIcon( const wxIcon& icon, wxCoord x, wxCoord y );
|
||||||
void DoDrawBitmap( const wxBitmap& bitmap, wxCoord x, wxCoord y, bool useMask = false );
|
void DoDrawBitmap( const wxBitmap& bitmap, wxCoord x, wxCoord y, bool useMask = false );
|
||||||
bool CanDrawBitmap() const { return true; }
|
bool CanDrawBitmap() const { return true; }
|
||||||
|
|
||||||
void DoDrawText(const wxString& text, wxCoord x, wxCoord y );
|
void DoDrawText(const wxString& text, wxCoord x, wxCoord y );
|
||||||
void DoDrawRotatedText(const wxString& text, wxCoord x, wxCoord y, double angle);
|
void DoDrawRotatedText(const wxString& text, wxCoord x, wxCoord y, double angle);
|
||||||
void Clear();
|
void Clear();
|
||||||
@@ -240,16 +243,16 @@ public:
|
|||||||
void SetBrush( const wxBrush& brush );
|
void SetBrush( const wxBrush& brush );
|
||||||
void SetLogicalFunction( int function );
|
void SetLogicalFunction( int function );
|
||||||
void SetBackground( const wxBrush& brush );
|
void SetBackground( const wxBrush& brush );
|
||||||
|
|
||||||
void DoSetClippingRegion(wxCoord x, wxCoord y, wxCoord width, wxCoord height);
|
void DoSetClippingRegion(wxCoord x, wxCoord y, wxCoord width, wxCoord height);
|
||||||
void DestroyClippingRegion();
|
void DestroyClippingRegion();
|
||||||
void DoSetClippingRegionAsRegion( const wxRegion &WXUNUSED(clip) ) { }
|
void DoSetClippingRegionAsRegion( const wxRegion &WXUNUSED(clip) ) { }
|
||||||
|
|
||||||
bool StartDoc(const wxString& message);
|
bool StartDoc(const wxString& message);
|
||||||
void EndDoc();
|
void EndDoc();
|
||||||
void StartPage();
|
void StartPage();
|
||||||
void EndPage();
|
void EndPage();
|
||||||
|
|
||||||
wxCoord GetCharHeight() const;
|
wxCoord GetCharHeight() const;
|
||||||
wxCoord GetCharWidth() const;
|
wxCoord GetCharWidth() const;
|
||||||
bool CanGetTextExtent() const { return true; }
|
bool CanGetTextExtent() const { return true; }
|
||||||
@@ -257,37 +260,37 @@ public:
|
|||||||
wxCoord *descent = (wxCoord *) NULL,
|
wxCoord *descent = (wxCoord *) NULL,
|
||||||
wxCoord *externalLeading = (wxCoord *) NULL,
|
wxCoord *externalLeading = (wxCoord *) NULL,
|
||||||
wxFont *theFont = (wxFont *) NULL ) const;
|
wxFont *theFont = (wxFont *) NULL ) const;
|
||||||
|
|
||||||
void DoGetSize(int* width, int* height) const;
|
void DoGetSize(int* width, int* height) const;
|
||||||
void DoGetSizeMM(int *width, int *height) const;
|
void DoGetSizeMM(int *width, int *height) const;
|
||||||
wxSize GetPPI() const;
|
wxSize GetPPI() const;
|
||||||
void SetAxisOrientation( bool xLeftRight, bool yBottomUp );
|
void SetAxisOrientation( bool xLeftRight, bool yBottomUp );
|
||||||
void SetDeviceOrigin( wxCoord x, wxCoord y );
|
void SetDeviceOrigin( wxCoord x, wxCoord y );
|
||||||
|
|
||||||
virtual int GetDepth() const { return 24; }
|
virtual int GetDepth() const { return 24; }
|
||||||
|
|
||||||
void SetBackgroundMode(int WXUNUSED(mode)) { }
|
void SetBackgroundMode(int WXUNUSED(mode)) { }
|
||||||
void SetPalette(const wxPalette& WXUNUSED(palette)) { }
|
void SetPalette(const wxPalette& WXUNUSED(palette)) { }
|
||||||
|
|
||||||
wxPrintData& GetPrintData() { return m_printData; }
|
wxPrintData& GetPrintData() { return m_printData; }
|
||||||
void SetPrintData(const wxPrintData& data) { m_printData = data; }
|
void SetPrintData(const wxPrintData& data) { m_printData = data; }
|
||||||
|
|
||||||
static void SetResolution(int ppi);
|
static void SetResolution(int ppi);
|
||||||
static int GetResolution();
|
static int GetResolution();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static float ms_PSScaleFactor;
|
static float ms_PSScaleFactor;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
PangoContext *m_context;
|
PangoContext *m_context;
|
||||||
PangoLayout *m_layout;
|
PangoLayout *m_layout;
|
||||||
PangoFontDescription *m_fontdesc;
|
PangoFontDescription *m_fontdesc;
|
||||||
|
|
||||||
unsigned char m_currentRed;
|
unsigned char m_currentRed;
|
||||||
unsigned char m_currentGreen;
|
unsigned char m_currentGreen;
|
||||||
unsigned char m_currentBlue;
|
unsigned char m_currentBlue;
|
||||||
wxPrintData m_printData;
|
wxPrintData m_printData;
|
||||||
|
|
||||||
wxGnomePrinter *m_printer;
|
wxGnomePrinter *m_printer;
|
||||||
GnomePrintContext *m_gpc;
|
GnomePrintContext *m_gpc;
|
||||||
|
|
||||||
|
@@ -1,8 +1,9 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
// Name: gprint.h
|
// Name: wx/gtk/gnome/gprint.h
|
||||||
// Author: Robert Roebling
|
// Author: Robert Roebling
|
||||||
// Purpose: GNOME printing support
|
// Purpose: GNOME printing support
|
||||||
// Created: 09/20/04
|
// Created: 09/20/04
|
||||||
|
// RCS-ID: $Id$
|
||||||
// Copyright: Robert Roebling
|
// Copyright: Robert Roebling
|
||||||
// Licence: wxWindows Licence
|
// Licence: wxWindows Licence
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
@@ -39,25 +40,25 @@ class wxGnomePrintNativeData: public wxPrintNativeDataBase
|
|||||||
public:
|
public:
|
||||||
wxGnomePrintNativeData();
|
wxGnomePrintNativeData();
|
||||||
virtual ~wxGnomePrintNativeData();
|
virtual ~wxGnomePrintNativeData();
|
||||||
|
|
||||||
virtual bool TransferTo( wxPrintData &data );
|
virtual bool TransferTo( wxPrintData &data );
|
||||||
virtual bool TransferFrom( const wxPrintData &data );
|
virtual bool TransferFrom( const wxPrintData &data );
|
||||||
|
|
||||||
virtual bool Ok() const { return true; }
|
virtual bool Ok() const { return true; }
|
||||||
|
|
||||||
GnomePrintConfig* GetPrintConfig() { return m_config; }
|
GnomePrintConfig* GetPrintConfig() { return m_config; }
|
||||||
void SetPrintJob( GnomePrintJob *job ) { m_job = job; }
|
void SetPrintJob( GnomePrintJob *job ) { m_job = job; }
|
||||||
GnomePrintJob* GetPrintJob() { return m_job; }
|
GnomePrintJob* GetPrintJob() { return m_job; }
|
||||||
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
GnomePrintConfig *m_config;
|
GnomePrintConfig *m_config;
|
||||||
GnomePrintJob *m_job;
|
GnomePrintJob *m_job;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
DECLARE_DYNAMIC_CLASS(wxGnomePrintNativeData)
|
DECLARE_DYNAMIC_CLASS(wxGnomePrintNativeData)
|
||||||
};
|
};
|
||||||
|
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
// wxGnomePrintFactory
|
// wxGnomePrintFactory
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
@@ -66,22 +67,22 @@ class wxGnomePrintFactory: public wxPrintFactory
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
virtual wxPrinterBase *CreatePrinter( wxPrintDialogData *data );
|
virtual wxPrinterBase *CreatePrinter( wxPrintDialogData *data );
|
||||||
|
|
||||||
virtual wxPrintPreviewBase *CreatePrintPreview( wxPrintout *preview,
|
virtual wxPrintPreviewBase *CreatePrintPreview( wxPrintout *preview,
|
||||||
wxPrintout *printout = NULL,
|
wxPrintout *printout = NULL,
|
||||||
wxPrintDialogData *data = NULL );
|
wxPrintDialogData *data = NULL );
|
||||||
virtual wxPrintPreviewBase *CreatePrintPreview( wxPrintout *preview,
|
virtual wxPrintPreviewBase *CreatePrintPreview( wxPrintout *preview,
|
||||||
wxPrintout *printout,
|
wxPrintout *printout,
|
||||||
wxPrintData *data );
|
wxPrintData *data );
|
||||||
|
|
||||||
virtual wxPrintDialogBase *CreatePrintDialog( wxWindow *parent,
|
virtual wxPrintDialogBase *CreatePrintDialog( wxWindow *parent,
|
||||||
wxPrintDialogData *data = NULL );
|
wxPrintDialogData *data = NULL );
|
||||||
virtual wxPrintDialogBase *CreatePrintDialog( wxWindow *parent,
|
virtual wxPrintDialogBase *CreatePrintDialog( wxWindow *parent,
|
||||||
wxPrintData *data );
|
wxPrintData *data );
|
||||||
|
|
||||||
virtual wxPageSetupDialogBase *CreatePageSetupDialog( wxWindow *parent,
|
virtual wxPageSetupDialogBase *CreatePageSetupDialog( wxWindow *parent,
|
||||||
wxPageSetupDialogData * data = NULL );
|
wxPageSetupDialogData * data = NULL );
|
||||||
|
|
||||||
virtual bool HasPrintSetupDialog();
|
virtual bool HasPrintSetupDialog();
|
||||||
virtual wxDialog *CreatePrintSetupDialog( wxWindow *parent, wxPrintData *data );
|
virtual wxDialog *CreatePrintSetupDialog( wxWindow *parent, wxPrintData *data );
|
||||||
virtual bool HasOwnPrintToFile();
|
virtual bool HasOwnPrintToFile();
|
||||||
@@ -89,7 +90,7 @@ public:
|
|||||||
virtual wxString CreatePrinterLine();
|
virtual wxString CreatePrinterLine();
|
||||||
virtual bool HasStatusLine();
|
virtual bool HasStatusLine();
|
||||||
virtual wxString CreateStatusLine();
|
virtual wxString CreateStatusLine();
|
||||||
|
|
||||||
virtual wxPrintNativeDataBase *CreatePrintNativeData();
|
virtual wxPrintNativeDataBase *CreatePrintNativeData();
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -109,7 +110,7 @@ public:
|
|||||||
{ return m_printDialogData.GetPrintData(); }
|
{ return m_printDialogData.GetPrintData(); }
|
||||||
wxPrintDialogData& GetPrintDialogData()
|
wxPrintDialogData& GetPrintDialogData()
|
||||||
{ return m_printDialogData; }
|
{ return m_printDialogData; }
|
||||||
|
|
||||||
wxDC *GetPrintDC();
|
wxDC *GetPrintDC();
|
||||||
|
|
||||||
virtual int ShowModal();
|
virtual int ShowModal();
|
||||||
@@ -118,7 +119,7 @@ public:
|
|||||||
virtual bool TransferDataToWindow();
|
virtual bool TransferDataToWindow();
|
||||||
virtual bool TransferDataFromWindow();
|
virtual bool TransferDataFromWindow();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// Implement some base class methods to do nothing to avoid asserts and
|
// Implement some base class methods to do nothing to avoid asserts and
|
||||||
// GTK warnings, since this is not a real wxDialog.
|
// GTK warnings, since this is not a real wxDialog.
|
||||||
virtual void DoSetSize(int WXUNUSED(x), int WXUNUSED(y),
|
virtual void DoSetSize(int WXUNUSED(x), int WXUNUSED(y),
|
||||||
@@ -126,10 +127,10 @@ private:
|
|||||||
int WXUNUSED(sizeFlags) = wxSIZE_AUTO) {}
|
int WXUNUSED(sizeFlags) = wxSIZE_AUTO) {}
|
||||||
virtual void DoMoveWindow(int WXUNUSED(x), int WXUNUSED(y),
|
virtual void DoMoveWindow(int WXUNUSED(x), int WXUNUSED(y),
|
||||||
int WXUNUSED(width), int WXUNUSED(height)) {}
|
int WXUNUSED(width), int WXUNUSED(height)) {}
|
||||||
|
|
||||||
void Init();
|
void Init();
|
||||||
wxPrintDialogData m_printDialogData;
|
wxPrintDialogData m_printDialogData;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
DECLARE_DYNAMIC_CLASS(wxGnomePrintDialog)
|
DECLARE_DYNAMIC_CLASS(wxGnomePrintDialog)
|
||||||
};
|
};
|
||||||
@@ -153,7 +154,7 @@ public:
|
|||||||
virtual bool TransferDataToWindow();
|
virtual bool TransferDataToWindow();
|
||||||
virtual bool TransferDataFromWindow();
|
virtual bool TransferDataFromWindow();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// Implement some base class methods to do nothing to avoid asserts and
|
// Implement some base class methods to do nothing to avoid asserts and
|
||||||
// GTK warnings, since this is not a real wxDialog.
|
// GTK warnings, since this is not a real wxDialog.
|
||||||
virtual void DoSetSize(int WXUNUSED(x), int WXUNUSED(y),
|
virtual void DoSetSize(int WXUNUSED(x), int WXUNUSED(y),
|
||||||
@@ -161,9 +162,9 @@ private:
|
|||||||
int WXUNUSED(sizeFlags) = wxSIZE_AUTO) {}
|
int WXUNUSED(sizeFlags) = wxSIZE_AUTO) {}
|
||||||
virtual void DoMoveWindow(int WXUNUSED(x), int WXUNUSED(y),
|
virtual void DoMoveWindow(int WXUNUSED(x), int WXUNUSED(y),
|
||||||
int WXUNUSED(width), int WXUNUSED(height)) {}
|
int WXUNUSED(width), int WXUNUSED(height)) {}
|
||||||
|
|
||||||
wxPageSetupDialogData m_pageDialogData;
|
wxPageSetupDialogData m_pageDialogData;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
DECLARE_DYNAMIC_CLASS(wxGnomePageSetupDialog)
|
DECLARE_DYNAMIC_CLASS(wxGnomePageSetupDialog)
|
||||||
};
|
};
|
||||||
@@ -183,9 +184,9 @@ public:
|
|||||||
bool prompt = true);
|
bool prompt = true);
|
||||||
virtual wxDC* PrintDialog(wxWindow *parent);
|
virtual wxDC* PrintDialog(wxWindow *parent);
|
||||||
virtual bool Setup(wxWindow *parent);
|
virtual bool Setup(wxWindow *parent);
|
||||||
|
|
||||||
GnomePrintContext *GetPrintContext() { return m_gpc; }
|
GnomePrintContext *GetPrintContext() { return m_gpc; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
GnomePrintContext *m_gpc;
|
GnomePrintContext *m_gpc;
|
||||||
bool m_native_preview;
|
bool m_native_preview;
|
||||||
@@ -204,9 +205,9 @@ class wxGnomePrintDC: public wxDC
|
|||||||
public:
|
public:
|
||||||
wxGnomePrintDC( wxGnomePrinter *printer );
|
wxGnomePrintDC( wxGnomePrinter *printer );
|
||||||
~wxGnomePrintDC();
|
~wxGnomePrintDC();
|
||||||
|
|
||||||
bool Ok() const;
|
bool Ok() const;
|
||||||
|
|
||||||
virtual void BeginDrawing() {}
|
virtual void BeginDrawing() {}
|
||||||
virtual void EndDrawing() {}
|
virtual void EndDrawing() {}
|
||||||
|
|
||||||
@@ -223,15 +224,17 @@ public:
|
|||||||
void DoDrawRectangle(wxCoord x, wxCoord y, wxCoord width, wxCoord height);
|
void DoDrawRectangle(wxCoord x, wxCoord y, wxCoord width, wxCoord height);
|
||||||
void DoDrawRoundedRectangle(wxCoord x, wxCoord y, wxCoord width, wxCoord height, double radius = 20.0);
|
void DoDrawRoundedRectangle(wxCoord x, wxCoord y, wxCoord width, wxCoord height, double radius = 20.0);
|
||||||
void DoDrawEllipse(wxCoord x, wxCoord y, wxCoord width, wxCoord height);
|
void DoDrawEllipse(wxCoord x, wxCoord y, wxCoord width, wxCoord height);
|
||||||
|
#if wxUSE_SPLINES
|
||||||
void DoDrawSpline(wxList *points);
|
void DoDrawSpline(wxList *points);
|
||||||
|
#endif // wxUSE_SPLINES
|
||||||
|
|
||||||
bool DoBlit(wxCoord xdest, wxCoord ydest, wxCoord width, wxCoord height,
|
bool DoBlit(wxCoord xdest, wxCoord ydest, wxCoord width, wxCoord height,
|
||||||
wxDC *source, wxCoord xsrc, wxCoord ysrc, int rop = wxCOPY, bool useMask = false,
|
wxDC *source, wxCoord xsrc, wxCoord ysrc, int rop = wxCOPY, bool useMask = false,
|
||||||
wxCoord xsrcMask = wxDefaultCoord, wxCoord ysrcMask = wxDefaultCoord);
|
wxCoord xsrcMask = wxDefaultCoord, wxCoord ysrcMask = wxDefaultCoord);
|
||||||
void DoDrawIcon( const wxIcon& icon, wxCoord x, wxCoord y );
|
void DoDrawIcon( const wxIcon& icon, wxCoord x, wxCoord y );
|
||||||
void DoDrawBitmap( const wxBitmap& bitmap, wxCoord x, wxCoord y, bool useMask = false );
|
void DoDrawBitmap( const wxBitmap& bitmap, wxCoord x, wxCoord y, bool useMask = false );
|
||||||
bool CanDrawBitmap() const { return true; }
|
bool CanDrawBitmap() const { return true; }
|
||||||
|
|
||||||
void DoDrawText(const wxString& text, wxCoord x, wxCoord y );
|
void DoDrawText(const wxString& text, wxCoord x, wxCoord y );
|
||||||
void DoDrawRotatedText(const wxString& text, wxCoord x, wxCoord y, double angle);
|
void DoDrawRotatedText(const wxString& text, wxCoord x, wxCoord y, double angle);
|
||||||
void Clear();
|
void Clear();
|
||||||
@@ -240,16 +243,16 @@ public:
|
|||||||
void SetBrush( const wxBrush& brush );
|
void SetBrush( const wxBrush& brush );
|
||||||
void SetLogicalFunction( int function );
|
void SetLogicalFunction( int function );
|
||||||
void SetBackground( const wxBrush& brush );
|
void SetBackground( const wxBrush& brush );
|
||||||
|
|
||||||
void DoSetClippingRegion(wxCoord x, wxCoord y, wxCoord width, wxCoord height);
|
void DoSetClippingRegion(wxCoord x, wxCoord y, wxCoord width, wxCoord height);
|
||||||
void DestroyClippingRegion();
|
void DestroyClippingRegion();
|
||||||
void DoSetClippingRegionAsRegion( const wxRegion &WXUNUSED(clip) ) { }
|
void DoSetClippingRegionAsRegion( const wxRegion &WXUNUSED(clip) ) { }
|
||||||
|
|
||||||
bool StartDoc(const wxString& message);
|
bool StartDoc(const wxString& message);
|
||||||
void EndDoc();
|
void EndDoc();
|
||||||
void StartPage();
|
void StartPage();
|
||||||
void EndPage();
|
void EndPage();
|
||||||
|
|
||||||
wxCoord GetCharHeight() const;
|
wxCoord GetCharHeight() const;
|
||||||
wxCoord GetCharWidth() const;
|
wxCoord GetCharWidth() const;
|
||||||
bool CanGetTextExtent() const { return true; }
|
bool CanGetTextExtent() const { return true; }
|
||||||
@@ -257,37 +260,37 @@ public:
|
|||||||
wxCoord *descent = (wxCoord *) NULL,
|
wxCoord *descent = (wxCoord *) NULL,
|
||||||
wxCoord *externalLeading = (wxCoord *) NULL,
|
wxCoord *externalLeading = (wxCoord *) NULL,
|
||||||
wxFont *theFont = (wxFont *) NULL ) const;
|
wxFont *theFont = (wxFont *) NULL ) const;
|
||||||
|
|
||||||
void DoGetSize(int* width, int* height) const;
|
void DoGetSize(int* width, int* height) const;
|
||||||
void DoGetSizeMM(int *width, int *height) const;
|
void DoGetSizeMM(int *width, int *height) const;
|
||||||
wxSize GetPPI() const;
|
wxSize GetPPI() const;
|
||||||
void SetAxisOrientation( bool xLeftRight, bool yBottomUp );
|
void SetAxisOrientation( bool xLeftRight, bool yBottomUp );
|
||||||
void SetDeviceOrigin( wxCoord x, wxCoord y );
|
void SetDeviceOrigin( wxCoord x, wxCoord y );
|
||||||
|
|
||||||
virtual int GetDepth() const { return 24; }
|
virtual int GetDepth() const { return 24; }
|
||||||
|
|
||||||
void SetBackgroundMode(int WXUNUSED(mode)) { }
|
void SetBackgroundMode(int WXUNUSED(mode)) { }
|
||||||
void SetPalette(const wxPalette& WXUNUSED(palette)) { }
|
void SetPalette(const wxPalette& WXUNUSED(palette)) { }
|
||||||
|
|
||||||
wxPrintData& GetPrintData() { return m_printData; }
|
wxPrintData& GetPrintData() { return m_printData; }
|
||||||
void SetPrintData(const wxPrintData& data) { m_printData = data; }
|
void SetPrintData(const wxPrintData& data) { m_printData = data; }
|
||||||
|
|
||||||
static void SetResolution(int ppi);
|
static void SetResolution(int ppi);
|
||||||
static int GetResolution();
|
static int GetResolution();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static float ms_PSScaleFactor;
|
static float ms_PSScaleFactor;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
PangoContext *m_context;
|
PangoContext *m_context;
|
||||||
PangoLayout *m_layout;
|
PangoLayout *m_layout;
|
||||||
PangoFontDescription *m_fontdesc;
|
PangoFontDescription *m_fontdesc;
|
||||||
|
|
||||||
unsigned char m_currentRed;
|
unsigned char m_currentRed;
|
||||||
unsigned char m_currentGreen;
|
unsigned char m_currentGreen;
|
||||||
unsigned char m_currentBlue;
|
unsigned char m_currentBlue;
|
||||||
wxPrintData m_printData;
|
wxPrintData m_printData;
|
||||||
|
|
||||||
wxGnomePrinter *m_printer;
|
wxGnomePrinter *m_printer;
|
||||||
GnomePrintContext *m_gpc;
|
GnomePrintContext *m_gpc;
|
||||||
|
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
// Name: dcpsg.cpp
|
// Name: src/generic/dcpsg.cpp
|
||||||
// Purpose: Generic wxPostScriptDC implementation
|
// Purpose: Generic wxPostScriptDC implementation
|
||||||
// Author: Julian Smart, Robert Roebling, Markus Holzhem
|
// Author: Julian Smart, Robert Roebling, Markus Holzhem
|
||||||
// Modified by:
|
// Modified by:
|
||||||
@@ -1385,6 +1385,7 @@ void wxPostScriptDC::SetLogicalFunction (int WXUNUSED(function))
|
|||||||
wxFAIL_MSG( wxT("wxPostScriptDC::SetLogicalFunction not implemented.") );
|
wxFAIL_MSG( wxT("wxPostScriptDC::SetLogicalFunction not implemented.") );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if wxUSE_SPLINES
|
||||||
void wxPostScriptDC::DoDrawSpline( wxList *points )
|
void wxPostScriptDC::DoDrawSpline( wxList *points )
|
||||||
{
|
{
|
||||||
wxCHECK_RET( m_ok, wxT("invalid postscript dc") );
|
wxCHECK_RET( m_ok, wxT("invalid postscript dc") );
|
||||||
@@ -1459,6 +1460,7 @@ void wxPostScriptDC::DoDrawSpline( wxList *points )
|
|||||||
wxT("stroke\n"),
|
wxT("stroke\n"),
|
||||||
LogicalToDeviceX((wxCoord)c), LogicalToDeviceY((wxCoord)d) );
|
LogicalToDeviceX((wxCoord)c), LogicalToDeviceY((wxCoord)d) );
|
||||||
}
|
}
|
||||||
|
#endif // wxUSE_SPLINES
|
||||||
|
|
||||||
wxCoord wxPostScriptDC::GetCharWidth() const
|
wxCoord wxPostScriptDC::GetCharWidth() const
|
||||||
{
|
{
|
||||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user