]> granicus.if.org Git - graphviz/commitdiff
remove commented out code
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Mon, 19 Apr 2021 00:50:12 +0000 (17:50 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Sun, 25 Apr 2021 18:58:21 +0000 (11:58 -0700)
cmd/smyrna/hotkeymap.c

index 670f74275fd4c8eb8ecd2ef7e4e9d6149cddf202..20b2ebe3336c093179f40e29946b64f2b6f07f5d 100644 (file)
@@ -112,15 +112,6 @@ static int get_drag(const char *s)
 
 void load_mouse_actions(char *modefile, ViewInfo * v)
 {
-/*#define MM_PAN                                       0
-#define MM_ZOOM                                        1
-#define MM_ROTATE                              2
-#define MM_SINGLE_SELECT               3
-#define MM_RECTANGULAR_SELECT  4
-#define MM_RECTANGULAR_X_SELECT        5
-#define MM_MOVE                                        10
-#define MM_MAGNIFIER                   20
-#define MM_FISHEYE_MAGNIFIER   21*/
     /*file parsing is temporarrily not available */
     int i = 0;
     FILE *file;
@@ -169,72 +160,6 @@ void load_mouse_actions(char *modefile, ViewInfo * v)
        fclose(file);
     }
     free(action_file);
-
-
-/*
-    v->mouse_action_count=7;
-    v->mouse_actions=realloc(v->mouse_actions,v->mouse_action_count * sizeof(mouse_action_t));
-    v->mouse_actions[ind].action=MM_PAN;
-    v->mouse_actions[ind].drag=1;
-    v->mouse_actions[ind].hotkey=0;
-    v->mouse_actions[ind].index=ind;
-    v->mouse_actions[ind].mode=smyrna_all;
-    v->mouse_actions[ind].type=glMouseLeftButton;
-
-    ind++;
-
-    v->mouse_actions[ind].action=MM_ROTATE;
-    v->mouse_actions[ind].drag=1;
-    v->mouse_actions[ind].hotkey=B_LSHIFT;
-    v->mouse_actions[ind].index=ind;
-    v->mouse_actions[ind].mode=smyrna_3D;
-    v->mouse_actions[ind].type=glMouseLeftButton;
-
-    ind++;
-
-    v->mouse_actions[ind].action=MM_SINGLE_SELECT;
-    v->mouse_actions[ind].drag=0;
-    v->mouse_actions[ind].hotkey=0;
-    v->mouse_actions[ind].index=ind;
-    v->mouse_actions[ind].mode=smyrna_all_but_fisheye;
-    v->mouse_actions[ind].type=glMouseLeftButton;
-
-    ind++;
-
-    v->mouse_actions[ind].action=MM_RECTANGULAR_SELECT;
-    v->mouse_actions[ind].drag=1;
-    v->mouse_actions[ind].hotkey=0;
-    v->mouse_actions[ind].index=ind;
-    v->mouse_actions[ind].mode=smyrna_all;
-    v->mouse_actions[ind].type=glMouseRightButton;
-
-    ind++;
-
-    v->mouse_actions[ind].action=MM_MOVE;
-    v->mouse_actions[ind].drag=1;
-    v->mouse_actions[ind].hotkey=B_LCTRL;
-    v->mouse_actions[ind].index=ind;
-    v->mouse_actions[ind].mode=smyrna_2D;
-    v->mouse_actions[ind].type=glMouseLeftButton;
-
-    ind++;
-
-    v->mouse_actions[ind].action=MM_FISHEYE_MAGNIFIER;
-    v->mouse_actions[ind].drag=1;
-    v->mouse_actions[ind].hotkey=B_LSHIFT;
-    v->mouse_actions[ind].index=ind;
-    v->mouse_actions[ind].mode=smyrna_2D;
-    v->mouse_actions[ind].type=glMouseLeftButton;
-
-    ind++;
-
-    v->mouse_actions[ind].action=MM_FISHEYE_PICK;
-    v->mouse_actions[ind].drag=0;
-    v->mouse_actions[ind].hotkey=0;
-    v->mouse_actions[ind].index=ind;
-    v->mouse_actions[ind].mode=smyrna_fisheye;
-    v->mouse_actions[ind].type=glMouseRightButton;
-*/
 }
 
 int get_key_action(ViewInfo * v, int key)
@@ -251,17 +176,6 @@ int get_key_action(ViewInfo * v, int key)
 
 int get_mode(ViewInfo * v)
 {
-
-
-/*#define F_BUTTON1   B_LSHIFT
-#define F_BUTTON2   B_RSHIFT
-#define F_BUTTON3   B_LCTRL
-#define F_BUTTON4   B_LCTRL
-
-#define MOUSE_BUTTON_1 LEFT_MOUSE_BUTTON
-#define MOUSE_BUTTON_2  RIGHT_MOUSE_BUTTON
-#define MOUSE_BUTTON_3 MIDDLE_MOUSE_BUTTON*/
-//typedef enum {smyrna_2D,smyrna_3D,smyrna_fisheye} smyrna_view_mode;
     int ind = 0;
     glMouseButtonType curMouseType = v->mouse.t;
     int curDragging = ((v->mouse.dragX != 0) || (v->mouse.dragY != 0));
@@ -289,22 +203,4 @@ int get_mode(ViewInfo * v)
        }
     }
     return -1;
-
-
-
-
-
-/*    if ((view->mouse.t==MOUSE_BUTTON_1)&&(view->keymap.down) && (view->keymap.keyVal ==F_BUTTON1) && (view->active_camera==-1))
-       return MM_FISHEYE_MAGNIFIER;
-    if ((view->mouse.t==MOUSE_BUTTON_1)&&(view->keymap.down) && (view->keymap.keyVal == F_BUTTON1) && (view->active_camera>-1))
-       return MM_ROTATE;
-    if ((view->mouse.t==MOUSE_BUTTON_1)&&(view->keymap.down) && (view->keymap.keyVal == F_BUTTON3)) 
-       return MM_MOVE;
-    if ((view->mouse.t==MOUSE_BUTTON_1)&&(view->mouse.down) ) 
-       return MM_PAN;
-    if ((view->mouse.t==MOUSE_BUTTON_2)&&(view->mouse.down) ) 
-       return MM_RECTANGULAR_SELECT;*/
-
-
-
 }