]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/msw/gdiobj.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/msw/gdiobj.h
3 // Purpose: wxGDIObject class: base class for other GDI classes
4 // Author: Julian Smart
8 // Copyright: (c) Julian Smart
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
15 #include "wx/object.h" // base class
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 WXDLLEXPORT wxGDIRefData
: public wxObjectRefData
25 // this class is intentionally left blank
28 // ----------------------------------------------------------------------------
30 // ----------------------------------------------------------------------------
32 class WXDLLEXPORT wxGDIObject
: public wxObject
35 wxGDIObject() { m_visible
= false; };
37 // Creates the resource
38 virtual bool RealizeResource() { return false; };
41 virtual bool FreeResource(bool WXUNUSED(force
) = false) { return false; }
43 virtual bool IsFree() const { return false; }
45 bool IsNull() const { return (m_refData
== 0); }
48 virtual WXHANDLE
GetResourceHandle() const { return 0; }
50 virtual bool GetVisible() { return m_visible
; }
51 virtual void SetVisible(bool v
) { m_visible
= v
; }
54 bool m_visible
; // true only if we should delete this object ourselves
57 DECLARE_DYNAMIC_CLASS(wxGDIObject
)