]> git.saurik.com Git - wxWidgets.git/blame - include/wx/palmos/gdiobj.h
MSLU with DMC build fix [#1469456].
[wxWidgets.git] / include / wx / palmos / gdiobj.h
CommitLineData
ffecfa5a
JS
1/////////////////////////////////////////////////////////////////////////////
2// Name: wx/palmos/gdiobj.h
3// Purpose: wxGDIObject class: base class for other GDI classes
e1d63b79 4// Author: William Osborne - minimal working wxPalmOS port
ffecfa5a
JS
5// Modified by:
6// Created: 10/13/04
e1d63b79 7// RCS-ID: $Id$
ffecfa5a
JS
8// Copyright: (c) William Osborne
9// Licence: wxWindows licence
10/////////////////////////////////////////////////////////////////////////////
11
12#ifndef _WX_GDIOBJ_H_
13#define _WX_GDIOBJ_H_
14
ffecfa5a
JS
15#include "wx/object.h" // base class
16
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
26};
27
28// ----------------------------------------------------------------------------
29// wxGDIObject
30// ----------------------------------------------------------------------------
31
32class WXDLLEXPORT wxGDIObject : public wxObject
33{
34public:
35 wxGDIObject() { m_visible = FALSE; };
36
37 // Creates the resource
38 virtual bool RealizeResource() { return FALSE; };
39
40 // Frees the resource
41 virtual bool FreeResource(bool WXUNUSED(force) = FALSE) { return FALSE; }
42
43 virtual bool IsFree() const { return FALSE; }
44
45 bool IsNull() const { return (m_refData == 0); }
46
47 // Returns handle.
48 virtual WXHANDLE GetResourceHandle() const { return 0; }
49
50 virtual bool GetVisible() { return m_visible; }
51 virtual void SetVisible(bool v) { m_visible = v; }
52
53protected:
54 bool m_visible; // TRUE only if we should delete this object ourselves
55
56private:
57 DECLARE_DYNAMIC_CLASS(wxGDIObject)
58};
59
60#endif
61 // _WX_GDIOBJ_H_