00001 #ifndef vgui_glut_menu_hack_h_ 00002 #define vgui_glut_menu_hack_h_ 00003 // .LIBRARY vgui-glut 00004 /* 00005 fsm 00006 */ 00007 00008 struct vgui_glut_menu_hack 00009 { 00010 // button is one of GLUT_LEFT_BUTTON, GLUT_MIDDLE_BUTTON, GLUT_RIGHT_BUTTON 00011 // mods is one of GLUT_ACTIVE_SHIFT, GLUT_ACTIVE_CTRL, GLUT_ACTIVE_ALT 00012 // unbind by using menu_id=0 00013 static void bind(int button, int mods, int menu_id); 00014 00015 // 00016 static bool mouse(int button, int state, int x,int y); 00017 static void menustatus(int status,int x,int y); 00018 static void (*last_minute_change_callback)(int menu_id); 00019 00020 struct per_window_record; 00021 00022 private: 00023 static bool active; 00024 static int glut_button; // the relevant button. 00025 static int find_index(int button, int mods);// returns -1 on failure. 00026 }; 00027 00028 #endif // vgui_glut_menu_hack_h_