Go to the documentation of this file.00001
00002
00003 #ifndef __GL_WINDOW_2_H
00004 #define __GL_WINDOW_2_H
00005
00006
00007
00008
00009
00010
00011 #include <cvd/glwindow.h>
00012 #include <TooN/TooN.h>
00013
00014 class GLWindowMenu;
00015
00016
00017 class GLWindow2 : public CVD::GLWindow, public CVD::GLWindow::EventHandler
00018 {
00019 public:
00020 GLWindow2(CVD::ImageRef irSize, std::string sTitle);
00021
00022
00023 void HandlePendingEvents();
00024
00025
00026 void AddMenu(std::string sName, std::string sTitle);
00027 void DrawMenus();
00028
00029
00030 void SetupViewport();
00031 void SetupVideoOrtho();
00032 void SetupUnitOrtho();
00033 void SetupWindowOrtho();
00034 void SetupVideoRasterPosAndZoom();
00035
00036
00037 void PrintString(CVD::ImageRef irPos, std::string s);
00038 void DrawCaption(std::string s);
00039
00040
00041 std::pair<TooN::Vector<6>, TooN::Vector<6> > GetMousePoseUpdate();
00042
00043
00044 protected:
00045 void GUICommandHandler(std::string sCommand, std::string sParams);
00046 static void GUICommandCallBack(void* ptr, std::string sCommand, std::string sParams);
00047
00048
00049 std::vector<GLWindowMenu*> mvpGLWindowMenus;
00050
00051 CVD::ImageRef mirVideoSize;
00052
00053
00054
00055 virtual void on_key_down(GLWindow&, int key);
00056 virtual void on_mouse_move(GLWindow& win, CVD::ImageRef where, int state);
00057 virtual void on_mouse_down(GLWindow& win, CVD::ImageRef where, int state, int button);
00058 virtual void on_event(GLWindow& win, int event);
00059 CVD::ImageRef mirLastMousePos;
00060
00061
00062 TooN::Vector<6> mvMCPoseUpdate;
00063 TooN::Vector<6> mvLeftPoseUpdate;
00064
00065
00066 };
00067
00068
00069
00070
00071
00072
00073
00074
00075 #endif