00001 #ifndef CAMWND_H_ 00002 #define CAMWND_H_ 00003 00004 class CamWnd 00005 { 00006 private: 00007 View m_view; 00008 camera_t m_Camera; 00009 CameraView m_cameraview; 00010 00011 guint m_freemove_handle_focusout; 00012 00013 static Shader* m_state_select1; 00014 static Shader* m_state_select2; 00015 00016 FreezePointer m_freezePointer; 00017 00018 public: 00019 GtkWidget* m_gl_widget; 00020 GtkWindow* m_parent; 00021 00022 SelectionSystemWindowObserver* m_window_observer; 00023 XORRectangle m_XORRectangle; 00024 00025 DeferredDraw m_deferredDraw; 00026 DeferredMotion m_deferred_motion; 00027 00028 guint m_selection_button_press_handler; 00029 guint m_selection_button_release_handler; 00030 guint m_selection_motion_handler; 00031 00032 guint m_freelook_button_press_handler; 00033 00034 guint m_sizeHandler; 00035 guint m_exposeHandler; 00036 00037 CamWnd (); 00038 ~CamWnd (); 00039 00040 bool m_drawing; 00041 void queue_draw () 00042 { 00043 if (m_drawing) { 00044 return; 00045 } 00046 m_deferredDraw.draw(); 00047 } 00048 void draw (); 00049 00050 static void captureStates () 00051 { 00052 m_state_select1 = GlobalShaderCache().capture("$CAM_HIGHLIGHT"); 00053 m_state_select2 = GlobalShaderCache().capture("$CAM_OVERLAY"); 00054 } 00055 static void releaseStates () 00056 { 00057 GlobalShaderCache().release("$CAM_HIGHLIGHT"); 00058 GlobalShaderCache().release("$CAM_OVERLAY"); 00059 } 00060 00061 camera_t& getCamera () 00062 { 00063 return m_Camera; 00064 } 00065 00066 void BenchMark (); 00067 void Cam_ChangeFloor (bool up); 00068 00069 void DisableFreeMove (); 00070 void EnableFreeMove (); 00071 bool m_bFreeMove; 00072 00073 CameraView& getCameraView () 00074 { 00075 return m_cameraview; 00076 } 00077 00078 private: 00079 void Cam_Draw (); 00080 }; 00081 00082 typedef MemberCaller<CamWnd, &CamWnd::queue_draw> CamWndQueueDraw; 00083 00084 #endif /* CAMWND_H_ */