ToolMap
Loading...
Searching...
No Matches
objectattribution_dlg.h
1/***************************************************************************
2 objectattribution_dlg.h
3 Display the dialog called when user press the
4 Project->Edit->Object definition menu
5 -------------------
6 copyright : (C) 2007 CREALP Lucien Schreiber
7 ***************************************************************************/
8
9/***************************************************************************
10 * *
11 * This program is free software; you can redistribute it and/or modify *
12 * it under the terms of the GNU General Public License as published by *
13 * the Free Software Foundation; either version 2 of the License, or *
14 * (at your option) any later version. *
15 * *
16 ***************************************************************************/
17
18#ifndef _OBJECT_ATTRIBUTION_H_
19#define _OBJECT_ATTRIBUTION_H_
20
21#include <wx/listctrl.h>
22#include <wx/notebook.h>
23#include <wx/statline.h>
24#include <wx/tglbtn.h>
25
26#include "../core/prjdefmemmanage.h"
27#include "objectdefinitionlistdlg.h" // For list and edition dialog definition
28#include "wxflatbutton.h"
29
30class wxNotebook;
31
32#define ID_DLG_ATTRIBUTION 10025
33#define ID_DLGPEO_NOTEBOOK 10026
34#define ID_DLGPEO_PANEL_LINE 10027
35#define ID_DLGPEO_LISTLINE 10264
36#define ID_DLGPEO_LYR_NAME_LINE 10234
37#define ID_DLGPEO_LINE_FRQ 10235
38#define ID_DLGPEO_PANEL_POINT 10028
39#define ID_DLGPEO_LISTPOINT 10000
40#define ID_DLGPEO_LYR_NAME_POINT 10236
41#define ID_DLGPEO_PANEL_POLY 10029
42#define ID_DLGPEO_LISTPOLY 10000
43#define ID_DLGPEO_LYR_NAME_POLY 10237
44#define ID_DLGPEO_BTN_ADD 10031
45#define ID_DLGPEO_BTN_DEL 10032
46#define ID_DLGPEO_BTN_IMPORT 10232
47#define ID_DLGPEO_BTN_EXPORT 10233
48#define SYMBOL_PROJECTEDITOBJECTDEFINITIONDLG_STYLE \
49 wxCAPTION | wxRESIZE_BORDER | wxSYSTEM_MENU | wxCLOSE_BOX | wxMAXIMIZE_BOX
50#define SYMBOL_PROJECTEDITOBJECTDEFINITIONDLG_TITLE _("Objects Kind definition")
51#define SYMBOL_PROJECTEDITOBJECTDEFINITIONDLG_IDNAME ID_DLG_ATTRIBUTION
52#define SYMBOL_PROJECTEDITOBJECTDEFINITIONDLG_SIZE wxDefaultSize
53#define SYMBOL_PROJECTEDITOBJECTDEFINITIONDLG_POSITION wxDefaultPosition
54
55class ProjectEditObjectDefinitionDLG : public wxDialog {
56 private:
57 DataBaseTM* m_DB;
58
59 // create a memory layer object for storing changes
60 PrjDefMemManage m_MemoryObject;
61
62 // EVENT FUNCTION
63 void OnAddObject(wxCommandEvent& event);
64
65 void OnRemoveObject(wxCommandEvent& event);
66
67 void OnImportFile(wxCommandEvent& event);
68
69 void OnExportFile(wxCommandEvent& event);
70
71 void OnChangeLayerName(wxCommandEvent& event);
72
73 void OnSaveChanges(wxCommandEvent& event);
74
75 void OnNotebookChangeTab(wxNotebookEvent& event);
76
77 // PRIVATE DATABASE FUNCTION
78 bool SetChoiceListText(wxChoice* choice, int listtype);
79
80 DECLARE_DYNAMIC_CLASS(ProjectEditObjectDefinitionDLG)
81
82 DECLARE_EVENT_TABLE()
83
84 public:
87
88 ProjectEditObjectDefinitionDLG(wxWindow* parent, DataBaseTM* pDatabase,
89 wxWindowID id = SYMBOL_PROJECTEDITOBJECTDEFINITIONDLG_IDNAME,
90 const wxString& caption = SYMBOL_PROJECTEDITOBJECTDEFINITIONDLG_TITLE,
91 const wxPoint& pos = SYMBOL_PROJECTEDITOBJECTDEFINITIONDLG_POSITION,
92 const wxSize& size = SYMBOL_PROJECTEDITOBJECTDEFINITIONDLG_SIZE,
93 long style = SYMBOL_PROJECTEDITOBJECTDEFINITIONDLG_STYLE);
94
96 bool Create(wxWindow* parent, wxWindowID id = SYMBOL_PROJECTEDITOBJECTDEFINITIONDLG_IDNAME,
97 const wxString& caption = SYMBOL_PROJECTEDITOBJECTDEFINITIONDLG_TITLE,
98 const wxPoint& pos = SYMBOL_PROJECTEDITOBJECTDEFINITIONDLG_POSITION,
99 const wxSize& size = SYMBOL_PROJECTEDITOBJECTDEFINITIONDLG_SIZE,
100 long style = SYMBOL_PROJECTEDITOBJECTDEFINITIONDLG_STYLE);
101
104
105 void Init();
106
107 void PostInit();
108
109 void CreateControls();
110
111 wxNotebook* m_DLGPEO_Notebook;
112 wxPanel* m_DLGPEO_Panel_Line;
113 ObjectDefinitionList* m_DLGPEO_List_Line;
114 wxChoice* m_DLGPEO_Choice_Lyr_Line_Name;
115 wxPanel* m_DLGPEO_Panel_Point;
116 ObjectDefinitionList* m_DLGPEO_List_Point;
117 wxChoice* m_DLGPEO_Choice_Lyr_Point_Name;
118 wxPanel* m_DLGPEO_Panel_Poly;
119 ObjectDefinitionList* m_DLGPEO_List_Poly;
120 wxChoice* m_DLGPEO_Choice_Lyr_Poly_Name;
121 wxStatusBar* m_DLGPEO_StatusBar;
122};
123
124#endif
Definition database_tm.h:80
Definition objectdefinitionlistdlg.h:96
Definition prjdefmemmanage.h:54
Definition objectattribution_dlg.h:55
ProjectEditObjectDefinitionDLG()
Constructors.
Definition objectattribution_dlg.cpp:246
~ProjectEditObjectDefinitionDLG()
Destructor.
Definition objectattribution_dlg.cpp:302
bool Create(wxWindow *parent, wxWindowID id=SYMBOL_PROJECTEDITOBJECTDEFINITIONDLG_IDNAME, const wxString &caption=SYMBOL_PROJECTEDITOBJECTDEFINITIONDLG_TITLE, const wxPoint &pos=SYMBOL_PROJECTEDITOBJECTDEFINITIONDLG_POSITION, const wxSize &size=SYMBOL_PROJECTEDITOBJECTDEFINITIONDLG_SIZE, long style=SYMBOL_PROJECTEDITOBJECTDEFINITIONDLG_STYLE)
Creation.
Definition objectattribution_dlg.cpp:263