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