BoxPicker Class Reference

#include <box.h>

Inheritance diagram for BoxPicker:

ImagePicker List of all members.

Public Member Functions

 BoxPicker (ImageValue *I)
virtual Valuevalue ()
virtual void nextPoint (PointValue point, bool right)

Private Attributes

BoxValue box
int nr

Detailed Description

Definition at line 38 of file box.h.


Constructor & Destructor Documentation

BoxPicker::BoxPicker ImageValue I  )  [inline]
 

Definition at line 43 of file box.h.

References nr.

00043 : ImagePicker(I) {nr=0;};


Member Function Documentation

void BoxPicker::nextPoint PointValue  point,
bool  right
[virtual]
 

Implements ImagePicker.

Definition at line 41 of file box.cpp.

References BoxValue::bl, box, BoxValue::br, nr, BoxValue::tl, BoxValue::tr, PointValue::x, and PointValue::y.

00042 {
00043   if (nr == 0)
00044     {
00045       box.tl = p;
00046       nr = 1;
00047     }
00048   else if (nr == 1)
00049     {
00050       if (final)
00051         {
00052           box.br = p;
00053           box.tr.x = box.br.x;
00054           box.tr.y = box.tl.y;
00055           box.bl.x = box.tl.x;
00056           box.bl.y = box.br.y;
00057           accept();
00058         }
00059       else
00060         {
00061           box.tr = p;
00062           nr = 2;
00063         }
00064     }
00065   else if (nr == 2)
00066     {
00067       box.br = p;
00068       nr = 3;
00069     }
00070   else if (nr == 3)
00071     {
00072       box.bl = p;
00073       accept();
00074     }
00075 }

virtual Value* BoxPicker::value  )  [inline, virtual]
 

Implements ImagePicker.

Definition at line 44 of file box.h.

References box.

Referenced by Runtime::box().

00044 {return new BoxValue(box);};


Member Data Documentation

BoxValue BoxPicker::box [private]
 

Definition at line 40 of file box.h.

Referenced by nextPoint(), and value().

int BoxPicker::nr [private]
 

Definition at line 41 of file box.h.

Referenced by BoxPicker(), and nextPoint().


The documentation for this class was generated from the following files:
Generated on Mon Jun 5 22:08:43 2006 for iis by  doxygen 1.4.6