]> git.saurik.com Git - wxWidgets.git/blame - include/wx/os2/gdiobj.h
gave default parameters for wxBrush() ctor from wxColour (this is what is used in...
[wxWidgets.git] / include / wx / os2 / gdiobj.h
CommitLineData
0e320a79
DW
1/////////////////////////////////////////////////////////////////////////////
2// Name: gdiobj.h
3// Purpose: wxGDIObject class: base class for other GDI classes
0371a691 4// Author: David Webster
0e320a79
DW
5// Modified by:
6// Created: ??/??/98
7// RCS-ID: $Id$
0371a691 8// Copyright: (c) David Webster
0e320a79
DW
9// Licence: wxWindows licence
10/////////////////////////////////////////////////////////////////////////////
11
12#ifndef _WX_GDIOBJ_H_
13#define _WX_GDIOBJ_H_
14
15#include "wx/object.h"
16
45016e1a
DW
17class WXDLLEXPORT wxGDIRefData: public wxObjectRefData
18{
0e320a79
DW
19public:
20 inline wxGDIRefData()
45016e1a 21 { }
0e320a79
DW
22};
23
24#define M_GDIDATA ((wxGDIRefData *)m_refData)
25
26class WXDLLEXPORT wxGDIObject: public wxObject
27{
28DECLARE_DYNAMIC_CLASS(wxGDIObject)
29 public:
30 inline wxGDIObject() { m_visible = FALSE; };
31 inline ~wxGDIObject() {};
32
0371a691
DW
33 // Creates the resource
34 virtual bool RealizeResource(void) { return FALSE; };
35
36 // Frees the resource
37 virtual bool FreeResource(bool WXUNUSED(force) = FALSE) { return FALSE; };
38
39 virtual bool IsFree(void) const { return FALSE; };
40
0e320a79
DW
41 inline bool IsNull() const { return (m_refData == 0); }
42
43 virtual bool GetVisible() { return m_visible; }
44 virtual void SetVisible(bool v) { m_visible = v; }
45
46protected:
47 bool m_visible; // Can a pointer to this object be safely taken?
48 // - only if created within FindOrCreate...
49};
50
51#endif
52 // _WX_GDIOBJ_H_