leocad/common/preview.h

47 lines
714 B
C
Raw Normal View History

2011-09-07 23:06:51 +02:00
#ifndef _PREVIEW_H_
#define _PREVIEW_H_
2013-08-09 06:57:18 +02:00
#include "lc_glwidget.h"
2011-09-07 23:06:51 +02:00
class PieceInfo;
2013-08-09 06:57:18 +02:00
class PiecePreview : public lcGLWidget
2011-09-07 23:06:51 +02:00
{
public:
2013-08-09 06:57:18 +02:00
PiecePreview();
2011-09-07 23:06:51 +02:00
virtual ~PiecePreview();
void OnDraw();
2013-08-09 06:57:18 +02:00
void OnLeftButtonDown();
void OnLeftButtonUp();
void OnLeftButtonDoubleClick();
void OnRightButtonDown();
void OnRightButtonUp();
void OnMouseMove();
2011-09-07 23:06:51 +02:00
PieceInfo* GetCurrentPiece() const
{
return m_PieceInfo;
}
2011-09-07 23:06:51 +02:00
void SetCurrentPiece(PieceInfo* Info);
void SetDefaultPiece();
2011-09-07 23:06:51 +02:00
protected:
PieceInfo* m_PieceInfo;
// Mouse tracking.
int m_Tracking;
int m_DownX;
int m_DownY;
// Current camera settings.
float m_Distance;
float m_RotateX;
float m_RotateZ;
bool m_AutoZoom;
};
#endif // _PREVIEW_H_