]> git.saurik.com Git - wxWidgets.git/blame - include/wx/msw/gdiobj.h
Reverted semicolons patch
[wxWidgets.git] / include / wx / msw / gdiobj.h
CommitLineData
2bda0e17 1/////////////////////////////////////////////////////////////////////////////
6d167489 2// Name: wx/msw/gdiobj.h
2bda0e17
KB
3// Purpose: wxGDIObject class: base class for other GDI classes
4// Author: Julian Smart
5// Modified by:
6// Created: 01/02/97
7// RCS-ID: $Id$
bbcdf8bc 8// Copyright: (c) Julian Smart
65571936 9// Licence: wxWindows licence
2bda0e17
KB
10/////////////////////////////////////////////////////////////////////////////
11
bbcdf8bc
JS
12#ifndef _WX_GDIOBJ_H_
13#define _WX_GDIOBJ_H_
2bda0e17 14
6d167489 15#include "wx/object.h" // base class
2bda0e17 16
6d167489
VZ
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// ----------------------------------------------------------------------------
22
23class WXDLLEXPORT wxGDIRefData : public wxObjectRefData
24{
25 // this class is intentionally left blank
2bda0e17
KB
26};
27
6d167489
VZ
28// ----------------------------------------------------------------------------
29// wxGDIObject
30// ----------------------------------------------------------------------------
2bda0e17 31
6d167489 32class WXDLLEXPORT wxGDIObject : public wxObject
2bda0e17 33{
6d167489 34public:
213ceb3f 35 wxGDIObject() { m_visible = false; };
2bda0e17 36
6d167489 37 // Creates the resource
213ceb3f 38 virtual bool RealizeResource() { return false; };
2bda0e17 39
6d167489 40 // Frees the resource
213ceb3f 41 virtual bool FreeResource(bool WXUNUSED(force) = false) { return false; }
2bda0e17 42
213ceb3f 43 virtual bool IsFree() const { return false; }
2bda0e17 44
6d167489 45 bool IsNull() const { return (m_refData == 0); }
2bda0e17 46
6d167489 47 // Returns handle.
2b5f62a0 48 virtual WXHANDLE GetResourceHandle() const { return 0; }
2bda0e17 49
6d167489
VZ
50 virtual bool GetVisible() { return m_visible; }
51 virtual void SetVisible(bool v) { m_visible = v; }
2bda0e17
KB
52
53protected:
213ceb3f 54 bool m_visible; // true only if we should delete this object ourselves
6d167489
VZ
55
56private:
57 DECLARE_DYNAMIC_CLASS(wxGDIObject)
2bda0e17
KB
58};
59
60#endif
bbcdf8bc 61 // _WX_GDIOBJ_H_