From c31712063344778ef93a43e037b3e09d516da4de Mon Sep 17 00:00:00 2001 From: arif Date: Tue, 14 Oct 2008 16:28:48 +0000 Subject: [PATCH] -center graph / fit graph to screen/ implemented more visual controls on graph -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 | 3 ++- cmd/smyrna/smyrnadefs.h | 1 + cmd/smyrna/viewport.c | 14 ++++++++++++-- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/cmd/smyrna/gui/toolboxcallbacks.c b/cmd/smyrna/gui/toolboxcallbacks.c index 80873583c..876a75ca7 100755 --- a/cmd/smyrna/gui/toolboxcallbacks.c +++ b/cmd/smyrna/gui/toolboxcallbacks.c @@ -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) diff --git a/cmd/smyrna/smyrnadefs.h b/cmd/smyrna/smyrnadefs.h index 683a6ee62..209f788be 100644 --- a/cmd/smyrna/smyrnadefs.h +++ b/cmd/smyrna/smyrnadefs.h @@ -488,6 +488,7 @@ typedef struct _ViewInfo int drawlabels; viewtype_t dfltViewType; gvk_layout dfltEngine; + GtkTextBuffer* consoleText; } ViewInfo; extern ViewInfo *view; diff --git a/cmd/smyrna/viewport.c b/cmd/smyrna/viewport.c index b24037961..be135c1d1 100755 --- a/cmd/smyrna/viewport.c +++ b/cmd/smyrna/viewport.c @@ -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 -- 2.40.0