]>
Commit | Line | Data |
---|---|---|
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 | 18 | #if wxUSE_NEW_DC |
ab171e95 | 19 | class WXDLLIMPEXP_CORE wxGTKImplDC : public wxImplDC |
2970ae54 RR |
20 | #else |
21 | #define wxGTKImplDC wxDC | |
ab171e95 | 22 | class WXDLLIMPEXP_CORE wxDC : public wxDCBase |
b86ad1d6 RR |
23 | #endif |
24 | ||
c801d85f | 25 | { |
463c1fa1 | 26 | public: |
ab171e95 RR |
27 | #if wxUSE_NEW_DC |
28 | wxGTKImplDC( wxDC *owner ); | |
29 | #else | |
30 | wxDC(); | |
31 | #endif | |
32 | ||
33 | virtual ~wxGTKImplDC(); | |
c801d85f | 34 | |
0b04c4e0 | 35 | #if wxUSE_PALETTE |
a23fd0e1 | 36 | void SetColourMap( const wxPalette& palette ) { SetPalette(palette); }; |
0b04c4e0 | 37 | #endif // wxUSE_PALETTE |
8bbe427f | 38 | |
a23fd0e1 VZ |
39 | // Resolution in pixels per logical inch |
40 | virtual wxSize GetPPI() const; | |
c801d85f | 41 | |
b1263dcf | 42 | virtual bool StartDoc( const wxString& WXUNUSED(message) ) { return true; } |
a23fd0e1 VZ |
43 | virtual void EndDoc() { } |
44 | virtual void StartPage() { } | |
45 | virtual void EndPage() { } | |
8bbe427f | 46 | |
2e992e06 VZ |
47 | virtual GdkWindow* GetGDKWindow() const { return NULL; } |
48 | ||
772b3767 | 49 | protected: |
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 | 54 | private: |
2970ae54 | 55 | DECLARE_ABSTRACT_CLASS(wxGTKImplDC) |
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__ |