]> git.saurik.com Git - wxWidgets.git/blame - include/wx/gtk/dc.h
Implement for selection code.
[wxWidgets.git] / include / wx / gtk / dc.h
CommitLineData
c801d85f 1/////////////////////////////////////////////////////////////////////////////
0b04c4e0 2// Name: wx/gtk/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
d296fd8f
RR
13
14//-----------------------------------------------------------------------------
2970ae54 15// wxDC
b86ad1d6
RR
16//-----------------------------------------------------------------------------
17
2970ae54
RR
18#if wxUSE_NEW_DC
19class WXDLLIMPEXP_CORE wxGTKImplDC : public wxDC
20#else
21#define wxGTKImplDC wxDC
22class WXDLLIMPEXP_CORE wxGTKImplDC : public wxDCBase
b86ad1d6
RR
23#endif
24
c801d85f 25{
463c1fa1 26public:
2970ae54
RR
27 wxGTKImplDC();
28 virtual ~wxGTKImplDC() { }
c801d85f 29
0b04c4e0 30#if wxUSE_PALETTE
a23fd0e1 31 void SetColourMap( const wxPalette& palette ) { SetPalette(palette); };
0b04c4e0 32#endif // wxUSE_PALETTE
8bbe427f 33
a23fd0e1
VZ
34 // Resolution in pixels per logical inch
35 virtual wxSize GetPPI() const;
c801d85f 36
b1263dcf 37 virtual bool StartDoc( const wxString& WXUNUSED(message) ) { return true; }
a23fd0e1
VZ
38 virtual void EndDoc() { }
39 virtual void StartPage() { }
40 virtual void EndPage() { }
8bbe427f 41
2e992e06
VZ
42 virtual GdkWindow* GetGDKWindow() const { return NULL; }
43
772b3767 44protected:
a23fd0e1 45 // implementation
04ab8b6d
RR
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); }
a23fd0e1 54
a23fd0e1 55 // base class pure virtuals implemented here
72cdf4c9 56 virtual void DoSetClippingRegion(wxCoord x, wxCoord y, wxCoord width, wxCoord height);
a23fd0e1 57 virtual void DoGetSizeMM(int* width, int* height) const;
8bbe427f 58
20e05ffb 59private:
2970ae54 60 DECLARE_ABSTRACT_CLASS(wxGTKImplDC)
c801d85f
KB
61};
62
c3e44503
VZ
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
c801d85f 70#endif // __GTKDCH__