]>
Commit | Line | Data |
---|---|---|
8cf73271 SC |
1 | ///////////////////////////////////////////////////////////////////////////// |
2 | // Name: gdiobj.h | |
3 | // Purpose: wxGDIObject class: base class for other GDI classes | |
4 | // Author: Stefan Csomor | |
5 | // Modified by: | |
6 | // Created: 1998-01-01 | |
7 | // RCS-ID: $Id$ | |
8 | // Copyright: (c) Stefan Csomor | |
65571936 | 9 | // Licence: wxWindows licence |
8cf73271 SC |
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" | |
20 | ||
21 | class WXDLLEXPORT wxGDIRefData: public wxObjectRefData { | |
22 | public: | |
23 | inline wxGDIRefData() | |
24 | { | |
66e9a9f0 | 25 | } |
8cf73271 SC |
26 | }; |
27 | ||
28 | #define M_GDIDATA ((wxGDIRefData *)m_refData) | |
29 | ||
30 | class WXDLLEXPORT wxGDIObject: public wxObject | |
31 | { | |
66e9a9f0 | 32 | DECLARE_DYNAMIC_CLASS(wxGDIObject) |
8cf73271 | 33 | |
66e9a9f0 WS |
34 | public: |
35 | wxGDIObject() : m_visible(false) { } | |
36 | ~wxGDIObject() { } | |
37 | ||
38 | bool IsNull() const { return (m_refData == 0); } | |
8cf73271 | 39 | |
66e9a9f0 WS |
40 | virtual bool GetVisible() { return m_visible; } |
41 | virtual void SetVisible(bool v) { m_visible = v; } | |
8cf73271 SC |
42 | |
43 | protected: | |
66e9a9f0 WS |
44 | bool m_visible; // Can a pointer to this object be safely taken? |
45 | // - only if created within FindOrCreate... | |
8cf73271 SC |
46 | }; |
47 | ||
48 | #endif | |
49 | // _WX_GDIOBJ_H_ |