static void SetFont(xdot_op * op, int param)
{
//activate the right font
- view->fontset->activefont=add_font(view->fontset,op->u.font.name);//load or set active font
+ view->widgets->fontset->activefont=add_font(view->widgets->fontset,op->u.font.name);//load or set active font
view->FontSize = op->u.font.size;
}
x = (GLfloat) op->u.text.x;
if (op->u.text.align == -1)
x = (GLfloat) op->u.text.x + op->u.text.width;
- view->fontset->fonts[view->fontset->activefont]->fontheight=view->FontSize;
+ view->widgets->fontset->fonts[view->widgets->fontset->activefont]->fontheight=view->FontSize;
if (param == 0)
- fontColor(view->fontset->fonts[view->fontset->activefont],view->penColor.R, view->penColor.G, view->penColor.B,1);
+ fontColor(view->widgets->fontset->fonts[view->widgets->fontset->activefont],view->penColor.R, view->penColor.G, view->penColor.B,1);
if (param == 1) //selected
- fontColor(view->fontset->fonts[view->fontset->activefont],view->selectedNodeColor.R, view->selectedNodeColor.G,
+ fontColor(view->widgets->fontset->fonts[view->widgets->fontset->activefont],view->selectedNodeColor.R, view->selectedNodeColor.G,
view->selectedNodeColor.B,1);
- glprintf(view->fontset->fonts[view->fontset->activefont], (x - dx), (GLfloat)op->u.text.y - dy,
+ glprintf(view->widgets->fontset->fonts[view->widgets->fontset->activefont], (x - dx), (GLfloat)op->u.text.y - dy,
(GLfloat)op->u.text.width, op->u.text.text);
}
op->obj = p;
if (op->op.kind==xd_font)
{
- add_font(view->fontset,op->op.u.font.name);//load or set active font
+ add_font(view->widgets->fontset,op->op.u.font.name);//load or set active font
}
}
glEnable(GL_TEXTURE_2D);
glTexEnvf (GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
// glTexEnvf(GL_TEXTURE_ENV,GL_TEXTURE_ENV_MODE , GL_DECAL);
- glBindTexture(GL_TEXTURE_2D,view->fontset->fonts[view->fontset->activefont]->texId);
+ glBindTexture(GL_TEXTURE_2D,view->widgets->fontset->fonts[view->widgets->fontset->activefont]->texId);
glColor3f(1,0,0);
glBegin(GL_POLYGON);
glTexCoord2f(0.0,0.0);glVertex3f(0.0,0.0,0.0);
// glCompDrawBegin();
// OtkUpdateCheck();
// glCompDrawEnd();
- glCompSetDraw(view->Topview->topviewmenu);
// OtkDrawAll_scene( 0);
}
else
drawGraph(view->g[view->activeGraph]); //xdot based drawing functions
+ glCompSetDraw(view->widgets);
return 1;
}
return 0;
smyrna_font = smyrnaPath("arial.tga");
#endif
- add_font(view->fontset,"Times 14");//wired in default font
/*** OpenGL BEGIN ***/
if (!gdk_gl_drawable_gl_begin(gldrawable, glcontext))
return;
{
if (view->graphCount)
{
- if (glCompSetClick(view->Topview->topviewmenu, (int) event->x, (int) event->y))
+ if (glCompSetClick(view->widgets, (int) event->x, (int) event->y))
expose_event(view->drawing_area, NULL, NULL);
}
if (event->button == 1) //left click release
{
if (glCompSetRelease
- (view->Topview->topviewmenu, (int) event->x_root,
+ (view->widgets, (int) event->x_root,
(int) event->y_root)) {
expose_event(view->drawing_area, NULL, NULL); }
view->mouse.mouse_down = 0;
*/
gdk_gl_query_version(&major, &minor);
- g_print("\nOpenGL extension version - %d.%d\n", major, minor);
/* Try double-buffered visual */
if (!view->SignalBlock) {
- active_graph = gtk_combo_box_get_active((GtkComboBox *) widget);
+ active_graph = gtk_combo_box_get_active((GtkComboBox*) widget);
if (active_graph > -1) {
view->activeGraph = active_graph;
//check if the engine has been changed, if so do new layout
- if (GD_Engine(graph) != gtk_combo_box_get_active((GtkComboBox *)
+/* if (GD_Engine(graph) != gtk_combo_box_get_active((GtkComboBox *)
glade_xml_get_widget(xml, "cbLayout"))) {
Dlg =
(GtkMessageDialog *) gtk_message_dialog_new(NULL,
(xml, "cbLayout")),
0);
gtk_object_destroy((GtkObject *) Dlg);
- }
+ }*/
return 1;
}
set_color_button_widget("topologicaltopviewcoarsestcolor",
"settingsColorBtn9");
- set_color_button_widget("topologicaltopviewfinestcolor",
+ set_color_button_widget("topologicalfisheyefinestcolor",
"settingsColorBtn10");
- set_color_button_widget("topologicaltopviewcoarsestcolor ",
+ set_color_button_widget("topologicalfisheyecoarsestcolor",
"settingsColorBtn11");
/>
<Tool
Name="VCLinkerTool"
- AdditionalDependencies="mspng.lib gtk-win32-2.0.lib asprintf.lib atk-1.0.lib bz2.lib cairo.lib charset.lib croco-0.6.lib expat.lib expatw.lib glade-2.0.lib fontconfig.lib freetype.lib gdk_pixbuf-2.0.lib gdkglext-win32-1.0.lib gdk-win32-2.0.lib glib-2.0.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 iconv.lib intl.lib jpeg.lib libexpat.lib libexpatw.lib pango-1.0.lib pangocairo-1.0.lib pangoft2-1.0.lib pangowin32-1.0.lib popt.lib rsvg-2.lib tiff.lib xml2.lib libgdkglext-win32-1.0.dll.a libgtkglext-win32-1.0.dll.a glu32.lib opengl32.lib ltdl.lib hs_regex.lib zdll.lib gladeui-1.lib glcomp.lib cgraph.lib gvc.lib xdot.lib topfish.lib ingraphs.lib neatogen.lib gts.lib $(NOINHERIT)"
+ AdditionalDependencies="mspng.lib gtk-win32-2.0.lib asprintf.lib atk-1.0.lib bz2.lib cairo.lib charset.lib croco-0.6.lib expat.lib expatw.lib glade-2.0.lib fontconfig.lib freetype.lib gdk_pixbuf-2.0.lib gdkglext-win32-1.0.lib gdk-win32-2.0.lib glib-2.0.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 iconv.lib intl.lib jpeg.lib libexpat.lib libexpatw.lib pango-1.0.lib pangocairo-1.0.lib pangoft2-1.0.lib pangowin32-1.0.lib popt.lib rsvg-2.lib tiff.lib xml2.lib libgdkglext-win32-1.0.dll.a libgtkglext-win32-1.0.dll.a glu32.lib opengl32.lib ltdl.lib regex_win32.lib zdll.lib gladeui-1.lib glcomp.lib cgraph.lib gvc.lib xdot.lib topfish.lib ingraphs.lib neatogen.lib gts.lib $(NOINHERIT)"
OutputFile="c:/graphviz-ms/bin/$(ProjectName).exe"
LinkIncremental="2"
AdditionalLibraryDirectories="C:\glade_setup\lib;"C:\graphviz-ms\bin";C:\gtk\lib;C:\GnuWin32\lib;"C:\Projects\graphviz2\lib\zlib-1.2.3\lib";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"
int Nodecount;
int Edgecount;
int limits[4];
- glCompSet *topviewmenu; //for novice user open gl menu
topviewdata *TopviewData;
void *customptr;
Hierarchy *h;
gvk_layout dfltEngine;
GtkTextBuffer* consoleText;
float FontSizeConst;
- fontset_t* fontset;
+ glCompSet *widgets; //for novice user open gl menu
+
} ViewInfo;
extern ViewInfo *view;
if((v==t->fs->foci_nodes[0]) &&(focusnodes))
{
glColor4f((float)0, (float)0, (float)1, (float)1);
- view->fontset->fonts[view->fontset->activefont]->fontheight=fs;
glprintfglut(GLUT_BITMAP_HELVETICA_18,gg[v].physical_x_coord,gg[v].physical_y_coord,buf);
}
else if (finenodes)
{
glColor4f(0, 0, 0, 1);
- view->fontset->fonts[view->fontset->activefont]->fontheight=fs;
glprintfglut(GLUT_BITMAP_HELVETICA_10,gg[v].physical_x_coord,gg[v].physical_y_coord,buf);
}
}
static float dz = 0.0;
/* Forward declarations */
-static glCompSet *glcreate_gl_topview_menu(void);
+glCompSet *glcreate_gl_topview_menu(void);
static void set_boundaries(topview * t);
static void set_topview_options(void);
static int draw_topview_label(topview_node * v, float zdepth);
free(t->Nodes);
/*clear edges */
free(t->Edges);
- /*clear gl menu */
- glCompSetClear(t->topviewmenu);
free(t);
}
t->Nodes = N_GNEW(agnnodes(g), topview_node);
- printf("# of edges :%i\n", agnnodes(g));
- printf("# of edges :%i\n", agnedges(g));
/* malloc topviewdata */
t->TopviewData = NEW(topviewdata);
}
ind++;
}
- t->Nodecount = ind;
+ view->widgets =glcreate_gl_topview_menu();
+// view->widgets->fontset = fontset_init();
+// add_font(view->widgets->fontset,"Times 14");//wired in default font
+
+ t->Nodecount = ind;
t->Edgecount = ind2;
view->fmg.fisheye_distortion_fac = 5; //need to be hooked to a widget
set_boundaries(t);
set_update_required(t);
- t->topviewmenu = glcreate_gl_topview_menu();
//set componenet set's font with already loaded default font.This will be inherited by all components added to this set as default
attach_camera_widget(view);
- load_host_buttons(t, g, t->topviewmenu);
+ load_host_buttons(t, g, view->widgets);
t->h = '\0';
if (view->dfltViewType == VT_TOPFISH)
t->is_top_fisheye = 1;
t->picked_node_count = 0;
t->picked_nodes = '\0';
+
+
}
/*
this function calculates and sets node size(opengl dots, they are squares not a dots
(GLfloat) fs,agnameof(view->Topview->picked_nodes[ind]->Node)
)
;
- view->fontset->fonts[view->fontset->activefont]->fontheight=fs;
+ view->widgets->fontset->fonts[view->widgets->fontset->activefont]->fontheight=fs;
/*blue font color*/
// fontwidth=GetOGLDistance(glutBitmapLength(GLUT_BITMAP_HELVETICA_12,agnameof(view->Topview->picked_nodes[ind]->Node)));
glColor4f(0, 0, 1, 1);
static char *smyrna_icon_fisheye;
static char *smyrna_icon_rotate;
-static glCompSet *glcreate_gl_topview_menu(void)
+glCompSet *glcreate_gl_topview_menu(void)
{
glCompSet *s = glCompSetNew();
glCompPanel *p;
glCompButton *b;
glCompLabel *l;
+ s->fontset=fontset_init();
+ /*add a glut font*/
+ add_glut_font(s->fontset,GLUT_BITMAP_HELVETICA_12);
+ s->fontset->activefont=0;
- copy_font(s->font,view->fontset->fonts[view->fontset->activefont]);
/* GtkRequisition requisition; *//* What??*/
if (!smyrna_icon_pan) {
#ifdef _WIN32
{
gvcolor_t cl;
char *buf;
-#if 0
- graph[antialiasing = 1,
- bgcolor = "#ffffff",
- bordercolor = "#38eb29",
- bordercoloralpha = "1",
- bordervisible = "1",
- defaultfontname = "1",
- defaultfontsize = "52",
- gridcolor = "#6033d8",
- gridcoloralpha = "1",
- gridvisible = "1",
- highlightededgecolor = "#c41b50",
- highlightededgecoloralpha = "1",
- highlightednodecolor = "#d1cd24",
- highlightednodecoloralpha = "1",
- defaultlinewidth = "1"
- nodesizewithdegree = "1",
- randomizeedgecolors = "1",
- randomizenodecolors = "1",
- selectededgecolor = "#ffc0cb",
- selectededgecoloralpha = "1",
- selectednodecolor = "#8ce61d",
- selectednodecoloralpha = "1",
- gridcoloralpha = "1",
- defaultmagnifierwidth = "300",
- defaultmagnifierheight = "200",
- defaultmagnifierkts = "5",
- defaultfisheyemagnifierradius = "250"
- defaultfisheyemagnifierdistort = "5",
- usermode = "1",
- topologicalfisheyefinenodes = "50",
- topologicalfisheyecoarseningfactor = "2.5",
- topologicalfisheyedistortionfactor = "1",
- topologicalfisheyedist2limit = "1",
- topologicalfisheyeanimate = "1",
- topologicalfisheyelabelfinenodes = "1",
- topologicalfisheyecolornodes = "1",
- topologicalfisheyecoloredges = "1",
- topologicalfisheyelabelfocus = "1",
- topologicalfisheyefinestcolor = "red",
- topologicalfisheyecoarsestcolor = "green",
- drawnodes="1",
- drawedges="1"]
- ;
-
-
-
-
- border color
-#endif
colorxlate(get_attribute_value("bordercolor", view, g), &cl,
RGBA_DOUBLE);
view->borderColor.R = (float) cl.u.RGBA[0];
view->frame_length=1;
/*add a call back to the main()*/
g_timeout_add_full((gint)G_PRIORITY_DEFAULT,(guint)100,gl_main_expose,NULL,NULL);
- view->Topview->topviewmenu = '\0';
view->cameras='\0';;
view->camera_count=0;
view->active_camera=-1;
view->dfltEngine = GVK_NONE;
//create fontset
- view->fontset = fontset_init();
}
view->g[view->graphCount - 1] = graph;
view->activeGraph = view->graphCount - 1;
//GUI update , graph combo box on top-right should be updated
- load_settings_from_graph(view->default_attributes);
+ 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]);
refreshControls(view);
return 1;
} else
char buf[256];
glCompPanel *p;
glCompButton *b;
- glCompSet *s = view->Topview->topviewmenu;
+ glCompSet *s = view->widgets;
int p_height;
/*first we need to get rid of the old menu */
for (ind = 0; ind < s->panelcount; ind++) {