]>
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 /////////////////////////////////////////////////////////////////////////////
16 #pragma interface "gdiobj.h"
19 #include "wx/object.h" // base class
21 // ----------------------------------------------------------------------------
22 // wxGDIRefData is the base class for wxXXXData structures which contain the
23 // real data for the GDI object and are shared among all wxWin objects sharing
24 // the same native GDI object
25 // ----------------------------------------------------------------------------
27 class WXDLLEXPORT wxGDIRefData
: public wxObjectRefData
29 // this class is intentionally left blank
32 // ----------------------------------------------------------------------------
34 // ----------------------------------------------------------------------------
36 class WXDLLEXPORT wxGDIObject
: public wxObject
39 wxGDIObject() { m_visible
= FALSE
; };
41 // Creates the resource
42 virtual bool RealizeResource() { return FALSE
; };
45 virtual bool FreeResource(bool WXUNUSED(force
) = FALSE
) { return FALSE
; }
47 virtual bool IsFree() const { return FALSE
; }
49 bool IsNull() const { return (m_refData
== 0); }
52 virtual WXHANDLE
GetResourceHandle() const { return 0; }
54 virtual bool GetVisible() { return m_visible
; }
55 virtual void SetVisible(bool v
) { m_visible
= v
; }
58 bool m_visible
; // TRUE only if we should delete this object ourselves
61 DECLARE_DYNAMIC_CLASS(wxGDIObject
)