]>
Commit | Line | Data |
---|---|---|
2bda0e17 KB |
1 | ///////////////////////////////////////////////////////////////////////////// |
2 | // Name: gdiobj.cpp | |
3 | // Purpose: wxGDIObject class | |
4 | // Author: Julian Smart | |
5 | // Modified by: | |
6 | // Created: 01/02/97 | |
7 | // RCS-ID: $Id$ | |
6c9a19aa | 8 | // Copyright: (c) Julian Smart |
213ceb3f | 9 | // Licence: wxWindows licence |
2bda0e17 KB |
10 | ///////////////////////////////////////////////////////////////////////////// |
11 | ||
2bda0e17 KB |
12 | // For compilers that support precompilation, includes "wx.h". |
13 | #include "wx/wxprec.h" | |
14 | ||
15 | #ifdef __BORLANDC__ | |
16 | #pragma hdrstop | |
17 | #endif | |
18 | ||
19 | #ifndef WX_PRECOMP | |
20 | #include <stdio.h> | |
21 | #include "wx/setup.h" | |
22 | #include "wx/list.h" | |
23 | #include "wx/utils.h" | |
24 | #include "wx/app.h" | |
25 | #endif | |
26 | ||
27 | #include "wx/gdiobj.h" | |
28 | #include "wx/msw/private.h" | |
2bda0e17 | 29 | |
2bda0e17 | 30 | IMPLEMENT_DYNAMIC_CLASS(wxGDIObject, wxObject) |
2bda0e17 KB |
31 | |
32 | /* | |
33 | void wxGDIObject::IncrementResourceUsage(void) | |
34 | { | |
213ceb3f WS |
35 | if ( !M_GDIDATA ) |
36 | return; | |
2bda0e17 KB |
37 | |
38 | // wxDebugMsg("Object %ld about to be incremented: %d\n", (long)this, m_usageCount); | |
39 | M_GDIDATA->m_usageCount ++; | |
40 | }; | |
41 | ||
42 | void wxGDIObject::DecrementResourceUsage(void) | |
43 | { | |
213ceb3f WS |
44 | if ( !M_GDIDATA ) |
45 | return; | |
2bda0e17 KB |
46 | |
47 | M_GDIDATA->m_usageCount --; | |
48 | if (wxTheApp) | |
213ceb3f | 49 | wxTheApp->SetPendingCleanup(true); |
2bda0e17 KB |
50 | // wxDebugMsg("Object %ld decremented: %d\n", (long)this, M_GDIDATA->m_usageCount); |
51 | if (M_GDIDATA->m_usageCount < 0) | |
52 | { | |
53 | char buf[80]; | |
54 | sprintf(buf, "Object %ld usage count is %d\n", (long)this, M_GDIDATA->m_usageCount); | |
55 | wxDebugMsg(buf); | |
56 | } | |
57 | // assert(M_GDIDATA->m_usageCount >= 0); | |
58 | }; | |
59 | ||
60 | */ | |
61 |