]> granicus.if.org Git - graphviz/commitdiff
-center graph / fit graph to screen/ implemented more visual controls on graph
authorarif <devnull@localhost>
Tue, 14 Oct 2008 16:28:48 +0000 (16:28 +0000)
committerarif <devnull@localhost>
Tue, 14 Oct 2008 16:28:48 +0000 (16:28 +0000)
-tool box has been changed and put on the main screen
-object identifying is now done by right click
-a console windows has been added as a replacement to std output
-A new algorithm is added to calculate font sizes for each graph

cmd/smyrna/gui/toolboxcallbacks.c
cmd/smyrna/smyrnadefs.h
cmd/smyrna/viewport.c

index 80873583c07f19d164520e5415b1501f9b6948f6..876a75ca7079320361fea4b8dc85e8085912a791 100755 (executable)
@@ -110,7 +110,8 @@ void btnToolZoomFit_clicked(GtkWidget * widget, gpointer user_data)
 
        }
        btnToolFit_clicked(NULL,NULL);
-
+//    xml = glade_xml_new(SMYRNA_GLADE, NULL, NULL);
+       gtk_widget_hide (glade_xml_get_widget(xml, "consoleText"));
 }
 
 void btnToolFit_clicked(GtkWidget * widget, gpointer user_data)
index 683a6ee622faef4b61d2b056477589bddb794d91..209f788beed8b3aef493d3ac6b95c78ddc764984 100644 (file)
@@ -488,6 +488,7 @@ typedef struct _ViewInfo
        int drawlabels;
        viewtype_t dfltViewType;
        gvk_layout dfltEngine;
+       GtkTextBuffer* consoleText;
 } ViewInfo;
 
 extern ViewInfo *view;
index b24037961866f0d7d16fb145eeb5aaf193b91b50..be135c1d1ae6283879d0902bc42f449f83b9ed90 100755 (executable)
@@ -270,6 +270,9 @@ void init_viewport(ViewInfo * view)
 {
     char *template_file;
     FILE *input_file;
+       GtkTextBuffer *a;
+       char* test;
+
 
     /*loading default visual attributes */
 #ifdef _WIN32
@@ -288,8 +291,15 @@ void init_viewport(ViewInfo * view)
 #ifndef _WIN32
     free (template_file);
 #endif
-
-    //init graphs
+       //init console text
+    xml = glade_xml_new(smyrnaGlade, NULL, NULL);
+       gtk_widget_hide (glade_xml_get_widget(xml, "consoleText"));
+       view->consoleText=gtk_text_buffer_new(NULL);
+       gtk_text_buffer_set_text (view->consoleText,"Smyrna console is initialized:\n",-1);
+       a=gtk_text_view_get_buffer((GtkTextView*)glade_xml_get_widget(xml, "consoleText"));
+       test=gtk_text_buffer_get_text  (a,0,5,1);
+       gtk_text_view_set_buffer ((GtkTextView*)glade_xml_get_widget(xml, "consoleText"),view->consoleText);
+       //init graphs
     view->g = NULL;            //no graph, gl screen should check it
     view->graphCount = 0;      //and disable interactivity if count is zero