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