1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: wxGDIObject base header
4 // Author: Julian Smart
7 // Copyright: (c) Julian Smart
9 // Licence: wxWindows Licence
10 /////////////////////////////////////////////////////////////////////////////
12 #ifndef _WX_GDIOBJ_H_BASE_
13 #define _WX_GDIOBJ_H_BASE_
15 #include "wx/object.h"
17 // ----------------------------------------------------------------------------
18 // wxGDIRefData is the base class for wxXXXData structures which contain the
19 // real data for the GDI object and are shared among all wxWin objects sharing
20 // the same native GDI object
21 // ----------------------------------------------------------------------------
23 class WXDLLIMPEXP_CORE wxGDIRefData
: public wxObjectRefData
{ };
25 // ----------------------------------------------------------------------------
27 // ----------------------------------------------------------------------------
29 class WXDLLIMPEXP_CORE wxGDIObject
: public wxObject
32 bool IsNull() const { return m_refData
== NULL
; }
34 #if defined(__WXMSW__) || defined(__WXOS2__) || defined(__WXPALMOS__)
35 // Creates the resource
36 virtual bool RealizeResource() { return false; }
39 virtual bool FreeResource(bool WXUNUSED(force
) = false) { return false; }
41 virtual bool IsFree() const { return false; }
44 virtual WXHANDLE
GetResourceHandle() const { return 0; }
45 #endif // defined(__WXMSW__) || defined(__WXOS2__)
47 DECLARE_DYNAMIC_CLASS(wxGDIObject
)