1998-05-20 14:01:55 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
2005-11-30 07:58:37 +00:00
|
|
|
// Name: wx/gtk/dc.h
|
1998-05-20 14:01:55 +00:00
|
|
|
// Purpose:
|
|
|
|
// Author: Robert Roebling
|
1998-10-26 10:56:58 +00:00
|
|
|
// Id: $Id$
|
|
|
|
// Copyright: (c) 1998 Robert Roebling
|
2004-05-23 20:53:33 +00:00
|
|
|
// Licence: wxWindows licence
|
1998-05-20 14:01:55 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#ifndef __GTKDCH__
|
|
|
|
#define __GTKDCH__
|
|
|
|
|
2007-05-06 20:14:55 +00:00
|
|
|
|
|
|
|
//-----------------------------------------------------------------------------
|
2007-05-08 23:47:43 +00:00
|
|
|
// wxDC
|
2007-05-03 22:29:01 +00:00
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
|
2007-05-08 23:47:43 +00:00
|
|
|
#if wxUSE_NEW_DC
|
|
|
|
class WXDLLIMPEXP_CORE wxGTKImplDC : public wxDC
|
|
|
|
#else
|
|
|
|
#define wxGTKImplDC wxDC
|
|
|
|
class WXDLLIMPEXP_CORE wxGTKImplDC : public wxDCBase
|
2007-05-03 22:29:01 +00:00
|
|
|
#endif
|
|
|
|
|
1998-05-20 14:01:55 +00:00
|
|
|
{
|
1998-12-03 15:14:45 +00:00
|
|
|
public:
|
2007-05-08 23:47:43 +00:00
|
|
|
wxGTKImplDC();
|
|
|
|
virtual ~wxGTKImplDC() { }
|
1998-05-20 14:01:55 +00:00
|
|
|
|
2005-11-30 07:58:37 +00:00
|
|
|
#if wxUSE_PALETTE
|
1999-05-13 21:21:04 +00:00
|
|
|
void SetColourMap( const wxPalette& palette ) { SetPalette(palette); };
|
2005-11-30 07:58:37 +00:00
|
|
|
#endif // wxUSE_PALETTE
|
1998-12-09 17:30:17 +00:00
|
|
|
|
1999-05-13 21:21:04 +00:00
|
|
|
// Resolution in pixels per logical inch
|
|
|
|
virtual wxSize GetPPI() const;
|
1998-05-20 14:01:55 +00:00
|
|
|
|
2004-12-16 21:24:45 +00:00
|
|
|
virtual bool StartDoc( const wxString& WXUNUSED(message) ) { return true; }
|
1999-05-13 21:21:04 +00:00
|
|
|
virtual void EndDoc() { }
|
|
|
|
virtual void StartPage() { }
|
|
|
|
virtual void EndPage() { }
|
1998-12-09 17:30:17 +00:00
|
|
|
|
2006-10-09 16:39:34 +00:00
|
|
|
virtual GdkWindow* GetGDKWindow() const { return NULL; }
|
|
|
|
|
2006-08-19 21:30:06 +00:00
|
|
|
protected:
|
1999-05-13 21:21:04 +00:00
|
|
|
// implementation
|
2007-05-02 11:05:45 +00:00
|
|
|
wxCoord XDEV2LOG(wxCoord x) const { return DeviceToLogicalX(x); }
|
|
|
|
wxCoord XDEV2LOGREL(wxCoord x) const { return DeviceToLogicalXRel(x); }
|
|
|
|
wxCoord YDEV2LOG(wxCoord y) const { return DeviceToLogicalY(y); }
|
|
|
|
wxCoord YDEV2LOGREL(wxCoord y) const { return DeviceToLogicalYRel(y); }
|
|
|
|
wxCoord XLOG2DEV(wxCoord x) const { return LogicalToDeviceX(x); }
|
|
|
|
wxCoord XLOG2DEVREL(wxCoord x) const { return LogicalToDeviceXRel(x); }
|
|
|
|
wxCoord YLOG2DEV(wxCoord y) const { return LogicalToDeviceY(y); }
|
|
|
|
wxCoord YLOG2DEVREL(wxCoord y) const { return LogicalToDeviceYRel(y); }
|
1999-05-13 21:21:04 +00:00
|
|
|
|
|
|
|
// base class pure virtuals implemented here
|
1999-10-18 15:14:52 +00:00
|
|
|
virtual void DoSetClippingRegion(wxCoord x, wxCoord y, wxCoord width, wxCoord height);
|
1999-05-13 21:21:04 +00:00
|
|
|
virtual void DoGetSizeMM(int* width, int* height) const;
|
1998-12-09 17:30:17 +00:00
|
|
|
|
1999-11-22 19:44:25 +00:00
|
|
|
private:
|
2007-05-08 23:47:43 +00:00
|
|
|
DECLARE_ABSTRACT_CLASS(wxGTKImplDC)
|
1998-05-20 14:01:55 +00:00
|
|
|
};
|
|
|
|
|
2002-02-10 16:09:49 +00:00
|
|
|
// 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
|
|
|
|
|
1998-05-20 14:01:55 +00:00
|
|
|
#endif // __GTKDCH__
|