]>
git.saurik.com Git - wxWidgets.git/blob - src/mac/classic/dcscreen.cpp
1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: wxScreenDC class
4 // Author: Stefan Csomor
8 // Copyright: (c) Stefan Csomor
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
12 #include "wx/dcscreen.h"
13 #include "wx/mac/uma.h"
15 IMPLEMENT_DYNAMIC_CLASS(wxScreenDC
, wxWindowDC
)
17 // Create a DC representing the whole screen
18 wxScreenDC::wxScreenDC()
21 m_macPort
= GetQDGlobalsThePort() ;
24 SetPort( (GrafPtr
) m_macPort
) ;
26 LocalToGlobal( &pt
) ;
28 m_macLocalOrigin
.x
= -pt
.h
;
29 m_macLocalOrigin
.y
= -pt
.v
;
31 m_macPort
= LMGetWMgrPort() ;
32 m_macLocalOrigin
.x
= 0 ;
33 m_macLocalOrigin
.y
= 0 ;
37 GetQDGlobalsScreenBits( &screenBits
);
38 m_minX
= screenBits
.bounds
.left
;
41 GetThemeMenuBarHeight( &height
) ;
42 m_minY
= screenBits
.bounds
.top
+ height
;
44 m_minY
= screenBits
.bounds
.top
+ LMGetMBarHeight() ;
46 m_maxX
= screenBits
.bounds
.right
;
47 m_maxY
= screenBits
.bounds
.bottom
;
48 MacSetRectRgn( (RgnHandle
) m_macBoundaryClipRgn
, m_minX
, m_minY
, m_maxX
, m_maxY
) ;
49 OffsetRgn( (RgnHandle
) m_macBoundaryClipRgn
, m_macLocalOrigin
.x
, m_macLocalOrigin
.y
) ;
50 CopyRgn( (RgnHandle
) m_macBoundaryClipRgn
, (RgnHandle
) m_macCurrentClipRgn
) ;
53 wxScreenDC::~wxScreenDC()