00001 /* 00002 * Copyright (C) 2003 Eric Bohm 00003 * 00004 *This program is free software; you can redistribute it and/or modify 00005 *it under the terms of the GNU General Public License as published by 00006 *the Free Software Foundation version 2 of the License. 00007 * 00008 *This program is distributed in the hope that it will be useful, but 00009 *WITHOUT ANY WARRANTY; without even the implied warranty of 00010 *MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00011 *General Public License for more details. 00012 * 00013 *You should have received a copy of the GNU General Public License along 00014 *with this program; if not, write to the Free Software Foundation, Inc., 00015 *675 Mass Ave, Cambridge, MA 02139, USA. 00016 * 00017 */ 00018 00019 00023 #include <mui/mui.h> 00024 #include <stdio.h> 00025 #include <stdlib.h> 00026 #include "View.h" 00027 using namespace std; 00028 00029 00031 00035 00036 00040 00041 00043 00045 00064 00065 00067 00069 00071 00073 00074 /* 00075 * 00076 Integration todos. 00077 Restructure initialization of glut with mui in mind. 00078 Replace glut callbacks like keyboard with mui. 00079 00080 */ 00081 extern View view; 00082 void menucallback(int x) 00083 { 00084 switch (x) 00085 { 00086 case 1: //reload 00087 break; 00088 case 2: //exit 00089 exit(0); 00090 break; 00091 } 00092 } 00093 00094 void bcallback(muiObject *obj, enum muiReturnValue r) 00095 { 00096 obj = obj; r = r; /* for lint's sake */ 00097 printf("button callback %d\n",r); 00098 view.next_step(); 00099 view.display(); 00100 }