|
// XGraphObjectBase.h: Schnittstelle f�r die Klasse CXGraphObjectBase.
//
//////////////////////////////////////////////////////////////////////
#if !defined(AFX_XGRAPHOBJECTBASE_H__4FC71E88_00C5_4518_A3F9_48AB5F5499BF__INCLUDED_)
#define AFX_XGRAPHOBJECTBASE_H__4FC71E88_00C5_4518_A3F9_48AB5F5499BF__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "GfxUtils.h"
class CXGraph;
#pragma warning (disable : 4244)
#pragma warning (disable : 4800)
#ifdef _AFXDLL
class __declspec(dllexport) CXGraphObject : public CObject
#else
class __declspec(dllimport) CXGraphObject : public CObject
#endif
{
DECLARE_SERIAL( CXGraphObject )
friend class CXGraph;
protected:
CRect m_clRect;
bool m_bSelected;
bool m_bEditing;
bool m_bCanResize;
bool m_bCanMove;
bool m_bSizing;
bool m_bVisible;
bool m_bCanEdit;
COLORREF m_crColor;
CXGraph* m_pGraph;
CRectTracker m_Tracker;
CXGraphObject();
CXGraphObject(const CXGraphObject& copy);
CXGraphObject& operator=(const CXGraphObject& copy);
virtual ~CXGraphObject();
virtual void Draw(CDCEx *pDC) {} ;
virtual void Edit() {} ;
virtual void EndEdit() {} ;
virtual void BeginSize();
virtual void EndSize();
virtual void InvokeProperties() {} ;
public:
inline void SetRect(CRect rect) { m_clRect = rect; };
inline void SetSelected(bool bValue) { m_bSelected = bValue; };
inline void SetVisible(bool bValue) { m_bVisible = bValue; };
inline void SetColor(COLORREF color) { m_crColor = color; };
inline CRect GetRect() const { return m_clRect; };
inline bool GetSelected() const { return m_bSelected; };
inline bool GetVisible() const { return m_bVisible; };
inline COLORREF GetColor() const { return m_crColor; };
inline CXGraph* GetGraph() const { return m_pGraph; };
virtual void Serialize( CArchive& archive );
};
#pragma warning (default : 4244)
#pragma warning (default : 4800)
#endif // !defined(AFX_XGRAPHOBJECTBASE_H__4FC71E88_00C5_4518_A3F9_48AB5F5499BF__INCLUDED_)
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.
A list of licenses authors might use can be found here
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.