]> git.saurik.com Git - wxWidgets.git/blame - include/wx/gtk1/dc.h
Implement monitoring of file descriptors in wxMotif event loop.
[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
10d30222 13#include "wx/dc.h"
c801d85f 14
c801d85f
KB
15//-----------------------------------------------------------------------------
16// wxDC
17//-----------------------------------------------------------------------------
18
10d30222 19class WXDLLIMPEXP_CORE wxGTKDCImpl : public wxDCImpl
c801d85f 20{
463c1fa1 21public:
10d30222
VZ
22 wxGTKDCImpl(wxDC *owner);
23 virtual ~wxGTKDCImpl() { }
c801d85f 24
0b04c4e0 25#if wxUSE_PALETTE
6dd0883d 26 void SetColourMap( const wxPalette& palette ) { SetPalette(palette); }
0b04c4e0 27#endif // wxUSE_PALETTE
8bbe427f 28
a23fd0e1
VZ
29 // Resolution in pixels per logical inch
30 virtual wxSize GetPPI() const;
c801d85f 31
b1263dcf 32 virtual bool StartDoc( const wxString& WXUNUSED(message) ) { return true; }
a23fd0e1
VZ
33 virtual void EndDoc() { }
34 virtual void StartPage() { }
35 virtual void EndPage() { }
8bbe427f 36
c3b0ceb5
VZ
37 virtual GdkWindow* GetGDKWindow() const { return NULL; }
38
e8b86d25 39public:
04ab8b6d
RR
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); }
c3b0ceb5 49
a23fd0e1 50 // base class pure virtuals implemented here
72cdf4c9 51 virtual void DoSetClippingRegion(wxCoord x, wxCoord y, wxCoord width, wxCoord height);
a23fd0e1 52 virtual void DoGetSizeMM(int* width, int* height) const;
8bbe427f 53
20e05ffb
RR
54private:
55 DECLARE_ABSTRACT_CLASS(wxDC)
c801d85f
KB
56};
57
c3e44503
VZ
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
c801d85f 65#endif // __GTKDCH__