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
|
1999-11-24 07:30:56 -05: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
|
|
|
|
|
|
|
#ifdef __GNUG__
|
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:
|
|
|
|
wxGDIObject() { m_visible = FALSE; };
|
1998-05-20 10:12:05 -04:00
|
|
|
|
1999-11-24 07:30:56 -05:00
|
|
|
// Creates the resource
|
|
|
|
virtual bool RealizeResource() { return FALSE; };
|
1998-05-20 10:12:05 -04:00
|
|
|
|
1999-11-24 07:30:56 -05:00
|
|
|
// Frees the resource
|
|
|
|
virtual bool FreeResource(bool WXUNUSED(force) = FALSE) { return FALSE; }
|
1998-05-20 10:12:05 -04:00
|
|
|
|
1999-11-24 07:30:56 -05: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.
|
|
|
|
virtual WXHANDLE GetResourceHandle() { 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:
|
1999-11-24 07:30:56 -05:00
|
|
|
bool m_visible; // TRUE only if we should delete this object ourselves
|
|
|
|
|
|
|
|
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_
|