1998-05-20 14:12:05 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
1999-11-24 12:30:56 +00:00
|
|
|
// Name: wx/msw/gdiobj.h
|
1998-05-20 14:12:05 +00:00
|
|
|
// Purpose: wxGDIObject class: base class for other GDI classes
|
|
|
|
// Author: Julian Smart
|
|
|
|
// Modified by:
|
|
|
|
// Created: 01/02/97
|
|
|
|
// RCS-ID: $Id$
|
1998-08-07 23:52:45 +00:00
|
|
|
// Copyright: (c) Julian Smart
|
2004-05-23 14:56:36 +00:00
|
|
|
// Licence: wxWidgets licence
|
1998-05-20 14:12:05 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
1998-08-07 23:52:45 +00:00
|
|
|
#ifndef _WX_GDIOBJ_H_
|
|
|
|
#define _WX_GDIOBJ_H_
|
1998-05-20 14:12:05 +00:00
|
|
|
|
2003-08-09 12:38:21 +00:00
|
|
|
#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
|
1999-11-24 12:30:56 +00:00
|
|
|
#pragma interface "gdiobj.h"
|
1998-05-20 14:12:05 +00:00
|
|
|
#endif
|
|
|
|
|
1999-11-24 12:30:56 +00:00
|
|
|
#include "wx/object.h" // base class
|
1998-05-20 14:12:05 +00:00
|
|
|
|
1999-11-24 12:30:56 +00:00
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
// wxGDIRefData is the base class for wxXXXData structures which contain the
|
|
|
|
// real data for the GDI object and are shared among all wxWin objects sharing
|
|
|
|
// the same native GDI object
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
class WXDLLEXPORT wxGDIRefData : public wxObjectRefData
|
|
|
|
{
|
|
|
|
// this class is intentionally left blank
|
1998-05-20 14:12:05 +00:00
|
|
|
};
|
|
|
|
|
1999-11-24 12:30:56 +00:00
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
// wxGDIObject
|
|
|
|
// ----------------------------------------------------------------------------
|
1998-05-20 14:12:05 +00:00
|
|
|
|
1999-11-24 12:30:56 +00:00
|
|
|
class WXDLLEXPORT wxGDIObject : public wxObject
|
1998-05-20 14:12:05 +00:00
|
|
|
{
|
1999-11-24 12:30:56 +00:00
|
|
|
public:
|
2004-01-15 13:49:22 +00:00
|
|
|
wxGDIObject() { m_visible = FALSE; };
|
1998-05-20 14:12:05 +00:00
|
|
|
|
1999-11-24 12:30:56 +00:00
|
|
|
// Creates the resource
|
|
|
|
virtual bool RealizeResource() { return FALSE; };
|
1998-05-20 14:12:05 +00:00
|
|
|
|
1999-11-24 12:30:56 +00:00
|
|
|
// Frees the resource
|
|
|
|
virtual bool FreeResource(bool WXUNUSED(force) = FALSE) { return FALSE; }
|
1998-05-20 14:12:05 +00:00
|
|
|
|
1999-11-24 12:30:56 +00:00
|
|
|
virtual bool IsFree() const { return FALSE; }
|
1998-05-20 14:12:05 +00:00
|
|
|
|
1999-11-24 12:30:56 +00:00
|
|
|
bool IsNull() const { return (m_refData == 0); }
|
1998-05-20 14:12:05 +00:00
|
|
|
|
1999-11-24 12:30:56 +00:00
|
|
|
// Returns handle.
|
2002-12-04 14:11:26 +00:00
|
|
|
virtual WXHANDLE GetResourceHandle() const { return 0; }
|
1998-05-20 14:12:05 +00:00
|
|
|
|
1999-11-24 12:30:56 +00:00
|
|
|
virtual bool GetVisible() { return m_visible; }
|
|
|
|
virtual void SetVisible(bool v) { m_visible = v; }
|
1998-05-20 14:12:05 +00:00
|
|
|
|
|
|
|
protected:
|
1999-11-24 12:30:56 +00:00
|
|
|
bool m_visible; // TRUE only if we should delete this object ourselves
|
|
|
|
|
|
|
|
private:
|
|
|
|
DECLARE_DYNAMIC_CLASS(wxGDIObject)
|
1998-05-20 14:12:05 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|
1998-08-07 23:52:45 +00:00
|
|
|
// _WX_GDIOBJ_H_
|