]>
Commit | Line | Data |
---|---|---|
32b8ec41 | 1 | ///////////////////////////////////////////////////////////////////////////// |
be437778 | 2 | // Name: wx/mgl/gdiobj.h |
32b8ec41 VZ |
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$ | |
8 | // Copyright: (c) Julian Smart | |
65571936 | 9 | // Licence: wxWindows licence |
32b8ec41 VZ |
10 | ///////////////////////////////////////////////////////////////////////////// |
11 | ||
12 | #ifndef _WX_GDIOBJ_H_ | |
13 | #define _WX_GDIOBJ_H_ | |
14 | ||
32b8ec41 VZ |
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 | ||
23 | class WXDLLEXPORT wxGDIRefData : public wxObjectRefData | |
24 | { | |
25 | // this class is intentionally left blank | |
26 | }; | |
27 | ||
28 | // ---------------------------------------------------------------------------- | |
29 | // wxGDIObject | |
30 | // ---------------------------------------------------------------------------- | |
31 | ||
32 | class WXDLLEXPORT wxGDIObject : public wxObject | |
33 | { | |
34 | public: | |
be437778 | 35 | wxGDIObject() { m_visible = false; } |
32b8ec41 VZ |
36 | |
37 | virtual bool GetVisible() { return m_visible; } | |
38 | virtual void SetVisible( bool visible ) { m_visible = visible; } | |
39 | ||
40 | bool IsNull() const { return (m_refData == 0); } | |
41 | ||
42 | protected: | |
43 | bool m_visible; /* can a pointer to this object be safely taken? | |
44 | * - only if created within FindOrCreate... */ | |
45 | ||
46 | private: | |
47 | DECLARE_DYNAMIC_CLASS(wxGDIObject) | |
48 | }; | |
49 | ||
0aa236cd | 50 | #endif // _WX_GDIOBJ_H_ |