ultimatepp/uppdev/RubberBandFast/RubberBand.h
cxl 4a1c627474 Adding uppdev....
git-svn-id: svn://ultimatepp.org/upp/trunk@328 f0d560ea-af0d-0410-9eb7-867de7ffcac7
2008-08-15 08:36:24 +00:00

37 lines
983 B
C++

#ifndef _RubberBand_RubberBand_h
#define _RubberBand_RubberBand_h
#include <CtrlLib/CtrlLib.h>
using namespace Upp;
#define LAYOUTFILE <RubberBandFast/RubberBand.lay>
#include <CtrlCore/lay.h>
class RubberBandClass : public LocalLoop
{
public:
virtual void MouseMove(Point p, dword keyflags);
virtual void LeftUp(Point p, dword keyflags) { EndLoop(); }
virtual void RightUp(Point p, dword keyflags) { EndLoop(); }
const Vector<Point> & GetPoints() { return points; }
const Drawing GetImage () { return resultpaint; }
void Clear() { points.Clear(); resultpaint.Clear(); resultpaint = DrawingDraw(0, 0);}
RubberBandClass () {resultpaint = DrawingDraw(0, 0);}
private:
Vector<Point> points;
Drawing resultpaint;
};
class RubberBand : public WithRubberBandLayout<TopWindow> {
public:
virtual void LeftDown(Point p, dword keyflags);
virtual void Paint(Draw& w);
typedef RubberBand CLASSNAME;
RubberBand();
RubberBandClass band;
};
#endif