]> git.saurik.com Git - wxWidgets.git/blame - include/wx/gtk1/dc.h
don't use deprecated GetTextExtent() overload
[wxWidgets.git] / include / wx / gtk1 / dc.h
CommitLineData
c801d85f 1/////////////////////////////////////////////////////////////////////////////
8ef94bfc 2// Name: wx/gtk1/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// classes
15//-----------------------------------------------------------------------------
16
20123d49 17class WXDLLIMPEXP_CORE wxDC;
c801d85f 18
c801d85f
KB
19//-----------------------------------------------------------------------------
20// wxDC
21//-----------------------------------------------------------------------------
22
20123d49 23class WXDLLIMPEXP_CORE wxDC : public wxDCBase
c801d85f 24{
463c1fa1 25public:
a23fd0e1 26 wxDC();
d3c7fc99 27 virtual ~wxDC() { }
c801d85f 28
0b04c4e0 29#if wxUSE_PALETTE
a23fd0e1 30 void SetColourMap( const wxPalette& palette ) { SetPalette(palette); };
0b04c4e0 31#endif // wxUSE_PALETTE
8bbe427f 32
a23fd0e1
VZ
33 // Resolution in pixels per logical inch
34 virtual wxSize GetPPI() const;
c801d85f 35
b1263dcf 36 virtual bool StartDoc( const wxString& WXUNUSED(message) ) { return true; }
a23fd0e1
VZ
37 virtual void EndDoc() { }
38 virtual void StartPage() { }
39 virtual void EndPage() { }
8bbe427f 40
e8b86d25 41public:
04ab8b6d
RR
42 // implementation
43 wxCoord XDEV2LOG(wxCoord x) const { return DeviceToLogicalX(x); }
44 wxCoord XDEV2LOGREL(wxCoord x) const { return DeviceToLogicalXRel(x); }
45 wxCoord YDEV2LOG(wxCoord y) const { return DeviceToLogicalY(y); }
46 wxCoord YDEV2LOGREL(wxCoord y) const { return DeviceToLogicalYRel(y); }
47 wxCoord XLOG2DEV(wxCoord x) const { return LogicalToDeviceX(x); }
48 wxCoord XLOG2DEVREL(wxCoord x) const { return LogicalToDeviceXRel(x); }
49 wxCoord YLOG2DEV(wxCoord y) const { return LogicalToDeviceY(y); }
50 wxCoord YLOG2DEVREL(wxCoord y) const { return LogicalToDeviceYRel(y); }
51
a23fd0e1 52 // base class pure virtuals implemented here
72cdf4c9 53 virtual void DoSetClippingRegion(wxCoord x, wxCoord y, wxCoord width, wxCoord height);
a23fd0e1 54 virtual void DoGetSizeMM(int* width, int* height) const;
8bbe427f 55
20e05ffb
RR
56private:
57 DECLARE_ABSTRACT_CLASS(wxDC)
c801d85f
KB
58};
59
c3e44503
VZ
60// this must be defined when wxDC::Blit() honours the DC origian and needed to
61// allow wxUniv code in univ/winuniv.cpp to work with versions of wxGTK
62// 2.3.[23]
63#ifndef wxHAS_WORKING_GTK_DC_BLIT
64 #define wxHAS_WORKING_GTK_DC_BLIT
65#endif
66
c801d85f 67#endif // __GTKDCH__