ultimatepp/uppdev/RubberBand/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

33 lines
878 B
C++

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