]> git.saurik.com Git - wxWidgets.git/blame_incremental - include/wx/gtk1/dc.h
update mac gl, after rev 50900
[wxWidgets.git] / include / wx / gtk1 / dc.h
... / ...
CommitLineData
1/////////////////////////////////////////////////////////////////////////////
2// Name: wx/gtk1/dc.h
3// Purpose:
4// Author: Robert Roebling
5// Id: $Id$
6// Copyright: (c) 1998 Robert Roebling
7// Licence: wxWindows licence
8/////////////////////////////////////////////////////////////////////////////
9
10#ifndef __GTKDCH__
11#define __GTKDCH__
12
13#include "wx/dc.h"
14
15//-----------------------------------------------------------------------------
16// wxDC
17//-----------------------------------------------------------------------------
18
19class WXDLLIMPEXP_CORE wxGTKDCImpl : public wxDCImpl
20{
21public:
22 wxGTKDCImpl(wxDC *owner);
23 virtual ~wxGTKDCImpl() { }
24
25#if wxUSE_PALETTE
26 void SetColourMap( const wxPalette& palette ) { SetPalette(palette); };
27#endif // wxUSE_PALETTE
28
29 // Resolution in pixels per logical inch
30 virtual wxSize GetPPI() const;
31
32 virtual bool StartDoc( const wxString& WXUNUSED(message) ) { return true; }
33 virtual void EndDoc() { }
34 virtual void StartPage() { }
35 virtual void EndPage() { }
36
37 virtual GdkWindow* GetGDKWindow() const { return NULL; }
38
39public:
40 // implementation
41 wxCoord XDEV2LOG(wxCoord x) const { return DeviceToLogicalX(x); }
42 wxCoord XDEV2LOGREL(wxCoord x) const { return DeviceToLogicalXRel(x); }
43 wxCoord YDEV2LOG(wxCoord y) const { return DeviceToLogicalY(y); }
44 wxCoord YDEV2LOGREL(wxCoord y) const { return DeviceToLogicalYRel(y); }
45 wxCoord XLOG2DEV(wxCoord x) const { return LogicalToDeviceX(x); }
46 wxCoord XLOG2DEVREL(wxCoord x) const { return LogicalToDeviceXRel(x); }
47 wxCoord YLOG2DEV(wxCoord y) const { return LogicalToDeviceY(y); }
48 wxCoord YLOG2DEVREL(wxCoord y) const { return LogicalToDeviceYRel(y); }
49
50 // base class pure virtuals implemented here
51 virtual void DoSetClippingRegion(wxCoord x, wxCoord y, wxCoord width, wxCoord height);
52 virtual void DoGetSizeMM(int* width, int* height) const;
53
54private:
55 DECLARE_ABSTRACT_CLASS(wxDC)
56};
57
58// this must be defined when wxDC::Blit() honours the DC origian and needed to
59// allow wxUniv code in univ/winuniv.cpp to work with versions of wxGTK
60// 2.3.[23]
61#ifndef wxHAS_WORKING_GTK_DC_BLIT
62 #define wxHAS_WORKING_GTK_DC_BLIT
63#endif
64
65#endif // __GTKDCH__