]> git.saurik.com Git - wxWidgets.git/blob - include/wx/motif/dc.h
Add wxActivateEvent::GetActivationReason().
[wxWidgets.git] / include / wx / motif / dc.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/motif/dc.h
3 // Purpose: wxMotifDCImpl class
4 // Author: Julian Smart
5 // Modified by:
6 // Created: 17/09/98
7 // Copyright: (c) Julian Smart
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
10
11 #ifndef _WX_DC_H_
12 #define _WX_DC_H_
13
14 #include "wx/dc.h"
15
16 // ----------------------------------------------------------------------------
17 // wxMotifDCImpl
18 // ----------------------------------------------------------------------------
19
20 class WXDLLIMPEXP_CORE wxMotifDCImpl : public wxDCImpl
21 {
22 public:
23 wxMotifDCImpl(wxDC *owner);
24
25 virtual wxSize GetPPI() const;
26
27 protected:
28 virtual void DoDrawIcon(const wxIcon& icon, wxCoord x, wxCoord y);
29 virtual void DoDrawBitmap(const wxBitmap &bmp, wxCoord x, wxCoord y,
30 bool useMask = false);
31
32 virtual void DoSetClippingRegion(wxCoord x, wxCoord y,
33 wxCoord width, wxCoord height);
34 virtual void DoGetSize(int *width, int *height) const;
35 virtual void DoGetSizeMM(int* width, int* height) const;
36
37 public:
38 // implementation
39 wxCoord XDEV2LOG(wxCoord x) const { return DeviceToLogicalX(x); }
40 wxCoord XDEV2LOGREL(wxCoord x) const { return DeviceToLogicalXRel(x); }
41 wxCoord YDEV2LOG(wxCoord y) const { return DeviceToLogicalY(y); }
42 wxCoord YDEV2LOGREL(wxCoord y) const { return DeviceToLogicalYRel(y); }
43 wxCoord XLOG2DEV(wxCoord x) const { return LogicalToDeviceX(x); }
44 wxCoord XLOG2DEVREL(wxCoord x) const { return LogicalToDeviceXRel(x); }
45 wxCoord YLOG2DEV(wxCoord y) const { return LogicalToDeviceY(y); }
46 wxCoord YLOG2DEVREL(wxCoord y) const { return LogicalToDeviceYRel(y); }
47
48 // Without device translation, for backing pixmap purposes
49 wxCoord XLOG2DEV_2(wxCoord x) const
50 {
51 return wxRound((double)(x - m_logicalOriginX) * m_scaleX) * m_signX;
52 }
53 wxCoord YLOG2DEV_2(wxCoord y) const
54 {
55 return wxRound((double)(y - m_logicalOriginY) * m_scaleY) * m_signY;
56 }
57
58 DECLARE_DYNAMIC_CLASS(wxMotifDCImpl)
59 };
60
61 #endif // _WX_DC_H_