17#ifndef _TM_GISRENDERER_H_
18#define _TM_GISRENDERER_H_
26#include <wx/dcbuffer.h>
27#include <wx/dcgraph.h>
28#include <wx/overlay.h>
29#include <wx/scrolwin.h>
31#include "../core/tmarraysize.h"
32#include "tmgisscale.h"
34const wxString TMRENDERER_WINDOW_NAME = wxTRANSLATE(
"TMRENDERER_WINDOW");
39DECLARE_EVENT_TYPE(tmEVT_LM_SIZE_CHANGED, -1)
40DECLARE_EVENT_TYPE(tmEVT_LM_MOUSE_MOVED, -1)
41DECLARE_EVENT_TYPE(tmEVT_LM_ZOOM_RECTANGLE_OUT, -1)
42DECLARE_EVENT_TYPE(tmEVT_LM_ZOOM_RECTANGLE_IN, -1)
43DECLARE_EVENT_TYPE(tmEVT_LM_PAN_ENDED, -1)
44DECLARE_EVENT_TYPE(tmEVT_LM_SELECTION, -1)
45DECLARE_EVENT_TYPE(tmEVT_EM_MODIFY_CLICK, -1)
46DECLARE_EVENT_TYPE(tmEVT_EM_DRAW_ENTER, -1)
47DECLARE_EVENT_TYPE(tmEVT_EM_CUT_LINE, -1)
48DECLARE_EVENT_TYPE(tmEVT_AM_SHORTCUT_PRESSED, -1)
49DECLARE_EVENT_TYPE(tmEVT_EM_MODIFY_MOVED, -1)
50DECLARE_EVENT_TYPE(tmEVT_EM_MODIFY_UP, -1)
51DECLARE_EVENT_TYPE(tmEVT_EM_DRAW_CLICK, -1)
52DECLARE_EVENT_TYPE(tmEVT_EM_DRAW_MOVE, -1)
53DECLARE_EVENT_TYPE(tmEVT_EM_DRAW_DOWN, -1)
54DECLARE_EVENT_TYPE(tmEVT_EM_DRAW_ESC, -1)
55DECLARE_EVENT_TYPE(tmEVT_EM_MODIFY_MENU, -1)
56DECLARE_EVENT_TYPE(tmEVT_TM_UPDATE_TOOL_VIEW, -1)
57DECLARE_EVENT_TYPE(tmEVT_EM_DRAW_ORIENT_DOWN, -1)
58DECLARE_EVENT_TYPE(tmEVT_EM_DRAW_ORIENT_MOVE, -1)
59DECLARE_EVENT_TYPE(tmEVT_EM_DRAW_ORIENT_UP, -1)
60DECLARE_EVENT_TYPE(tmEVT_EM_MODIFY_SHARED_DOWN, -1)
61DECLARE_EVENT_TYPE(tmEVT_EM_MODIFY_SHARED_UP, -1)
62DECLARE_EVENT_TYPE(tmEVT_EM_MODIFY_SHARED_MOVE, -1)
66 tmTOOL_ZOOM_RECTANGLE_IN,
67 tmTOOL_ZOOM_RECTANGLE_OUT,
74 tmTOOL_ORIENTED_POINTS,
78 tmTOOL_ZOOM_RECTANGLE = tmTOOL_ZOOM_RECTANGLE_IN
88 tmCURSOR_VERTEX_REMOVE
93const int tmSELECTION_DIAMETER = 10;
102 tmGIS_TOOL m_ActualTool;
103 tmGIS_CURSOR m_ActualNotStockCursor;
111 wxPoint m_StartCoord;
122 wxPoint m_WheelPosition;
123 wxTimer m_WheelTimer;
126 wxCursor LoadCursorFromBitmap(tmGIS_CURSOR cursor);
128 void ChangeCursor(
const tmGIS_TOOL& selected_tool);
131 void OnMouseDown(wxMouseEvent& event);
134 void OnMouseMove(wxMouseEvent& event);
136 void OnMouseUp(wxMouseEvent& event);
138 void OnMouseCaptureLost(wxMouseEvent& event);
140 void OnMouseDClick(wxMouseEvent& event);
142 void OnMouseWheel(wxMouseEvent& event);
144 void OnShiftDown(wxKeyEvent& event);
146 void OnShiftUp(wxKeyEvent& event);
148 void OnKey(wxKeyEvent& event);
150 void OnWheelTimer(wxTimerEvent& event);
152 void OnAvoidFlickering(wxEraseEvent& event);
155 bool BitmapUpdateSize();
157 bool BitmapSetToWhite();
159 bool BitmapCopyInto(wxBitmap* bmp);
162 DECLARE_EVENT_TABLE()
166 void ZoomStart(
const wxPoint& mousepos);
168 void ZoomUpdate(wxMouseEvent& event);
170 void ZoomStop(
const wxPoint& mousepos);
180 void PanStart(
const wxPoint& mousepos);
184 void PanStop(
const wxPoint& mousepos);
186 void PanDClick(wxMouseEvent& event);
189 void OrientedPtsStart(
const wxPoint& mousepos);
191 void OrientedPtsMove(
const wxPoint& mousepos);
193 void OrientedPtsStop(
const wxPoint& mousepos);
196 void ModifySharedStart(
const wxPoint& mousepos);
198 void ModifySharedStop(
const wxPoint& mousepos);
200 void ModifySharedUpdate(
const wxPoint& mousepos);
213 void OnPaint(wxPaintEvent& event);
215 void SetBitmapStatus(wxBitmap* bmp =
nullptr);
217 void SetTool(tmGIS_TOOL selected_tool);
219 tmGIS_TOOL GetTool() {
224 wxBitmap* GetBitmap() {
231 void DrawCircleVideoInverseClean();
234 void StopModifyEvent() {
235 m_ModifyCalled =
false;
239 m_EditManager = manager;
243 m_ToolManager = manager;
Deals with editing data.
Definition tmeditmanager.h:87
Definition tmrenderer.h:99
void PanStop(const wxPoint &mousepos)
Refresh screen after pan.
Definition tmrenderer.cpp:763
void OnSizeChange(wxSizeEvent &event)
Respond to a Size message.
Definition tmrenderer.cpp:157
void PanStart(const wxPoint &mousepos)
Start the pan.
Definition tmrenderer.cpp:691
void CutLineClick(const wxPoint &mousepos)
Click up with cut line tool.
Definition tmrenderer.cpp:860
void SelectStart(const wxPoint &mousepos)
Called when selection start (mouse down)
Definition tmrenderer.cpp:628
~tmRenderer()
Destructor.
Definition tmrenderer.cpp:145
void PanUpdate(const wxPoint &mousepos)
Update the pan image during mouse move.
Definition tmrenderer.cpp:729
void DrawCircleVideoInverse(wxPoint pt, int radius)
Draw a circle using inverse video.
Definition tmrenderer.cpp:874
void SelectStop(const wxPoint &mousepos)
Called when selection finished (mouse up)
Definition tmrenderer.cpp:658
void SelectUpdate(wxMouseEvent &event)
Called when selection is updated (mouse move)
Definition tmrenderer.cpp:641
Definition vrrubberband.h:26