From 5c492ab370ed90bb7bef4fc4054ca6991b3cab26 Mon Sep 17 00:00:00 2001 From: arif Date: Mon, 3 Mar 2008 15:37:41 +0000 Subject: [PATCH] *** empty log message *** --- cmd/smyrna/gui/toolboxcallbacks.c | 110 ++++++++++++++++++++++++++++++ cmd/smyrna/gui/toolboxcallbacks.h | 50 ++++++++++++++ 2 files changed, 160 insertions(+) create mode 100755 cmd/smyrna/gui/toolboxcallbacks.c create mode 100755 cmd/smyrna/gui/toolboxcallbacks.h diff --git a/cmd/smyrna/gui/toolboxcallbacks.c b/cmd/smyrna/gui/toolboxcallbacks.c new file mode 100755 index 000000000..acbb924d8 --- /dev/null +++ b/cmd/smyrna/gui/toolboxcallbacks.c @@ -0,0 +1,110 @@ +/* $Id$ $Revision$ */ +/* vim:set shiftwidth=4 ts=8: */ + +/********************************************************** +* This software is part of the graphviz package * +* http://www.graphviz.org/ * +* * +* Copyright (c) 1994-2004 AT&T Corp. * +* and is licensed under the * +* Common Public License, Version 1.0 * +* by AT&T Corp. * +* * +* Information and Software Systems Research * +* AT&T Research, Florham Park NJ * +**********************************************************/ + +#include "toolboxcallbacks.h" +#include "viewport.h" + + +void btnToolSingleSelect_clicked(GtkWidget *widget,gpointer user_data) +{ + deselect_all(view->g[view->activeGraph]); + switch_Mouse (NULL,3); +} +void btnToolRectSelect_clicked(GtkWidget *widget,gpointer user_data) +{ + + deselect_all(view->g[view->activeGraph]); + view->Selection.Anti=0; + switch_Mouse (NULL,4); +} + +void btnToolRectXSelect_clicked (GtkWidget *widget,gpointer user_data) +{ + deselect_all(view->g[view->activeGraph]); + view->Selection.Anti=0; + switch_Mouse (NULL,5); +} + +void btnToolAntiRectSelect_clicked (GtkWidget *widget,gpointer user_data) +{ + view->Selection.Anti=1; + switch_Mouse (NULL,4); + +} +void btnToolAntiRectXSelect_clicked (GtkWidget *widget,gpointer user_data) +{ + view->Selection.Anti=1; + switch_Mouse (NULL,5); + +} + + +void btnToolPan_clicked (GtkWidget *widget,gpointer user_data) +{ + switch_Mouse (NULL,0); +} +void btnToolZoom_clicked (GtkWidget *widget,gpointer user_data) +{ + switch_Mouse (NULL,1); +} +void btnToolZoomIn_clicked (GtkWidget *widget,gpointer user_data) +{ + view->zoom = view->zoom + ZOOM_STEP; + if(view->zoom > MAX_ZOOM) + view->zoom=MAX_ZOOM; + expose_event (view->drawing_area,NULL,NULL); + +} +void btnToolZoomOut_clicked (GtkWidget *widget,gpointer user_data) +{ + view->zoom = view->zoom - ZOOM_STEP; + if(view->zoom < MIN_ZOOM) + view->zoom=MIN_ZOOM; + expose_event (view->drawing_area,NULL,NULL); +} +void btnToolFit_clicked (GtkWidget *widget,gpointer user_data) +{ + printf("btnToolFit_clicked\n"); +} +void btnToolMove_clicked (GtkWidget *widget,gpointer user_data) +{ + switch_Mouse (NULL,10); +} +void btnToolAddNode_clicked (GtkWidget *widget,gpointer user_data) +{ + printf("btnToolAddNode_clicked\n"); +} +void btnToolDeleteNode_clicked (GtkWidget *widget,gpointer user_data) +{ + printf("btnToolDeleteNode_clicked\n"); +} +void btnToolFindNode_clicked (GtkWidget *widget,gpointer user_data) +{ + printf("btnToolFindNode_clicked\n"); +} +void btnToolAddEdge_clicked (GtkWidget *widget,gpointer user_data) +{ + printf("btnToolAddEdge_clicked\n"); +} +void btnToolDeleteEdge_clicked (GtkWidget *widget,gpointer user_data) +{ + printf("btnToolDeleteEdge_clicked\n"); +} +void btnToolFindEdge_clicked (GtkWidget *widget,gpointer user_data) +{ + printf("btnToolFindEdge_clicked\n"); + printf("zoom :%f\n",view->zoom); +} diff --git a/cmd/smyrna/gui/toolboxcallbacks.h b/cmd/smyrna/gui/toolboxcallbacks.h new file mode 100755 index 000000000..b6861181a --- /dev/null +++ b/cmd/smyrna/gui/toolboxcallbacks.h @@ -0,0 +1,50 @@ +/* $Id$ $Revision$ */ +/* vim:set shiftwidth=4 ts=8: */ + +/********************************************************** +* This software is part of the graphviz package * +* http://www.graphviz.org/ * +* * +* Copyright (c) 1994-2004 AT&T Corp. * +* and is licensed under the * +* Common Public License, Version 1.0 * +* by AT&T Corp. * +* * +* Information and Software Systems Research * +* AT&T Research, Florham Park NJ * +**********************************************************/ + +#ifndef TOOLBOXCALLBACKS_H +#define TOOLBOXCALLBACKS_H +#include +#include "gui.h" +#if WIN32 +#define _BB __declspec(dllexport) +#else +#define _BB /**/ +#endif +_BB void btnToolSingleSelect_clicked (GtkWidget *widget,gpointer user_data); +_BB void btnToolRectSelect_clicked (GtkWidget *widget,gpointer user_data); +_BB void btnToolRectXSelect_clicked (GtkWidget *widget,gpointer user_data); + +_BB void btnToolAntiRectSelect_clicked (GtkWidget *widget,gpointer user_data); +_BB void btnToolAntiRectXSelect_clicked (GtkWidget *widget,gpointer user_data); + + + +_BB void btnToolPan_clicked (GtkWidget *widget,gpointer user_data); +_BB void btnToolZoom_clicked (GtkWidget *widget,gpointer user_data); +_BB void btnToolZoomIn_clicked (GtkWidget *widget,gpointer user_data); +_BB void btnToolZoomOut_clicked (GtkWidget *widget,gpointer user_data); +_BB void btnToolFit_clicked (GtkWidget *widget,gpointer user_data); +_BB void btnToolMove_clicked (GtkWidget *widget,gpointer user_data); +_BB void btnToolAddNode_clicked (GtkWidget *widget,gpointer user_data); +_BB void btnToolDeleteNode_clicked (GtkWidget *widget,gpointer user_data); +_BB void btnToolFindNode_clicked (GtkWidget *widget,gpointer user_data); +_BB void btnToolAddEdge_clicked (GtkWidget *widget,gpointer user_data); +_BB void btnToolDeleteEdge_clicked (GtkWidget *widget,gpointer user_data); +_BB void btnToolFindEdge_clicked (GtkWidget *widget,gpointer user_data); + + + +#endif -- 2.40.0