casa
$Rev:20696$
|
#include <RegionTool.h>
Classes | |
class | State |
Public Types | |
enum | RegionToolTypes { POLYTOOL, RECTTOOL, POINTTOOL, ELLIPSETOOL, POLYLINETOOL, PVLINETOOL } |
typedef std::map < viewer::Region *, viewer::region::PointInfo > | region_map_type |
Public Member Functions | |
RegionTool (Display::KeySym keysym=Display::K_Pointer_Button1) | |
Constructor taking the primary key to which this tool will respond. | |
~RegionTool () | |
void | keyPressed (const WCPositionEvent &ev) |
Functions called by the local event handling operators - by default they do nothing, so a derived class needs only implement the events it cares about. | |
void | keyReleased (const WCPositionEvent &) |
void | otherKeyPressed (const WCPositionEvent &) |
void | otherKeyReleased (const WCPositionEvent &) |
void | moved (const WCMotionEvent &ev, const viewer::region::region_list_type &) |
void | draw (const WCRefreshEvent &, const viewer::region::region_list_type &) |
Draw whatever should be drawn (if anything) on current WC. | |
virtual void | checkPoint (WorldCanvas *wc, State &state)=0 |
this is a non-const function because a non-const RegionTool ptr is returned in 'state' which can then be used for setting the state of the regions managed by the various tools.... | |
virtual bool | create (viewer::region::RegionTypes, WorldCanvas *, const std::vector< std::pair< double, double > > &, const std::string &, viewer::region::TextPosition, const std::vector< int > &, const std::string &, int, int, const std::string &, const std::string &, viewer::region::LineStyle, unsigned int, bool, VOID *)=0 |
create regions of various types (e.g. | |
void | enable () |
DISPLAY_PURE_VIRTUAL(RegionTool::create,true);. | |
void | disable () |
virtual RegionToolTypes | type () const =0 |
virtual void | revokeRegion (viewer::Region *)=0 |
called when the user (read GUI user) indicates that a region should be deleted... |
Definition at line 39 of file RegionTool.h.
typedef std::map<viewer::Region*,viewer::region::PointInfo> casa::RegionTool::region_map_type |
Definition at line 41 of file RegionTool.h.
Definition at line 43 of file RegionTool.h.
casa::RegionTool::RegionTool | ( | Display::KeySym | keysym = Display::K_Pointer_Button1 | ) | [inline] |
Constructor taking the primary key to which this tool will respond.
Definition at line 91 of file RegionTool.h.
casa::RegionTool::~RegionTool | ( | ) | [inline] |
Definition at line 92 of file RegionTool.h.
virtual void casa::RegionTool::checkPoint | ( | WorldCanvas * | wc, |
State & | state | ||
) | [pure virtual] |
this is a non-const function because a non-const RegionTool ptr is returned in 'state' which can then be used for setting the state of the regions managed by the various tools....
Implemented in casa::MultiPVTool, casa::MultiRectTool, casa::MultiPolyTool, and casa::MultiPolylineTool.
virtual bool casa::RegionTool::create | ( | viewer::region::RegionTypes | , |
WorldCanvas * | , | ||
const std::vector< std::pair< double, double > > & | , | ||
const std::string & | , | ||
viewer::region::TextPosition | , | ||
const std::vector< int > & | , | ||
const std::string & | , | ||
int | , | ||
int | , | ||
const std::string & | , | ||
const std::string & | , | ||
viewer::region::LineStyle | , | ||
unsigned | int, | ||
bool | , | ||
VOID * | |||
) | [pure virtual] |
create regions of various types (e.g.
point, rect, poly, etc.). For use when loading casa region files...
Implemented in casa::MultiPVTool, casa::MultiRectTool, casa::MultiPolyTool, and casa::MultiPolylineTool.
void casa::RegionTool::disable | ( | ) | [inline, virtual] |
Reimplemented from casa::MultiWCTool.
Reimplemented in casa::MultiPVTool, casa::MultiRectTool, casa::MultiPolyTool, and casa::MultiPolylineTool.
Definition at line 118 of file RegionTool.h.
void casa::RegionTool::draw | ( | const WCRefreshEvent & | , |
const viewer::region::region_list_type & | |||
) | [virtual] |
Draw whatever should be drawn (if anything) on current WC.
Should only be called by refresh event handler.
Reimplemented from casa::MultiWCTool.
Reimplemented in casa::MultiPVTool, casa::MultiRectTool, casa::MultiPolyTool, and casa::MultiPolylineTool.
void casa::RegionTool::enable | ( | ) | [inline, virtual] |
DISPLAY_PURE_VIRTUAL(RegionTool::create,true);.
defeat the registering/unregistering done by MultiWCTool (because polygon regions stop working because they see a double-click from both the RegionToolManager and MultiWCTool)...
Reimplemented from casa::MultiWCTool.
Definition at line 117 of file RegionTool.h.
void casa::RegionTool::keyPressed | ( | const WCPositionEvent & | ) | [virtual] |
Functions called by the local event handling operators - by default they do nothing, so a derived class needs only implement the events it cares about.
Reimplemented from casa::MultiWCTool.
Reimplemented in casa::MultiPVTool, casa::MultiRectTool, casa::MultiPolyTool, and casa::MultiPolylineTool.
void casa::RegionTool::keyReleased | ( | const WCPositionEvent & | ) | [virtual] |
Reimplemented from casa::MultiWCTool.
Reimplemented in casa::MultiPVTool, casa::MultiRectTool, casa::MultiPolyTool, and casa::MultiPolylineTool.
void casa::RegionTool::moved | ( | const WCMotionEvent & | ev, |
const viewer::region::region_list_type & | |||
) | [virtual] |
Reimplemented from casa::MultiWCTool.
Reimplemented in casa::MultiPVTool, casa::MultiRectTool, casa::MultiPolyTool, and casa::MultiPolylineTool.
void casa::RegionTool::otherKeyPressed | ( | const WCPositionEvent & | ) | [virtual] |
Reimplemented from casa::MultiWCTool.
Reimplemented in casa::MultiPVTool, casa::MultiRectTool, casa::MultiPolyTool, and casa::MultiPolylineTool.
void casa::RegionTool::otherKeyReleased | ( | const WCPositionEvent & | ) | [virtual] |
Reimplemented from casa::MultiWCTool.
virtual void casa::RegionTool::revokeRegion | ( | viewer::Region * | ) | [pure virtual] |
called when the user (read GUI user) indicates that a region should be deleted...
Implemented in casa::MultiPVTool, casa::MultiRectTool, casa::MultiPolyTool, and casa::MultiPolylineTool.
virtual RegionToolTypes casa::RegionTool::type | ( | ) | const [pure virtual] |
Implemented in casa::MultiPVTool, casa::MultiRectTool, casa::MultiPolyTool, casa::MultiPolylineTool, casa::MultiEllipseTool, and casa::MultiPointTool.