30 case GLUT_LEFT_BUTTON:
32 case GLUT_RIGHT_BUTTON:
34 case GLUT_MIDDLE_BUTTON:
52 glMatrixMode(GL_PROJECTION);
66 glMatrixMode(GL_MODELVIEW);
74 glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
89 if (
view->
g == 0)
return;
97 if (button == GLUT_LEFT_BUTTON)
99 if (button == GLUT_RIGHT_BUTTON)
101 if (button == GLUT_MIDDLE_BUTTON)
111 if (button == GLUT_LEFT_BUTTON || button == GLUT_RIGHT_BUTTON ||
112 button == GLUT_MIDDLE_BUTTON)
184 printf(
"Currently help is not available\n");
197 printf(
"Currently help is not available\n");
206 glutGameModeString(optArg);
207 if (glutGameModeGet(GLUT_GAME_MODE_POSSIBLE))
213 printf(
"smyrna cannot initialize requested screen resolution and rate!\n");
219int cb_glutinit(
int w,
int h,
int *argcp,
char *argv[],
char *optArg) {
227 glutInit(argcp,argv);
229 glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGBA | GLUT_DEPTH);
233 glEnable(GL_DEPTH_TEST);
234 glDepthFunc(GL_LEQUAL);
235 glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST);
247 glutPassiveMotionFunc(
NULL);
248 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)