]>
Commit | Line | Data |
---|---|---|
2bda0e17 | 1 | ///////////////////////////////////////////////////////////////////////////// |
6d167489 | 2 | // Name: wx/msw/gdiobj.h |
2bda0e17 KB |
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$ | |
bbcdf8bc | 8 | // Copyright: (c) Julian Smart |
65571936 | 9 | // Licence: wxWindows licence |
2bda0e17 KB |
10 | ///////////////////////////////////////////////////////////////////////////// |
11 | ||
bbcdf8bc JS |
12 | #ifndef _WX_GDIOBJ_H_ |
13 | #define _WX_GDIOBJ_H_ | |
2bda0e17 | 14 | |
12028905 | 15 | #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) |
6d167489 | 16 | #pragma interface "gdiobj.h" |
2bda0e17 KB |
17 | #endif |
18 | ||
6d167489 | 19 | #include "wx/object.h" // base class |
2bda0e17 | 20 | |
6d167489 VZ |
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 | ||
27 | class WXDLLEXPORT wxGDIRefData : public wxObjectRefData | |
28 | { | |
29 | // this class is intentionally left blank | |
2bda0e17 KB |
30 | }; |
31 | ||
6d167489 VZ |
32 | // ---------------------------------------------------------------------------- |
33 | // wxGDIObject | |
34 | // ---------------------------------------------------------------------------- | |
2bda0e17 | 35 | |
6d167489 | 36 | class WXDLLEXPORT wxGDIObject : public wxObject |
2bda0e17 | 37 | { |
6d167489 | 38 | public: |
213ceb3f | 39 | wxGDIObject() { m_visible = false; }; |
2bda0e17 | 40 | |
6d167489 | 41 | // Creates the resource |
213ceb3f | 42 | virtual bool RealizeResource() { return false; }; |
2bda0e17 | 43 | |
6d167489 | 44 | // Frees the resource |
213ceb3f | 45 | virtual bool FreeResource(bool WXUNUSED(force) = false) { return false; } |
2bda0e17 | 46 | |
213ceb3f | 47 | virtual bool IsFree() const { return false; } |
2bda0e17 | 48 | |
6d167489 | 49 | bool IsNull() const { return (m_refData == 0); } |
2bda0e17 | 50 | |
6d167489 | 51 | // Returns handle. |
2b5f62a0 | 52 | virtual WXHANDLE GetResourceHandle() const { return 0; } |
2bda0e17 | 53 | |
6d167489 VZ |
54 | virtual bool GetVisible() { return m_visible; } |
55 | virtual void SetVisible(bool v) { m_visible = v; } | |
2bda0e17 KB |
56 | |
57 | protected: | |
213ceb3f | 58 | bool m_visible; // true only if we should delete this object ourselves |
6d167489 VZ |
59 | |
60 | private: | |
61 | DECLARE_DYNAMIC_CLASS(wxGDIObject) | |
2bda0e17 KB |
62 | }; |
63 | ||
64 | #endif | |
bbcdf8bc | 65 | // _WX_GDIOBJ_H_ |