ToolMap
Loading...
Searching...
No Matches
tmaattribwindow.h
1/***************************************************************************
2 tmaattribwindow.h
3 Display the Advanced Attribution Window
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 _TM_AATTRIBWINDOW_H_
20#define _TM_AATTRIBWINDOW_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/treectrl.h>
31
32#include "../gis/tmattributionbasicarray.h"
33#include "tmaattribtree.h" // for Adavanced attribution tree
34
35/***************************************************************************/
42class tmAAttribWindow : public wxDialog {
43 private:
44 // windows position
45 static wxRect m_WndPos;
46
47 void GetWindowPosition();
48
49 void SetWindowPosition();
50
51 // member controls
52 tmAAttribTree* m_AAttribTree;
53 wxStatusBar* m_Status;
54 wxButton* m_CancelBtn;
55
56 // member initialized by ctor
57 PrjMemLayersArray* m_Layers;
58 wxArrayString* m_Values;
59 tmLayerValueArray m_LayerNameID;
60
61 // member
62 int m_iTotalControls;
63 tmAAttribCtrlArray m_Ctrls;
64
65 // member function
66 void InitMemberValue();
67
68 void CreateControls();
69
70 int GetNumberControls();
71
72 bool CheckValuesAndControls();
73
74 bool SetValue(unsigned int pos, tmAAttribCtrl* ctrl);
75
76 void SetStatusNumberControl(int ictrl, unsigned int layers);
77
78 protected:
79 public:
80 tmAAttribWindow(wxWindow* parent, PrjMemLayersArray* layers, wxArrayString* values,
81 const tmLayerValueArray& arrayidname, wxWindowID id = wxID_ANY,
82 const wxString& title = _("Object attribute (single feature)"),
83 const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
84 long style = wxDEFAULT_DIALOG_STYLE | wxMAXIMIZE_BOX | wxRESIZE_BORDER);
85
87
88 // data transfert
89 virtual bool TransferDataToWindow();
90
91 virtual bool TransferDataFromWindow();
92};
93
94#endif
Abstract class for tmAAttribTree Items.
Definition tmaattribctrls.h:50
Definition tmaattribtree.h:35
Advanced Attribution Window.
Definition tmaattribwindow.h:42
virtual bool TransferDataToWindow()
Transfer data to window.
Definition tmaattribwindow.cpp:202
~tmAAttribWindow()
Destructor.
Definition tmaattribwindow.cpp:135
virtual bool TransferDataFromWindow()
Transfert data from the window.
Definition tmaattribwindow.cpp:241