]> Creatis software - creaContours.git/blob - lib/Interface_ManagerContour_NDimensions/wxContour_ListViewPanel.h
de2dd8c5899a348f27c9673dbc304b7300a36ed7
[creaContours.git] / lib / Interface_ManagerContour_NDimensions / wxContour_ListViewPanel.h
1 #ifndef __wxContour_ListViewPanel_h_INCLUDED_H__
2 #define __wxContour_ListViewPanel_h_INCLUDED_H__
3
4
5 // -----------------------------------------------------------------------------------------------------------
6 // WX headers inclusion.
7 // For compilers that support precompilation, includes <wx/wx.h>.
8 // -----------------------------------------------------------------------------------------------------------
9
10 #include <wx/wxprec.h>
11 #ifdef __BORLANDC__
12 #pragma hdrstop
13 #endif
14 #ifndef WX_PRECOMP
15 #include <wx/wx.h>
16 #endif
17
18
19 //------------------------------------------------------------------------------------------------------------
20 // Includes
21 //------------------------------------------------------------------------------------------------------------
22 #include <wx/listctrl.h>
23
24 //------------------------------------------------------------------------------------------------------------
25 // Events declaration
26 //------------------------------------------------------------------------------------------------------------
27 /*BEGIN_DECLARE_EVENT_TYPES()
28         DECLARE_EVENT_TYPE( wxEVT_CONCEPT_RELEASE, -1 ) 
29 END_DECLARE_EVENT_TYPES()*/
30
31 /** file wxContour_ListViewPanel.h */
32
33 class wxContour_ControlPanel;
34 //------------------------------------------------------------------------------------------------------------
35 // Class definition
36 //------------------------------------------------------------------------------------------------------------
37 class wxContour_ListViewPanel : public wxListCtrl {
38
39                 public:
40
41         //------------------------------------------------------------------------------------------------------------
42         // Constructors & Destructors
43         //------------------------------------------------------------------------------------------------------------
44
45         wxContour_ListViewPanel(wxWindow *parent,const wxWindowID id, const wxPoint& pos,const wxSize& size,long style);
46
47         ~wxContour_ListViewPanel();
48
49         //------------------------------------------------------------------------------------------------------------
50         // Methods for capturing events
51         //------------------------------------------------------------------------------------------------------------
52          void InsertItemInReportView(int i);
53
54     void OnColClick(wxListEvent& event);
55     void OnColRightClick(wxListEvent& event);
56     void OnColBeginDrag(wxListEvent& event);
57     void OnColDragging(wxListEvent& event);
58     void OnColEndDrag(wxListEvent& event);
59     void OnBeginDrag(wxListEvent& event);
60     void OnBeginRDrag(wxListEvent& event);
61     void OnBeginLabelEdit(wxListEvent& event);
62     void OnEndLabelEdit(wxListEvent& event);
63     void OnDeleteItem(wxListEvent& event);
64     void OnDeleteAllItems(wxListEvent& event);
65
66     void OnGetInfo(wxListEvent& event);
67     void OnSetInfo(wxListEvent& event);
68
69     void OnSelected(wxListEvent& event);
70     void OnDeselected(wxListEvent& event);
71     void OnListKeyDown(wxListEvent& event);
72     void OnActivated(wxListEvent& event);
73     void OnFocused(wxListEvent& event);
74     void OnCacheHint(wxListEvent& event);
75
76     void OnChar(wxKeyEvent& event);
77
78     void OnContextMenu(wxContextMenuEvent& event);
79         void OnRightClick(wxMouseEvent& event);
80                 
81         //------------------------------------------------------------------------------------------------------------
82         //  Methods for sending events
83         //------------------------------------------------------------------------------------------------------------
84         void sendEnvent( WXTYPE theEventType );
85
86
87         //------------------------------------------------------------------------------------------------------------
88         //  Attributes getters and setters
89         //------------------------------------------------------------------------------------------------------------
90         
91         void setContainerParent( wxContour_ControlPanel * theBuilder);
92
93
94         //------------------------------------------------------------------------------------------------------------
95         //  Other functional methods
96         //------------------------------------------------------------------------------------------------------------
97
98 private:
99         //------------------------------------------------------------------------------------------------------------
100         //  Private methods
101         //------------------------------------------------------------------------------------------------------------
102
103
104         void ShowContextMenu(const wxPoint& pos);
105     wxLog *m_logOld;
106     void SetColumnImage(int col, int image);
107
108         /*
109     void LogEvent(const wxListEvent& event, const wxChar *eventName);
110     void LogColEvent(const wxListEvent& event, const wxChar *eventName);
111         */
112
113     virtual wxString OnGetItemText(long item, long column) const;
114     virtual int OnGetItemColumnImage(long item, long column) const;
115     virtual wxListItemAttr *OnGetItemAttr(long item) const;
116
117         //------------------------------------------------------------------------------------------------------------
118         // Creational and initialization methods
119         //------------------------------------------------------------------------------------------------------------
120
121                 
122         //------------------------------------------------------------------------------------------------------------
123         // Attributtes
124         //------------------------------------------------------------------------------------------------------------
125         wxContour_ControlPanel * containerParent;
126
127         wxListItemAttr itemsStyle;
128
129 };
130 #endif // __wxContour_ListViewPanel_HEADER_FILE__
131