summaryrefslogtreecommitdiffstats
path: root/tksao/frame/composite.h
blob: 21fa4a07446777840e1708d173c890a1e18b2b07 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
// Copyright (C) 1999-2017
// Smithsonian Astrophysical Observatory, Cambridge, MA, USA
// For conditions of distribution and use, see copyright notice in "copyright"

#ifndef __composite_h__
#define __composite_h__

#include "marker.h"
#include "list.h"

class Composite : public Marker {
 private:
  List<Marker> members;
  int global;

  void renderX(Drawable, Coord::InternalSystem, RenderMode) {}
  void renderPS(int mode) {}
#ifdef MAC_OSX_TK
  void renderMACOSX() {}
#endif
#ifdef __WIN32
  void renderWIN32() {}
#endif

protected:
  void updateHandles();

public:
  Composite(const Composite&);
  Composite(Base* p, const Vector& ctr, 
	    double ang, int gl,
	    const char* clr, int* dsh,
	    int wth, const char* fnt, const char* txt,
	    unsigned short prop, const char* cmt,
	    const List<Tag>& tg, const List<CallBack>& cb);

  Marker* dup() {return new Composite(*this);}

  void x11(Drawable, Coord::InternalSystem, int, RenderMode, HandleMode);
  void ps(int,int);
#ifdef MAC_OSX_TK
  void macosx(int);
#endif
#ifdef __WIN32
  void win32(int);
#endif

  void updateCoords(const Matrix&);
  int isIn(const Vector& v);

  void append(Marker*);
  Marker* extract();

  void setGlobal(int w) {global = w ? 1 : 0;}
  int getGlobal() {return global;}

  void list(ostream&, Coord::CoordSystem, Coord::SkyFrame, Coord::SkyFormat, int, int);
  void listXML(ostream&, Coord::CoordSystem, Coord::SkyFrame, Coord::SkyFormat) {}
  void listCiao(ostream&, Coord::CoordSystem, int);
  void listSAOtng(ostream&, Coord::CoordSystem, Coord::SkyFrame, Coord::SkyFormat, int);
  void listSAOimage(ostream&, int);
  void listPros(ostream&, Coord::CoordSystem, Coord::SkyFrame, Coord::SkyFormat, int);
  void listXY(ostream&, Coord::CoordSystem, Coord::SkyFrame, Coord::SkyFormat, int);

};

#endif