Main Page | Modules | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members | Related Pages
hugin1/hugin/PreviewTool.h
Go to the documentation of this file.00001 // -*- c-basic-offset: 4 -*- 00002 00023 #ifndef _PREVIEWTOOL_H 00024 #define _PREVIEWTOOL_H 00025 00026 #include "hugin_utils/utils.h" 00027 #include <wx/event.h> 00028 00029 #include "PreviewToolHelper.h" 00030 00031 /* PreviewTool is an abstract base class for the interactive tools that work 00032 * with the OpenGL accelerated preview. They can respond to the users actions 00033 * over the preview, or changes in the panorama, and can draw extras above, 00034 * below, or instead of the panorama images. 00035 * 00036 * The *Event functions are only called when the Tool requested a notification. 00037 * Tools may do this through an instance of the PreviewToolHelper class which 00038 * is passed by pointer on construction. When a tool is decativated, all the 00039 * notifications it monitors are removed. 00040 */ 00041 class PreviewTool 00042 { 00043 public: 00047 PreviewTool(PreviewToolHelper *helper); 00048 00049 virtual ~PreviewTool(); 00050 // Lots of stub functions here. Your tools should override a few of them. 00051 00058 virtual void Activate() = 0; 00059 00067 virtual void MouseMoveEvent(double x, double y, wxMouseEvent & e) {} 00071 virtual void MouseButtonEvent(wxMouseEvent &e) {} 00075 virtual void ImagesUnderMouseChangedEvent() {} 00079 virtual void KeypressEvent(int keycode, int modifiers, bool pressed) {} 00081 virtual void BeforeDrawImagesEvent() {} 00083 virtual void AfterDrawImagesEvent() {} 00085 virtual void ReallyAfterDrawImagesEvent() {} 00093 virtual bool BeforeDrawImageEvent(unsigned int image) {return true;} 00095 virtual void AfterDrawImageEvent(unsigned int image) {} 00096 protected: 00100 PreviewToolHelper *helper; 00101 }; 00102 00103 #endif 00104
1.3.9.1