]> git.saurik.com Git - wxWidgets.git/blob - include/wx/mgl/private.h
wxHelpController now wxCHMHelpController on Windows
[wxWidgets.git] / include / wx / mgl / private.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: private.h
3 // Purpose: Private declarations: as this header is only included by
4 // wxWidgets itself, it may contain identifiers which don't start
5 // with "wx".
6 // Author: Vaclav Slavik
7 // Created: 2001/04/07
8 // RCS-ID: $Id$
9 // Copyright: (c) 2001-2002 SciTech Software, Inc. (www.scitechsoft.com)
10 // Licence: wxWindows licence
11 /////////////////////////////////////////////////////////////////////////////
12
13 #ifndef _WX_PRIVATE_H_
14 #define _WX_PRIVATE_H_
15
16 #include <mgraph.hpp>
17 #include "pmapi.h"
18
19 class WXDLLEXPORT wxBitmap;
20
21
22 // ---------------------------------------------------------------------------
23 // private variables
24 // ---------------------------------------------------------------------------
25
26 extern MGLDevCtx *g_displayDC;
27 extern winmng_t *g_winMng;
28
29 // ---------------------------------------------------------------------------
30 // helper functions
31 // ---------------------------------------------------------------------------
32
33
34 // This function converts wxBitmap into pixpattern24_t representation
35 // (used by wxBrush and wxPen)
36
37 extern void wxBitmapToPixPattern(const wxBitmap& bitmap,
38 pixpattern24_t *pix, pattern_t *mask);
39
40
41 // Sets current DC and restores previous one upon destruction:
42 class wxCurrentDCSwitcher
43 {
44 public:
45 wxCurrentDCSwitcher(MGLDevCtx *dc)
46 { m_old = dc->makeCurrent(); }
47 ~wxCurrentDCSwitcher()
48 { MGL_makeCurrentDC(m_old); }
49 MGLDC *m_old;
50 };
51
52
53 #endif // _WX_PRIVATE_H_