From 1a65f4b82be8bb588edf6895e4712012f1cbe17a Mon Sep 17 00:00:00 2001 From: arif Date: Wed, 5 Nov 2008 21:14:38 +0000 Subject: [PATCH] *** empty log message *** --- cmd/smyrna/gltemplate.c | 18 +-- cmd/smyrna/gui/topviewsettings.c | 2 +- cmd/smyrna/smyrnadefs.h | 2 +- cmd/smyrna/topview.c | 41 +++---- share/gui/Makefile.am | 15 ++- share/gui/attrs.txt | 194 +++++++++++++++---------------- share/gui/smyrna.glade | 27 ++--- 7 files changed, 145 insertions(+), 154 deletions(-) diff --git a/cmd/smyrna/gltemplate.c b/cmd/smyrna/gltemplate.c index 4f0ac454b..b5041d222 100755 --- a/cmd/smyrna/gltemplate.c +++ b/cmd/smyrna/gltemplate.c @@ -345,15 +345,17 @@ static gboolean button_release_event(GtkWidget * widget, } if (event->button == 3) //right click { - if (view->Topview->is_top_fisheye) { - GetFixedOGLPoslocal((int) event->x, (int) event->y, - view->GLDepth, &(view->GLx2), - &(view->GLy2), &(view->GLz2)); - changetopfishfocus(view->Topview, &view->GLx2, &view->GLy2, 0, - 1); - expose_event(view->drawing_area, NULL, NULL); + + if ((view->activeGraph >= 0) && (GD_TopView(view->g[view->activeGraph]))) + { + if(view->Topview->is_top_fisheye) + { + GetFixedOGLPoslocal((int) event->x, (int) event->y,view->GLDepth, &(view->GLx2),&(view->GLy2), &(view->GLz2)); + changetopfishfocus(view->Topview, &view->GLx2, &view->GLy2, 0,1); + expose_event(view->drawing_area, NULL, NULL); + } + } } - } dx = 0.0; dy = 0.0; diff --git a/cmd/smyrna/gui/topviewsettings.c b/cmd/smyrna/gui/topviewsettings.c index 4d4534494..ad79aa354 100644 --- a/cmd/smyrna/gui/topviewsettings.c +++ b/cmd/smyrna/gui/topviewsettings.c @@ -334,7 +334,7 @@ int load_settings_from_graph(Agraph_t * g) /*select the right item in combo box */ gtk_combo_box_set_active((GtkComboBox *) glade_xml_get_widget(xml, - "settingscombobox1"), + "settingscombobox2"), atoi(buf)); } diff --git a/cmd/smyrna/smyrnadefs.h b/cmd/smyrna/smyrnadefs.h index 0c26dc8b5..0d8dec027 100644 --- a/cmd/smyrna/smyrnadefs.h +++ b/cmd/smyrna/smyrnadefs.h @@ -77,7 +77,7 @@ #define NODE_ZOOM_LIMIT -25.3 #define NODE_CIRCLE_LIMIT -7.3 -#define GL_DOTSIZE_CONSTANT -5 +#define GL_DOTSIZE_CONSTANT -18 #define SPHERE_SLICE_COUNT 6 diff --git a/cmd/smyrna/topview.c b/cmd/smyrna/topview.c index dafa4531c..347dd3142 100755 --- a/cmd/smyrna/topview.c +++ b/cmd/smyrna/topview.c @@ -156,7 +156,8 @@ void preparetopview(Agraph_t * g, topview * t) } else t->Nodes[ind].Label2 = '\0'; - maxlabelsize = maxlabelsize + strlen(t->Nodes[ind].Label); + if (t->Nodes[ind].Label) + maxlabelsize = maxlabelsize + strlen(t->Nodes[ind].Label); for (e = agfstout(g, v); e; e = agnxtout(g, e)) { @@ -266,9 +267,9 @@ static float set_gl_dot_size(topview * t) else dotsize = GL_DOTSIZE_CONSTANT / view->cameras[view->active_camera]->r*-1; - dotsize=dotsize * DOT_SIZE_CORRECTION_FAC; +// dotsize=dotsize * DOT_SIZE_CORRECTION_FAC; if (dotsize <=1) - dotsize=4; + dotsize=1; glPointSize(dotsize); return dotsize; @@ -500,7 +501,6 @@ static void drawtopviewedges(Agraph_t * g) } -#if 0 static int drawtopviewlabels(Agraph_t * g) { //drawing labels @@ -518,13 +518,12 @@ static int drawtopviewlabels(Agraph_t * g) return 0; } -#endif void drawTopViewGraph(Agraph_t * g) { drawtopviewnodes(g); -// drawtopviewlabels(g); + drawtopviewlabels(g); drawtopviewedges(g); enddrawcycle(g); @@ -820,7 +819,7 @@ int set_update_required(topview * t) } -#if 0 + static int draw_topview_label(topview_node * v, float zdepth) { @@ -833,27 +832,24 @@ static int draw_topview_label(topview_node * v, float zdepth) if ((v->distorted_x / view->zoom * -1 > view->clipX1) && (v->distorted_x / view->zoom * -1 < view->clipX2) && (v->distorted_y / view->zoom * -1 > view->clipY1) - && (v->distorted_y / view->zoom * -1 < view->clipY2)) { - - fs = (v->degree == - 1) ? (float) (log((double) v->degree + - 1) * - (double) 3) : (float) (log((double) v->degree + - (double) 0.5) * - (double) 3)*view->FontSize; + && (v->distorted_y / view->zoom * -1 < view->clipY2)) + { + fs = (v->degree ==1) ? + (float) (log((double) v->degree +1) *(double) 3) + : + (float) (log((double) v->degree +(double) 0.5) *(double) 3)*14; // fs=view->FontSize; fs = fs * v->zoom_factor; if (OD_Selected(v->Node) == 1) { ddx = dx; ddy = dy; } - if ((view->FontSize/view->zoom*-1) < 2) + if ((fs / view->zoom*-1) < 35) return 0; + fs= 10; - if ((view->FontSize/view->zoom*-1) > 10) - fs= 10; fontSize(view->fontset->fonts[view->fontset->activefont],(int) fs); @@ -861,21 +857,20 @@ static int draw_topview_label(topview_node * v, float zdepth) fontColorA(view->fontset->fonts[view->fontset->activefont],(float) log((double) v->degree + (double) 1), view->penColor.G, view->penColor.B, view->penColor.A / (float) log((double) v->degree) * - (float) -0.6 * (float) view->zoom); + (float) -0.4 * (float) view->zoom); else fontColorA(view->fontset->fonts[view->fontset->activefont],(float) log((double) v->degree + (double) 1), - view->penColor.G, view->penColor.B, 1); + view->penColor.G, view->penColor.B, 0.7); // fontColorA(0,0,0,1); fontDrawString(view->fontset->fonts[view->fontset->activefont],(int) (v->distorted_x - ddx), - (int) (v->distorted_y - ddy), - (int) (fs * strlen(v->Label)*0.7), v->Label); + (int) (v->distorted_y - ddy), (int) (fs * strlen(v->Label)*0.6),v->Label ); return 1; } else return 0; } -#endif + diff --git a/share/gui/Makefile.am b/share/gui/Makefile.am index 5e4182f80..56ac16a8c 100644 --- a/share/gui/Makefile.am +++ b/share/gui/Makefile.am @@ -2,11 +2,18 @@ # ## Process this file with automake to produce Makefile.in # -guidir = $(pkgdatadir)/smyrna -gui = smyrna.glade attrs.txt arial.tga template.dot +iconsdir = $(pkgdatadir)/smyrna +icons = add_edge.png AntiselectRect.png AntiselectRectX.png cursor.png \ + deletE_edge.png delete_node.png find_edge.png find_node.png \ + fit_to_screen.png hourglass.png magifier_zoom_out.png magnifier.png \ + magnifier_zoom_in.png move.png new_delete.png new_node.png \ + newzoom.png pan.png select.png selectx.png zoom_in.png \ + zoom_out.png zoom.png \ + fisheye.raw ok.raw ok2.raw ok3.raw pan.raw zoom.raw \ + zoomminus.raw zoomplus.raw rotate.raw if WITH_SMYRNA -gui_DATA = $(gui) +icons_DATA = $(icons) endif -EXTRA_DIST = $(gui) +EXTRA_DIST = $(icons) diff --git a/share/gui/attrs.txt b/share/gui/attrs.txt index 6b756f43e..e2c98860d 100755 --- a/share/gui/attrs.txt +++ b/share/gui/attrs.txt @@ -1,97 +1,97 @@ -F,"Damping", "0.99", GRAPH, NEATO -F,"Epsilon", "", GRAPH, NEATO -A,"URL", "", ANY_ELEMENT, ALL_ENGINES -A,"arrowhead", "normal", EDGE, ALL_ENGINES -F,"arrowsize", "1.0", EDGE, ALL_ENGINES -A,"arrowtail", "normal", EDGE, ALL_ENGINES -A,"bb", "", GRAPH, ALL_ENGINES -C,"bgcolor", "white", GRAPH Or CLUSTER, ALL_ENGINES -A,"bottomlabel", "", NODE, ALL_ENGINES -B,"center", "false", GRAPH, ALL_ENGINES -A,"clusterrank", "local", GRAPH, DOT -C,"color", "black", EDGE Or NODE Or CLUSTER, ALL_ENGINES -A,"comment", "", EDGE Or NODE Or GRAPH, ALL_ENGINES -B,"compound", "false", GRAPH, DOT -B,"concentrate", "false", GRAPH, DOT -B,"constraint", "true", EDGE, DOT -B,"decorate", "false", EDGE, ALL_ENGINES -D,"dir", "forward", EDGE, ALL_ENGINES,"Forward,Backward" -F,"distortion", "0.0", NODE, ALL_ENGINES -C,"fillcolor", "lightgrey", NODE Or CLUSTER, ALL_ENGINES -B,"fixedsize", "false", NODE, ALL_ENGINES -C,"fontcolor", "green", EDGE Or NODE Or GRAPH Or CLUSTER, ALL_ENGINES -A,"fontname", "Times-Roman", EDGE Or NODE Or GRAPH Or CLUSTER, ALL_ENGINES -A,"fontpath", "", GRAPH, ALL_ENGINES -I,"fontsize", "14.0", EDGE Or NODE Or GRAPH Or CLUSTER, ALL_ENGINES -A,"group", "", NODE, DOT -A,"headURL", "", EDGE, ALL_ENGINES -A,"headlabel", "", EDGE, ALL_ENGINES -A,"headport", "center", EDGE, ALL_ENGINES -F,"height", "0.5", NODE, ALL_ENGINES -A,"label", "", EDGE Or NODE Or GRAPH Or CLUSTER, ALL_ENGINES -F,"labelangle", "-25.0", EDGE, ALL_ENGINES -F,"labeldistance", "1.0", EDGE, ALL_ENGINES -B,"labelfloat", "false", EDGE, ALL_ENGINES -C,"labelfontcolor", "black", EDGE, ALL_ENGINES -A,"labelfontname", "Times-Roman", EDGE, ALL_ENGINES -I,"labelfontsize", "11.0", EDGE, ALL_ENGINES -A,"labeljust", "", ANY_ELEMENT, DOT -A,"labelloc", "t", GRAPH Or CLUSTER, DOT -A,"layer", "", EDGE Or NODE, ALL_ENGINES -A,"layers", "", GRAPH, ALL_ENGINES -F,"len", "1.0", EDGE, NEATO -A,"lhead", "", EDGE, DOT -A,"lp", "", EDGE Or GRAPH Or CLUSTER, ALL_ENGINES -A,"ltail", "", EDGE, DOT -F,"margin", "", GRAPH, ALL_ENGINES -I,"maxiter", "", GRAPH, NEATO -F,"mclimit", "1.0", GRAPH, DOT -I,"minlen", "1", EDGE, DOT -A,"model", "", GRAPH, NEATO -F,"nodesep", "0.25", GRAPH, DOT -B,"normalize", "false", GRAPH, NEATO -F,"nslimit", "", GRAPH, DOT -A,"ordering", "", GRAPH, DOT -F,"orientation", "0.0", NODE, ALL_ENGINES -A,"orientation", "", GRAPH, ALL_ENGINES -B,"overlap", "", GRAPH, NEATO -B,"pack", "false", GRAPH, NEATO -A,"page", "", GRAPH, ALL_ENGINES -A,"pagedir", "BL", GRAPH, ALL_ENGINES -C,"pencolor", "black", CLUSTER, ALL_ENGINES -I,"peripheries", "0", NODE, ALL_ENGINES -B,"pin", "false", NODE, NEATO -A,"pos", "", EDGE Or NODE, ALL_ENGINES -F,"quantum", "0.0", GRAPH, ALL_ENGINES -A,"rank", "", SUBGRAPH, DOT -A,"rankdir", "", GRAPH, DOT -F,"ranksep", "", GRAPH, ALL_ENGINES -F,"ratio", "", GRAPH, ALL_ENGINES -A,"rects", "", NODE, ALL_ENGINES -B,"regular", "false", NODE, ALL_ENGINES -B,"remincross", "false", GRAPH, DOT -I,"rotate", "0", GRAPH, ALL_ENGINES -A,"samehead", "", EDGE, DOT -A,"sametail", "", EDGE, DOT -I,"samplepoints", "8", GRAPH, ALL_ENGINES -I,"searchsize", "30", GRAPH, DOT -F,"sep", "0.01", GRAPH, NEATO -A,"shape", "ellipse", NODE, ALL_ENGINES -A,"shapefile", "", NODE, ALL_ENGINES -I,"showboxes", "0", EDGE Or NODE Or GRAPH, DOT -I,"sides", "4", NODE, ALL_ENGINES -F,"size", "", GRAPH, ALL_ENGINES -F,"skew", "0.0", NODE, ALL_ENGINES -B,"splines", "false", GRAPH, NEATO -A,"start", "", GRAPH, ALL_ENGINES -A,"style", "", EDGE Or NODE, ALL_ENGINES -A,"stylesheet", "", GRAPH, ALL_ENGINES -A,"tailURL", "", EDGE, ALL_ENGINES -A,"taillabel", "", EDGE, ALL_ENGINES -A,"tailport", "center", EDGE, ALL_ENGINES -A,"toplabel", "", NODE, ALL_ENGINES -A,"vertices", "", NODE, ALL_ENGINES -F,"voro_margin", "0.05", GRAPH, NEATO -F,"weight", "", EDGE, DOT Or NEATO -F,"width", "0.75", NODE, ALL_ENGINES -F,"z", "0.0", NODE, ALL_ENGINES +F,Damping, 0.99, GRAPH, NEATO +F,Epsilon, , GRAPH, NEATO +A,URL, , ANY_ELEMENT, ALL_ENGINES +A,arrowhead, normal, EDGE, ALL_ENGINES +F,arrowsize, 1.0, EDGE, ALL_ENGINES +A,arrowtail, normal, EDGE, ALL_ENGINES +A,bb, , GRAPH, ALL_ENGINES +C,bgcolor, white, GRAPH Or CLUSTER, ALL_ENGINES +A,bottomlabel, , NODE, ALL_ENGINES +B,center, false, GRAPH, ALL_ENGINES +A,clusterrank, local, GRAPH, DOT +C,color, black, EDGE Or NODE Or CLUSTER, ALL_ENGINES +A,comment, , EDGE Or NODE Or GRAPH, ALL_ENGINES +B,compound, false, GRAPH, DOT +B,concentrate, false, GRAPH, DOT +B,constraint, true, EDGE, DOT +B,decorate, false, EDGE, ALL_ENGINES +D,dir, forward, EDGE, ALL_ENGINES,Forward,Backward +F,distortion, 0.0, NODE, ALL_ENGINES +C,fillcolor, lightgrey, NODE Or CLUSTER, ALL_ENGINES +B,fixedsize, false, NODE, ALL_ENGINES +C,fontcolor, green, EDGE Or NODE Or GRAPH Or CLUSTER, ALL_ENGINES +A,fontname, Times-Roman, EDGE Or NODE Or GRAPH Or CLUSTER, ALL_ENGINES +A,fontpath, , GRAPH, ALL_ENGINES +I,fontsize, 14.0, EDGE Or NODE Or GRAPH Or CLUSTER, ALL_ENGINES +A,group, , NODE, DOT +A,headURL, , EDGE, ALL_ENGINES +A,headlabel, , EDGE, ALL_ENGINES +A,headport, center, EDGE, ALL_ENGINES +F,height, 0.5, NODE, ALL_ENGINES +A,label, , EDGE Or NODE Or GRAPH Or CLUSTER, ALL_ENGINES +F,labelangle, -25.0, EDGE, ALL_ENGINES +F,labeldistance, 1.0, EDGE, ALL_ENGINES +B,labelfloat, false, EDGE, ALL_ENGINES +C,labelfontcolor, black, EDGE, ALL_ENGINES +A,labelfontname, Times-Roman, EDGE, ALL_ENGINES +I,labelfontsize, 11.0, EDGE, ALL_ENGINES +A,labeljust, , ANY_ELEMENT, DOT +A,labelloc, t, GRAPH Or CLUSTER, DOT +A,layer, , EDGE Or NODE, ALL_ENGINES +A,layers, , GRAPH, ALL_ENGINES +F,len, 1.0, EDGE, NEATO +A,lhead, , EDGE, DOT +A,lp, , EDGE Or GRAPH Or CLUSTER, ALL_ENGINES +A,ltail, , EDGE, DOT +F,margin, , GRAPH, ALL_ENGINES +I,maxiter, , GRAPH, NEATO +F,mclimit, 1.0, GRAPH, DOT +I,minlen, 1, EDGE, DOT +A,model, , GRAPH, NEATO +F,nodesep, 0.25, GRAPH, DOT +B,normalize, false, GRAPH, NEATO +F,nslimit, , GRAPH, DOT +A,ordering, , GRAPH, DOT +F,orientation, 0.0, NODE, ALL_ENGINES +A,orientation, , GRAPH, ALL_ENGINES +B,overlap, , GRAPH, NEATO +B,pack, false, GRAPH, NEATO +A,page, , GRAPH, ALL_ENGINES +A,pagedir, BL, GRAPH, ALL_ENGINES +C,pencolor, black, CLUSTER, ALL_ENGINES +I,peripheries, 0, NODE, ALL_ENGINES +B,pin, false, NODE, NEATO +A,pos, , EDGE Or NODE, ALL_ENGINES +F,quantum, 0.0, GRAPH, ALL_ENGINES +A,rank, , SUBGRAPH, DOT +A,rankdir, , GRAPH, DOT +F,ranksep, , GRAPH, ALL_ENGINES +F,ratio, , GRAPH, ALL_ENGINES +A,rects, , NODE, ALL_ENGINES +B,regular, false, NODE, ALL_ENGINES +B,remincross, false, GRAPH, DOT +I,rotate, 0, GRAPH, ALL_ENGINES +A,samehead, , EDGE, DOT +A,sametail, , EDGE, DOT +I,samplepoints, 8, GRAPH, ALL_ENGINES +I,searchsize, 30, GRAPH, DOT +F,sep, 0.01, GRAPH, NEATO +A,shape, ellipse, NODE, ALL_ENGINES +A,shapefile, , NODE, ALL_ENGINES +I,showboxes, 0, EDGE Or NODE Or GRAPH, DOT +I,sides, 4, NODE, ALL_ENGINES +F,size, , GRAPH, ALL_ENGINES +F,skew, 0.0, NODE, ALL_ENGINES +B,splines, false, GRAPH, NEATO +A,start, , GRAPH, ALL_ENGINES +A,style, , EDGE Or NODE, ALL_ENGINES +A,stylesheet, , GRAPH, ALL_ENGINES +A,tailURL, , EDGE, ALL_ENGINES +A,taillabel, , EDGE, ALL_ENGINES +A,tailport, center, EDGE, ALL_ENGINES +A,toplabel, , NODE, ALL_ENGINES +A,vertices, , NODE, ALL_ENGINES +F,voro_margin, 0.05, GRAPH, NEATO +F,weight, , EDGE, DOT Or NEATO +F,width, 0.75, NODE, ALL_ENGINES +F,z, 0.0, NODE, ALL_ENGINES diff --git a/share/gui/smyrna.glade b/share/gui/smyrna.glade index ab451d049..d20ac54c6 100755 --- a/share/gui/smyrna.glade +++ b/share/gui/smyrna.glade @@ -1,6 +1,6 @@ - + 470 @@ -1114,7 +1114,7 @@ topview True - page 4 + Layout tab @@ -1210,6 +1210,7 @@ topview True zoom + + False @@ -1219,6 +1220,7 @@ topview True zoom - + False @@ -1267,6 +1269,7 @@ topview True move + False @@ -1330,26 +1333,10 @@ topview True - - True - Smyrna Console - - - False - False - + - - 49 - True - True - False - vgnvnvnvbnbvnb - - - 1 - + -- 2.40.0