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;
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)
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));
}
}
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;*/
-
-
-
}