]> granicus.if.org Git - graphviz/commitdiff
gvpr + multiplle graphs
authorarif <devnull@localhost>
Tue, 23 Jun 2009 21:38:59 +0000 (21:38 +0000)
committerarif <devnull@localhost>
Tue, 23 Jun 2009 21:38:59 +0000 (21:38 +0000)
13 files changed:
cmd/smyrna/gui/menucallbacks.c
cmd/smyrna/gui/toolboxcallbacks.c
cmd/smyrna/gui/toolboxcallbacks.h
cmd/smyrna/gvprpipe.c
cmd/smyrna/main.c
cmd/smyrna/smyrna.vcproj
cmd/smyrna/smyrnadefs.h
cmd/smyrna/topfisheyeview.c
cmd/smyrna/topview.c
cmd/smyrna/viewport.c
graphviz.sln
lib/sfdpgen/sfdp.vcproj
share/gui/smyrna.glade

index 0ad14826adc1b143b1b243bb8ca0dc94a6c300db..d8568dc7c267b73a60a12b3e2db413127ae38523 100755 (executable)
@@ -55,8 +55,8 @@ void mOpenSlot(GtkWidget * widget, gpointer user_data)
     if (gtk_dialog_run(GTK_DIALOG(dialog)) == GTK_RESPONSE_ACCEPT) {
        char *filename;
        filename = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(dialog));
-       if (view->activeGraph == 0)
-               close_graph(view,0);
+/*     if (view->activeGraph == 0)
+               close_graph(view,0);*/
        add_graph_to_viewport_from_file(filename);
        g_free(filename);
        }
@@ -536,9 +536,9 @@ void mTestgvpr(GtkWidget * widget, gpointer user_data)
     assert (j == argc);
 
     run_gvpr (view->g[view->activeGraph], argc, argv);
-    for (i = 1; i < argc; i++)
+/*    for (i = 1; i < argc; i++)
        free (argv[i]);
-    free (argv);
+    free (argv);*/
 }
 
 
index c4d557284bdb5238b5e6df5f60864799debf3443..a556173aca2e35a105fd70bf2c84aa06d882ea23 100755 (executable)
@@ -183,3 +183,12 @@ void write_to_console(char* text)
        gtk_text_buffer_insert (view->consoleText,&iter,text,-1);
        gtk_text_view_set_buffer ((GtkTextView*)glade_xml_get_widget(xml, "consoleText"),view->consoleText);
 }
+extern void switch_graph(int graphId);
+void on_btnActivateGraph_clicked(GtkWidget * widget, gpointer user_data)
+{
+       int graphId;
+       graphId=gtk_combo_box_get_active(view->graphComboBox);
+       printf ("%d\n",graphId);
+       switch_graph(graphId);
+}
+
index 8f14e60a722aad1583cadaa8af9a6155f44b7655..b14db995bd9df908afaf00ed4c7d278969b9095b 100755 (executable)
@@ -50,6 +50,7 @@ _BB void btnToolAddEdge_clicked(GtkWidget * widget, gpointer user_data);
 _BB void btnToolDeleteEdge_clicked(GtkWidget * widget, gpointer user_data);
 _BB void btnToolFindEdge_clicked(GtkWidget * widget, gpointer user_data);
 _BB void btnToolCursor_clicked(GtkWidget * widget, gpointer user_data);
+_BB void on_btnActivateGraph_clicked(GtkWidget * widget, gpointer user_data);
 
 void write_to_console(char* text);
 
index b83d8981ff0fb1d4338ce1ea3fd715d1d76db7a1..f5045f65a868bef4108de35635241d36c1cc369f 100644 (file)
@@ -30,10 +30,20 @@ extern GladeXML* xml;
 static void
 refreshViewport ()
 {
-    update_graph_from_settings(view->g[view->activeGraph]);
+               view->Topview->Graphdata.GraphFileName = strdup ("unnamed");
+               load_settings_from_graph(view->g[view->activeGraph]);
+               update_graph_from_settings(view->g[view->activeGraph]);
+               set_viewport_settings_from_template(view, view->g[view->activeGraph]);
+               update_topview(view->g[view->activeGraph], view->Topview,1);
+               fill_key(view->orig_key,get_md5_key(view->g[view->activeGraph]));
+               expose_event(view->drawing_area, NULL, NULL);
+/*
+       update_graph_from_settings(view->g[view->activeGraph]);
     set_viewport_settings_from_template(view, view->g[view->activeGraph]);
     settvcolorinfo(view->g[view->activeGraph],view->Topview);
-    glexpose ();
+    glexpose ();*/
+
+
 }
 
 static ssize_t outfn (void* sp, const char *buf, size_t nbyte, void* dp)
index d1cf87482bf9feba1c62f1d74b46245acb11a04c..4845de3271235b366821d4c0da3558785d1a0e37 100755 (executable)
@@ -203,6 +203,8 @@ int main(int argc, char *argv[])
 {
     GdkGLConfig *glconfig;
     char* initFileName;
+       /*combo box to show loaded graphs*/
+       GtkComboBox *  graphComboBox;
 
     smyrnaDir = getenv ("SMYRNA_PATH");
     if (!smyrnaDir) {
@@ -263,7 +265,7 @@ int main(int argc, char *argv[])
        gtk_gl_init(0, 0);
     /* Configure OpenGL framebuffer. */
     glconfig = configure_gl();
-    gladewidget = glade_xml_get_widget(xml, "vbox2");
+       gladewidget = glade_xml_get_widget(xml, "vbox2");
     create_window(glconfig, gladewidget);
 
        change_cursor(GDK_TOP_LEFT_ARROW);
@@ -271,6 +273,12 @@ int main(int argc, char *argv[])
 #ifndef WIN32  
        glutInit(&argc,argv);
 #endif
+
+       gladewidget = glade_xml_get_widget(xml, "hbox10");
+       graphComboBox=(GtkComboBox*)gtk_combo_box_new_text();
+       gtk_box_pack_end(gladewidget,graphComboBox,1,1,10);
+    gtk_widget_show(graphComboBox);
+       view->graphComboBox=graphComboBox;
        gtk_main();
 
 
index f6ffdbc19089387422964f8e7b3124bc1a700bec..72ea120b6a64e5dbd004ce3eae653e6b7ea2d964 100644 (file)
@@ -40,7 +40,7 @@
                                Name="VCCLCompilerTool"
                                AdditionalOptions="/D &quot;_CRT_SECURE_NO_DEPRECATE&quot;"
                                Optimization="0"
-                               AdditionalIncludeDirectories="&quot;C:\graphviz-ms\graphviz2\lib\windirent&quot;;&quot;$(SolutionDir)/lib/gvc&quot;;&quot;C:\gtk\include\libglade-2.0&quot;;&quot;$(SolutionDir)/lib/neatogen&quot;;&quot;$(SolutionDir)/lib/sparse&quot;;&quot;$(SolutionDir)/lib/topfish&quot;;&quot;C:\gtk\lib\gtkglext-1.0\include&quot;;&quot;C:\gtk\include\gtkglext-1.0\&quot;;C:\gtk\include\cairo;&quot;C:\gtk\include\atk-1.0&quot;;&quot;C:\gtk\lib\gtk-2.0\include\cairo&quot;;&quot;C:\gtk\lib\gtk-2.0\include&quot;;&quot;C:\gtk\include\gtk-2.0\&quot;;&quot;$(SolutionDir)/cmd/smyrna/gui&quot;;&quot;$(SolutionDir)/cmd/smyrna&quot;;&quot;$(SolutionDir)&quot;;&quot;$(SolutionDir)/lib/glcomp&quot;;&quot;C:\gtk\lib\glib-2.0\include&quot;;&quot;C:\gtk\include\glib-2.0&quot;;&quot;C:\gtk\include\pango-1.0\&quot;;C:\gtk\include;&quot;$(SolutionDir)/lib/common&quot;;&quot;$(SolutionDir)/lib/cdt&quot;;&quot;$(SolutionDir)/lib/cgraph&quot;;&quot;$(SolutionDir)/windows\lib\ingraphs&quot;;&quot;$(SolutionDir)/lib/xdot&quot;;&quot;$(SolutionDir)/lib/glut/glut-3.7.6-bin&quot;"
+                               AdditionalIncludeDirectories="&quot;$(SolutionDir)/lib/gvc&quot;;&quot;C:\gtk\include\libglade-2.0&quot;;&quot;$(SolutionDir)/lib/neatogen&quot;;&quot;$(SolutionDir)/lib/sparse&quot;;&quot;$(SolutionDir)/lib/topfish&quot;;&quot;C:\gtk\lib\gtkglext-1.0\include&quot;;&quot;C:\gtk\include\gtkglext-1.0\&quot;;C:\gtk\include\cairo;&quot;C:\gtk\include\atk-1.0&quot;;&quot;C:\gtk\lib\gtk-2.0\include\cairo&quot;;&quot;C:\gtk\lib\gtk-2.0\include&quot;;&quot;C:\gtk\include\gtk-2.0\&quot;;&quot;$(SolutionDir)/cmd/smyrna/gui&quot;;&quot;$(SolutionDir)/cmd/smyrna&quot;;&quot;$(SolutionDir)&quot;;&quot;$(SolutionDir)/lib/glcomp&quot;;&quot;C:\gtk\lib\glib-2.0\include&quot;;&quot;C:\gtk\include\glib-2.0&quot;;&quot;C:\gtk\include\pango-1.0\&quot;;C:\gtk\include;&quot;$(SolutionDir)/lib/common&quot;;&quot;$(SolutionDir)/lib/gvpr&quot;;&quot;$(SolutionDir)/lib/cdt&quot;;&quot;$(SolutionDir)/lib/cgraph&quot;;&quot;$(SolutionDir)/lib/glut/glut-3.7.6-bin&quot;;&quot;$(SolutionDir)/lib/xdot&quot;"
                                PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;HAVE_TRIANGLE;HAVE_CONFIG_H;HAVE_GTS;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;WIN32_DLL"
                                MinimalRebuild="true"
                                BasicRuntimeChecks="3"
@@ -62,7 +62,7 @@
                        />
                        <Tool
                                Name="VCLinkerTool"
-                               AdditionalDependencies="asprintf.lib ast.lib atk-1.0.lib bz2.lib cairo.lib cdt.lib cgraph.lib charset.lib croco-0.6.lib expat.lib expatw.lib expr.lib fontconfig.lib freetype.lib Gdi32.lib gdk_pixbuf-2.0.lib gdkglext-win32-1.0.lib gdk-win32-2.0.lib glade-2.0.lib gladeui-1.lib glcomp.lib glib-2.0.lib glu32.lib gmodule-2.0.lib gobject-2.0.lib gsf-1.lib gsf-win32-1.lib gthread-2.0.lib gtkglext-win32-1.0.lib gtk-win32-2.0.lib gts.lib gvc.lib gvprlib.lib hs_regex.lib iconv.lib ingraphs.lib intl.lib jpeg.lib libexpat.lib libexpatw.lib libgtkglext-win32-1.0.dll.a ltdl.lib mspng.lib neatogen.lib opengl32.lib pango-1.0.lib pangocairo-1.0.lib pangoft2-1.0.lib pangowin32-1.0.lib popt.lib regex_win32.lib rsvg-2.lib sfio.lib shlwapi.lib tiff.lib topfish.lib User32.lib vmalloc.lib xdot.lib xml2.lib zdll.lib $(NOINHERIT)"
+                               AdditionalDependencies="asprintf.lib ast.lib atk-1.0.lib bz2.lib cairo.lib cdt.lib cgraph.lib charset.lib croco-0.6.lib expat.lib expatw.lib expr.lib fontconfig.lib freetype.lib Gdi32.lib gdk_pixbuf-2.0.lib gdkglext-win32-1.0.lib gdk-win32-2.0.lib glade-2.0.lib gladeui-1.lib glcomp.lib glib-2.0.lib glu32.lib gmodule-2.0.lib gobject-2.0.lib gsf-1.lib gsf-win32-1.lib gthread-2.0.lib gtkglext-win32-1.0.lib gtk-win32-2.0.lib gts.lib gvprlib.lib hs_regex.lib iconv.lib ingraphs.lib intl.lib jpeg.lib libexpat.lib libexpatw.lib libgtkglext-win32-1.0.dll.a ltdl.lib mspng.lib neatogen.lib opengl32.lib pango-1.0.lib pangocairo-1.0.lib pangoft2-1.0.lib pangowin32-1.0.lib popt.lib regex_win32.lib rsvg-2.lib sfio.lib shlwapi.lib tiff.lib topfish.lib User32.lib vmalloc.lib xdot.lib xml2.lib zdll.lib gvc.lib $(NOINHERIT)"
                                OutputFile="c:/graphviz-ms/bin/$(ProjectName).exe"
                                LinkIncremental="2"
                                AdditionalLibraryDirectories="C:\glade_setup\lib;&quot;C:\graphviz-ms\bin&quot;;C:\gtk\lib;C:\GnuWin32\lib;&quot;C:\Projects\graphviz2\lib\zlib-1.2.3\lib&quot;;C:\Projects\cairo_build\lib;C:\Projects\ATT\GTK\GTKTest2\lib;C:\GtkGLExt\1.0\lib;C:\GTK\2.0\bin;C:\GTK\2.0\lib"
                        />
                        <Tool
                                Name="VCCLCompilerTool"
-                               AdditionalIncludeDirectories="&quot;$(SolutionDir)/lib/gvc&quot;;&quot;C:\gtk\include\libglade-2.0&quot;;&quot;$(SolutionDir)/lib/neatogen&quot;;&quot;$(SolutionDir)/lib/sparse&quot;;&quot;$(SolutionDir)/lib/topfish&quot;;&quot;C:\gtk\lib\gtkglext-1.0\include&quot;;&quot;C:\gtk\include\gtkglext-1.0\&quot;;C:\gtk\include\cairo;&quot;C:\gtk\include\atk-1.0&quot;;&quot;C:\gtk\lib\gtk-2.0\include\cairo&quot;;&quot;C:\gtk\lib\gtk-2.0\include&quot;;&quot;C:\gtk\include\gtk-2.0\&quot;;&quot;$(SolutionDir)/cmd/smyrna/gui&quot;;&quot;$(SolutionDir)/cmd/smyrna&quot;;&quot;$(SolutionDir)&quot;;&quot;$(SolutionDir)/lib/glcomp&quot;;&quot;C:\gtk\lib\glib-2.0\include&quot;;&quot;C:\gtk\include\glib-2.0&quot;;&quot;C:\gtk\include\pango-1.0\&quot;;C:\gtk\include;&quot;$(SolutionDir)/lib/common&quot;;&quot;$(SolutionDir)/lib/cdt&quot;;&quot;$(SolutionDir)/lib/cgraph&quot;;&quot;$(SolutionDir)/lib/glut/glut-3.7.6-bin&quot;;&quot;$(SolutionDir)/lib/xdot&quot;"
+                               AdditionalIncludeDirectories="&quot;$(SolutionDir)/lib/gvc&quot;;&quot;C:\gtk\include\libglade-2.0&quot;;&quot;$(SolutionDir)/lib/neatogen&quot;;&quot;$(SolutionDir)/lib/sparse&quot;;&quot;$(SolutionDir)/lib/topfish&quot;;&quot;C:\gtk\lib\gtkglext-1.0\include&quot;;&quot;C:\gtk\include\gtkglext-1.0\&quot;;C:\gtk\include\cairo;&quot;C:\gtk\include\atk-1.0&quot;;&quot;C:\gtk\lib\gtk-2.0\include\cairo&quot;;&quot;C:\gtk\lib\gtk-2.0\include&quot;;&quot;C:\gtk\include\gtk-2.0\&quot;;&quot;$(SolutionDir)/cmd/smyrna/gui&quot;;&quot;$(SolutionDir)/cmd/smyrna&quot;;&quot;$(SolutionDir)&quot;;&quot;$(SolutionDir)/lib/glcomp&quot;;&quot;C:\gtk\lib\glib-2.0\include&quot;;&quot;C:\gtk\include\glib-2.0&quot;;&quot;C:\gtk\include\pango-1.0\&quot;;C:\gtk\include;&quot;$(SolutionDir)/lib/common&quot;;&quot;$(SolutionDir)/lib/gvpr&quot;;&quot;$(SolutionDir)/lib/cdt&quot;;&quot;$(SolutionDir)/lib/cgraph&quot;;&quot;$(SolutionDir)/lib/glut/glut-3.7.6-bin&quot;;&quot;$(SolutionDir)/lib/xdot&quot;"
                                PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;"
                                RuntimeLibrary="2"
                                UsePrecompiledHeader="0"
index 46bab5a9378edefd98c986fc6cf6ad3385e90d8a..4af4923174576c9e0825cf8b9c747229f35e660b 100644 (file)
@@ -564,6 +564,7 @@ typedef struct _ViewInfo
        line interpol;
        gvprscript* scripts;
        int script_count;  /*# of scripts*/
+       GtkComboBox* graphComboBox;/*pointer to graph combo box at top right*/
 
 } ViewInfo;
 
index 9a3d5ceba3343eac0a1e4842ceb4ed80ca31aa11..e5c1c2af810011e0fd0abcc1a87a0674988d41fe 100644 (file)
@@ -295,11 +295,11 @@ void prepare_topological_fisheye(topview* t)
     view->Topview->tarColor.B = (float) cl.u.RGBA[2];
 
 
-       sscanf(agget(view->g[0],"topologicalfisheyedistortionfactor"),"%lf",&view->Topview->parms.repos.distortion);
-       sscanf(agget(view->g[0],"topologicalfisheyefinenodes"),"%d",&view->Topview->parms.level.num_fine_nodes);
-       sscanf(agget(view->g[0],"topologicalfisheyecoarseningfactor"),"%lf",&view->Topview->parms.level.coarsening_rate);
-       sscanf(agget(view->g[0],"topologicalfisheyedist2limit"),"%d",&view->Topview->parms.hier.dist2_limit);
-       sscanf(agget(view->g[0],"topologicalfisheyeanimate"),"%d",&view->Topview->animate);
+       sscanf(agget(view->g[view->activeGraph],"topologicalfisheyedistortionfactor"),"%lf",&view->Topview->parms.repos.distortion);
+       sscanf(agget(view->g[view->activeGraph],"topologicalfisheyefinenodes"),"%d",&view->Topview->parms.level.num_fine_nodes);
+       sscanf(agget(view->g[view->activeGraph],"topologicalfisheyecoarseningfactor"),"%lf",&view->Topview->parms.level.coarsening_rate);
+       sscanf(agget(view->g[view->activeGraph],"topologicalfisheyedist2limit"),"%d",&view->Topview->parms.hier.dist2_limit);
+       sscanf(agget(view->g[view->activeGraph],"topologicalfisheyeanimate"),"%d",&view->Topview->animate);
                
        set_active_levels(hp, fs->foci_nodes, fs->num_foci, &(t->parms.level));
        positionAllItems(hp, fs, &(t->parms.repos));
@@ -656,11 +656,11 @@ void changetopfishfocus(topview * t, float *x, float *y,
 
 
 
-       sscanf(agget(view->g[0],"topologicalfisheyedistortionfactor"),"%lf",&view->Topview->parms.repos.distortion);
-       sscanf(agget(view->g[0],"topologicalfisheyefinenodes"),"%d",&view->Topview->parms.level.num_fine_nodes);
-       sscanf(agget(view->g[0],"topologicalfisheyecoarseningfactor"),"%lf",&view->Topview->parms.level.coarsening_rate);
-       sscanf(agget(view->g[0],"topologicalfisheyedist2limit"),"%d",&view->Topview->parms.hier.dist2_limit);
-       sscanf(agget(view->g[0],"topologicalfisheyeanimate"),"%d",&view->Topview->animate);
+       sscanf(agget(view->g[view->activeGraph],"topologicalfisheyedistortionfactor"),"%lf",&view->Topview->parms.repos.distortion);
+       sscanf(agget(view->g[view->activeGraph],"topologicalfisheyefinenodes"),"%d",&view->Topview->parms.level.num_fine_nodes);
+       sscanf(agget(view->g[view->activeGraph],"topologicalfisheyecoarseningfactor"),"%lf",&view->Topview->parms.level.coarsening_rate);
+       sscanf(agget(view->g[view->activeGraph],"topologicalfisheyedist2limit"),"%d",&view->Topview->parms.hier.dist2_limit);
+       sscanf(agget(view->g[view->activeGraph],"topologicalfisheyeanimate"),"%d",&view->Topview->animate);
 
 
 
index d8c939e1d1ca3afdbeab910189bffc96eebbb44c..8ca15f81a2190c43d4685db722e7615412b62735 100755 (executable)
@@ -154,36 +154,38 @@ void settvposinfo(Agraph_t* g,topview* t)
 
 
        /*loop nodes*/
-    for (ind=0;ind < t->Nodecount ; ind ++) {
-       np = t->Nodes + ind;
-       setpositioninfo(&np->x,&np->y,&np->z,agxget(np->Node, poss));
-
-       /*distorted coordiates, same with original ones at the beginning*/
-       np->distorted_x = t->Nodes[ind].x;
-       np->distorted_y = t->Nodes[ind].y;
-       np->distorted_z = t->Nodes[ind].z;
-       xmax = MAX(xmax, np->x);
-       xmin = MIN(xmin, np->x);
-       ymax = MAX(ymax, np->y);
-       ymin = MIN(ymin, np->y);
+    for (ind=0;ind < t->Nodecount ; ind ++) 
+       {
+               np = t->Nodes + ind;
+               setpositioninfo(&np->x,&np->y,&np->z,agxget(np->Node, poss));
+
+               /*distorted coordiates, same with original ones at the beginning*/
+               np->distorted_x = t->Nodes[ind].x;
+               np->distorted_y = t->Nodes[ind].y;
+               np->distorted_z = t->Nodes[ind].z;
+               xmax = MAX(xmax, np->x);
+               xmin = MIN(xmin, np->x);
+               ymax = MAX(ymax, np->y);
+               ymin = MIN(ymin, np->y);
      }
 
        /*loop edges*/
-    for (ind=0;ind < t->Edgecount ; ind ++) {
-       ep = t->Edges + ind;
+    for (ind=0;ind < t->Edgecount ; ind ++) 
+       {
+               ep = t->Edges + ind;
         ep->x1 = ep->Node1->x;
         ep->y1 = ep->Node1->y;
         ep->z1 = ep->Node1->z;
         ep->x2 = ep->Node2->x;
         ep->y2 = ep->Node2->y;
         ep->z2 = ep->Node2->z;
-       len=(float)DIST(ep->x2 - ep->x1, ep->y2 - ep->y1);
-       totallen = totallen + len;
-       if (len > maxedgelen)
-           maxedgelen=len;
-       if(len < minedgelen)
-           minedgelen=len;
-       ep->length=len;
+               len=(float)DIST(ep->x2 - ep->x1, ep->y2 - ep->y1);
+               totallen = totallen + len;
+               if (len > maxedgelen)
+                       maxedgelen=len;
+               if(len < minedgelen)
+                   minedgelen=len;
+               ep->length=len;
     }
 
     t->maxedgelen=maxedgelen;
@@ -372,6 +374,8 @@ void preparetopview(Agraph_t * g, topview * t)
        /*set some stats for topview*/
        t->Nodecount = ind;
     t->Edgecount = ind2;
+       printf("node count:%d\n",ind);
+       printf("edge count:%d\n",ind2);
 
 
        /*create glcomp menu system*/
index 59482bd43df984022a7e74ced7c333ab951b0879..5240f64746a1a0038372a6c26bc37452b221795b 100755 (executable)
@@ -97,7 +97,7 @@ static void* get_glut_font(int ind)
        }
 
 }
-static void fill_key(md5_byte_t* b,md5_byte_t* data)
+void fill_key(md5_byte_t* b,md5_byte_t* data)
 {
        int ind=0;
        for (ind=0;ind < 16;ind ++)
@@ -593,24 +593,39 @@ int add_graph_to_viewport_from_file(char *fileName)
 
 int add_graph_to_viewport(Agraph_t* graph)
 {
-    if (graph) {
-       view->graphCount = view->graphCount + 1;
-       view->g =
-           (Agraph_t **) realloc(view->g,
-                                 sizeof(Agraph_t *) * view->graphCount);
-       view->g[view->graphCount - 1] = graph;
-       view->activeGraph = view->graphCount - 1;
+    if (graph) 
+       {
+               view->graphCount = view->graphCount + 1;
+               view->g =(Agraph_t **) realloc(view->g,sizeof(Agraph_t *) * view->graphCount);
+               view->g[view->graphCount - 1] = graph;
+               view->activeGraph = view->graphCount - 1;
+               load_settings_from_graph(view->g[view->activeGraph]);
+               update_graph_from_settings(view->g[view->activeGraph]);
+               set_viewport_settings_from_template(view, view->g[view->activeGraph]);
+               update_topview(graph, view->Topview,1);
+               gtk_combo_box_append_text(view->graphComboBox,view->Topview->Graphdata.GraphFileName);
+               fill_key(view->orig_key,get_md5_key(graph));
+               expose_event(view->drawing_area, NULL, NULL);
+               return 1;
+    } 
+    else 
+       {
+               return 0;
+    }
+
+}
+void switch_graph(int graphId)
+{
+       if (graphId >= view->graphCount)
+               return;/*wrong entry*/
+       view->activeGraph = graphId;
        load_settings_from_graph(view->g[view->activeGraph]);
        update_graph_from_settings(view->g[view->activeGraph]);
        set_viewport_settings_from_template(view, view->g[view->activeGraph]);
-       update_topview(graph, view->Topview,1);
-       fill_key(view->orig_key,get_md5_key(graph));
+       cleartopview(view->Topview);
+       update_topview(view->g[view->activeGraph], view->Topview,1);
+       fill_key(view->orig_key,get_md5_key(view->g[view->activeGraph]));
        expose_event(view->drawing_area, NULL, NULL);
-       return 1;
-    } 
-    else {
-       return 0;
-    }
 
 }
 
index 5fe434854f2f7f97ba24ee5d7e406a5345596855..925556ead4a3bb6aa76d1648b62ee9d7177a42df 100644 (file)
@@ -195,12 +195,14 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gvtest", "cmd\tester\gvtest
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "osage", "lib\osage\osage.vcproj", "{8E82D6BD-74D0-48C3-887A-1754EA71DA5A}"
 EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gvprlib", "cmd\gvprlib\gvprlib.vcproj", "{1068DA13-0BB3-43A7-8776-6F519003EEBD}"
-EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sfdp", "lib\sfdpgen\sfdp.vcproj", "{443EB1A7-C634-4292-9F2D-C752BB2BF40F}"
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "rbtree", "lib\rbtree\rbtree.vcproj", "{D6CEB142-BF8E-471C-AE16-4300F2D5DEDA}"
 EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gts", "lib\GTS\gts.vcproj", "{0DEA7FAC-4190-4B39-BEF0-1C055758FED3}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gvprlib", "lib\gvpr\gvprlib.vcproj", "{8C103DE9-BC35-4173-A08D-63906EC5EEFD}"
+EndProject
 Global
        GlobalSection(SolutionConfigurationPlatforms) = preSolution
                Debug|Win32 = Debug|Win32
@@ -423,10 +425,6 @@ Global
                {8E82D6BD-74D0-48C3-887A-1754EA71DA5A}.Debug|Win32.Build.0 = Debug|Win32
                {8E82D6BD-74D0-48C3-887A-1754EA71DA5A}.Release|Win32.ActiveCfg = Release|Win32
                {8E82D6BD-74D0-48C3-887A-1754EA71DA5A}.Release|Win32.Build.0 = Release|Win32
-               {1068DA13-0BB3-43A7-8776-6F519003EEBD}.Debug|Win32.ActiveCfg = Debug|Win32
-               {1068DA13-0BB3-43A7-8776-6F519003EEBD}.Debug|Win32.Build.0 = Debug|Win32
-               {1068DA13-0BB3-43A7-8776-6F519003EEBD}.Release|Win32.ActiveCfg = Release|Win32
-               {1068DA13-0BB3-43A7-8776-6F519003EEBD}.Release|Win32.Build.0 = Release|Win32
                {443EB1A7-C634-4292-9F2D-C752BB2BF40F}.Debug|Win32.ActiveCfg = Debug|Win32
                {443EB1A7-C634-4292-9F2D-C752BB2BF40F}.Debug|Win32.Build.0 = Debug|Win32
                {443EB1A7-C634-4292-9F2D-C752BB2BF40F}.Release|Win32.ActiveCfg = Release|Win32
@@ -435,6 +433,14 @@ Global
                {D6CEB142-BF8E-471C-AE16-4300F2D5DEDA}.Debug|Win32.Build.0 = Debug|Win32
                {D6CEB142-BF8E-471C-AE16-4300F2D5DEDA}.Release|Win32.ActiveCfg = Release|Win32
                {D6CEB142-BF8E-471C-AE16-4300F2D5DEDA}.Release|Win32.Build.0 = Release|Win32
+               {0DEA7FAC-4190-4B39-BEF0-1C055758FED3}.Debug|Win32.ActiveCfg = Debug|Win32
+               {0DEA7FAC-4190-4B39-BEF0-1C055758FED3}.Debug|Win32.Build.0 = Debug|Win32
+               {0DEA7FAC-4190-4B39-BEF0-1C055758FED3}.Release|Win32.ActiveCfg = Release|Win32
+               {0DEA7FAC-4190-4B39-BEF0-1C055758FED3}.Release|Win32.Build.0 = Release|Win32
+               {8C103DE9-BC35-4173-A08D-63906EC5EEFD}.Debug|Win32.ActiveCfg = Debug|Win32
+               {8C103DE9-BC35-4173-A08D-63906EC5EEFD}.Debug|Win32.Build.0 = Debug|Win32
+               {8C103DE9-BC35-4173-A08D-63906EC5EEFD}.Release|Win32.ActiveCfg = Release|Win32
+               {8C103DE9-BC35-4173-A08D-63906EC5EEFD}.Release|Win32.Build.0 = Release|Win32
        EndGlobalSection
        GlobalSection(SolutionProperties) = preSolution
                HideSolutionNode = FALSE
index 3802665a937303ac13062fe4a2805beafccad607..1f13e14056ef9dbadd40f36b5cb6c333d79975b0 100644 (file)
@@ -39,7 +39,7 @@
                        <Tool
                                Name="VCCLCompilerTool"
                                Optimization="0"
-                               AdditionalIncludeDirectories="&quot;C:\gtk\lib\glib-2.0\include&quot;;&quot;C:\gtk\include\glib-2.0&quot;;&quot;C:\gtk\include\pango-1.0\&quot;;C:\gtk\include\cairo;&quot;$(SolutionDir)/lib/sfdp&quot;;C:\gtk\include\freetype2;C:\gtk\include;&quot;$(SolutionDir)/libltdl&quot;;&quot;$(SolutionDir)/lib/neatogen&quot;;&quot;$(SolutionDir)/lib/agutil&quot;;&quot;$(SolutionDir)/windows/lib/cdt&quot;;&quot;$(SolutionDir)/&quot;;&quot;$(SolutionDir)/lib/graph&quot;;&quot;$(SolutionDir)/lib/vpsc&quot;;&quot;$(SolutionDir)/lib/vmalloc&quot;;&quot;$(SolutionDir)/lib/twopigen&quot;;&quot;$(SolutionDir)/lib/sparse&quot;;&quot;$(SolutionDir)/lib/sfio&quot;;&quot;$(SolutionDir)/lib/sfpdpgen&quot;;&quot;$(SolutionDir)/lib/rbtree&quot;;&quot;$(SolutionDir)/lib/pathplan&quot;;&quot;$(SolutionDir)/lib/patchwork&quot;;&quot;$(SolutionDir)/lib/pack&quot;;&quot;$(SolutionDir)/lib/ortho&quot;;&quot;$(SolutionDir)/lib/inkpot&quot;;&quot;$(SolutionDir)/lib/ingraphs&quot;;&quot;$(SolutionDir)/lib/gd&quot;;&quot;$(SolutionDir)/lib/filter&quot;;&quot;$(SolutionDir)/lib/fdpgen&quot;;&quot;$(SolutionDir)/lib/expr&quot;;&quot;$(SolutionDir)/lib/dotgen&quot;;&quot;$(SolutionDir)/lib/circogen&quot;;&quot;$(SolutionDir)/lib/ast&quot;;&quot;$(SolutionDir)/lib/agraph&quot;;&quot;$(SolutionDir)/lib/common&quot;;&quot;$(SolutionDir)/lib/gvc&quot;;&quot;$(SolutionDir)/lib/cdt&quot;;&quot;$(SolutionDir)/lib/cgraph&quot;"
+                               AdditionalIncludeDirectories="&quot;$(SolutionDir)\lib\sfdpgen\&quot;;&quot;C:\gtk\lib\glib-2.0\include&quot;;&quot;C:\gtk\include\glib-2.0&quot;;&quot;C:\gtk\include\pango-1.0\&quot;;C:\gtk\include\cairo;&quot;$(SolutionDir)/lib/sfdp&quot;;C:\gtk\include\freetype2;C:\gtk\include;&quot;$(SolutionDir)/libltdl&quot;;&quot;$(SolutionDir)/lib/neatogen&quot;;&quot;$(SolutionDir)/lib/agutil&quot;;&quot;$(SolutionDir)/windows/lib/cdt&quot;;&quot;$(SolutionDir)/&quot;;&quot;$(SolutionDir)/lib/graph&quot;;&quot;$(SolutionDir)/lib/vpsc&quot;;&quot;$(SolutionDir)/lib/vmalloc&quot;;&quot;$(SolutionDir)/lib/twopigen&quot;;&quot;$(SolutionDir)/lib/sparse&quot;;&quot;$(SolutionDir)/lib/sfio&quot;;&quot;$(SolutionDir)/lib/sfpdpgen&quot;;&quot;$(SolutionDir)/lib/rbtree&quot;;&quot;$(SolutionDir)/lib/pathplan&quot;;&quot;$(SolutionDir)/lib/patchwork&quot;;&quot;$(SolutionDir)/lib/pack&quot;;&quot;$(SolutionDir)/lib/ortho&quot;;&quot;$(SolutionDir)/lib/inkpot&quot;;&quot;$(SolutionDir)/lib/ingraphs&quot;;&quot;$(SolutionDir)/lib/gd&quot;;&quot;$(SolutionDir)/lib/filter&quot;;&quot;$(SolutionDir)/lib/fdpgen&quot;;&quot;$(SolutionDir)/lib/expr&quot;;&quot;$(SolutionDir)/lib/dotgen&quot;;&quot;$(SolutionDir)/lib/circogen&quot;;&quot;$(SolutionDir)/lib/ast&quot;;&quot;$(SolutionDir)/lib/agraph&quot;;&quot;$(SolutionDir)/lib/common&quot;;&quot;$(SolutionDir)/lib/gvc&quot;;&quot;$(SolutionDir)/lib/cdt&quot;;&quot;$(SolutionDir)/lib/cgraph&quot;"
                                PreprocessorDefinitions="WIN32;_DEBUG;_LIB;HAVE_CONFIG_H"
                                MinimalRebuild="true"
                                BasicRuntimeChecks="3"
index e1deaf9e32d82330710eacd7bcb24149e673719e..5a2c8c5ced90a5f55650f66fca8f2758dfe33bfd 100755 (executable)
              <property name="fill">True</property>
            </packing>
          </child>
+
+         <child>
+           <widget class="GtkVBox" id="vbox11">
+             <property name="visible">True</property>
+             <property name="homogeneous">False</property>
+             <property name="spacing">0</property>
+
+             <child>
+               <widget class="GtkFixed" id="fixed5">
+                 <property name="height_request">46</property>
+                 <property name="visible">True</property>
+
+                 <child>
+                   <widget class="GtkLabel" id="label120">
+                     <property name="width_request">66</property>
+                     <property name="height_request">16</property>
+                     <property name="visible">True</property>
+                     <property name="label" translatable="yes">Graph Array</property>
+                     <property name="use_underline">False</property>
+                     <property name="use_markup">False</property>
+                     <property name="justify">GTK_JUSTIFY_LEFT</property>
+                     <property name="wrap">False</property>
+                     <property name="selectable">False</property>
+                     <property name="xalign">0.5</property>
+                     <property name="yalign">0.5</property>
+                     <property name="xpad">0</property>
+                     <property name="ypad">0</property>
+                     <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+                     <property name="width_chars">-1</property>
+                     <property name="single_line_mode">False</property>
+                     <property name="angle">0</property>
+                   </widget>
+                   <packing>
+                     <property name="x">5</property>
+                     <property name="y">27</property>
+                   </packing>
+                 </child>
+               </widget>
+               <packing>
+                 <property name="padding">0</property>
+                 <property name="expand">False</property>
+                 <property name="fill">False</property>
+               </packing>
+             </child>
+
+             <child>
+               <widget class="GtkHBox" id="hbox10">
+                 <property name="visible">True</property>
+                 <property name="homogeneous">False</property>
+                 <property name="spacing">0</property>
+
+                 <child>
+                   <placeholder/>
+                 </child>
+
+                 <child>
+                   <widget class="GtkButton" id="btnActivateGraph">
+                     <property name="visible">True</property>
+                     <property name="can_focus">True</property>
+                     <property name="label" translatable="yes">Activate</property>
+                     <property name="use_underline">True</property>
+                     <property name="relief">GTK_RELIEF_NORMAL</property>
+                     <property name="focus_on_click">True</property>
+                     <signal name="clicked" handler="on_btnActivateGraph_clicked" last_modification_time="Tue, 23 Jun 2009 16:15:08 GMT"/>
+                   </widget>
+                   <packing>
+                     <property name="padding">0</property>
+                     <property name="expand">False</property>
+                     <property name="fill">False</property>
+                   </packing>
+                 </child>
+
+                 <child>
+                   <widget class="GtkButton" id="button10">
+                     <property name="visible">True</property>
+                     <property name="can_focus">True</property>
+                     <property name="label" translatable="yes">Remove</property>
+                     <property name="use_underline">True</property>
+                     <property name="relief">GTK_RELIEF_NORMAL</property>
+                     <property name="focus_on_click">True</property>
+                   </widget>
+                   <packing>
+                     <property name="padding">0</property>
+                     <property name="expand">False</property>
+                     <property name="fill">False</property>
+                   </packing>
+                 </child>
+               </widget>
+               <packing>
+                 <property name="padding">0</property>
+                 <property name="expand">True</property>
+                 <property name="fill">True</property>
+               </packing>
+             </child>
+           </widget>
+           <packing>
+             <property name="padding">0</property>
+             <property name="expand">True</property>
+             <property name="fill">True</property>
+           </packing>
+         </child>
        </widget>
        <packing>
          <property name="padding">0</property>