]> git.saurik.com Git - wxWidgets.git/blame - include/wx/palmos/gdiobj.h
added wxConvFileName which is a variable, not define as wxConvFile; added comments...
[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
15#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
16 #pragma interface "gdiobj.h"
17#endif
18
19#include "wx/object.h" // base class
20
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// ----------------------------------------------------------------------------
26
27class WXDLLEXPORT wxGDIRefData : public wxObjectRefData
28{
29 // this class is intentionally left blank
30};
31
32// ----------------------------------------------------------------------------
33// wxGDIObject
34// ----------------------------------------------------------------------------
35
36class WXDLLEXPORT wxGDIObject : public wxObject
37{
38public:
39 wxGDIObject() { m_visible = FALSE; };
40
41 // Creates the resource
42 virtual bool RealizeResource() { return FALSE; };
43
44 // Frees the resource
45 virtual bool FreeResource(bool WXUNUSED(force) = FALSE) { return FALSE; }
46
47 virtual bool IsFree() const { return FALSE; }
48
49 bool IsNull() const { return (m_refData == 0); }
50
51 // Returns handle.
52 virtual WXHANDLE GetResourceHandle() const { return 0; }
53
54 virtual bool GetVisible() { return m_visible; }
55 virtual void SetVisible(bool v) { m_visible = v; }
56
57protected:
58 bool m_visible; // TRUE only if we should delete this object ourselves
59
60private:
61 DECLARE_DYNAMIC_CLASS(wxGDIObject)
62};
63
64#endif
65 // _WX_GDIOBJ_H_