]>
git.saurik.com Git - wxWidgets.git/blob - src/mac/classic/dcscreen.cpp
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: src/mac/classic/dcscreen.cpp
3 // Purpose: wxScreenDC class
4 // Author: Stefan Csomor
8 // Copyright: (c) Stefan Csomor
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
12 #include "wx/wxprec.h"
14 #include "wx/dcscreen.h"
16 #include "wx/mac/uma.h"
18 IMPLEMENT_DYNAMIC_CLASS(wxScreenDC
, wxWindowDC
)
20 // Create a DC representing the whole screen
21 wxScreenDC::wxScreenDC()
24 m_macPort
= GetQDGlobalsThePort() ;
27 SetPort( (GrafPtr
) m_macPort
) ;
29 LocalToGlobal( &pt
) ;
31 m_macLocalOrigin
.x
= -pt
.h
;
32 m_macLocalOrigin
.y
= -pt
.v
;
34 m_macPort
= LMGetWMgrPort() ;
35 m_macLocalOrigin
.x
= 0 ;
36 m_macLocalOrigin
.y
= 0 ;
40 GetQDGlobalsScreenBits( &screenBits
);
41 m_minX
= screenBits
.bounds
.left
;
44 GetThemeMenuBarHeight( &height
) ;
45 m_minY
= screenBits
.bounds
.top
+ height
;
47 m_minY
= screenBits
.bounds
.top
+ LMGetMBarHeight() ;
49 m_maxX
= screenBits
.bounds
.right
;
50 m_maxY
= screenBits
.bounds
.bottom
;
51 MacSetRectRgn( (RgnHandle
) m_macBoundaryClipRgn
, m_minX
, m_minY
, m_maxX
, m_maxY
) ;
52 OffsetRgn( (RgnHandle
) m_macBoundaryClipRgn
, m_macLocalOrigin
.x
, m_macLocalOrigin
.y
) ;
53 CopyRgn( (RgnHandle
) m_macBoundaryClipRgn
, (RgnHandle
) m_macCurrentClipRgn
) ;
56 wxScreenDC::~wxScreenDC()