X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/376aa62a5d8ead9dc9d0ab3af6628862a21137ed..e412f8928f8cc7d2f21e093f0305137736e9c639:/include/wx/gtk1/dc.h diff --git a/include/wx/gtk1/dc.h b/include/wx/gtk1/dc.h index 8c447ae426..82f2ae49e7 100644 --- a/include/wx/gtk1/dc.h +++ b/include/wx/gtk1/dc.h @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: dc.h +// Name: wx/gtk1/dc.h // Purpose: // Author: Robert Roebling // Id: $Id$ @@ -7,24 +7,20 @@ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// - #ifndef __GTKDCH__ #define __GTKDCH__ -#ifdef __GNUG__ -#pragma interface -#endif - //----------------------------------------------------------------------------- // classes //----------------------------------------------------------------------------- -class wxDC; +class WXDLLIMPEXP_CORE wxDC; //----------------------------------------------------------------------------- // constants //----------------------------------------------------------------------------- +#ifndef MM_TEXT #define MM_TEXT 0 #define MM_ISOTROPIC 1 #define MM_ANISOTROPIC 2 @@ -33,26 +29,26 @@ class wxDC; #define MM_TWIPS 5 #define MM_POINTS 6 #define MM_METRIC 7 +#endif //----------------------------------------------------------------------------- // wxDC //----------------------------------------------------------------------------- -class wxDC : public wxDCBase +class WXDLLIMPEXP_CORE wxDC : public wxDCBase { public: wxDC(); - ~wxDC() { } + virtual ~wxDC() { } +#if wxUSE_PALETTE void SetColourMap( const wxPalette& palette ) { SetPalette(palette); }; - - // the first two must be overridden and called - virtual void DestroyClippingRegion(); +#endif // wxUSE_PALETTE // Resolution in pixels per logical inch virtual wxSize GetPPI() const; - virtual bool StartDoc( const wxString& WXUNUSED(message) ) { return TRUE; } + virtual bool StartDoc( const wxString& WXUNUSED(message) ) { return true; } virtual void EndDoc() { } virtual void StartPage() { } virtual void EndPage() { } @@ -70,6 +66,8 @@ public: virtual void ComputeScaleAndOrigin(); + virtual GdkWindow* GetGDKWindow() const { return NULL; } + wxCoord XDEV2LOG(wxCoord x) const { wxCoord new_x = x - m_deviceOriginX; @@ -147,9 +145,16 @@ public: bool m_needComputeScaleX, m_needComputeScaleY; // not yet used - + private: DECLARE_ABSTRACT_CLASS(wxDC) }; +// this must be defined when wxDC::Blit() honours the DC origian and needed to +// allow wxUniv code in univ/winuniv.cpp to work with versions of wxGTK +// 2.3.[23] +#ifndef wxHAS_WORKING_GTK_DC_BLIT + #define wxHAS_WORKING_GTK_DC_BLIT +#endif + #endif // __GTKDCH__