1998-05-20 10:12:05 -04:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
1999-11-24 07:30:56 -05:00
|
|
|
// Name: wx/msw/gdiobj.h
|
1998-05-20 10:12:05 -04: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 19:52:45 -04:00
|
|
|
// Copyright: (c) Julian Smart
|
2004-05-23 16:53:33 -04:00
|
|
|
// Licence: wxWindows licence
|
1998-05-20 10:12:05 -04:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
1998-08-07 19:52:45 -04:00
|
|
|
#ifndef _WX_GDIOBJ_H_
|
|
|
|
#define _WX_GDIOBJ_H_
|
1998-05-20 10:12:05 -04:00
|
|
|
|
2003-08-09 08:38:21 -04:00
|
|
|
#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
|
1999-11-24 07:30:56 -05:00
|
|
|
#pragma interface "gdiobj.h"
|
1998-05-20 10:12:05 -04:00
|
|
|
#endif
|
|
|
|
|
1999-11-24 07:30:56 -05:00
|
|
|
#include "wx/object.h" // base class
|
1998-05-20 10:12:05 -04:00
|
|
|
|
1999-11-24 07:30:56 -05: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 10:12:05 -04:00
|
|
|
};
|
|
|
|
|
1999-11-24 07:30:56 -05:00
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
// wxGDIObject
|
|
|
|
// ----------------------------------------------------------------------------
|
1998-05-20 10:12:05 -04:00
|
|
|
|
1999-11-24 07:30:56 -05:00
|
|
|
class WXDLLEXPORT wxGDIObject : public wxObject
|
1998-05-20 10:12:05 -04:00
|
|
|
{
|
1999-11-24 07:30:56 -05:00
|
|
|
public:
|
2004-08-26 04:46:18 -04:00
|
|
|
wxGDIObject() { m_visible = false; };
|
1998-05-20 10:12:05 -04:00
|
|
|
|
1999-11-24 07:30:56 -05:00
|
|
|
// Creates the resource
|
2004-08-26 04:46:18 -04:00
|
|
|
virtual bool RealizeResource() { return false; };
|
1998-05-20 10:12:05 -04:00
|
|
|
|
1999-11-24 07:30:56 -05:00
|
|
|
// Frees the resource
|
2004-08-26 04:46:18 -04:00
|
|
|
virtual bool FreeResource(bool WXUNUSED(force) = false) { return false; }
|
1998-05-20 10:12:05 -04:00
|
|
|
|
2004-08-26 04:46:18 -04:00
|
|
|
virtual bool IsFree() const { return false; }
|
1998-05-20 10:12:05 -04:00
|
|
|
|
1999-11-24 07:30:56 -05:00
|
|
|
bool IsNull() const { return (m_refData == 0); }
|
1998-05-20 10:12:05 -04:00
|
|
|
|
1999-11-24 07:30:56 -05:00
|
|
|
// Returns handle.
|
2002-12-04 09:11:26 -05:00
|
|
|
virtual WXHANDLE GetResourceHandle() const { return 0; }
|
1998-05-20 10:12:05 -04:00
|
|
|
|
1999-11-24 07:30:56 -05:00
|
|
|
virtual bool GetVisible() { return m_visible; }
|
|
|
|
virtual void SetVisible(bool v) { m_visible = v; }
|
1998-05-20 10:12:05 -04:00
|
|
|
|
|
|
|
protected:
|
2004-08-26 04:46:18 -04:00
|
|
|
bool m_visible; // true only if we should delete this object ourselves
|
1999-11-24 07:30:56 -05:00
|
|
|
|
|
|
|
private:
|
|
|
|
DECLARE_DYNAMIC_CLASS(wxGDIObject)
|
1998-05-20 10:12:05 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|
1998-08-07 19:52:45 -04:00
|
|
|
// _WX_GDIOBJ_H_
|