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