]> git.saurik.com Git - wxWidgets.git/blame - include/wx/motif/dc.h
Add a new event type for new window creation, document and implement under MSW. Updat...
[wxWidgets.git] / include / wx / motif / dc.h
CommitLineData
9b6dbb09 1/////////////////////////////////////////////////////////////////////////////
925f7740 2// Name: wx/motif/dc.h
fce127d7 3// Purpose: wxMotifDCImpl class
9b6dbb09
JS
4// Author: Julian Smart
5// Modified by:
6// Created: 17/09/98
7// RCS-ID: $Id$
8// Copyright: (c) Julian Smart
65571936 9// Licence: wxWindows licence
9b6dbb09
JS
10/////////////////////////////////////////////////////////////////////////////
11
12#ifndef _WX_DC_H_
13#define _WX_DC_H_
14
fce127d7 15#include "wx/dc.h"
9b6dbb09 16
fce127d7
VZ
17// ----------------------------------------------------------------------------
18// wxMotifDCImpl
19// ----------------------------------------------------------------------------
9b6dbb09 20
53a2db12 21class WXDLLIMPEXP_CORE wxMotifDCImpl : public wxDCImpl
9b6dbb09 22{
af0bb3b1 23public:
fce127d7 24 wxMotifDCImpl(wxDC *owner);
d16b634f 25
af0bb3b1 26 virtual wxSize GetPPI() const;
d16b634f 27
af0bb3b1 28protected:
7b65ea1a
MB
29 virtual void DoDrawIcon(const wxIcon& icon, wxCoord x, wxCoord y);
30 virtual void DoDrawBitmap(const wxBitmap &bmp, wxCoord x, wxCoord y,
fce127d7 31 bool useMask = false);
d16b634f 32
7b65ea1a 33 virtual void DoSetClippingRegion(wxCoord x, wxCoord y,
fce127d7 34 wxCoord width, wxCoord height);
af0bb3b1
VZ
35 virtual void DoGetSize(int *width, int *height) const;
36 virtual void DoGetSizeMM(int* width, int* height) const;
d16b634f 37
af0bb3b1 38public:
04ab8b6d
RR
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); }
fce127d7 48
af0bb3b1 49 // Without device translation, for backing pixmap purposes
7b65ea1a 50 wxCoord XLOG2DEV_2(wxCoord x) const
9b6dbb09 51 {
04ab8b6d 52 return wxRound((double)(x - m_logicalOriginX) * m_scaleX) * m_signX;
9b6dbb09 53 }
7b65ea1a 54 wxCoord YLOG2DEV_2(wxCoord y) const
9b6dbb09 55 {
04ab8b6d 56 return wxRound((double)(y - m_logicalOriginY) * m_scaleY) * m_signY;
9b6dbb09 57 }
d16b634f 58
fce127d7 59 DECLARE_DYNAMIC_CLASS(wxMotifDCImpl)
9b6dbb09
JS
60};
61
fce127d7 62#endif // _WX_DC_H_