]>
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 |
2bda0e17 KB |
9 | // Licence: wxWindows licence |
10 | ///////////////////////////////////////////////////////////////////////////// | |
11 | ||
12 | #ifdef __GNUG__ | |
13 | #pragma implementation "gdiobj.h" | |
14 | #endif | |
15 | ||
16 | // For compilers that support precompilation, includes "wx.h". | |
17 | #include "wx/wxprec.h" | |
18 | ||
19 | #ifdef __BORLANDC__ | |
20 | #pragma hdrstop | |
21 | #endif | |
22 | ||
23 | #ifndef WX_PRECOMP | |
24 | #include <stdio.h> | |
25 | #include "wx/setup.h" | |
26 | #include "wx/list.h" | |
27 | #include "wx/utils.h" | |
28 | #include "wx/app.h" | |
29 | #endif | |
30 | ||
31 | #include "wx/gdiobj.h" | |
32 | #include "wx/msw/private.h" | |
2bda0e17 | 33 | |
2bda0e17 | 34 | IMPLEMENT_DYNAMIC_CLASS(wxGDIObject, wxObject) |
2bda0e17 KB |
35 | |
36 | /* | |
37 | void wxGDIObject::IncrementResourceUsage(void) | |
38 | { | |
39 | if ( !M_GDIDATA ) | |
40 | return; | |
41 | ||
42 | // wxDebugMsg("Object %ld about to be incremented: %d\n", (long)this, m_usageCount); | |
43 | M_GDIDATA->m_usageCount ++; | |
44 | }; | |
45 | ||
46 | void wxGDIObject::DecrementResourceUsage(void) | |
47 | { | |
48 | if ( !M_GDIDATA ) | |
49 | return; | |
50 | ||
51 | M_GDIDATA->m_usageCount --; | |
52 | if (wxTheApp) | |
53 | wxTheApp->SetPendingCleanup(TRUE); | |
54 | // wxDebugMsg("Object %ld decremented: %d\n", (long)this, M_GDIDATA->m_usageCount); | |
55 | if (M_GDIDATA->m_usageCount < 0) | |
56 | { | |
57 | char buf[80]; | |
58 | sprintf(buf, "Object %ld usage count is %d\n", (long)this, M_GDIDATA->m_usageCount); | |
59 | wxDebugMsg(buf); | |
60 | } | |
61 | // assert(M_GDIDATA->m_usageCount >= 0); | |
62 | }; | |
63 | ||
64 | */ | |
65 |