]> granicus.if.org Git - graphviz/commitdiff
smyna Makefile.am update, and add a missing header
authorellson <devnull@localhost>
Tue, 26 Feb 2008 17:33:55 +0000 (17:33 +0000)
committerellson <devnull@localhost>
Tue, 26 Feb 2008 17:33:55 +0000 (17:33 +0000)
cmd/smyrna/Makefile.am
cmd/smyrna/smyrnadefs.h [new file with mode: 0644]
lib/filter/Makefile.am
lib/gui/Makefile.am
lib/utilities/Makefile.am
lib/xdot/Makefile.am

index 1b2bb6be32231ce5dbc137d229837d364fba58cc..37cb8dfc8752814ee8e16dac5a85b78763dbfef7 100644 (file)
@@ -1,31 +1,36 @@
-gladedir = $(datadir)/gtktopview/glade
-fontsdir = $(datadir)/gtktopview/fonts
-icondir = $(datadir)/gtktopview/icons
+guidir = $(pkgdatadir)/gui
+icondir = $(pkgdatadir)/icons
 
 AM_CPPFLAGS = \
-       -DGTKTOPVIEW_GLADE=\""$(gladedir)/gtktopview.glade"\" \
-       -DGTKTOPVIEW_FONT=\""$(fontsdir)/arial.tga"\" \
-       -DGTKTOPVIEW_ICONSDIR=\""$(iconsdir)"\" \
+       -DSMYRNA_GLADE=\""$(guidir)/smyrna.glade"\" \
+       -DSMYRNA_FONT=\""$(guidir)/arial.tga"\" \
+       -DSMYRNA_ICONSDIR=\""$(iconsdir)"\" \
         -I$(top_srcdir) \
         -I$(top_srcdir)/lib/cgraph \
         -I$(top_srcdir)/lib/cdt \
         -I$(top_srcdir)/lib/filter \
         -I$(top_srcdir)/lib/utilities \
         -I$(top_srcdir)/lib/xdot \
-        -I$(top_srcdir)/lib/GUI \
+        -I$(top_srcdir)/lib/topfish \
+        -I$(top_srcdir)/lib/gui \
         -I$(top_srcdir)/lib/common \
        $(GTK_CFLAGS) $(GTKGLEXT_CFLAGS) $(GLADE_CFLAGS) $(FREETYPE2_CFLAGS) $(FONTCONFIG_CFLAGS)
 
-noinst_HEADERS = draw.h glTemplate.h materials.h support.h topview.h trackball.h tvnodes.h viewport.h
-bin_PROGRAMS = gtktopview
+if WITH_SMYRNA
+noinst_HEADERS = draw.h glTemplate.h hier.h materials.h support.h topview.h \
+       trackball.h tvnodes.h viewport.h smyrnadefs.h
+bin_PROGRAMS = smyrna
+endif
 
-gtktopview_SOURCES = topview.c viewport.c draw.c glTemplate.c main.c support.c template.c trackball.c tvnodes.c
+smyrna_SOURCES = draw.c glTemplate.c hier.c main.c support.c template.c \
+       topview.c trackball.c tvnodes.c viewport.c
 
-gtktopview_LDADD = $(top_builddir)/lib/cgraph/libcgraph_C.la \
+smyrna_LDADD = $(top_builddir)/lib/cgraph/libcgraph_C.la \
                $(top_builddir)/lib/cdt/libcdt_C.la \
                $(top_builddir)/lib/utilities/libutilities_C.la \
                $(top_builddir)/lib/xdot/libxdot_C.la \
+               $(top_builddir)/lib/topfish/libtopfish_C.la \
                $(top_builddir)/lib/filter/libfilter_C.la \
-               $(top_builddir)/lib/GUI/libGUI_C.la \
+               $(top_builddir)/lib/gui/libgui_C.la \
                $(top_builddir)/lib/common/libcommon_C.la \
                $(GTK_LIBS) $(GTKGLEXT_LIBS) $(GLADE_LIBS) $(EXPAT_LIBS)
diff --git a/cmd/smyrna/smyrnadefs.h b/cmd/smyrna/smyrnadefs.h
new file mode 100644 (file)
index 0000000..bb94afd
--- /dev/null
@@ -0,0 +1,306 @@
+#ifndef SMYRNADEFS_H
+#define SMYRNADEFS_H
+
+#include "windows.h"
+#include <gtk/gtk.h>
+#include "cgraph.h"
+#include <GL/gl.h>
+#include <GL/glu.h>    
+#include <gtk/gtkgl.h>
+#include "glCompset.h"
+
+#define IS_TEST_MODE_ON                                0
+#define        DEFAULT_MAGNIFIER_WIDTH         300
+#define        DEFAULT_MAGNIFIER_HEIGHT        225
+#define DEFAULT_MAGNIFIER_KTS          3       //x3
+#define DEFAULT_FISHEYE_MAGNIFIER_RADIUS 250;
+#define TOP_VIEW_USER_ADVANCED_MODE    0
+#define TOP_VIEW_USER_NOVICE_MODE      1
+
+#define MAX_ZOOM       -1.000033
+#define MIN_ZOOM       -89.00000
+#define ZOOM_STEP      5
+#define DEG2RAD  G_PI/180
+
+#define UNHIGHLIGHTED_ALPHA    0.3
+#define Z_FORWARD_PLANE -0.00201
+#define Z_BACK_PLANE -0.00199
+
+#define NODE_ZOOM_LIMIT        -25.3
+#define NODE_CIRCLE_LIMIT      -7.3
+
+
+
+typedef struct{
+       float R;
+       float G;
+       float B;
+       float A;        //Alpha
+} RGBColor;
+typedef struct {
+       GtkButton** gtkhostbtn;
+       int gtkhostbtncount;
+       GtkColorButton** gtkhostcolor;
+       int hostactive[50];     //temporary static, convert to dynamic,realloc
+       char** hostregex;
+} topviewdata;
+typedef struct{
+       Agnode_t* Node;
+       /*original coordinates*/
+       float x;
+       float y;
+       float z;
+       /*coordinates to draw*/
+       float distorted_x;              
+       float distorted_y;
+       float distorted_z;
+       float zoom_factor;
+       int in_fish_eye;        //boolean value if to apply fisheye
+       RGBColor Color;
+       RGBColor GroupColor;
+       int GroupIndex; //default -1;
+       int update_required;
+       char* Label;
+       char* Label2;
+       int degree;
+       float node_alpha;
+       int valid;
+}topview_node;
+
+typedef struct{
+       Agnode_t* Tnode;        //Tail node
+       Agnode_t* Hnode;        //Tail node
+       Agedge_t *Edge;         //edge itself
+       GLfloat x1;
+       GLfloat y1;
+       GLfloat z1;
+       GLfloat x2;
+       GLfloat y2;
+       GLfloat z2;
+       topview_node* Node1;
+       topview_node* Node2;
+       RGBColor Color;
+       int update_required;
+
+}topview_edge;
+typedef struct {
+       topview_node* Nodes;
+       topview_edge* Edges;
+       int Nodecount;
+       int Edgecount;
+       int limits[4];
+       glCompSet* topviewmenu; //for novice user open gl menu
+       topviewdata* TopviewData;
+} topview;
+enum
+{
+  COL_NAME = 0,
+  COL_FILENAME,
+  NUM_COLS
+} ;
+//atributes
+typedef struct _mouse_attr
+{
+       int mouse_down;
+       int mouse_mode;
+       int mouse_X;
+       int mouse_Y;
+}mouse_attr;
+
+
+typedef struct _attribute
+{
+       char Type;
+       char* Name;
+       char* Default;
+       char ApplyTo[4];
+       char Engine[5];
+       char** ComboValues;
+       int ComboValuesCount;
+       GtkWidget* attrWidget;
+
+}attribute;
+
+//bind this to cgraph g
+typedef struct _custom_graph_data
+{
+       Agrec_t h;
+       char* GraphName;
+       char* GraphFileName;
+       int AlwaysShow; //active or not draw it 
+       int TopView;    //default 0, 1 for topview data, dots and lines
+       int Locked;
+       int Engine;     //enum GVEngine{DOT,NEATO,TWOPI,CIRCO,FDP};
+       //graph's location, change these to move the whole graph
+       int Modified;   //if graph has been modified after loading
+       float offsetx;
+       float offsety;
+       float offsetz;
+
+       Agraph_t** selectedGraphs;              //clusters , subgraphs indeed
+       Agnode_t** selectedNodes;
+       Agedge_t** selectedEdges;
+
+       int selectedGraphsCount;
+       int selectedNodesCount;
+       int selectedEdgesCount;
+} custom_graph_data;
+
+
+
+enum GEunit{GEpixels,GEinches,GEmm};
+
+
+typedef struct _custom_object_data             //has to be attached to every Node, Edge, Graph and cluster
+{
+       Agrec_t h;
+       int ID;
+       char* ObjName;
+       int ObjType;
+       int Layer;
+       int Visible;
+       int Locked;
+       int Highlighted;
+       int Selected;
+       int Preselected;
+       int NumDataCount;
+       float* NumData;
+       int StrDataCount;
+       char** StrData;
+       int selectionflag;
+       int param;              //generic purpose param
+       int TVRef;              //Topview reference
+
+}custom_object_data;
+
+typedef struct _selection
+{
+       int Active;             //0 there is no selection need to be applied
+       char Type;              //0     single selection , 1 rectangle , 2 rectangleX 
+       float X,Y,W,H;  //selection boundries
+       int Anti;       //subtract selections if 1
+       int AlreadySelected; //for single selections to avoid selecting more than one object
+       RGBColor SelectionColor;
+
+}selection;
+typedef struct _magnifier
+{
+       float x,y;
+       float kts;      //zoom X
+       float GLwidth,GLheight;
+       int width,height;       //how big is the magnifier referenced from windows
+       int active;
+} magnifier;
+
+typedef struct _fisheye_magnifier
+{
+       float x,y;//center coords of active circle
+       float distortion_factor;        //distortion factor ,default 1
+       int R;  //radius of  the magnifier referenced from windows
+       int active;
+       int fisheye_distortion_fac;
+} fisheye_magnifier;
+
+typedef struct _ViewInfo
+{
+       /*view variables*/
+       float panx;
+       float pany;
+       float panz;
+       float prevpanx;
+       float prevpany;
+       float prevpanz;
+       float zoom;
+
+       /*clipping coordinates, to avoid unnecesarry rendering*/
+       float clipX1,clipX2,clipY1,clipY2,clipZ1,clipZ2;
+
+       /*background color*/
+       RGBColor bgColor;
+       /*default pen color*/
+       RGBColor penColor;
+       /*default fill color*/
+       RGBColor fillColor;
+       /*selection color, selected items appear in this color*/
+       RGBColor selectColor;
+       /*grid color*/
+       RGBColor gridColor;     //grid color
+
+       /*default line width*/
+       float LineWidth;
+       
+       /*grid is drawn if this variable is 1*/
+       int gridVisible;        
+       /*grid cell size in gl coords system*/
+       float gridSize; //grid cell size
+
+       /*draws a border in border colors if it is 1*/
+       int bdVisible;  //if borders are visible (boundries of the drawing,
+       /*border color*/
+       RGBColor borderColor;
+       /*border coordinates, needs to be calculated for each graph*/
+       float bdxLeft,bdyTop,bdzTop;    
+       float bdxRight,bdyBottom,bdzBottom; 
+
+       /*reserved , not being used yet*/
+       enum GEunit unit;       //default pixels :0  
+
+       /*variable to hold mouse coordinates temporarily*/
+       float GLx,GLy,GLz;              
+       /*this is second  set of mouse coordinates holder for, it is needed to draw a rectangle with mouse*/
+       float GLx2,GLy2,GLz2;           
+
+       /*screen window size in 2d*/    
+       int w,h;
+       /*graph pointer to hold loaded graphs*/
+       Agraph_t** g;
+       /*number of graphs loaded*/
+       int graphCount;         
+       /*active graph*/
+       int activeGraph; 
+
+       /**/
+       int FontSize;
+       /*texture data*/
+       int texture;    /*1 texturing enabled, 0 disabled*/     
+       /*opengl depth value to convert mouse to GL coords*/
+       float GLDepth;          
+
+       /*stores the info about status of mouse,pressed? what button ? where?*/
+       mouse_attr mouse;
+
+       /*selection object,refer to smyrnadefs.h for more info*/
+       selection Selection;
+
+       /*rectangular magnifier object*/
+       magnifier mg;
+       /*fisheye magnifier object*/
+       fisheye_magnifier fmg;
+
+       /*data attributes are read from graph's attributes DataAttribute1 and DataAttribute2*/
+       char* node_data_attribute1;     /*for topview graphs this is the node data attribute to put as label*/
+       char* node_data_attribute2;     /*for topview graphs this is the node data attribute to be stored and used for something else*/
+
+       /*0 advanced users with editing options 1 nonice users just navigate (glmenu system)*/
+       int topviewusermode;    
+       
+       /*open gl canvas, used to be a globa variable before looks better wrapped in viewinfo*/
+       GtkWidget *drawing_area; 
+
+       /*some boolean variable for variety hacks used in the software*/
+       int SignalBlock;
+
+       /*Topview data structure, refer topview.h for more info*/
+       topview* Topview;
+}ViewInfo;
+
+extern ViewInfo*       view;
+extern GtkMessageDialog*  Dlg;
+extern int respond;
+
+extern void glexpose();
+
+
+
+
+#endif
index 565f157d597f3c6c6267457f988b88f16f89ac9d..462f4107401fcce6375236353fa657dc9d3385f0 100644 (file)
@@ -4,18 +4,20 @@
 AM_CPPFLAGS = \
        -I$(top_srcdir) \
        -I$(top_srcdir)/lib/utilities \
-       -I$(top_srcdir)/lib/GUI \
-       -I$(top_srcdir)/cmd/gtktopview \
+       -I$(top_srcdir)/lib/gui \
+       -I$(top_srcdir)/lib/topfish \
+       -I$(top_srcdir)/cmd/smyrna \
        -I$(top_srcdir)/lib/xdot \
        -I$(top_srcdir)/lib/cgraph \
        -I$(top_srcdir)/lib/cdt \
        $(GTK_CFLAGS) $(GTKGL_CFLAGS) $(GTKGLEXT_CFLAGS) $(GLADE_CFLAGS) $(FREETYPE2_CFLAGS)
 
+if WITH_SMYRNA
 noinst_HEADERS = \
        btree.h filter.h 
 
 noinst_LTLIBRARIES = libfilter_C.la
+endif
 
 libfilter_C_la_SOURCES = \
        Filter.c btree.c
-
index eb69687bc45ede7b79c4e227dd4d17cf441d26cc..3575de0cd8030b3f29fb3e98a3c922ea59c31e67 100644 (file)
@@ -2,22 +2,25 @@
 # ## Process this file with automake to produce Makefile.in
 #
 
-gladedir = $(datadir)/gtktopview/glade
+guidir = $(pkgdatadir)/gui
 
 AM_CPPFLAGS = \
-       -DGTKTOPVIEW_GLADE=\""$(gladedir)/gtktopview.glade"\" \
-       -DGTKTOPVIEW_ATTRS=\""$(gladedir)/attrs.txt"\" \
+       -DSMYRNA_GLADE=\""$(guidir)/smyrna.glade"\" \
+       -DSMYRNA_ATTRS=\""$(guidir)/attrs.txt"\" \
        -I$(top_srcdir) \
        -I$(top_srcdir)/lib/xdot \
        -I$(top_srcdir)/lib/cgraph \
        -I$(top_srcdir)/lib/cdt \
        -I$(top_srcdir)/lib/utilities \
-       -I$(top_srcdir)/cmd/gtktopview \
+       -I$(top_srcdir)/lib/topfish \
+       -I$(top_srcdir)/cmd/smyrna \
        $(GTK_CFLAGS) $(GTKGL_CFLAGS) $(GTKGLEXT_CFLAGS) $(GLADE_CFLAGS) $(FREETYPE2_CFLAGS)
 
-noinst_HEADERS = callbacks.h datalistcallbacks.h gui.h \
+if WITH_SMYRNA
+noinst_HEADERS = callbacks.h datalistcallbacks.h filterscallbacks.h gui.h \
        menucallbacks.h toolboxcallbacks.h
-noinst_LTLIBRARIES = libGUI_C.la
+noinst_LTLIBRARIES = libgui_C.la
+endif
 
-libGUI_C_la_SOURCES = gui.c callbacks.c datalistcallbacks.c \
-       menucallbacks.c toolboxcallbacks.c
+libgui_C_la_SOURCES = callbacks.c datalistcallbacks.c filterscallbacks.c \
+       gui.c menucallbacks.c toolboxcallbacks.c
index 7a0a80bc8f62525e5c7019ea0a51b6018c6a2566..74587afce41f1e0daea66297e8c2e086d65d8aba 100644 (file)
@@ -3,19 +3,22 @@
 #
 AM_CPPFLAGS = \
        -I$(top_srcdir) \
-       -I$(top_srcdir)/cmd/gtktopview \
+       -I$(top_srcdir)/cmd/smyrna \
        -I$(top_srcdir)/lib/utilities \
        -I$(top_srcdir)/lib/xdot \
        -I$(top_srcdir)/lib/cgraph \
        -I$(top_srcdir)/lib/cdt \
        $(GTK_CFLAGS) $(GTKGL_CFLAGS) $(GTKGLEXT_CFLAGS) $(GLADE_CFLAGS) $(FREETYPE2_CFLAGS)
 
+if WITH_SMYRNA
 noinst_HEADERS = \
-       abstring.h glTexFontDefs.h glTexFont.h glTexFontInclude.h \
-       glTexFontTGA.h opengl_pango.h selection.h 
+       abstring.h cclass.h cname.h glTexFont.h glTexFontDefs.h \
+       glTexFontInclude.h glTexFontTGA.h opengl_pango.h regex.h \
+       regex2.h selection.h strcasecmp.h utils.h
 
 noinst_LTLIBRARIES = libutilities_C.la
+endif
 
 libutilities_C_la_SOURCES = \
        abstring.c glTexFont.c glTexFontColor.c glTexFontTGA.c \
-       opengl_pango.c selection.c
+       opengl_pango.c pangotest.c selection.c strcasecmp.c
index edd975ab77b6ed9c2f791c54ee6bea38f8691843..974603e04627b3f36c19d63f2a9008437283818e 100644 (file)
@@ -6,10 +6,12 @@ AM_CPPFLAGS = \
        -I$(top_srcdir)/lib/cgraph \
        -I$(top_srcdir)/lib/cdt \
        -I$(top_srcdir)/lib/utilities \
-       -I$(top_srcdir)/cmd/gtktopview \
+       -I$(top_srcdir)/cmd/smyrna \
        $(GTK_CFLAGS) $(GTKGL_CFLAGS) $(GTKGLEXT_CFLAGS) $(GLADE_CFLAGS) $(FREETYPE2_CFLAGS)
 
+if WITH_SMYRNA
 noinst_HEADERS = xdot.h
 noinst_LTLIBRARIES = libxdot_C.la
+endif
 
 libxdot_C_la_SOURCES = xdot.c