]>
git.saurik.com Git - wxWidgets.git/blob - src/mac/dcscreen.cpp
03d769a05b41ddf5987b5ac71122aac8a4e4da83
   1 ///////////////////////////////////////////////////////////////////////////// 
   3 // Purpose:     wxScreenDC class 
   4 // Author:      Stefan Csomor 
   8 // Copyright:   (c) Stefan Csomor 
   9 // Licence:       wxWindows licence 
  10 ///////////////////////////////////////////////////////////////////////////// 
  13 #pragma implementation "dcscreen.h" 
  16 #include "wx/dcscreen.h" 
  17 #include "wx/mac/uma.h" 
  19 #if !USE_SHARED_LIBRARY 
  20 IMPLEMENT_DYNAMIC_CLASS(wxScreenDC
, wxWindowDC
) 
  23 // Create a DC representing the whole screen 
  24 wxScreenDC::wxScreenDC() 
  27     m_macPort 
= GetQDGlobalsThePort() ; 
  30     SetPort( (GrafPtr
) m_macPort 
) ; 
  32     LocalToGlobal( &pt 
) ;      
  34     m_macLocalOrigin
.x 
= -pt
.h 
; 
  35     m_macLocalOrigin
.y 
= -pt
.v 
; 
  37     m_macPort 
= LMGetWMgrPort() ; 
  38     m_macLocalOrigin
.x 
= 0 ; 
  39     m_macLocalOrigin
.y 
= 0 ; 
  43     GetQDGlobalsScreenBits( &screenBits 
); 
  44      m_minX 
= screenBits
.bounds
.left 
; 
  47      GetThemeMenuBarHeight( &height 
) ; 
  48      m_minY 
= screenBits
.bounds
.top 
+ height 
; 
  50      m_minY 
= screenBits
.bounds
.top 
+ LMGetMBarHeight() ; 
  52     m_maxX 
= screenBits
.bounds
.right  
; 
  53     m_maxY 
= screenBits
.bounds
.bottom 
; 
  54     MacSetRectRgn( (RgnHandle
) m_macBoundaryClipRgn 
, m_minX 
, m_minY 
, m_maxX 
, m_maxY 
) ; 
  55     OffsetRgn( (RgnHandle
) m_macBoundaryClipRgn 
, m_macLocalOrigin
.x 
, m_macLocalOrigin
.y 
) ; 
  56     CopyRgn( (RgnHandle
) m_macBoundaryClipRgn 
, (RgnHandle
) m_macCurrentClipRgn 
) ; 
  59 wxScreenDC::~wxScreenDC()