ToolMap
Loading...
Searching...
No Matches
information_dlg.h
1/***************************************************************************
2 information_dlg.h
3 Display informations dialog for layers and features
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
17// comment doxygen
18
19#ifndef _INFORMATION_DLG_H_
20#define _INFORMATION_DLG_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/html/htmlwin.h>
31#include <wx/notebook.h>
32
33#include "../components/wxtreemultictrl/TreeMultiItemWindow.h"
34#include "../components/wxtreemultictrl/wxTreeMultiCtrl.h" // for wxTreeMultiCtrl
35
36class TocCtrl;
37
39
41
42class tmLayerInfoCtrl;
43
44class PrjDefMemManage;
45
46const int ID_INFORMATION_DLG = 22401;
47
48class InformationDLG : public wxDialog {
49 private:
50 TocCtrl* m_TocCtrl;
51 tmSelectedDataMemory* m_Selected;
52 tmSelectionInfoCtrl* m_SelCtrl;
53 tmLayerInfoCtrl* m_LayerCtrl;
54
55 void _CreateControls();
56
57 void OnCloseDlg(wxCloseEvent& event);
58
59 DECLARE_EVENT_TABLE();
60
61 public:
62 InformationDLG(wxWindow* parent, TocCtrl* toc, tmSelectedDataMemory* sel, wxWindowID id,
63 const wxString& title = _("Informations"), const wxPoint& pos = wxDefaultPosition,
64 const wxSize& size = wxDefaultSize,
65 long style = wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER | wxFRAME_FLOAT_ON_PARENT);
66
67 virtual ~InformationDLG();
68
69 virtual bool TransferDataToWindow();
70
71 void UpdateLayer();
72
73 void UpdateSelection();
74
75 void SetProject(PrjDefMemManage* project);
76};
77
78/***************************************************************************/
83class tmLayerInfoCtrl : public wxHtmlWindow {
84 public:
85 tmLayerInfoCtrl(wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size);
86
87 virtual ~tmLayerInfoCtrl();
88
89 void UpdateLayer(TocCtrl* toc);
90};
91
92/***************************************************************************/
97const int ID_POPUP_MOVE_TO = 18500;
98const int ID_POPUP_ZOOM_TO = 18501;
99const int ID_POPUP_REMOVE_FROM_SEL = 18502;
100const int ID_POPUP_ONLY_THIS_OBJ = 18503;
101
103 private:
104 tmSelectedDataMemory* m_Selected;
105 long m_ClickedItemID;
106 PrjDefMemManage* m_Project;
107 TocCtrl* m_TocCtrl;
108
109 bool _GetItemByMousePos(wxTreeMultiItem& item, const wxPoint& position);
110
111 void _DeleteAllInfos(const wxTreeMultiItem& dontdelete);
112
113 wxMenu* _CreatePopupMenu();
114
115 void _CreateInfoControl(const wxTreeMultiItem& item, const wxArrayString& header, const wxArrayString& values);
116
117 void _UpdateSelection();
118
119 bool _GetData(long oid, wxArrayString& header, wxArrayString& values);
120
121 // event function
122 void OnItemLeftClick(wxMouseEvent& event);
123
124 void OnItemRightClick(wxMouseEvent& event);
125
126 void OnPopupSelectionThis(wxCommandEvent& event);
127
128 void OnPopupSelectionRemove(wxCommandEvent& event);
129
130 void OnPopupMove(wxCommandEvent& event);
131
132 void OnPopupZoom(wxCommandEvent& event);
133
134 void OnPopupCopy(wxCommandEvent& event);
135
136 DECLARE_EVENT_TABLE();
137
138 public:
139 tmSelectionInfoCtrl(wxWindow* window, wxWindowID id, tmSelectedDataMemory* sel, TocCtrl* toc,
140 const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
142
144
145 void UpdateSelection();
146
147 void SetProject(PrjDefMemManage* project);
148};
149
150#endif
Definition information_dlg.h:48
Definition prjdefmemmanage.h:54
Definition tocctrl.h:30
Definition information_dlg.h:83
Store ID of selected data into memory.
Definition tmselecteddatamemory.h:43
Definition information_dlg.h:102
This is the visual control, which will contain all the logic for the tree mechanism.
Definition wxTreeMultiCtrl.h:541
An intermediate class which is used to return as 'item' value for the wxTreeMultiCtrl....
Definition wxTreeMultiCtrl.h:173
#define wxTMC_BG_ADJUST_ALL
Definition wxTreeMultiCtrl.h:99
#define wxTMC_SPAN_WIDTH
Definition wxTreeMultiCtrl.h:102