Klamp't  0.8.1
4 #include <KrisLibrary/GLdraw/GLUTProgram.h>
5 #include "GenericGUI.h"
7 class GLUTGUI : public GenericGUIBase, public GLUTProgramBase
8 {
9  public:
10  GLUTGUI(GenericBackendBase* backend=NULL,int w=800,int h=600);
11  virtual ~GLUTGUI() {}
12  //if you want to set up the window title, it must be called before Run()
13  void SetWindowTitle(const char* title) { window_title = title; }
14  //if you want to set up the display mode, it must be called before Run()
15  void SetDisplayMode(int mode) { displayMode = mode; }
18  virtual bool Initialize();
19  virtual void Handle_Display();
20  virtual void Handle_Reshape(int w,int h);
21  virtual void Handle_Keypress(unsigned char key,int x,int y);
22  virtual void Handle_KeypressUp(unsigned char key,int x,int y);
23  virtual void Handle_Special(int key,int x,int y);
24  virtual void Handle_SpecialUp(int key,int x,int y);
25  virtual void Handle_Click(int button,int state,int x,int y);
26  virtual void Handle_Drag(int x,int y);
27  virtual void Handle_Motion(int x,int y);
28  virtual void Handle_Idle();
30  virtual void Run();
31  virtual bool OnQuit();
32  virtual bool OnNotify(const string& text,const string& msglevel);
33  virtual bool OnPauseIdle(double secs);
34  virtual bool OnRefresh();
35  virtual bool OnDrawText(double x, double y, double z, const std::string &text, int height);
36  virtual bool OnDrawText(int x, int y, const std::string &text, int height);
38  string window_title;
39  unsigned int displayMode;
40 };
43 #endif
Definition: GLUTGUI.h:7
virtual void Run()
Default implementation does nothing but startup and shutdown the interface.
A base class for a GUI frontend. Performs message passing to the backend in the easily serializable A...
Definition: GenericGUI.h:25
Definition: GenericGUI.h:84
virtual bool Initialize()
Subclasses: put GL initialization code here.