23 #include <wx/colour.h>
24 #include <wx/settings.h>
25 #include <wx/string.h>
28 #include <wx/gdicmn.h>
29 #include <wx/stattext.h>
30 #include <wx/bitmap.h>
33 #include <wx/bmpbuttn.h>
34 #include <wx/button.h>
35 #include <wx/textctrl.h>
38 #include <wx/statline.h>
40 #include "wxgis/carto/carto.h"
41 #include "wxgis/datasource/table.h"
43 #define GRID_ROW_SIZE 15
44 #define GRID_COL_SIZE 20
46 WX_DECLARE_HASH_MAP(
long,
wxGISFeature, wxIntegerHash, wxIntegerEqual, wxGISFeatureMap);
57 public wxGridTableBase
65 virtual int GetNumberRows();
66 virtual int GetNumberCols();
67 virtual bool IsEmptyCell(
int row,
int col);
68 virtual wxString GetValue(
int row,
int col);
69 virtual void SetValue(
int row,
int col,
const wxString &value);
70 virtual wxString GetColLabelValue(
int col);
71 virtual wxString GetRowLabelValue(
int row);
73 virtual void ClearFeatures(
void);
74 virtual bool DeleteCols(
size_t pos = 0,
size_t numCols = 1);
75 virtual void SetEncoding(
const wxFontEncoding &oEncoding);
76 virtual bool CanDeleteField(
void)
const;
77 virtual wxGridCellAttr *GetAttr(
int row,
int col, wxGridCellAttr::wxAttrKind kind);
79 virtual void FillForPos(
int nRow);
85 wxGISFeatureMap m_moFeatures;
86 std::map<int, int> m_mnAlign;
102 ID_DELETE = wxID_HIGHEST + 5001,
107 ID_CALCULATE_GEOMETRY,
118 wxGridCtrl(wxWindow* parent, wxWindowID
id,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxWANTS_CHARS,
const wxString& name = wxPanelNameStr);
119 virtual void SetEncoding(
const wxFontEncoding &eEnc);
121 virtual void DrawRowLabel(wxDC& dc,
int row);
122 virtual void OnLabelLeftClick(wxGridEvent& event);
123 virtual void OnLabelRightClick(wxGridEvent& event);
124 virtual void OnSelectCell(wxGridEvent& event);
125 virtual void OnMenu(wxCommandEvent& event);
126 virtual void OnMenuUpdateUI(wxUpdateUIEvent& event);
127 virtual void OnMouseMove(wxMouseEvent& event);
128 virtual void OnMouseWheel(wxMouseEvent& event);
129 virtual void OnCellClick(wxGridEvent& event);
133 DECLARE_EVENT_TABLE();
137 #define WXGISBITBUTTONSIZE 18
139 #define WXGISBITBUTTONSIZE 24
147 ID_FIRST = wxID_HIGHEST + 4001,
157 wxGISTableView(wxWindow* parent, wxWindowID
id = wxID_ANY,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxSTATIC_BORDER|wxTAB_TRAVERSAL);
159 bool Create(wxWindow* parent, wxWindowID
id = wxID_ANY,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxSTATIC_BORDER|wxTAB_TRAVERSAL,
const wxString& name = wxT(
"GISTableView"));
160 virtual void SetTable(wxGridTableBase* table,
bool takeOwnership =
false, wxGrid::wxGridSelectionModes selmode = wxGrid::wxGridSelectCells);
161 virtual wxGridTableBase* GetTable(
void)
const;
162 virtual void SetReadOnly(
bool bIsReadOnly){
if(m_grid) m_grid->EnableEditing( bIsReadOnly );};
164 void OnSelectCell(wxGridEvent& event);
165 void OnBtnFirst(wxCommandEvent& event);
166 void OnBtnNext(wxCommandEvent& event);
167 void OnBtnPrev(wxCommandEvent& event);
168 void OnBtnLast(wxCommandEvent& event);
169 void OnSetPos(wxCommandEvent& event);
170 void OnEncodingSelect(wxCommandEvent& event);
173 wxStaticText* m_staticText1, *m_staticText2, *m_staticText3, *m_staticText4;
174 wxBitmapButton* m_bpFirst;
175 wxBitmapButton* m_bpPrev;
176 wxTextCtrl* m_position;
177 wxBitmapButton* m_bpNext;
178 wxBitmapButton* m_bpLast;
179 wxComboBox *m_pEncodingsCombo;
180 wxStaticLine *m_staticline1;
181 std::map<wxString, wxFontEncoding> m_mnEnc;
183 DECLARE_EVENT_TABLE()
Definition: tableview.h:142
Definition: gdalinh.h:117
Definition: tableview.h:97
Definition: tableview.h:56