]> git.saurik.com Git - wxWidgets.git/blame - src/mac/classic/dcscreen.cpp
Do not try to expand the root node in SetWindowStyle if the root node hasn't been...
[wxWidgets.git] / src / mac / classic / dcscreen.cpp
CommitLineData
2646f485
SC
1/////////////////////////////////////////////////////////////////////////////
2// Name: dcscreen.cpp
3// Purpose: wxScreenDC class
4// Author: Stefan Csomor
5// Modified by:
6// Created: 1998-01-01
7// RCS-ID: $Id$
8// Copyright: (c) Stefan Csomor
65571936 9// Licence: wxWindows licence
2646f485
SC
10/////////////////////////////////////////////////////////////////////////////
11
12#ifdef __GNUG__
13#pragma implementation "dcscreen.h"
14#endif
15
16#include "wx/dcscreen.h"
17#include "wx/mac/uma.h"
18
2646f485 19IMPLEMENT_DYNAMIC_CLASS(wxScreenDC, wxWindowDC)
2646f485
SC
20
21// Create a DC representing the whole screen
22wxScreenDC::wxScreenDC()
23{
24#if TARGET_CARBON
25 m_macPort = GetQDGlobalsThePort() ;
26 GrafPtr port ;
27 GetPort( &port ) ;
28 SetPort( (GrafPtr) m_macPort ) ;
29 Point pt = { 0,0 } ;
30 LocalToGlobal( &pt ) ;
31 SetPort( port ) ;
32 m_macLocalOrigin.x = -pt.h ;
33 m_macLocalOrigin.y = -pt.v ;
34#else
35 m_macPort = LMGetWMgrPort() ;
36 m_macLocalOrigin.x = 0 ;
37 m_macLocalOrigin.y = 0 ;
38#endif
39 m_ok = TRUE ;
40 BitMap screenBits;
41 GetQDGlobalsScreenBits( &screenBits );
42 m_minX = screenBits.bounds.left ;
43 #if TARGET_CARBON
44 SInt16 height ;
45 GetThemeMenuBarHeight( &height ) ;
46 m_minY = screenBits.bounds.top + height ;
47 #else
48 m_minY = screenBits.bounds.top + LMGetMBarHeight() ;
49 #endif
50 m_maxX = screenBits.bounds.right ;
51 m_maxY = screenBits.bounds.bottom ;
52 MacSetRectRgn( (RgnHandle) m_macBoundaryClipRgn , m_minX , m_minY , m_maxX , m_maxY ) ;
53 OffsetRgn( (RgnHandle) m_macBoundaryClipRgn , m_macLocalOrigin.x , m_macLocalOrigin.y ) ;
54 CopyRgn( (RgnHandle) m_macBoundaryClipRgn , (RgnHandle) m_macCurrentClipRgn ) ;
55}
56
57wxScreenDC::~wxScreenDC()
58{
59 // TODO
60}
61