ToolMap
Loading...
Searching...
No Matches
tmtoolmanager.h
1/***************************************************************************
2 tmtoolmanager.h
3 Take control of all tools (Dangling nodes, etc.)
4 -------------------
5 copyright : (C) 2007 CREALP Lucien Schreiber
6 ***************************************************************************/
7
8/***************************************************************************
9 * *
10 * This program is free software; you can redistribute it and/or modify *
11 * it under the terms of the GNU General Public License as published by *
12 * the Free Software Foundation; either version 2 of the License, or *
13 * (at your option) any later version. *
14 * *
15 ***************************************************************************/
16#ifndef _TM_TOOLMANAGER_H_
17#define _TM_TOOLMANAGER_H_
18
19#include <wx/wxprec.h>
20
21#ifndef WX_PRECOMP
22#include <wx/wx.h>
23#endif
24
25#include "../database/database_tm.h" // for database
26#include "../gis/tmrenderer.h" // for GIS rendering
27#include "../gis/tmselecteddatamemory.h" // for selection data
28#include "../gis/tooldanglingnodes.h" // for computing dangling nodes (engine class)
29#include "danglingnodes_dlg.h" // for dangling nodes dialog support
30
31const int tmDANGLING_NODE_DRAW_SIZE = 4;
32const wxColour tmDANGLING_NODE_DRAW_COLOUR = wxColour(*wxRED);
33
34class tmToolManager : public wxEvtHandler {
35 private:
36 // defined by ctor
37 wxWindow* m_Parent;
38 tmSelectedDataMemory* m_Selected;
39 tmRenderer* m_Renderer;
40 tmGISScale* m_Scale;
41 wxArrayRealPoints m_DanglingPts;
42 DataBaseTM* m_pDB;
43
44 void InitMemberValues();
45
46 bool _IsOk();
47
48 bool _SearchDanglingNodes(int selectedlayer, const wxArrayString& layersname);
49
50 void _ClearDangling() {
51 m_DanglingPts.Clear();
52 }
53
54 public:
55 tmToolManager(wxWindow* parent, tmSelectedDataMemory* seldata, tmRenderer* renderer, tmGISScale* scale);
56
58
59 void SetDatabase(DataBaseTM* db) {
60 m_pDB = db;
61 }
62
63 bool FindDanglingNodes();
64
65 long DrawDanglingNodes(wxGCDC* dc);
66};
67
68#endif
Definition database_tm.h:80
Definition tmgisscale.h:100
Definition tmrenderer.h:99
Store ID of selected data into memory.
Definition tmselecteddatamemory.h:43
Definition tmtoolmanager.h:34