casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
RegionCreator.h
Go to the documentation of this file.
1 
2 #ifndef REGION_REGIONCREATOR_H_
3 #define REGION_REGIONCREATOR_H_
6 #include <set>
7 #include <map>
8 #include <list>
9 #include <vector>
10 
11 namespace casa {
12  class WorldCanvas;
13  namespace viewer {
14  class RegionCreator {
15  public:
16  typedef std::list <RegionCreator*> creator_list_type;
17  // called when the user indicates that a region should be deleted...
18  virtual void revokeRegion (Region *) = 0;
19  // returns the set of region types which this creator will create
20  virtual const std::set <region::RegionTypes> &regionsCreated () const = 0;
21  virtual bool create( region::RegionTypes /*region_type*/, WorldCanvas */*wc*/, const std::vector<std::pair <double, double> > &/*pts*/,
22  const std::string &/*label*/, viewer::region::TextPosition /*label_pos*/, const std::vector<int> &/*label_off*/,
23  const std::string &/*font*/, int /*font_size*/, int /*font_style*/, const std::string &/*font_color*/,
24  const std::string &/*line_color*/, viewer::region::LineStyle /*line_style*/, unsigned int /*line_width*/,
25  bool /*annotation*/, VOID */*region_specific_state*/ )= 0;
26 // DISPLAY_PURE_VIRTUAL(RegionCreator::create,true);
27 
28  RegionCreator ();
29  virtual ~RegionCreator ();
30 
32 
33  private:
34  typedef std::map <region::RegionTypes, creator_list_type*> creator_map_type;
37  };
38 
39  } // end namespace viewer
40 } // end namespace casa
41 
42 #endif
Definition: VOID.h:32
virtual Type type()
Return the type enum.
virtual void revokeRegion(Region *)=0
called when the user indicates that a region should be deleted...
RegionCreator()
DISPLAY_PURE_VIRTUAL(RegionCreator::create,true);.
static const creator_list_type & findCreator(region::RegionTypes type)
All regions are specified in &quot;linear coordinates&quot;, not &quot;pixel coordinates&quot;.
Definition: Region.qo.h:147
LineStyle
LSDoubleDashed is only used to preserve state (it is a Display::LineStyle option) ...
Definition: RegionEnums.h:27
virtual bool create(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
static creator_list_type unsorted_creators
Definition: RegionCreator.h:36
Implementation of drawing in world coordinates on top of a PixelCanvas.
Definition: WorldCanvas.h:204
static creator_map_type creator_map
Definition: RegionCreator.h:35
std::list< RegionCreator * > creator_list_type
Definition: RegionCreator.h:16
virtual const std::set< region::RegionTypes > & regionsCreated() const =0
returns the set of region types which this creator will create
std::map< region::RegionTypes, creator_list_type * > creator_map_type
Definition: RegionCreator.h:34