00001 /*! \file wx/editor/sttoolext.h 00002 \brief tool special for zooming image objects 00003 \author Klaas Holwerda 00004 00005 Copyright: 2001-2004 (c) Klaas Holwerda 00006 00007 Licence: wxWidgets Licence 00008 00009 RCS-ID: $Id: sttoolext.h,v 1.9 2006/12/13 21:43:29 titato Exp $ 00010 */ 00011 00012 #ifndef __A2DCANVASSTTOOLEXT_H__ 00013 #define __A2DCANVASSTTOOLEXT_H__ 00014 00015 #include "a2dprivate.h" 00016 00017 #if wxART2D_USE_CANEXTOBJ 00018 #include "wx/canextobj/canextmod.h" 00019 00020 #ifndef WX_PRECOMP 00021 #include "wx/wx.h" 00022 #endif 00023 00024 #include "wx/canvas/canmod.h" 00025 #include "wx/editor/sttool.h" 00026 00027 //!Interactive Zooming into a a2dRenderImage canvasobject. 00028 /*!draging a rectangle to zoom into area. 00029 00030 \remark Left Click and/or drag. 00031 \remark Right Click for zoom popup. 00032 \remark Double Left Click for zoom out. 00033 00034 \sa a2dStToolContr 00035 */ 00036 class A2DEDITORDLLEXP a2dRenderImageZoomTool: public a2dStTool 00037 { 00038 public: 00039 00040 //! push this tool on the tools stack 00041 /*! \ingroup commandid 00042 */ 00043 static const a2dCommandId COMID_PushTool_RenderImageZoom; 00044 00045 a2dRenderImageZoomTool(a2dStToolContr* controller); 00046 ~a2dRenderImageZoomTool(); 00047 bool ZoomSave(){return true;}; 00048 00049 protected: 00050 00051 void OnChar(wxKeyEvent& event); 00052 00053 void OnMouseEvent(wxMouseEvent& event); 00054 00055 //!mouse position used for zooming 00056 int m_zoom_x1; 00057 //!mouse position used for zooming 00058 int m_zoom_y1; 00059 //!mouse position used for zooming 00060 int m_zoom_x2; 00061 //!mouse position used for zooming 00062 int m_zoom_y2; 00063 00064 a2dRenderImage* m_renderimage; 00065 00066 public: 00067 DECLARE_CLASS(a2dRenderImageZoomTool) 00068 A2D_DECLARE_EVENT_TABLE() 00069 00070 }; 00071 00072 00073 #endif //wxART2D_USE_CANEXTOBJ 00074 00075 #endif /* __A2DCANVASSTTOOL_H__ */ 00076 00077