Shinya Kitaoka 810553
#pragma once
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
#ifndef PEGCENTERCONTROL_INCLUDED
Toshihiro Shimizu 890ddd
#define PEGCENTERCONTROL_INCLUDED
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
#include "tw/tw.h"
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
#undef DVAPI
Toshihiro Shimizu 890ddd
#undef DVVAR
Toshihiro Shimizu 890ddd
#ifdef TWIN_EXPORTS
Toshihiro Shimizu 890ddd
#define DVAPI DV_EXPORT_API
Toshihiro Shimizu 890ddd
#define DVVAR DV_EXPORT_VAR
Toshihiro Shimizu 890ddd
#else
Toshihiro Shimizu 890ddd
#define DVAPI DV_IMPORT_API
Toshihiro Shimizu 890ddd
#define DVVAR DV_IMPORT_VAR
Toshihiro Shimizu 890ddd
#endif
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
class DVAPI TPegCenterControl : public TWidget
Toshihiro Shimizu 890ddd
{
Toshihiro Shimizu 890ddd
	TUINT32 m_status, m_oldStatus;
Toshihiro Shimizu 890ddd
	int m_clickPos;
Toshihiro Shimizu 890ddd
	bool m_dragging;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
protected:
Toshihiro Shimizu 890ddd
public:
Toshihiro Shimizu 890ddd
	TPegCenterControl(TWidget *parent, string name = "canvas");
Toshihiro Shimizu 890ddd
	~TPegCenterControl();
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	virtual void draw();
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	void leftButtonDown(const TMouseEvent &e);
Toshihiro Shimizu 890ddd
	void leftButtonDrag(const TMouseEvent &e);
Toshihiro Shimizu 890ddd
	void leftButtonUp(const TMouseEvent &e);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	void configureNotify(const TDimension &d);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	void setStatus(TUINT32 status);
Toshihiro Shimizu 890ddd
	TUINT32 getStatus() const;
Toshihiro Shimizu 890ddd
};
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
#endif