1 /*# ---------------------------------------------------------------------
3 # Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
5 # Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
6 # Previous Authors : Laurent Guigues, Jean-Pierre Roux
7 # CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
9 # This software is governed by the CeCILL-B license under French law and
10 # abiding by the rules of distribution of free software. You can use,
11 # modify and/ or redistribute the software under the terms of the CeCILL-B
12 # license as circulated by CEA, CNRS and INRIA at the following URL
13 # http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
14 # or in the file LICENSE.txt.
16 # As a counterpart to the access to the source code and rights to copy,
17 # modify and redistribute granted by the license, users are provided only
18 # with a limited warranty and the software's author, the holder of the
19 # economic rights, and the successive licensors have only limited
22 # The fact that you are presently reading this means that you have had
23 # knowledge of the CeCILL-B license and that you accept its terms.
24 # ------------------------------------------------------------------------ */
26 #ifndef __wxContour_ListViewPanel_h_INCLUDED_H__
27 #define __wxContour_ListViewPanel_h_INCLUDED_H__
30 // -----------------------------------------------------------------------------------------------------------
31 // WX headers inclusion.
32 // For compilers that support precompilation, includes <wx/wx.h>.
33 // -----------------------------------------------------------------------------------------------------------
35 #include <wx/wxprec.h>
44 //------------------------------------------------------------------------------------------------------------
46 //------------------------------------------------------------------------------------------------------------
47 #include <wx/listctrl.h>
49 //------------------------------------------------------------------------------------------------------------
51 //------------------------------------------------------------------------------------------------------------
52 /*BEGIN_DECLARE_EVENT_TYPES()
53 DECLARE_EVENT_TYPE( wxEVT_CONCEPT_RELEASE, -1 )
54 END_DECLARE_EVENT_TYPES()*/
56 /** file wxContour_ListViewPanel.h */
58 class wxContour_ControlPanel;
59 //------------------------------------------------------------------------------------------------------------
61 //------------------------------------------------------------------------------------------------------------
62 class wxContour_ListViewPanel : public wxListCtrl {
66 //------------------------------------------------------------------------------------------------------------
67 // Constructors & Destructors
68 //------------------------------------------------------------------------------------------------------------
70 wxContour_ListViewPanel(wxWindow *parent,const wxWindowID id, const wxPoint& pos,const wxSize& size,long style);
72 ~wxContour_ListViewPanel();
74 //------------------------------------------------------------------------------------------------------------
75 // Methods for capturing events
76 //------------------------------------------------------------------------------------------------------------
77 void InsertItemInReportView(int i);
79 void OnColClick(wxListEvent& event);
80 void OnColRightClick(wxListEvent& event);
81 void OnColBeginDrag(wxListEvent& event);
82 void OnColDragging(wxListEvent& event);
83 void OnColEndDrag(wxListEvent& event);
84 void OnBeginDrag(wxListEvent& event);
85 void OnBeginRDrag(wxListEvent& event);
86 void OnBeginLabelEdit(wxListEvent& event);
87 void OnEndLabelEdit(wxListEvent& event);
88 void OnDeleteItem(wxListEvent& event);
89 void OnDeleteAllItems(wxListEvent& event);
91 void OnGetInfo(wxListEvent& event);
92 void OnSetInfo(wxListEvent& event);
94 void OnSelected(wxListEvent& event);
95 void OnDeselected(wxListEvent& event);
96 void OnListKeyDown(wxListEvent& event);
97 void OnActivated(wxListEvent& event);
98 void OnFocused(wxListEvent& event);
99 void OnCacheHint(wxListEvent& event);
101 void OnChar(wxKeyEvent& event);
103 void OnContextMenu(wxContextMenuEvent& event);
104 void OnRightClick(wxMouseEvent& event);
106 //------------------------------------------------------------------------------------------------------------
107 // Methods for sending events
108 //------------------------------------------------------------------------------------------------------------
109 void sendEnvent( WXTYPE theEventType );
112 //------------------------------------------------------------------------------------------------------------
113 // Attributes getters and setters
114 //------------------------------------------------------------------------------------------------------------
116 void setContainerParent( wxContour_ControlPanel * theBuilder);
119 //------------------------------------------------------------------------------------------------------------
120 // Other functional methods
121 //------------------------------------------------------------------------------------------------------------
124 //------------------------------------------------------------------------------------------------------------
126 //------------------------------------------------------------------------------------------------------------
129 void ShowContextMenu(const wxPoint& pos);
131 void SetColumnImage(int col, int image);
134 void LogEvent(const wxListEvent& event, const wxChar *eventName);
135 void LogColEvent(const wxListEvent& event, const wxChar *eventName);
138 virtual wxString OnGetItemText(long item, long column) const;
139 virtual int OnGetItemColumnImage(long item, long column) const;
140 virtual wxListItemAttr *OnGetItemAttr(long item) const;
142 //------------------------------------------------------------------------------------------------------------
143 // Creational and initialization methods
144 //------------------------------------------------------------------------------------------------------------
147 //------------------------------------------------------------------------------------------------------------
149 //------------------------------------------------------------------------------------------------------------
150 wxContour_ControlPanel * containerParent;
152 wxListItemAttr itemsStyle;
155 #endif // __wxContour_ListViewPanel_HEADER_FILE__