wxArt2D
sttoolext.h
1 /*! \file wx/editor/sttoolext.h
2  \brief tool special for zooming image objects
3  \author Klaas Holwerda
4 
5  Copyright: 2001-2004 (c) Klaas Holwerda
6 
7  Licence: wxWidgets Licence
8 
9  RCS-ID: $Id: sttoolext.h,v 1.9 2006/12/13 21:43:29 titato Exp $
10 */
11 
12 #ifndef __A2DCANVASSTTOOLEXT_H__
13 #define __A2DCANVASSTTOOLEXT_H__
14 
15 #include "a2dprivate.h"
16 
17 #if wxART2D_USE_CANEXTOBJ
18 #include "wx/canextobj/canextmod.h"
19 
20 #ifndef WX_PRECOMP
21 #include "wx/wx.h"
22 #endif
23 
24 #include "wx/canvas/canmod.h"
25 #include "wx/canvas/sttool.h"
26 
27 //!Interactive Zooming into a a2dRenderImage canvasobject.
28 /*!draging a rectangle to zoom into area.
29 
30 \remark Left Click and/or drag.
31 \remark Right Click for zoom popup.
32 \remark Double Left Click for zoom out.
33 
34 \sa a2dStToolContr
35 */
36 class A2DEDITORDLLEXP a2dRenderImageZoomTool: public a2dStTool
37 {
38 public:
39 
40  //! push this tool on the tools stack
41  /*! \ingroup commandid
42  */
44 
47  bool ZoomSave() {return true;};
48 
49 protected:
50 
51  void OnChar( wxKeyEvent& event );
52 
53  void OnMouseEvent( wxMouseEvent& event );
54 
55  //!mouse position used for zooming
56  int m_zoom_x1;
57  //!mouse position used for zooming
58  int m_zoom_y1;
59  //!mouse position used for zooming
60  int m_zoom_x2;
61  //!mouse position used for zooming
62  int m_zoom_y2;
63 
64  a2dRenderImage* m_renderimage;
65 
66 public:
67  DECLARE_CLASS( a2dRenderImageZoomTool )
68  DECLARE_EVENT_TABLE()
69 
70 };
71 
72 
73 #endif //wxART2D_USE_CANEXTOBJ
74 
75 #endif /* __A2DCANVASSTTOOL_H__ */
76 
77 
Interactive Zooming into a a2dRenderImage canvasobject.
Definition: sttoolext.h:36
a2dRenderImage is an a2dCanvasObject that is able to display a complete a2dCanvasDocument as a a2dCan...
Definition: rendimg.h:42
The a2dStTool is used to derive tools from.
Definition: sttool.h:115
int m_zoom_y2
mouse position used for zooming
Definition: sttoolext.h:62
void OnMouseEvent(wxMouseEvent &event)
called on mouse events
Definition: sttool.cpp:1203
static const a2dCommandId COMID_PushTool_RenderImageZoom
push this tool on the tools stack
Definition: sttoolext.h:43
The a2dStToolContr is a Tool Controller specialized for working with a2dCanvasView.
Definition: sttool.h:485
void OnChar(wxKeyEvent &event)
called on key events
Definition: sttool.cpp:1568
int m_zoom_x1
mouse position used for zooming
Definition: sttoolext.h:56
int m_zoom_x2
mouse position used for zooming
Definition: sttoolext.h:60
Each a2dCommand is given a command id at construction.
Definition: comevt.h:99
bool ZoomSave()
Is Zooming while the tool is busy Save.
Definition: sttoolext.h:47
all headers of the canvas module
int m_zoom_y1
mouse position used for zooming
Definition: sttoolext.h:58
stack based tools controller and tools for drawing and editing.
sttoolext.h Source File -- Sun Oct 12 2014 17:04:25 -- Sun Oct 12 2014 -- 1.8.5 -- wxArt2D -- . -- Main Page Reference Documentation