00001 //---------------------------------------------------------------------- 00002 // The Motion Strategy Library (MSL) 00003 //---------------------------------------------------------------------- 00004 // 00005 // Copyright (c) University of Illinois and Steven M. LaValle. 00006 // All Rights Reserved. 00007 // 00008 // Permission to use, copy, and distribute this software and its 00009 // documentation is hereby granted free of charge, provided that 00010 // (1) it is not a component of a commercial product, and 00011 // (2) this notice appears in all copies of the software and 00012 // related documentation. 00013 // 00014 // The University of Illinois and the author make no representations 00015 // about the suitability or fitness of this software for any purpose. 00016 // It is provided "as is" without express or implied warranty. 00017 //---------------------------------------------------------------------- 00018 00019 #ifndef MSL_GUI_H 00020 #define MSL_GUI_H 00021 00022 // FOX GUI library 00023 // #include <fx.h> 00024 #include "../../configs/configFOX.h" 00025 00026 #include "problem.h" 00027 #include "scene.h" 00028 #include "render.h" 00029 #include "util.h" 00030 00031 class Render; // This needs to be here because of mutual reference 00032 00034 00045 class Gui { 00046 protected: 00047 string FilePath; 00048 00050 virtual void CreateWindow() {}; 00051 00053 virtual void Init(); 00054 00056 virtual void MainLoop(); 00057 00059 00060 public: 00061 Gui(Render *render); 00062 virtual ~Gui() {}; 00063 00064 Render *R; 00065 00067 virtual void Start(); 00068 00070 bool Finished; 00071 00073 virtual void HandleEvents() = 0; 00074 00076 virtual void ButtonHandle(int b) {}; 00077 }; 00078 00079 00080 // ID numbers for GUIs 00081 // (a simple, not-so-elegant way to avoid name ID conflicts) 00082 00083 enum { 00084 // Special IDs used by Render 00085 GID_RENDER_FIRST = FXMainWindow::ID_LAST, 00086 GID_TOGGLE_SHOWPATH, 00087 GID_TOGGLE_BOUNDINGBOX, 00088 GID_TOGGLE_MULTIPLEVIEWS, 00089 GID_TOGGLE_ATTACHEDCAMERA, 00090 GID_VCR_STOP, 00091 GID_VCR_LAST, 00092 GID_VCR_PAUSE, 00093 GID_VCR_NEXT, 00094 GID_VCR_SLOWER, 00095 GID_VCR_PLAY, 00096 GID_VCR_FASTER, 00097 GID_VCR_RESET, 00098 GID_RENDER_LAST, 00099 00100 // General Gui IDs 00101 GID_CONSTRUCT, 00102 GID_PLAN, 00103 GID_CLEAR_GRAPHS, 00104 GID_2D_GRAPH, 00105 GID_SAVE_GRAPHS, 00106 GID_LOAD_GRAPHS, 00107 GID_SAVE_FRAMES, 00108 GID_LOAD_FRAMES, 00109 GID_SAVE_POLICY, 00110 GID_LOAD_POLICY, 00111 GID_DONE, 00112 00113 GID_RRT, 00114 GID_RRTGOALBIAS, 00115 GID_RRTCON, 00116 GID_RRTDUAL, 00117 GID_RRTEXTEXT, 00118 GID_RRTEXTCON, 00119 GID_RRTCONCON, 00120 GID_RCRRT, 00121 GID_RCRRTEXTEXT, 00122 GID_RRTBIDIRBALANCED, 00123 GID_PRM, 00124 GID_FDP, 00125 GID_FDPSTAR, 00126 GID_FDPBESTFIRST, 00127 GID_FDPBI, 00128 00129 GID_LAST 00130 }; 00131 00132 00133 00134 #endif