]> git.saurik.com Git - wxWidgets.git/blob - include/wx/gtk1/dc.h
No real changes, just make wxWindow::CanScroll() virtual.
[wxWidgets.git] / include / wx / gtk1 / dc.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/gtk1/dc.h
3 // Purpose:
4 // Author: Robert Roebling
5 // Copyright: (c) 1998 Robert Roebling
6 // Licence: wxWindows licence
7 /////////////////////////////////////////////////////////////////////////////
8
9 #ifndef __GTKDCH__
10 #define __GTKDCH__
11
12 #include "wx/dc.h"
13
14 //-----------------------------------------------------------------------------
15 // wxDC
16 //-----------------------------------------------------------------------------
17
18 class WXDLLIMPEXP_CORE wxGTKDCImpl : public wxDCImpl
19 {
20 public:
21 wxGTKDCImpl(wxDC *owner);
22 virtual ~wxGTKDCImpl() { }
23
24 #if wxUSE_PALETTE
25 void SetColourMap( const wxPalette& palette ) { SetPalette(palette); }
26 #endif // wxUSE_PALETTE
27
28 // Resolution in pixels per logical inch
29 virtual wxSize GetPPI() const;
30
31 virtual bool StartDoc( const wxString& WXUNUSED(message) ) { return true; }
32 virtual void EndDoc() { }
33 virtual void StartPage() { }
34 virtual void EndPage() { }
35
36 virtual GdkWindow* GetGDKWindow() const { return NULL; }
37
38 public:
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); }
48
49 // base class pure virtuals implemented here
50 virtual void DoSetClippingRegion(wxCoord x, wxCoord y, wxCoord width, wxCoord height);
51 virtual void DoGetSizeMM(int* width, int* height) const;
52
53 private:
54 DECLARE_ABSTRACT_CLASS(wxDC)
55 };
56
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
64 #endif // __GTKDCH__