30 case GLUT_LEFT_BUTTON:
32 case GLUT_RIGHT_BUTTON:
34 case GLUT_MIDDLE_BUTTON:
53 glGetIntegerv(GL_VIEWPORT, vPort);
55 glMatrixMode(GL_PROJECTION);
69 glMatrixMode(GL_MODELVIEW);
77 glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
92 if (
view->
g == 0)
return;
100 if (button == GLUT_LEFT_BUTTON)
102 if (button == GLUT_RIGHT_BUTTON)
104 if (button == GLUT_MIDDLE_BUTTON)
114 if (button == GLUT_LEFT_BUTTON || button == GLUT_RIGHT_BUTTON ||
115 button == GLUT_MIDDLE_BUTTON)
187 printf(
"Currently help is not available\n");
200 printf(
"Currently help is not available\n");
209 glutGameModeString(optArg);
210 if (glutGameModeGet(GLUT_GAME_MODE_POSSIBLE))
216 printf(
"smyrna cannot initialize requested screen resolution and rate!\n");
222int cb_glutinit(
int w,
int h,
int *argcp,
char *argv[],
char *optArg) {
230 glutInit(argcp,argv);
232 glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGBA | GLUT_DEPTH);
236 glEnable(GL_DEPTH_TEST);
237 glDepthFunc(GL_LEQUAL);
238 glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST);
250 glutPassiveMotionFunc(
NULL);
251 glutVisibilityFunc(
NULL);
void appmouse_drag(ViewInfo *v, int x, int y)
void appmouse_key_release(ViewInfo *v)
void appmouse_move(ViewInfo *v, int x, int y)
void appmouse_key_press(ViewInfo *v, int key)
void appmouse_middle_click_down(ViewInfo *v, int x, int y)
void appmouse_left_click_down(ViewInfo *v, int x, int y)
void appmouse_right_click_down(ViewInfo *v, int x, int y)
void appmouse_up(ViewInfo *v, int x, int y)
void init_arcBall(ArcBall_t *a, float NewWidth, float NewHeight)
static NORETURN void graphviz_exit(int status)
#define X(prefix, name, str, type, subtype,...)
void glcompsetUpdateBorder(glCompSet *s, int w, int h)
void switch2D3D(glCompObj *obj, float x, float y, glMouseButtonType t)
void menu_click_zoom_minus(glCompObj *obj, float x, float y, glMouseButtonType t)
void menu_click_center(glCompObj *obj, float x, float y, glMouseButtonType t)
void menu_click_pan(glCompObj *obj, float x, float y, glMouseButtonType t)
void menu_click_zoom_plus(glCompObj *obj, float x, float y, glMouseButtonType t)
int glexpose_main(ViewInfo *vi)
static void cb_game_mode(char *optArg)
static void cb_drag(int X, int Y)
static void cb_special_key(int key, int x, int y)
static void cb_mouseclick(int button, int state, int x, int y)
static void cb_display(void)
static void cb_keyboard(unsigned char key, int x, int y)
static void cb_special_key_up(int key, int x, int y)
static void cb_keyboard_up(unsigned char key, int x, int y)
static glMouseButtonType getGlCompMouseType(int n)
static void cb_reshape(int width, int height)
int cb_glutinit(int w, int h, int *argcp, char *argv[], char *optArg)
#define GL_VIEWPORT_FACTOR
glcompmouseupfunc_t mouseup
glcompmousedownfunc_t mousedown
glcompmouseoverfunc_t mouseover
glCompCallBacks functions
void close_graph(ViewInfo *vi)
int add_graph_to_viewport_from_file(char *fileName)