#ifndef INCLUDED_PANELS_POSITIONHANDLER
#define INCLUDED_PANELS_POSITIONHANDLER

#include <Math/Point.h>

#include <memory>

//////////////////////////////////////////////////////////////
namespace Dubious {
namespace Panels {

class Panel;
typedef std::shared_ptr<Panel> PanelPtr;
typedef std::weak_ptr<Panel> PanelWeakPtr;

class PositionHandler
{
public:
	Math::LocalPoint& 	LocalPosition() { return m_Position; }
	Math::Point			GetPosition() const;
	void				SetPosition( const Math::Point& Position );

protected:
	PositionHandler();
	PositionHandler( PanelPtr pParent );
	virtual ~PositionHandler();

private:
	PositionHandler( const PositionHandler& );
	PositionHandler& operator=( const PositionHandler& );

	PanelWeakPtr		m_pParent;
	Math::LocalPoint 	m_Position;
};

}
}

#endif
