Main Page   Namespace List   Class Hierarchy   Compound List   File List   Compound Members   File Members  

gui.h

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


Web page maintained by Steve LaValle
Partial support provided by NSF CAREER Award IRI-970228 (LaValle), Honda Research.
Contributors: Anna Atramentov, Peng Cheng, James Kuffner, Steve LaValle, and Libo Yang.