View2D.h
Go to the documentation of this file.
1 ////////////////////////////////////////////////////////////////////////
2 /// \file View2D.h
3 /// \brief A collection of drawable 2-D objects.
4 ///
5 /// \version $Id: View2D.h,v 1.2 2012-03-10 06:40:29 bckhouse Exp $
6 /// \author messier@indiana.edu
7 ////////////////////////////////////////////////////////////////////////
8 #ifndef EVDB_VIEW2D_H
9 #define EVDB_VIEW2D_H
10 #include <list>
11 
12 class TMarker;
13 class TPolyMarker;
14 class TLine;
15 class TPolyLine;
16 class TArc;
17 class TBox;
18 class TText;
19 class TLatex;
20 
21 namespace evdb {
22  class View2D {
23  public:
24  View2D();
25  ~View2D();
26 
27  void Draw();
28  void Clear();
29 
30  // The list of object which make up the view
31  TMarker& AddMarker(double x, double y, int c, int st, double sz);
32  TPolyMarker& AddPolyMarker(int n, int c, int st, double sz);
33  TLine& AddLine(double x1, double y1, double x2, double y2);
34  TPolyLine& AddPolyLine(int n, int c, int w, int s);
35  TArc& AddArc(double x,double t,double r,double a=0.,double b=360.);
36  TBox& AddBox(double x1, double y1, double x2, double y2);
37  TText& AddText(double x, double y, const char* text);
38  TLatex& AddLatex(double x, double y, const char* text);
39 
40  private:
41  // Lists of cached drawing objects shared between all instances. Allows us
42  // to avoid costly news and deletes.
43  static std::list<TMarker*> fgMarkerL;
44  static std::list<TPolyMarker*> fgPolyMarkerL;
45  static std::list<TLine*> fgLineL;
46  static std::list<TPolyLine*> fgPolyLineL;
47  static std::list<TArc*> fgArcL;
48  static std::list<TBox*> fgBoxL;
49  static std::list<TText*> fgTextL;
50  static std::list<TLatex*> fgLatexL;
51 
52  // Lists of drawing objects currently being used by this view. Will be
53  // returned to the shared lists when done with them.
54  std::list<TMarker*> fMarkerL;
55  std::list<TPolyMarker*> fPolyMarkerL;
56  std::list<TLine*> fLineL;
57  std::list<TPolyLine*> fPolyLineL;
58  std::list<TArc*> fArcL;
59  std::list<TBox*> fBoxL;
60  std::list<TText*> fTextL;
61  std::list<TLatex*> fLatexL;
62  };
63 }
64 
65 #endif // EVDB_VIEW2D_H
66 ////////////////////////////////////////////////////////////////////////
static std::list< TBox * > fgBoxL
Definition: View2D.h:48
TPolyLine & AddPolyLine(int n, int c, int w, int s)
Definition: View2D.cxx:210
TLine & AddLine(double x1, double y1, double x2, double y2)
Definition: View2D.cxx:187
std::list< TBox * > fBoxL
Definition: View2D.h:59
Manage all things related to colors for the event display.
void Clear()
Definition: View2D.cxx:109
static std::list< TPolyMarker * > fgPolyMarkerL
Definition: View2D.h:44
static std::list< TPolyLine * > fgPolyLineL
Definition: View2D.h:46
TBox & AddBox(double x1, double y1, double x2, double y2)
Definition: View2D.cxx:263
double y
std::list< TPolyMarker * > fPolyMarkerL
Definition: View2D.h:55
std::list< TLatex * > fLatexL
Definition: View2D.h:61
void Draw()
Definition: View2D.cxx:89
std::void_t< T > n
TPolyMarker & AddPolyMarker(int n, int c, int st, double sz)
Definition: View2D.cxx:157
TArc & AddArc(double x, double t, double r, double a=0., double b=360.)
Definition: View2D.cxx:238
TText & AddText(double x, double y, const char *text)
Definition: View2D.cxx:286
std::list< TArc * > fArcL
Definition: View2D.h:58
std::list< TPolyLine * > fPolyLineL
Definition: View2D.h:57
TLatex & AddLatex(double x, double y, const char *text)
Definition: View2D.cxx:308
static std::list< TLatex * > fgLatexL
Definition: View2D.h:50
const GenericPointer< typename T::ValueType > T2 T::AllocatorType & a
Definition: pointer.h:1124
std::list< TLine * > fLineL
Definition: View2D.h:56
static std::list< TMarker * > fgMarkerL
Definition: View2D.h:43
static bool * b
Definition: config.cpp:1043
static std::list< TLine * > fgLineL
Definition: View2D.h:45
list x
Definition: train.py:276
static std::list< TArc * > fgArcL
Definition: View2D.h:47
std::list< TText * > fTextL
Definition: View2D.h:60
std::list< TMarker * > fMarkerL
Definition: View2D.h:54
static std::list< TText * > fgTextL
Definition: View2D.h:49
TMarker & AddMarker(double x, double y, int c, int st, double sz)
Definition: View2D.cxx:124
static QCString * s
Definition: config.cpp:1042