ToolMap
Loading...
Searching...
No Matches
tmdraweredit.h
1/***************************************************************************
2 tmdraweredit.h
3 Drawing data during editing process
4 -------------------
5 copyright : (C) 2009 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
17// comment doxygen
18
19#ifndef _TM_DRAWER_EDIT_H_
20#define _TM_DRAWER_EDIT_H_
21
22// For compilers that support precompilation, includes "wx/wx.h".
23#include <wx/wxprec.h>
24
25// Include wxWidgets' headers
26#ifndef WX_PRECOMP
27#include <wx/wx.h>
28#endif
29
30#include <wx/overlay.h>
31
32#include "../core/tmarraysize.h"
33
34class tmDrawerEditLine : public wxObject {
35 private:
36 wxPoint* m_LeftPT;
37 wxPoint* m_Pt;
38 wxPoint* m_RightPT;
39 int m_Index;
40
41 wxPen m_EditPen;
42 wxOverlay m_Overlay;
43
44 void DLVertexDelete();
45
46 int DLGetCountPoints();
47
48 wxPoint* DLGetPoints();
49
50 void DLReorderVertex();
51
52 protected:
53 public:
55
57
58 // creating and validating
59 bool CreateVertex(const wxArrayPoints& pts, int index);
60
61 bool CreateVertex(const wxPoint& pt, wxPoint* left, wxPoint* right, int index);
62
63 bool CreateVertex(const wxPoint& pt);
64
65 bool IsEndVertex();
66
67 bool IsOK();
68
69 bool ClearVertex();
70
71 bool SetVertex(const wxPoint& pt);
72
73 int GetVertexIndex() {
74 return m_Index;
75 }
76
77 // Drawing functions
78 void SetSymbology(wxColour col, int width);
79
80 bool DrawEditPart(wxClientDC* pdc);
81
82 void DrawEditReset(wxClientDC* pdc);
83};
84
85#endif
Definition tmdraweredit.h:34