X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/7c72311fe19b9451446e5f97bf7f8ee7535227a5..6ca154fcc14a2532798a23977baee2eed3179d19:/include/wx/gtk1/gnome/gprint.h diff --git a/include/wx/gtk1/gnome/gprint.h b/include/wx/gtk1/gnome/gprint.h index 2dce890414..3b8859c17b 100644 --- a/include/wx/gtk1/gnome/gprint.h +++ b/include/wx/gtk1/gnome/gprint.h @@ -10,8 +10,8 @@ #ifndef __gprint_H__ #define __gprint_H__ -#if defined(__GNUG__) && !defined(__APPLE__) - #pragma interface "gprint.h" +#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) +#pragma interface #endif // Include wxWindows' headers @@ -46,6 +46,7 @@ public: virtual bool Ok() const { return true; } GnomePrintConfig* GetPrintConfig() { return m_config; } + void SetPrintJob( GnomePrintJob *job ) { m_job = job; } GnomePrintJob* GetPrintJob() { return m_job; } @@ -77,7 +78,10 @@ public: wxPrintDialogData *data = NULL ); virtual wxPrintDialogBase *CreatePrintDialog( wxWindow *parent, wxPrintData *data ); - + + virtual wxPageSetupDialogBase *CreatePageSetupDialog( wxWindow *parent, + wxPageSetupDialogData * data = NULL ); + virtual bool HasPrintSetupDialog(); virtual wxDialog *CreatePrintSetupDialog( wxWindow *parent, wxPrintData *data ); virtual bool HasOwnPrintToFile(); @@ -90,14 +94,58 @@ public: }; //---------------------------------------------------------------------------- -// wxGnomePrintSetupDialog +// wxGnomePrintDialog +//---------------------------------------------------------------------------- + +class wxGnomePrintDialog: public wxPrintDialogBase +{ +public: + wxGnomePrintDialog( wxWindow *parent, + wxPrintDialogData* data = NULL ); + wxGnomePrintDialog( wxWindow *parent, wxPrintData* data); + ~wxGnomePrintDialog(); + + wxPrintData& GetPrintData() + { return m_printDialogData.GetPrintData(); } + wxPrintDialogData& GetPrintDialogData() + { return m_printDialogData; } + + wxDC *GetPrintDC(); + + virtual int ShowModal(); + + virtual bool Validate(); + virtual bool TransferDataToWindow(); + virtual bool TransferDataFromWindow(); + +private: + // Implement some base class methods to do nothing to avoid asserts and + // GTK warnings, since this is not a real wxDialog. + virtual void DoSetSize(int WXUNUSED(x), int WXUNUSED(y), + int WXUNUSED(width), int WXUNUSED(height), + int WXUNUSED(sizeFlags) = wxSIZE_AUTO) {} + virtual void DoMoveWindow(int WXUNUSED(x), int WXUNUSED(y), + int WXUNUSED(width), int WXUNUSED(height)) {} + + void Init(); + wxPrintDialogData m_printDialogData; + +private: + DECLARE_DYNAMIC_CLASS(wxGnomePrintDialog) +}; + +//---------------------------------------------------------------------------- +// wxGnomePageSetupDialog //---------------------------------------------------------------------------- -class wxGnomePrintSetupDialog: public wxDialog +class wxGnomePageSetupDialog: public wxPageSetupDialogBase { public: - wxGnomePrintSetupDialog( wxWindow *parent, wxPrintData *data ); - ~wxGnomePrintSetupDialog(); + wxGnomePageSetupDialog( wxWindow *parent, + wxPageSetupDialogData* data = NULL ); + ~wxGnomePageSetupDialog(); + + virtual wxPageSetupDialogData& GetPageSetupDialogData(); virtual int ShowModal(); @@ -113,8 +161,11 @@ private: int WXUNUSED(sizeFlags) = wxSIZE_AUTO) {} virtual void DoMoveWindow(int WXUNUSED(x), int WXUNUSED(y), int WXUNUSED(width), int WXUNUSED(height)) {} + + wxPageSetupDialogData m_pageDialogData; + private: - DECLARE_DYNAMIC_CLASS(wxGnomePrintSetupDialog) + DECLARE_DYNAMIC_CLASS(wxGnomePageSetupDialog) }; //---------------------------------------------------------------------------- @@ -137,6 +188,7 @@ public: private: GnomePrintContext *m_gpc; + bool m_native_preview; private: DECLARE_DYNAMIC_CLASS(wxGnomePrinter)