0xc0, 0x00, 0xc0, 0x00, 0xc0, 0x00, 0xff, 0xc0, 0xff, 0xc0
};
-void DrawBezier(GLfloat * xp, GLfloat * yp, GLfloat * zp, int filled,
+static void DrawBezier(GLfloat * xp, GLfloat * yp, GLfloat * zp, int filled,
int param)
{
/*copied from NEHE */
}*/
}
-void DrawBeziers(sdot_op* o, int param)
+static void DrawBeziers(sdot_op* o, int param)
{
//SEND ALL CONTROL POINTS IN 3D ARRAYS
int temp = 0;
int filled;
int i = 0;
- static xdot_op * op;
- op=&o->op;
- view->Topview->global_z=view->Topview->global_z+o->layer*LAYER_DIFF;
+ xdot_op * op=&o->op;
+ view->Topview->global_z=view->Topview->global_z+o->layer*LAYER_DIFF;
// SelectBeziers((sdot_op *) op);
relocate_spline((sdot_op *) op, param);
//Draws an ellpise made out of points.
//void DrawEllipse(xdot_point* xpoint,GLfloat xradius, GLfloat yradius,int filled)
-void DrawEllipse(sdot_op* o, int param)
+static void DrawEllipse(sdot_op* o, int param)
{
//to draw a circle set xradius and yradius same values
GLfloat x, y, xradius, yradius;
int i = 0;
int filled;
- static xdot_op * op;
- op=&o->op;
- view->Topview->global_z=view->Topview->global_z+o->layer*LAYER_DIFF;
+ xdot_op * op=&o->op;
+ view->Topview->global_z=view->Topview->global_z+o->layer*LAYER_DIFF;
set_options((sdot_op *) op, param);
x = op->u.ellipse.x - dx;
y = op->u.ellipse.y - dy;
glEnd();
}
-extern void DrawPolygon(sdot_op * o, int param)
+static void DrawPolygon(sdot_op * o, int param)
//void DrawPolygon(xdot_point* xpoint,int count, int filled)
{
int filled;
- static xdot_op * op;
- op=&o->op;
- view->Topview->global_z=view->Topview->global_z+o->layer*LAYER_DIFF;
+ xdot_op * op=&o->op;
+ view->Topview->global_z=view->Topview->global_z+o->layer*LAYER_DIFF;
//SelectPolygon((sdot_op *) op);
set_options((sdot_op *) op, param);
}
-extern void DrawPolygon2(sdot_op * o, int param)
-
+#if 0
+static void DrawPolygon2(sdot_op * o, int param)
{
drawTessPolygon(o);
}
+#endif
-
-
-
-
-
-void DrawPolyline(sdot_op* o, int param)
+static void DrawPolyline(sdot_op* o, int param)
{
int i = 0;
- static xdot_op * op;
- op=&o->op;
- view->Topview->global_z=view->Topview->global_z+o->layer*LAYER_DIFF;
+ xdot_op * op=&o->op;
+ view->Topview->global_z=view->Topview->global_z+o->layer*LAYER_DIFF;
if (param == 0)
glColor4f(view->penColor.R, view->penColor.G, view->penColor.B,
glEnd();
}
-void SetFillColor(sdot_op* o, int param)
+static glCompColor GetglCompColor(char *color)
{
- glCompColor c;
- static xdot_op * op;
- op=&o->op;
- c = GetglCompColor(op->u.color);
+ gvcolor_t cl;
+ glCompColor c;
+ if (color != '\0') {
+ colorxlate(color, &cl, RGBA_DOUBLE);
+ c.R = (float) cl.u.RGBA[0];
+ c.G = (float) cl.u.RGBA[1];
+ c.B = (float) cl.u.RGBA[2];
+ c.A = (float) cl.u.RGBA[3];
+ } else {
+ c.R = view->penColor.R;
+ c.G = view->penColor.G;
+ c.B = view->penColor.B;
+ c.A = view->penColor.A;
+ }
+ return c;
+}
+static void SetFillColor(sdot_op* o, int param)
+{
+ xdot_op * op=&o->op;
+ glCompColor c = GetglCompColor(op->u.color);
view->fillColor.R = c.R;
view->fillColor.G = c.G;
view->fillColor.B = c.B;
view->fillColor.A = c.A;
}
-void SetPenColor(sdot_op* o, int param)
+static void SetPenColor(sdot_op* o, int param)
{
glCompColor c;
- static xdot_op * op;
- op=&o->op;
+ xdot_op * op=&o->op;
c = GetglCompColor(op->u.color);
view->penColor.R = c.R;
view->penColor.G = c.G;
view->penColor.A = c.A;
}
-void SetStyle(sdot_op* o, int param)
+static void SetStyle(sdot_op* o, int param)
{
- static xdot_op * op;
- op=&o->op;
-
-
+ /* xdot_op * op=&o->op; */
}
static sdot_op * font_op;
-void SetFont(sdot_op * o, int param)
+static void SetFont(sdot_op * o, int param)
{
font_op=o;
}
/*for now we only support png files in 2d space, no image rotation*/
-void InsertImage(sdot_op * o, int param)
+static void InsertImage(sdot_op * o, int param)
{
- float w,h,x,y,X,Y,Z;
+ float x,y;
glCompImage *i;
if(!o->obj)
return;
- if(!o->iData.data)
- {
- o->iData.data = load_png(o->op.u.image.name, &o->iData.w, &o->iData.h);
- x=o->op.u.image.pos.x;
- y=o->op.u.image.pos.y;
- i = glCompImageNew(NULL, x, y);
- glCompImageLoadPng(i, o->op.u.image.name,0);
+ if(!o->img) {
+ x = o->op.u.image.pos.x;
+ y = o->op.u.image.pos.y;
+ i = o->img = glCompImageNewFile (NULL, x, y, o->op.u.image.name, 0);
+ if (!o->img) {
+ fprintf (stderr, "Could not open file \"%s\" to read image.\n", o->op.u.image.name);
+ return;
+ }
+ i->width = o->op.u.image.pos.w;
+ i->height = o->op.u.image.pos.h;
i->common.functions.draw(i);
}
}
-void EmbedText(sdot_op* o, int param)
+static void EmbedText(sdot_op* o, int param)
{
GLfloat x,y;
glColor4f(view->penColor.R,view->penColor.G,view->penColor.B,view->penColor.A);
y=o->op.u.text.y;
if (!o->font)
{
- o->font=new_font(
+ o->font=glNewFont(
view->widgets,
o->op.u.text.text,
&view->penColor,
pangotext,
font_op->op.u.font.name,font_op->op.u.font.size,0);
- //new_font(glCompSet * s, char *text, glCompColor * c, glCompFontType type, char *fontdesc, int fs)*/
+ //glNewFont(glCompSet * s, char *text, glCompColor * c, glCompFontType type, char *fontdesc, int fs)*/
}
glCompDrawText3D(o->font,x,y,view->Topview->global_z,o->op.u.text.width,font_op->op.u.font.size);
}
+#if 0
void draw_selection_box(ViewInfo * view)
{
/* if (((view->mouse.mouse_mode == 4) || (view->mouse.mouse_mode == 5))
}*/
}
+#endif
void draw_magnifier(ViewInfo * view)
{
}
-void draw_circle(float originX, float originY, float radius)
+static void draw_circle(float originX, float originY, float radius)
{
/* draw a circle from a bunch of short lines */
float vectorX1, vectorY1, vectorX, vectorY, angle;
#endif
-
-/*void drawGraph(Agraph_t * g)
+#if 0
+void drawGraph(Agraph_t * g)
{
Agnode_t *v;
Agedge_t *e;
view->SignalBlock = 0;
}
-}*/
+}
+#endif
+#if 0
/*
this function is used to cache fonts in view->fontset
}
-
static void scanXdotwithattr(void *p, char *attr)
{
xdot *xDot;
iterate in nodes and edges to cache fonts, run this once or whenever a new font is added to the graph
*/
-
-void scanGraph(Agraph_t * g)
+static void scanGraph(Agraph_t * g)
{
Agnode_t *v;
Agedge_t *e;
c->B = B;
return 1;
}
+#endif
void drawCircle(float x, float y, float radius, float zdepth)
(drawfunc_t)InsertImage,
};
-glCompColor GetglCompColor(char *color)
-{
- gvcolor_t cl;
- glCompColor c;
- if (color != '\0') {
- colorxlate(color, &cl, RGBA_DOUBLE);
- c.R = (float) cl.u.RGBA[0];
- c.G = (float) cl.u.RGBA[1];
- c.B = (float) cl.u.RGBA[2];
- c.A = (float) cl.u.RGBA[3];
- } else {
- c.R = view->penColor.R;
- c.G = view->penColor.G;
- c.B = view->penColor.B;
- c.A = view->penColor.A;
- }
- return c;
-}
void drawEllipse(float xradius, float yradius, int angle1, int angle2)
{
int i;
glEnd();
}
+
+#if 0
int draw_node_hintbox_gl_polygon(GLfloat x, GLfloat y, GLfloat z,
GLfloat fs, char *text)
{
return 1;
}
+#endif
+#if 0
static GLUquadric *sphere;
void draw_sphere(float x, float y, float z, float r)
{
gluSphere(fisheyesphere, r, SPHERE_SLICE_COUNT, SPHERE_SLICE_COUNT);
glTranslatef(-x, -y, -z);
}
+#endif
void draw_selpoly(glCompPoly* selPoly)
{
* these are opengl based xdot drawing functions
* topview drawings are not here
*/
- extern drawfunc_t OpFns[];
- extern void drawGraph(Agraph_t * g);
- void scanGraph(Agraph_t * g);
- void draw_selection_box(ViewInfo * view);
- void draw_magnifier(ViewInfo * view);
- void draw_fisheye_magnifier(ViewInfo * view);
- extern int randomize_color(glCompColor * c, int brightness);
- extern void drawCircle(float x, float y, float radius, float zdepth);
- extern glCompColor GetglCompColor(char *color);
- extern void drawBorders(ViewInfo * view);
- void drawEllipse(float xradius, float yradius, int angle1, int angle2);
- int draw_node_hintbox(GLfloat x, GLfloat y, GLfloat z, GLfloat fs,
- char *text);
- void draw_sphere(float x, float y, float z, float r);
+extern drawfunc_t OpFns[];
+extern void drawGraph(Agraph_t * g);
+#if 0
+extern void scanGraph(Agraph_t * g);
+extern int randomize_color(glCompColor * c, int brightness);
+extern void draw_sphere(float x, float y, float z, float r);
+extern int draw_node_hintbox(GLfloat x, GLfloat y, GLfloat z, GLfloat fs, char *text);
+extern glCompColor GetglCompColor(char *color);
+#endif
+extern void draw_selection_box(ViewInfo * view);
+extern void draw_magnifier(ViewInfo * view);
+extern void draw_fisheye_magnifier(ViewInfo * view);
+extern void drawCircle(float x, float y, float radius, float zdepth);
+extern void drawBorders(ViewInfo * view);
+extern void drawEllipse(float xradius, float yradius, int angle1, int angle2);
+extern void draw_selpoly(glCompPoly* selPoly);
- void draw_selpoly(glCompPoly* selPoly);
+#if 0
/*xdot drawing functions*/
- extern void DrawBeziers(sdot_op* o, int param);
- extern void DrawEllipse(sdot_op * op, int param);
- extern void DrawPolygon(sdot_op * op, int param);
- extern void DrawPolyline(sdot_op * op, int param);
- extern void SetFillColor(sdot_op* o, int param);
- extern void SetPenColor(sdot_op* o, int param);
- extern void SetStyle(sdot_op* o, int param);
- extern void SetFont(sdot_op * o, int param);
- extern void InsertImage(sdot_op * o, int param);
- extern void EmbedText(sdot_op * o, int param);
-
- typedef struct
- {
- glCompColor color;
- float width;
- }xdotstyle;
-
-
-
- typedef struct
- {
- glCompColor penColor;
- glCompColor fillColor;
- xdotstyle style;
- } xdotstate;
+extern void DrawBeziers(sdot_op* o, int param);
+extern void DrawEllipse(sdot_op * op, int param);
+extern void DrawPolygon(sdot_op * op, int param);
+extern void DrawPolyline(sdot_op * op, int param);
+extern void SetFillColor(sdot_op* o, int param);
+extern void SetPenColor(sdot_op* o, int param);
+extern void SetStyle(sdot_op* o, int param);
+extern void SetFont(sdot_op * o, int param);
+extern void InsertImage(sdot_op * o, int param);
+extern void EmbedText(sdot_op * o, int param);
+#endif
+typedef struct {
+ glCompColor color;
+ float width;
+} xdotstyle;
+typedef struct {
+ glCompColor penColor;
+ glCompColor fillColor;
+ xdotstyle style;
+} xdotstate;
#ifdef __cplusplus
#include "hotkeymap.h"
#include "polytess.h"
-void drawRotatingAxis(void);
-void draw_cube()
+#if 0
+static void draw_cube()
{
glBegin(GL_QUADS); // Draw The Cube Using quads
glVertex3f(100.0f, -100.0f, -100.0f); // Bottom Right Of The Quad (Right)
glEnd();
}
+#endif
-
-
-void drawRotatingAxis(void)
+static void drawRotatingAxis(void)
{
- static GLUquadricObj *quadratic = (GLUquadricObj *) 0;
- float AL = 45;
+ static GLUquadricObj *quadratic;
+ float AL = 45;
if (get_mode(view) != MM_ROTATE)
return;
params:ViewInfo , global view variable defined in viewport.c
return value:always 1
*/
-int glupdatecamera(ViewInfo * view)
+static int glupdatecamera(ViewInfo * view)
{
if (view->active_camera == -1)
glTranslatef(-view->panx, -view->pany, view->panz);
return 1;
}
-/*
- main gl expose ,any time sreen needs to be redrawn, this function is called by gltemplate
- ,all drawings are initialized in this function
- params:ViewInfo , global view variable defined in viewport.c
- return value:0 if something goes wrong with GL 1 , otherwise
-*/
-int glexpose_main(ViewInfo * view)
-{
- static int doonce = 0;
- if (!glupdatecamera(view))
- return 0;
-
- if (view->activeGraph >= 0) {
- if (!doonce) {
- doonce = 1;
- btnToolZoomFit_clicked(NULL, NULL);
- btnToolZoomFit_clicked(NULL, NULL);
- }
- }
- else
- return 0;
-
- glexpose_grid(view);
- draw_fisheye_magnifier(view);
- draw_magnifier(view);
- drawBorders(view);
- glexpose_drawgraph(view);
-// drawRotatingTools();
-// draw_cube();
- drawRotatingAxis();
- draw_selpoly(&view->Topview->sel.selPoly);
-// draw_stuff();
-// test_color_pallete();
-// drawtestpoly();
- /*DEBUG*/
-/* if (view->mouse.mouse_mode == MM_PAN)
- {
- glBegin(GL_LINE_STRIP);
- glColor4f((GLfloat) 1, (GLfloat) 0.0, (GLfloat) 0.0,
- (GLfloat) 1);
- glVertex3f((GLfloat) view->GLx, (GLfloat) view->GLy,
- (GLfloat) 0.001);
- glVertex3f((GLfloat) view->GLx2, (GLfloat) view->GLy2,
- (GLfloat) 0.001);
-
-
- glEnd();
- }*/
- /*DEBUG*/ return 1;
-}
-
-/*
- draws grid (little dots , with no use)
- params:ViewInfo , global view variable defined in viewport.c
- return value:none
-*/
-void drawtestpoly(void)
+#if 0
+static void drawtestpoly(void)
{
glEnable(GL_TEXTURE_2D);
glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
glDisable(GL_TEXTURE_2D);
}
+#endif
-void glexpose_grid(ViewInfo * view)
+/*
+ draws grid (little dots , with no use)
+ params:ViewInfo , global view variable defined in viewport.c
+ return value:none
+*/
+static void glexpose_grid(ViewInfo * view)
{
//drawing grids
float x, y;
params:ViewInfo , global view variable defined in viewport.c
return value:1 if there is a graph to draw else 0
*/
-int glexpose_drawgraph(ViewInfo * view)
+static int glexpose_drawgraph(ViewInfo * view)
{
if (view->activeGraph > -1) {
return 0;
}
+#if 0
+static void test_color_pallete(void)
+{
+ int ind = 0;
+ float xGAP = 5;
+ float yGAP = 80;
+ float x = 50;
+ float y = 50;
+ glCompColor c;
+ for (ind = 0; ind < 350; ind++) {
+ getcolorfromschema(view->colschms, ind, 350, &c);
+ x = ind * xGAP;
+ glBegin(GL_POLYGON);
+ glColor3f(c.R, c.G, c.B);
+ glVertex3f(x, y, 0.0);
+ glVertex3f(x + xGAP, y, 0.0);
+ glVertex3f(x + xGAP, y + yGAP, 0.0);
+ glVertex3f(x, y + yGAP, 0.0);
+ glEnd();
+ }
+}
+#endif
+/*
+ main gl expose ,any time sreen needs to be redrawn, this function is called by gltemplate
+ ,all drawings are initialized in this function
+ params:ViewInfo , global view variable defined in viewport.c
+ return value:0 if something goes wrong with GL 1 , otherwise
+*/
+int glexpose_main(ViewInfo * view)
+{
+ static int doonce = 0;
+ if (!glupdatecamera(view))
+ return 0;
+
+ if (view->activeGraph >= 0) {
+ if (!doonce) {
+ doonce = 1;
+ btnToolZoomFit_clicked(NULL, NULL);
+ btnToolZoomFit_clicked(NULL, NULL);
+ }
+ }
+ else
+ return 0;
+
+ glexpose_grid(view);
+ draw_fisheye_magnifier(view);
+ draw_magnifier(view);
+ drawBorders(view);
+ glexpose_drawgraph(view);
+// drawRotatingTools();
+// draw_cube();
+ drawRotatingAxis();
+ draw_selpoly(&view->Topview->sel.selPoly);
+// draw_stuff();
+// test_color_pallete();
+// drawtestpoly();
+ /*DEBUG*/
+/* if (view->mouse.mouse_mode == MM_PAN)
+ {
+ glBegin(GL_LINE_STRIP);
+ glColor4f((GLfloat) 1, (GLfloat) 0.0, (GLfloat) 0.0,
+ (GLfloat) 1);
+ glVertex3f((GLfloat) view->GLx, (GLfloat) view->GLy,
+ (GLfloat) 0.001);
+ glVertex3f((GLfloat) view->GLx2, (GLfloat) view->GLy2,
+ (GLfloat) 0.001);
+
+
+ glEnd();
+ }*/
+ /*DEBUG*/ return 1;
+}
+
/*
void drawRotatingTools(void)
{
extern "C" {
#endif
- int glupdatecamera(ViewInfo * v);
+ /* int glupdatecamera(ViewInfo * v); */
int glexpose_main(ViewInfo * v);
- void glexpose_grid(ViewInfo * v);
- int glexpose_drawgraph(ViewInfo * view);
+ /* void glexpose_grid(ViewInfo * v); */
+ /* int glexpose_drawgraph(ViewInfo * view); */
void drawRotatingTools(void);
- void drawtestpoly(void);
- void draw_cube(void);
+ /* void drawtestpoly(void); */
+ /* void draw_cube(void); */
#ifdef __cplusplus
} /* end extern "C" */
gboolean redraw = FALSE;
-
+#if 0
void glmotion_main(ViewInfo * v, GdkEventMotion * event,
GtkWidget * widget)
{
FALSE);
}
-void glmotion_zoom_inc(int zoomin)
-{
- float inc_value;
- inc_value =
- (float) (view->Topview->fitin_zoom * MAX_ZOOM * -1 -
- view->Topview->fitin_zoom * MIN_ZOOM * -1) / ZOOM_STEPS;
- if (zoomin) /*zooming in , zoom value should be decreased */
- graph_zoom(view->zoom - view->zoom * 0.25);
- else
- graph_zoom(view->zoom + view->zoom * 0.25); /*zoom out */
- glexpose();
-
-}
-
+#endif
/*real zoom in out is done here, all other functions send this one what they desire, it is not guranteed,*/
-void graph_zoom(float real_zoom)
+static void graph_zoom(float real_zoom)
{
float old_zoom;
glCompLabelSetText((glCompLabel *) v->Topview->customptr, buf);*/
}
+void glmotion_zoom_inc(int zoomin)
+{
+ float inc_value;
+ inc_value =
+ (float) (view->Topview->fitin_zoom * MAX_ZOOM * -1 -
+ view->Topview->fitin_zoom * MIN_ZOOM * -1) / ZOOM_STEPS;
+ if (zoomin) /*zooming in , zoom value should be decreased */
+ graph_zoom(view->zoom - view->zoom * 0.25);
+ else
+ graph_zoom(view->zoom + view->zoom * 0.25); /*zoom out */
+ glexpose();
+
+}
+
void glmotion_zoom(ViewInfo * v)
{
float real_zoom;
redraw = TRUE;
}
+#if 0
void glmotion_adjust_pan(ViewInfo * v, float panx, float pany)
{
float gldx, gldy;
redraw = TRUE;
}
+#endif
#ifdef UNUSED
static float mod_angle(float angle)
}
#endif
+#if 0
void glmotion_rotate(ViewInfo * v)
{
/* if(v->mouse.rotate_axis==MOUSE_ROTATE_XY)
v->cameras[v->active_camera]->anglez-=v->mouse.dy/7;
}*/
}
+#endif
extern "C" {
#endif
+#if 0
void glmotion_main(ViewInfo * v, GdkEventMotion * event,
GtkWidget * widget);
- void glmotion_zoom(ViewInfo * v);
- void glmotion_pan(ViewInfo * v);
void glmotion_rotate(ViewInfo * v);
void glmotion_adjust_pan(ViewInfo * v, float panx, float pany);
void graph_zoom(float real_zoom);
+#endif
+
+ void glmotion_zoom(ViewInfo * v);
+ void glmotion_pan(ViewInfo * v);
void glmotion_zoom_inc(int zoomin);
#ifdef __cplusplus
}
+/*
+ test single opengl parameter, all visual , it doesnt return a value
+ params:gtk gl config class , attribute name and id,if boolean expected send is_boolean true
+ return value:none
+*/
+void print_gl_config_attrib(GdkGLConfig * glconfig,
+ const gchar * attrib_str,
+ int attrib, gboolean is_boolean)
+{
+ int value;
+
+ g_print("%s = ", attrib_str);
+ if (gdk_gl_config_get_attrib(glconfig, attrib, &value)) {
+ if (is_boolean)
+ g_print("%s\n", value == TRUE ? "TRUE" : "FALSE");
+ else
+ g_print("%d\n", value);
+ } else
+ g_print("*** Cannot get %s attribute value\n", attrib_str);
+}
+
/*
test opengl parameters, configuration.Run this function to see machine's open gl capabilities
params:gtk gl config class ,gtk takes care of all these tests
return value:none
*/
-void examine_gl_config_attrib(GdkGLConfig * glconfig)
+static void examine_gl_config_attrib(GdkGLConfig * glconfig)
{
g_print("\nOpenGL visual configurations :\n\n");
g_print("gdk_gl_config_is_rgba (glconfig) = %s\n",
g_print("\n");
}
-/*
- test single opengl parameter, all visual , it doesnt return a value
- params:gtk gl config class , attribute name and id,if boolean expected send is_boolean true
- return value:none
-*/
-void print_gl_config_attrib(GdkGLConfig * glconfig,
- const gchar * attrib_str,
- int attrib, gboolean is_boolean)
-{
- int value;
-
- g_print("%s = ", attrib_str);
- if (gdk_gl_config_get_attrib(glconfig, attrib, &value)) {
- if (is_boolean)
- g_print("%s\n", value == TRUE ? "TRUE" : "FALSE");
- else
- g_print("%d\n", value);
- } else
- g_print("*** Cannot get %s attribute value\n", attrib_str);
-}
-
/*
initialize the gl , run only once!!
params:gtk opgn gl canvas and optional data pointer
extern "C" {
#endif
+#if 0
void examine_gl_config_attrib(GdkGLConfig * glconfig);
void print_gl_config_attrib(GdkGLConfig * glconfig,
const gchar * attrib_str, int attrib,
gboolean is_boolean);
-/* static void realize (GtkWidget *widget,gpointer data); */
-/* static gboolean configure_event (GtkWidget *widget,GdkEventConfigure *event, gpointer data); */
+void realize (GtkWidget *widget,gpointer data);
+gboolean configure_event (GtkWidget *widget,GdkEventConfigure *event, gpointer data);
+gboolean button_press_event (GtkWidget *widget,GdkEventButton *event,gpointer data);
+gboolean button_release_event (GtkWidget *widget,GdkEventButton *event,gpointer data);
+gboolean motion_notify_event (GtkWidget *widget,GdkEventMotion *event,gpointer data);
+gboolean key_press_event (GtkWidget *widget, GdkEventKey *event,gpointer data);
+gboolean button_press_event_popup_menu (GtkWidget *widget,GdkEventButton *event,gpointer data);
+ void switch_Mouse(GtkMenuItem * menuitem, int mouse_mode);
+#endif
+
gboolean expose_event(GtkWidget * widget, GdkEventExpose * event,
gpointer data);
-/* static gboolean button_press_event (GtkWidget *widget,GdkEventButton *event,gpointer data); */
-/* static gboolean button_release_event (GtkWidget *widget,GdkEventButton *event,gpointer data); */
-/* static gboolean motion_notify_event (GtkWidget *widget,GdkEventMotion *event,gpointer data); */
-/* static gboolean key_press_event (GtkWidget *widget, GdkEventKey *event,gpointer data); */
- void switch_Mouse(GtkMenuItem * menuitem, int mouse_mode);
-/* static gboolean button_press_event_popup_menu (GtkWidget *widget,GdkEventButton *event,gpointer data); */
extern GdkGLConfig *configure_gl(void);
void create_window(GdkGLConfig * glconfig, GtkWidget * vbox);
view->Topview);
}
+
+/* This is the action attached to the publish button on the attributes
+ * window. What should happen?
+ */
_BB void on_attrProg_toggled(GtkWidget * widget, gpointer user_data)
{
/* FIX */
{
int nodeCnt = 0;
int edgeCnt = 0;
- static char buf[512];
+ char buf[512];
Agedge_t* ep;
Agnode_t* v;
Agraph_t* g;
view->Topview->sel.selectNodes=1;
else
view->Topview->sel.selectNodes=0;
-
-
}
-
void testContainer(glCompSet *s)
{
-
glCompPanel* p;
- glCompLabel *l=NULL;
p = glCompPanelNew((glCompObj *) s, 100, 100, 500, 500);
p = glCompPanelNew((glCompObj *) p, 0, 0, 480, 480);
p->common.anchor.bottom=50;
p->common.anchor.top=10;
p->common.anchor.right=10;
-
-
-
-
-
-
-
}
y=y+off;
b = glCompButtonNew((glCompObj *) p, 1, y, 42, 42, "N");
- b->common.callbacks.click = selectnodes;
+ b->common.callbacks.click = (glcompclickfunc_t)selectnodes;
b->groupid=-1;
b->status=1;
y=y+off;
b = glCompButtonNew((glCompObj *) p, 1, y, 42, 42, "E");
- b->common.callbacks.click = selectedges;
+ b->common.callbacks.click = (glcompclickfunc_t)selectedges;
b->groupid=-1;
-
-
p = glCompPanelNew((glCompObj *) p, 1, 325, 45, 180);
p->common.align = glAlignTop;
p->common.data = 0;
}*/
+#if 0
gvprscript* scr_from_string(char* str,void* obj)
{
return NULL;
}
-
+#endif
static ssize_t outfn(void *sp, const char *buf, size_t nbyte, void *dp)
return fs;
}
+#ifdef UNUSED
void freeFocus(focus_t * fs)
{
free(fs->foci_nodes);
free(fs->y_foci);
free(fs);
}
+#endif
#ifndef WIN32
#define CALLBACK
#endif
-void CALLBACK combineCallback(GLdouble coords[3], GLdouble *vertex_data[4],GLfloat weight[4], GLdouble **dataOut)
+static void CALLBACK combineCallback(GLdouble coords[3], GLdouble *vertex_data[4],GLfloat weight[4], GLdouble **dataOut)
{
GLdouble *vertex;
int i;
*dataOut = vertex;
}
-void CALLBACK vertexCallback(GLvoid *vertex)
+static void CALLBACK vertexCallback(GLvoid *vertex)
{
GLdouble *ptr;
ptr = (GLdouble *) vertex;
}
-
-
static GLUtesselator* Init()
{
// Create a new tessellation object
#if UNUSED
static int Render_Contour(GLUtesselator *tobj, GLdouble obj_data[][3],int cnt)
{
-
-
-
// GLdouble d[1][3];
- static GLdouble**d;
+ static GLdouble** d;
int x=0;
/* int y=0; */
- if (!d)
- {
- d = (GLdouble**) malloc(sizeof(GLdouble)* cnt);
+ if (!d) {
+ d = N_NEW(cnt,GLdouble*);
for (x=0;x < cnt; x++)
{
/* GLdouble temp; */
- d[x]=(GLdouble*)(malloc(sizeof(GLdouble)*3));
+ d[x] = N_NEW3,GLdouble);
d[x][0]=obj_data[x][0];
d[x][1]=obj_data[x][1];
d[x][2]=obj_data[x][2];
}
+#if 0
static int freeTes(GLUtesselator *tobj)
{
gluDeleteTess(tobj);
return(1);
}
+#endif
+
int drawTessPolygon(sdot_op* p)
{
if (!TP.tobj)
return 1;
return 0;
}
+#if 0
float distance_to_line(float ax, float ay, float bx, float by, float cx,
float cy)
{
c = !c;
}
return c;
- }
+}
+#endif
int point_in_polygon(glCompPoly* selPoly,glCompPoint p)
extern void setColor(glCompColor* c,GLfloat R,GLfloat G,GLfloat B,GLfloat A);
extern void getcolorfromschema(colorschemaset * sc, float l, float maxl,glCompColor * c);
extern glCompPoint getPointFromStr(char* str);
+#if 0
extern float distance_to_line(float ax, float ay, float bx, float by, float cx,float cy);
+#endif
extern int point_in_polygon(glCompPoly* selPoly,glCompPoint p);
extern int point_within_ellips_with_coords(float ex, float ey,
float ea, float eb,
int h;
}image_data;
typedef struct
- {
- xdot_op op;
- void *obj;
- glCompFont* font;
- int size;
- int layer;
- int listId;/*opengl list id*/
- image_data iData;
+ {
+ xdot_op op;
+ void *obj;
+ glCompFont* font;
+ int size;
+ int layer;
+ int listId;/*opengl list id*/
+ glCompImage* img;
+ /* image_data iData; */
} sdot_op;
#include "support.h"
+#if 0
GtkWidget *lookup_widget(GtkWidget * widget, const gchar * widget_name)
{
GtkWidget *parent, *found_widget;
g_warning("Widget not found: %s", widget_name);
return found_widget;
}
+#endif
static GList *pixmaps_directories = NULL;
+#if 0
/* Use this function to set the directory containing installed pixmaps. */
-void add_pixmap_directory(const gchar * directory)
+static void add_pixmap_directory(const gchar * directory)
{
pixmaps_directories = g_list_prepend(pixmaps_directories,
g_strdup(directory));
g_free(pathname);
return pixbuf;
}
+#endif
+#if 0
/* This is used to set ATK action descriptions. */
void
glade_set_atk_action_description(AtkAction * action,
atk_action_set_description(action, i, description);
}
}
+#endif
/* Use this function to set the directory containing installed pixmaps. */
-void add_pixmap_directory(const gchar * directory);
+/* void add_pixmap_directory(const gchar * directory); */
/*
GtkWidget *create_pixmap(GtkWidget * widget, const gchar * filename);
/* This is used to create the pixbufs used in the interface. */
-GdkPixbuf *create_pixbuf(const gchar * filename);
+/* GdkPixbuf *create_pixbuf(const gchar * filename); */
/* This is used to set ATK action descriptions. */
void glade_set_atk_action_description(AtkAction * action,
-
+#if 0
static v_data *makeGraph_old(topview * tv, int *nedges)
{
int i;
*nedges = ne;
return graph;
}
+#endif
+static void refresh_old_values(topview * t)
+{
+ int level, v;
+ Hierarchy *hp = t->fisheyeParams.h;
+ for (level = 0; level < hp->nlevels; level++) {
+ for (v = 0; v < hp->nvtxs[level]; v++) {
+ ex_vtx_data *gg = hp->geom_graphs[level];
+ /* v_data *g = hp->graphs[level]; */
+ /* double x0,y0; */
+ gg[v].old_physical_x_coord = gg[v].physical_x_coord;
+ gg[v].old_physical_y_coord = gg[v].physical_y_coord;
+ gg[v].old_active_level = gg[v].active_level;
+ }
+ }
+
+}
/* To use:
* double* x_coords; // initial x coordinates
}
+#if 0
/*
draws all level 0 nodes and edges, during animation
*/
}
glEnd();
}
+#endif
-void drawtopfishnodes(topview * t)
+static void drawtopfishnodes(topview * t)
{
glCompColor srcColor;
glCompColor tarColor;
}
-void drawtopfishnodelabels(topview * t)
+#if 0
+static void drawtopfishnodelabels(topview * t)
{
int v, finenodes, focusnodes;
char buf[512];
}
}
-void drawtopfishedges(topview * t)
+#endif
+static void drawtopfishedges(topview * t)
{
glCompColor srcColor;
glCompColor tarColor;
}
+static int get_active_frame(topview * t)
+{
+ gulong microseconds;
+ gdouble seconds;
+ int fr;
+ seconds = g_timer_elapsed(view->timer, µseconds);
+ fr = (int) (seconds / ((double) view->frame_length / (double) 1000));
+ if (fr < view->total_frames) {
+
+ if (fr == view->active_frame)
+ return 0;
+ else {
+ view->active_frame = fr;
+ return 1;
+ }
+ } else {
+ g_timer_stop(view->timer);
+ view->Topview->fisheyeParams.animate = 0;
+ return 0;
+ }
+
+}
+
void drawtopologicalfisheye(topview * t)
{
get_active_frame(t);
}
+static void get_interpolated_coords(double x0, double y0, double x1, double y1,
+ int fr, int total_fr, double *x, double *y)
+{
+ *x = x0 + (x1 - x0) / (double) total_fr *(double) (fr + 1);
+ *y = y0 + (y1 - y0) / (double) total_fr *(double) (fr + 1);
+}
int get_temp_coords(topview * t, int level, int v, double *coord_x,
double *coord_y)
* positionAllItems(hierarchy, fs, parms)
*/
+#if 0
void infotopfisheye(topview * t, float *x, float *y, float *z)
{
/* hp->geom_graphs[0][closest_fine_node].x_coord;
hp->geom_graphs[0][closest_fine_node].y_coord;*/
}
-
+#endif
}
}
-void refresh_old_values(topview * t)
-{
- int level, v;
- Hierarchy *hp = t->fisheyeParams.h;
- for (level = 0; level < hp->nlevels; level++) {
- for (v = 0; v < hp->nvtxs[level]; v++) {
- ex_vtx_data *gg = hp->geom_graphs[level];
- /* v_data *g = hp->graphs[level]; */
- /* double x0,y0; */
- gg[v].old_physical_x_coord = gg[v].physical_x_coord;
- gg[v].old_physical_y_coord = gg[v].physical_y_coord;
- gg[v].old_active_level = gg[v].active_level;
- }
- }
-
-}
-void get_interpolated_coords(double x0, double y0, double x1, double y1,
- int fr, int total_fr, double *x, double *y)
-{
- *x = x0 + (x1 - x0) / (double) total_fr *(double) (fr + 1);
- *y = y0 + (y1 - y0) / (double) total_fr *(double) (fr + 1);
-}
-
-int get_active_frame(topview * t)
-{
- gulong microseconds;
- gdouble seconds;
- int fr;
- seconds = g_timer_elapsed(view->timer, µseconds);
- fr = (int) (seconds / ((double) view->frame_length / (double) 1000));
- if (fr < view->total_frames) {
-
- if (fr == view->active_frame)
- return 0;
- else {
- view->active_frame = fr;
- return 1;
- }
- } else {
- g_timer_stop(view->timer);
- view->Topview->fisheyeParams.animate = 0;
- return 0;
- }
-}
#ifdef UNUSED
void fisheye_spherical(double x_focus, double y_focus, double z_focus,
topview * t);
void drawtopologicalfisheye(topview * t);
- void drawtopologicalfisheye2(topview * t);
void changetopfishfocus(topview * t, float *x, float *y,
float *z, int num_foci);
- void refresh_old_values(topview * t);
+#if 0
+ void drawtopologicalfisheye2(topview * t);
+ int get_active_frame(topview * t);
void get_interpolated_coords(double x0, double y0, double x1,
double y1, int fr, int total_fr,
double *x, double *y);
- int get_active_frame(topview * t);
+ void refresh_old_values(topview * t);
+#endif
void prepare_topological_fisheye(Agraph_t* g,topview * t);
#ifdef __cplusplus
/* If the "visible" attribute is not set or "", return true
* else evaluate as boolean
*/
-int visible(Agsym_t* attr, void* obj)
+static int visible(Agsym_t* attr, void* obj)
{
char* s;
}
else return 1;
}
-int object_color(void* obj,glCompColor* c)
+static int object_color(void* obj,glCompColor* c)
{
gvcolor_t cl;
Agraph_t* g=view->g[view->activeGraph];
}
}
-void renderSelectedNodes(Agraph_t * g)
+static void renderSelectedNodes(Agraph_t * g)
{
Agnode_t *v;
Agsym_t* data_attr = GN_labelattribute(g);
-void renderNodes(Agraph_t * g)
+static void renderNodes(Agraph_t * g)
{
Agnode_t *v;
glCompPoint pos;
}
-void renderSelectedEdges(Agraph_t * g)
+static void renderSelectedEdges(Agraph_t * g)
{
Agedge_t *e;
-void renderEdges(Agraph_t * g)
+static void renderEdges(Agraph_t * g)
{
Agedge_t *e;
Agnode_t *v;
glEnd();
}
-void renderNodeLabels(Agraph_t * g)
+static void renderNodeLabels(Agraph_t * g)
{
Agnode_t *v;
glCompPoint pos;
}
}
-void renderEdgeLabels(Agraph_t * g)
+static void renderEdgeLabels(Agraph_t * g)
{
Agedge_t *e;
Agnode_t *v;
-
-void cacheNodes(Agraph_t * g,topview* t)
+static void cacheNodes(Agraph_t * g,topview* t)
{
if(t->cache.node_id!=-1) /*clean existing cache*/
glDeleteLists(t->cache.node_id,1);
}
-void cacheEdges(Agraph_t * g,topview* t)
+static void cacheEdges(Agraph_t * g,topview* t)
{
if(t->cache.edge_id!=-1) /*clean existing cache*/
glDeleteLists(t->cache.edge_id,1);
renderSelectedNodes(g);
glEndList();
}
-void cacheNodeLabels(Agraph_t * g,topview* t)
+static void cacheNodeLabels(Agraph_t * g,topview* t)
{
if(t->cache.nodelabel_id!=-1) /*clean existing cache*/
glDeleteLists(t->cache.nodelabel_id,1);
renderNodeLabels(g);
glEndList();
}
-void cacheEdgeLabels(Agraph_t * g,topview* t)
+static void cacheEdgeLabels(Agraph_t * g,topview* t)
{
if(t->cache.edgelabel_id!=-1) /*clean existing cache*/
glDeleteLists(t->cache.edgelabel_id,1);
#include "topviewfuncs.h"
-
/* Forward declarations */
#ifdef UNUSED
static int init_object_custom_data(Agraph_t * graph, void *obj);
static void refresh_borders(Agraph_t * g);
#endif
+static colorschemaset *create_color_theme(int themeid);
+static md5_byte_t *get_md5_key(Agraph_t * graph);
+
#define countof( array ) ( sizeof( array )/sizeof( array[0] ) )
ViewInfo *view;
#endif
-void clear_viewport(ViewInfo * view)
+static void clear_viewport(ViewInfo * view)
{
/*free topview if there is one */
if (view->activeGraph >= 0)
}
}
-void fill_key(md5_byte_t * b, md5_byte_t * data)
+static void fill_key(md5_byte_t * b, md5_byte_t * data)
{
int ind = 0;
for (ind = 0; ind < 16; ind++) {
static md5_byte_t md5_digest[16];
static md5_state_t pms;
-int append_to_md5(void *chan, const char *str)
+static int append_to_md5(void *chan, const char *str)
{
md5_append(&pms, (unsigned char *) str, (int) strlen(str));
return 1;
}
-int flush_md5(void *chan)
+static int flush_md5(void *chan)
{
md5_finish(&pms, md5_digest);
return 1;
}
-md5_byte_t *get_md5_key(Agraph_t * graph)
+static md5_byte_t *get_md5_key(Agraph_t * graph)
{
Agiodisc_t *xio;
Agiodisc_t a;
}
-/* init_object_custom_data:
- * creates a custom_object_data
- */
-
+#ifdef UNUSED
/* move_node:
*/
-void movenode(void *obj, float dx, float dy)
+static void movenode(void *obj, float dx, float dy)
{
char buf[512];
double x, y;
}
}
-#ifdef UNUSED
static char *move_xdot(void *obj, xdot * x, int dx, int dy, int dz)
{
int i = 0;
expose_event(view->drawing_area, NULL, NULL);
}
+#if 0
/*following code does not do what i like it to do*/
/*I liked to have a please wait window on the screen all i got was the outer borders of the window
GTK requires a custom widget expose function
{
gtk_widget_hide(glade_xml_get_widget(xml, "frmWait"));
}
+#endif
float interpol(float minv, float maxv, float minc, float maxc, float x)
{
colorschema* s;
}colorschemaset; */
-void clear_color_theme(colorschemaset * cs)
+static void clear_color_theme(colorschemaset * cs)
{
free(cs->s);
free(cs);
}
-
-
-colorschemaset *create_color_theme(int themeid)
+static colorschemaset *create_color_theme(int themeid)
{
char **colors;
colorschemaset *s = malloc(sizeof(colorschemaset));
return s;
}
-
-void test_color_pallete(void)
-{
- int ind = 0;
- float xGAP = 5;
- float yGAP = 80;
- float x = 50;
- float y = 50;
- glCompColor c;
- for (ind = 0; ind < 350; ind++) {
- getcolorfromschema(view->colschms, ind, 350, &c);
- x = ind * xGAP;
- glBegin(GL_POLYGON);
- glColor3f(c.R, c.G, c.B);
- glVertex3f(x, y, 0.0);
- glVertex3f(x + xGAP, y, 0.0);
- glVertex3f(x + xGAP, y + yGAP, 0.0);
- glVertex3f(x, y + yGAP, 0.0);
- glEnd();
- }
-}
void init_viewport(ViewInfo * view);
void set_viewport_settings_from_template(ViewInfo * view, Agraph_t *);
+#if 0
void clear_viewport(ViewInfo * view);
+ colorschemaset *create_color_theme(int themeid);
+ md5_byte_t *get_md5_key(Agraph_t * graph);
+ void fill_key(md5_byte_t * b, md5_byte_t * data);
+ void movenode(void *n, float dx, float dy);
+ void please_dont_wait(void);
+ void please_wait(void);
+#endif
void switch_graph(int);
void refreshViewport(int doClear);
int add_graph_to_viewport_from_file(char *fileName);
int do_graph_layout(Agraph_t * graph, int Engine, int keeppos);
- void movenode(void *n, float dx, float dy);
void glexpose(void);
void move_nodes(Agraph_t * g);
- void please_wait(void);
- void please_dont_wait(void);
- extern md5_byte_t *get_md5_key(Agraph_t * graph);
- void fill_key(md5_byte_t * b, md5_byte_t * data);
- colorschemaset *create_color_theme(int themeid);
extern void getcolorfromschema(colorschemaset * sc, float l,
float maxl, glCompColor * c);
}
}
-viewport_camera *add_camera_to_viewport(ViewInfo * view)
+static viewport_camera *add_camera_to_viewport(ViewInfo * view)
{
view->camera_count++;
view->cameras =
return view->cameras[view->camera_count - 1];
}
-void set_camera_x_y(viewport_camera * c)
+#if 0
+static void set_camera_x_y(viewport_camera * c)
{
/* c->x =
c->r * cos((float) DEG2RAD * c->anglexy) * sin((float) DEG2RAD *
view->pany;
c->z = c->r * cos(DEG2RAD * c->anglexyz);*/
}
-
int delete_camera_from_viewport(ViewInfo * view, viewport_camera * c)
{
int ind;
}
return 0;
}
+#endif
+#if 0
int activate_viewport_camera(ViewInfo * view, int cam_index)
{
if (cam_index < view->camera_count) {
} else
return 0;
}
-
int refresh_viewport_camera(ViewInfo * view)
{
if (view->active_camera >= 0) {
} else
return 0;
}
+#endif
void menu_click_add_camera(void *p)
{
// attach_camera_widget(view);
}
-int blocksignal = 0;
-void menu_click_2d(void *p)
+#ifdef UNUSED
+static int blocksignal = 0;
+static void menu_click_2d(void *p)
{
view->active_camera = -1;
}
-void menu_click_camera_select(void *p)
+static void menu_click_camera_select(void *p)
{
view->active_camera = ((glCompButton *) p)->data;
}
+static int show_camera_settings(viewport_camera * c)
+{
+
+ char buf[50];
+ sprintf(buf, "Camera:%i", c->index);
+ gtk_label_set_text((GtkLabel *)
+ glade_xml_get_widget(xml, "dlgcameralabel1"), buf);
+ gtk_spin_button_set_value((GtkSpinButton *)
+ glade_xml_get_widget(xml,
+ "dlgcameraspinbutton1"),
+ c->x);
+ gtk_spin_button_set_value((GtkSpinButton *)
+ glade_xml_get_widget(xml,
+ "dlgcameraspinbutton2"),
+ c->y);
+ gtk_spin_button_set_value((GtkSpinButton *)
+ glade_xml_get_widget(xml,
+ "dlgcameraspinbutton3"),
+ c->z);
+ gtk_spin_button_set_value((GtkSpinButton *)
+ glade_xml_get_widget(xml,
+ "dlgcameraspinbutton4"),
+ c->targetx);
+ gtk_spin_button_set_value((GtkSpinButton *)
+ glade_xml_get_widget(xml,
+ "dlgcameraspinbutton5"),
+ c->targety);
+ gtk_spin_button_set_value((GtkSpinButton *)
+ glade_xml_get_widget(xml,
+ "dlgcameraspinbutton6"),
+ c->targetz);
+
+
+ gtk_spin_button_set_value((GtkSpinButton *)
+ glade_xml_get_widget(xml,
+ "dlgcameraspinbutton7"),
+ c->camera_vectorx * 360.0);
+ gtk_spin_button_set_value((GtkSpinButton *)
+ glade_xml_get_widget(xml,
+ "dlgcameraspinbutton8"),
+ c->camera_vectory * 360.0);
+ gtk_spin_button_set_value((GtkSpinButton *)
+ glade_xml_get_widget(xml,
+ "dlgcameraspinbutton9"),
+ c->camera_vectorz * 360.0);
+
+
+
+
+
+ gtk_widget_hide(glade_xml_get_widget(xml, "dlgCamera"));
+ gtk_widget_show(glade_xml_get_widget(xml, "dlgCamera"));
+ gtk_window_set_keep_above((GtkWindow *)
+ glade_xml_get_widget(xml, "dlgCamera"), 1);
+ view->selected_camera = c;
+ return 1;
+
+
+}
-void menu_click_camera_edit(void *p)
+static void menu_click_camera_edit(void *p)
{
show_camera_settings(view->cameras[(int) ((glCompButton *) p)->data]
);
}
-#ifdef UNUSED
void attach_camera_widget(ViewInfo * view)
{
}
}
#endif
-int show_camera_settings(viewport_camera * c)
-{
-
- char buf[50];
- sprintf(buf, "Camera:%i", c->index);
- gtk_label_set_text((GtkLabel *)
- glade_xml_get_widget(xml, "dlgcameralabel1"), buf);
- gtk_spin_button_set_value((GtkSpinButton *)
- glade_xml_get_widget(xml,
- "dlgcameraspinbutton1"),
- c->x);
- gtk_spin_button_set_value((GtkSpinButton *)
- glade_xml_get_widget(xml,
- "dlgcameraspinbutton2"),
- c->y);
- gtk_spin_button_set_value((GtkSpinButton *)
- glade_xml_get_widget(xml,
- "dlgcameraspinbutton3"),
- c->z);
- gtk_spin_button_set_value((GtkSpinButton *)
- glade_xml_get_widget(xml,
- "dlgcameraspinbutton4"),
- c->targetx);
- gtk_spin_button_set_value((GtkSpinButton *)
- glade_xml_get_widget(xml,
- "dlgcameraspinbutton5"),
- c->targety);
- gtk_spin_button_set_value((GtkSpinButton *)
- glade_xml_get_widget(xml,
- "dlgcameraspinbutton6"),
- c->targetz);
-
-
- gtk_spin_button_set_value((GtkSpinButton *)
- glade_xml_get_widget(xml,
- "dlgcameraspinbutton7"),
- c->camera_vectorx * 360.0);
- gtk_spin_button_set_value((GtkSpinButton *)
- glade_xml_get_widget(xml,
- "dlgcameraspinbutton8"),
- c->camera_vectory * 360.0);
- gtk_spin_button_set_value((GtkSpinButton *)
- glade_xml_get_widget(xml,
- "dlgcameraspinbutton9"),
- c->camera_vectorz * 360.0);
-
-
-
-
-
- gtk_widget_hide(glade_xml_get_widget(xml, "dlgCamera"));
- gtk_widget_show(glade_xml_get_widget(xml, "dlgCamera"));
- gtk_window_set_keep_above((GtkWindow *)
- glade_xml_get_widget(xml, "dlgCamera"), 1);
- view->selected_camera = c;
- return 1;
-
-
-}
-
+#if 0
int save_camera_settings(viewport_camera * c)
{
c->x = (float) gtk_spin_button_get_value((GtkSpinButton *)
(GtkWidget * widget, gpointer user_data) {
gtk_widget_hide(glade_xml_get_widget(xml, "dlgCamera"));
}
+#endif
extern "C" {
#endif
- viewport_camera *add_camera_to_viewport(ViewInfo * view);
+#if 0
void set_camera_x_y(viewport_camera * c);
int delete_camera_from_viewport(ViewInfo * view, viewport_camera * c);
+ viewport_camera *add_camera_to_viewport(ViewInfo * view);
int activate_viewport_camera(ViewInfo * view, int cam_index);
- int refresh_viewport_camera(ViewInfo * view);
- void attach_camera_widget(ViewInfo * view);
- int show_camera_settings(viewport_camera * c);
- int save_camera_settings(viewport_camera * c);
- _BB void dlgcameraokbutton_clicked_cb(GtkWidget * widget,
- gpointer user_data);
_BB void dlgcameracancelbutton_clicked_cb(GtkWidget * widget,
gpointer user_data);
+ _BB void dlgcameraokbutton_clicked_cb(GtkWidget * widget,
+ gpointer user_data);
+ int refresh_viewport_camera(ViewInfo * view);
+ int save_camera_settings(viewport_camera * c);
+ int show_camera_settings(viewport_camera * c);
+#endif
+ extern void attach_camera_widget(ViewInfo * view);
extern void menu_click_add_camera(void *p);
#ifdef __cplusplus