]> git.saurik.com Git - wxWidgets.git/blame - include/wx/msw/wince/gdiobj.h
Small speed up to fonts and support for scaling.
[wxWidgets.git] / include / wx / msw / wince / gdiobj.h
CommitLineData
1a4fe894
JS
1/////////////////////////////////////////////////////////////////////////////
2// Name: wx/msw/gdiobj.h
3// Purpose: wxGDIObject class: base class for other GDI classes
4// Author: Marco Cavallini
5// Modified by:
6// Created: 11/11/2002
7// RCS-ID:
8// Copyright: (c) KOAN SAS ( www.koansoftware.com )
9// Licence: wxWindows licence
10/////////////////////////////////////////////////////////////////////////////
11
12#ifndef _WX_GDIOBJ_H_
13#define _WX_GDIOBJ_H_
14
15
16#include "wx/object.h" // base class
17
18// ----------------------------------------------------------------------------
19// wxGDIRefData is the base class for wxXXXData structures which contain the
20// real data for the GDI object and are shared among all wxWin objects sharing
21// the same native GDI object
22// ----------------------------------------------------------------------------
23
24class WXDLLEXPORT wxGDIRefData : public wxObjectRefData
25{
26 // this class is intentionally left blank
27};
28
29// ----------------------------------------------------------------------------
30// wxGDIObject
31// ----------------------------------------------------------------------------
32
33class WXDLLEXPORT wxGDIObject : public wxObject
34{
35public:
36 wxGDIObject() { m_visible = FALSE; };
37
38 // Creates the resource
39 virtual bool RealizeResource() { return FALSE; };
40
41 // Frees the resource
42 virtual bool FreeResource(bool WXUNUSED(force) = FALSE) { return FALSE; }
43
44 virtual bool IsFree() const { return FALSE; }
45
46 bool IsNull() const { return (m_refData == 0); }
47
48 // Returns handle.
49// virtual WXHANDLE GetResourceHandle() { return 0; }
50 WXHANDLE GetResourceHandle() { return 0; }
51
52 virtual bool GetVisible() { return m_visible; }
53 virtual void SetVisible(bool v) { m_visible = v; }
54
55protected:
56 bool m_visible; // TRUE only if we should delete this object ourselves
57
58private:
59 DECLARE_DYNAMIC_CLASS(wxGDIObject)
60};
61
62#endif
63 // _WX_GDIOBJ_H_