summaryrefslogtreecommitdiffstats
path: root/tksao/frame/text.h
blob: f367c42797e81242b7be88f51fdcf3acf8e6d566 (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
// Copyright (C) 1999-2018
// Smithsonian Astrophysical Observatory, Cambridge, MA, USA
// For conditions of distribution and use, see copyright notice in "copyright"

#ifndef __text_h__
#define __text_h__

#include "marker.h"

class Text : public Marker {
 private:
  int rotate;

 private:
  void renderX(Drawable, Coord::InternalSystem, RenderMode);
  void renderXText(Drawable, Coord::InternalSystem, RenderMode) {}
  void renderXInclude(Drawable, Coord::InternalSystem, RenderMode) {}

  void renderPS(int);
  void renderPSText(int) {}
  void renderPSInclude(int) {}

#ifdef MAC_OSX_TK
  void renderMACOSX();
  void renderMACOSXText() {}
  void renderMACOSXInclude() {}
#endif

#ifdef __WIN32
  void renderWIN32();
  void renderWIN32Text() {}
  void renderWIN32Include() {}
#endif

  void updateHandles();
  void calcAllBBox();

 public:
  Text(const Text&);
  Text(Base* p, const Vector& ctr,
       double a, int r,
       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 Text(*this);}

  int isIn(const Vector&);

  void editBegin(int) {}
  void edit(const Vector& v, int h) {}
  void editEnd() {}

  void setRotate(int);
  int getRotate() {return rotate;}

  void list(ostream&, Coord::CoordSystem, Coord::SkyFrame, Coord::SkyFormat, int, int);
  void listXML(ostream&, Coord::CoordSystem, Coord::SkyFrame, Coord::SkyFormat);
  void listSAOtng(ostream&, Coord::CoordSystem, Coord::SkyFrame, Coord::SkyFormat, int);
};

#endif