00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifdef HAVE_CONFIG_H
00024 #include "config.h"
00025 #endif
00026
00027 #include <stdio.h>
00028
00029 #include "gvplugin_layout.h"
00030
00031
00032 #include "globals.h"
00033
00034 typedef enum { LAYOUT_NEATO,
00035 LAYOUT_FDP,
00036 LAYOUT_TWOPI,
00037 LAYOUT_CIRCO,
00038 LAYOUT_NOP1,
00039 LAYOUT_NOP2,
00040 } layout_type;
00041
00042 extern void neato_layout(graph_t * g);
00043 extern void fdp_layout(graph_t * g);
00044 extern void twopi_layout(graph_t * g);
00045 extern void circo_layout(graph_t * g);
00046
00047 extern void neato_cleanup(graph_t * g);
00048 extern void fdp_cleanup(graph_t * g);
00049 extern void twopi_cleanup(graph_t * g);
00050 extern void circo_cleanup(graph_t * g);
00051
00052 static void nop1_layout(graph_t * g)
00053 {
00054 Nop = 1;
00055 neato_layout(g);
00056 }
00057
00058 static void nop2_layout(graph_t * g)
00059 {
00060 Nop = 2;
00061 neato_layout(g);
00062 }
00063
00064 gvlayout_engine_t neatogen_engine = {
00065 neato_layout,
00066 neato_cleanup,
00067 };
00068
00069 gvlayout_engine_t fdpgen_engine = {
00070 fdp_layout,
00071 fdp_cleanup,
00072 };
00073
00074 gvlayout_engine_t twopigen_engine = {
00075 twopi_layout,
00076 twopi_cleanup,
00077 };
00078
00079 gvlayout_engine_t circogen_engine = {
00080 circo_layout,
00081 circo_cleanup,
00082 };
00083
00084 gvlayout_engine_t nop1gen_engine = {
00085 nop1_layout,
00086 neato_cleanup,
00087 };
00088
00089 gvlayout_engine_t nop2gen_engine = {
00090 nop2_layout,
00091 neato_cleanup,
00092 };
00093
00094 gvlayout_features_t neatogen_features = {
00095 0,
00096 };
00097
00098 gvplugin_installed_t gvlayout_neato_types[] = {
00099 {LAYOUT_NEATO, "neato", 0, &neatogen_engine, &neatogen_features},
00100 {LAYOUT_FDP, "fdp", 0, &fdpgen_engine, &neatogen_features},
00101 {LAYOUT_TWOPI, "twopi", 0, &twopigen_engine, &neatogen_features},
00102 {LAYOUT_CIRCO, "circo", 0, &circogen_engine, &neatogen_features},
00103 {LAYOUT_NOP1, "nop", 0, &nop1gen_engine, &neatogen_features},
00104 {LAYOUT_NOP1, "nop1", 0, &nop1gen_engine, &neatogen_features},
00105 {LAYOUT_NOP1, "nop2", 0, &nop2gen_engine, &neatogen_features},
00106 {0, NULL, 0, NULL, NULL}
00107 };