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 #include "problem.h" 00023 #include "scene.h" 00024 #include "render.h" 00025 00026 // FOX GUI library 00027 #include <fx.h> 00028 00029 class Render; // This needs to be here because of mutual reference 00030 00032 00043 class Gui { 00044 protected: 00045 string FilePath; 00046 00048 virtual void CreateWindow() {}; 00049 00051 virtual void Init(); 00052 00054 virtual void MainLoop(); 00055 00057 00058 public: 00059 Gui(Render *render); 00060 virtual ~Gui() {}; 00061 00062 Render *R; 00063 00065 virtual void Start(); 00066 00068 bool Finished; 00069 00071 virtual void HandleEvents() = 0; 00072 00074 virtual void ButtonHandle(int b) {}; 00075 }; 00076 00077 00078 // ID numbers for GUIs 00079 // (a simple, not-so-elegant way to avoid name ID conflicts) 00080 00081 enum { 00082 // Special IDs used by Render 00083 GID_RENDER_FIRST = FXMainWindow::ID_LAST, 00084 GID_TOGGLE_SHOWPATH, 00085 GID_TOGGLE_BOUNDINGBOX, 00086 GID_TOGGLE_MULTIPLEVIEWS, 00087 GID_TOGGLE_ATTACHEDCAMERA, 00088 GID_VCR_STOP, 00089 GID_VCR_LAST, 00090 GID_VCR_PAUSE, 00091 GID_VCR_NEXT, 00092 GID_VCR_SLOWER, 00093 GID_VCR_PLAY, 00094 GID_VCR_FASTER, 00095 GID_VCR_RESET, 00096 GID_RENDER_LAST, 00097 00098 // General Gui IDs 00099 GID_CONSTRUCT, 00100 GID_PLAN, 00101 GID_CLEAR_GRAPHS, 00102 GID_2D_GRAPH, 00103 GID_SAVE_GRAPHS, 00104 GID_LOAD_GRAPHS, 00105 GID_SAVE_FRAMES, 00106 GID_LOAD_FRAMES, 00107 GID_SAVE_PATH, 00108 GID_LOAD_PATH, 00109 GID_DONE, 00110 00111 GID_RRT, 00112 GID_RRTGOALBIAS, 00113 GID_RRTCON, 00114 GID_RRTDUAL, 00115 GID_RRTEXTEXT, 00116 GID_RRTEXTCON, 00117 GID_RRTCONCON, 00118 GID_PRM, 00119 GID_FDP, 00120 GID_FDPSTAR, 00121 GID_FDPBESTFIRST, 00122 GID_FDPBI, 00123 00124 GID_LAST 00125 }; 00126 00127 00128 00129 #endif