initial
[prop.git] / include / AD / visualize / visualizer.h
blob9a4918097889310d8d2e0519c2fed3ebb6f0fa20
1 //////////////////////////////////////////////////////////////////////////////
2 // NOTICE:
3 //
4 // ADLib, Prop and their related set of tools and documentation are in the
5 // public domain. The author(s) of this software reserve no copyrights on
6 // the source code and any code generated using the tools. You are encouraged
7 // to use ADLib and Prop to develop software, in both academic and commercial
8 // settings, and are welcomed to incorporate any part of ADLib and Prop into
9 // your programs.
11 // Although you are under no obligation to do so, we strongly recommend that
12 // you give away all software developed using our tools.
14 // We also ask that credit be given to us when ADLib and/or Prop are used in
15 // your programs, and that this notice be preserved intact in all the source
16 // code.
18 // This software is still under development and we welcome(read crave for)
19 // any suggestions and help from the users.
21 // Allen Leung (leunga@cs.nyu.edu)
22 // 1994-1997
23 //////////////////////////////////////////////////////////////////////////////
25 #ifndef visualizer_h
26 #define visualizer_h
28 #include <AD/generic/generic.h>
29 #include <stdarg.h>
31 //////////////////////////////////////////////////////////////////////////////
33 // Visualizer base class
35 //////////////////////////////////////////////////////////////////////////////
36 class Visualizer
37 { Visualizer(const Visualizer&);
38 operator = (const Visualizer&);
39 public:
40 //////////////////////////////////////////////////////////////////////////
42 // Attribute types
44 //////////////////////////////////////////////////////////////////////////
45 typedef const char * Label;
46 typedef const char * String;
47 typedef const struct color * Color;
48 typedef const void * Node;
49 typedef const void * Graph;
50 typedef const struct text_mode * TextMode;
51 typedef const struct shape * Shape;
53 public:
54 ///////////////////////////////////////////////////////////////////////////
56 // Predefined constants
58 ///////////////////////////////////////////////////////////////////////////
59 static Color black, blue, red, green, yellow, magenta, cyan,
60 white, darkgrey, darkblue, darkred, darkgreen,
61 darkyellow, darkmagneta, darkcyan, gold, lightgrey,
62 lightblue, lightred, lightgreen, lightyellow,
63 lightmagenta, lightcyan, lilac, turquoise, aquamarine,
64 khaki, purple, yellowgreen, pink, orange, orchid;
66 static TextMode center, left_justify, right_justify;
68 static Shape box, rhomb, ellispe, triangle;
70 public:
71 Visualizer();
72 virtual ~Visualizer();
75 ///////////////////////////////////////////////////////////////////////////
77 // Create graph objects
79 ///////////////////////////////////////////////////////////////////////////
80 virtual Visualizer& begin_graph(Graph);
81 virtual Visualizer& end_graph();
82 virtual Visualizer& begin_node(Node);
83 virtual Visualizer& end_node();
84 virtual Visualizer& begin_edge(Node, Node);
85 virtual Visualizer& end_edge();
87 ///////////////////////////////////////////////////////////////////////////
89 // Object attributes
91 ///////////////////////////////////////////////////////////////////////////
92 virtual Visualizer& label(Label);
93 virtual Visualizer& color(Color);
94 virtual Visualizer& textcolor(Color);
95 virtual Visualizer& width(int);
96 virtual Visualizer& height(int);
97 virtual Visualizer& borderwidth(int);
98 virtual Visualizer& x(int);
99 virtual Visualizer& y(int);
100 virtual Visualizer& folding(int);
101 virtual Visualizer& shrink(int);
102 virtual Visualizer& stretch(int);
103 virtual Visualizer& textmode(TextMode);
104 virtual Visualizer& shape(Shape);
105 virtual Visualizer& vertical_order(int);
106 virtual Visualizer& horizontal_order(int);
107 virtual Visualizer& xmax(int);
108 virtual Visualizer& ymax(int);
109 virtual Visualizer& xbase(int);
110 virtual Visualizer& ybase(int);
111 virtual Visualizer& xlspace(int);
112 virtual Visualizer& yspace(int);
113 virtual Visualizer& xlraster(int);
114 virtual Visualizer& ylraster(int);
115 virtual Visualizer& hidden(int);
116 virtual Visualizer& classname(String);
117 virtual Visualizer& infoname(String);
118 virtual Visualizer& layoutalgorithm(Algorithm);
119 virtual Visualizer& layout_downfactor(int);
120 virtual Visualizer& layout_upfactor(int);
121 virtual Visualizer& layout_nearfactor(int);
122 virtual Visualizer& layout_splinefactor(int);
123 virtual Visualizer& late_edge_labels(Bool);
124 virtual Visualizer& display_edge_labels(Bool);
125 virtual Visualizer& dirty_edge_labels(Bool);
126 virtual Visualizer& finetuning(Bool);
129 #endif