67 lines
2 KiB
C++
67 lines
2 KiB
C++
// cntritem.h : interface of the CDrawItem class
|
|
//
|
|
// This file is a part of the XTREME TOOLKIT PRO MFC class library.
|
|
// (c)1998-2008 Codejock Software, All Rights Reserved.
|
|
//
|
|
// THIS SOURCE FILE IS THE PROPERTY OF CODEJOCK SOFTWARE AND IS NOT TO BE
|
|
// RE-DISTRIBUTED BY ANY MEANS WHATSOEVER WITHOUT THE EXPRESSED WRITTEN
|
|
// CONSENT OF CODEJOCK SOFTWARE.
|
|
//
|
|
// THIS SOURCE CODE CAN ONLY BE USED UNDER THE TERMS AND CONDITIONS OUTLINED
|
|
// IN THE XTREME TOOLKIT PRO LICENSE AGREEMENT. CODEJOCK SOFTWARE GRANTS TO
|
|
// YOU (ONE SOFTWARE DEVELOPER) THE LIMITED RIGHT TO USE THIS SOFTWARE ON A
|
|
// SINGLE COMPUTER.
|
|
//
|
|
// CONTACT INFORMATION:
|
|
// support@codejock.com
|
|
// http://www.codejock.com
|
|
//
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
class CDrawDoc;
|
|
class CDrawView;
|
|
|
|
class CDrawItem : public COleClientItem
|
|
{
|
|
DECLARE_SERIAL(CDrawItem)
|
|
|
|
// Constructors
|
|
public:
|
|
CDrawItem(CDrawDoc* pContainer = NULL, CDrawOleObj* pDrawObj = NULL);
|
|
// Note: pContainer is allowed to be NULL to enable IMPLEMENT_SERIALIZE
|
|
// IMPLEMENT_SERIALIZE requires the class have a constructor with
|
|
// zero arguments. Normally, OLE items are constructed with a
|
|
// non-NULL document pointer.
|
|
|
|
// Attributes
|
|
public:
|
|
CDrawDoc* GetDocument()
|
|
{ return (CDrawDoc*)COleClientItem::GetDocument(); }
|
|
CDrawView* GetActiveView()
|
|
{ return (CDrawView*)COleClientItem::GetActiveView(); }
|
|
|
|
CDrawOleObj* m_pDrawObj; // back pointer to OLE draw object
|
|
|
|
// Operations
|
|
BOOL UpdateExtent();
|
|
|
|
// Implementation
|
|
public:
|
|
~CDrawItem();
|
|
#ifdef _DEBUG
|
|
virtual void AssertValid() const;
|
|
virtual void Dump(CDumpContext& dc) const;
|
|
#endif
|
|
virtual void Serialize(CArchive& ar);
|
|
virtual void OnGetItemPosition(CRect& rPosition);
|
|
|
|
protected:
|
|
virtual void OnChange(OLE_NOTIFICATION wNotification, DWORD dwParam);
|
|
virtual BOOL OnChangeItemPosition(const CRect& rectPos);
|
|
virtual void OnDeactivateUI(BOOL bUndoable);
|
|
virtual void OnActivate();
|
|
|
|
void ActiveStateChanged(BOOL bActive);
|
|
};
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|