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