]> Creatis software - creaImageIO.git/blob - src2/creaImageIOWxTreeView.cpp
After checking that the event goes up in the hierarchy (in win32 at least)
[creaImageIO.git] / src2 / creaImageIOWxTreeView.cpp
1 #include <creaImageIOWxTreeView.h>
2 #include <creaImageIOSystem.h>
3 #include <wx/splitter.h>
4 int wxCALLBACK MyCompareFunction(long item1, long item2, long WXUNUSED(sortData))
5 {
6     // inverse the order
7     if (item1 < item2)
8         return -1;
9     if (item1 > item2)
10         return 1;
11
12     return 0;
13 }
14 namespace creaImageIO
15 {
16   //=====================================================================
17   // CTor
18   WxTreeView::WxTreeView(TreeHandler* handler,
19                          wxWindow* parent,
20                          const wxWindowID id)
21     : wxPanel(parent,id),
22       TreeView(handler)
23   {
24     GimmickDebugMessage(1,"WxTreeView::WxTreeView"
25                         <<std::endl);
26
27     
28     // Split part below toolbar into notebook for views and panel
29     // for preview, messages...
30     // TO DO : Splitter
31     //    mSplitter = new wxSplitterWindow( this , -1);
32
33     // Global sizer
34     wxBoxSizer  *sizer = new wxBoxSizer(wxHORIZONTAL);
35     
36     int ctrl_style = wxLC_REPORT | wxLC_VRULES;
37     int col_style = wxLIST_FORMAT_LEFT;
38
39     // Creating the ListCtrl for the levels > 0 (not for Root level)
40     for (int i = 1;
41          i < handler->GetTree().GetNumberOfLevels();
42          ++i)
43       {
44
45         GimmickDebugMessage(5,"Creating view for level "<<i
46                             <<std::endl);
47         LevelType level;
48
49         // If the first level : parent = this
50         wxWindow* sparent = this;
51         // else parent = last splitter
52         if (i>1) sparent = mLevelList[i-2].wxSplitter;
53
54         level.wxSplitter = new wxSplitterWindow( sparent , -1);
55         //          level.wxSplitter->SetMinimumPaneSize(100);
56         
57         wxListCtrl* ctrl = new wxListCtrl(level.wxSplitter,
58                                           i,
59                                           wxDefaultPosition, 
60                                           wxDefaultSize,
61                                           ctrl_style);
62         level.wxCtrl = ctrl;
63         level.wxSplitter->Initialize(ctrl);
64
65         // Create the columns : one for each attribute of the level
66         int col = 0;
67                         //ctrl->InsertItem(0, "1");
68         
69         tree::LevelDescriptor::AttributeDescriptorListType::const_iterator a;
70         for (a  = handler->GetTree().GetAttributeDescriptorList(i).begin();
71              a != handler->GetTree().GetAttributeDescriptorList(i).end();
72              ++a)
73           {
74                   if(col==0)
75                   {
76                     wxListItem it;
77                     it.SetTextColour(*wxRED);
78                     it.SetText(_T("#C"));
79                     it.SetColumn(col);
80                     //              ctrl->InsertColumn(col, _("Children"), col_style);
81                     ctrl->InsertColumn(col,it);
82                     //ctrl->InsertItem(0, "1");
83                     //level.key.push_back(_("Children"));
84                     //level.key.push_back(handler->GetTree().GetChildrenList().size());
85                     col++;
86                   }
87                   
88                 GimmickDebugMessage(5,"Creating column "<<col<<" : "
89                                 <<a->GetName()
90                                 <<std::endl);
91                 ctrl->InsertColumn(col, 
92                                 crea::std2wx(a->GetName()),
93                                 col_style);
94                 level.key.push_back(a->GetKey());
95                 //          ctrl->SetColumnWidth(col, wxLIST_AUTOSIZE );
96                 col++;
97                 
98                 
99           }
100           
101         mLevelList.push_back(level);
102       }
103     
104
105     /// Initialize the first level splitter
106  
107       sizer->Add( mLevelList[0].wxSplitter ,1, wxGROW  ,0);
108
109     UpdateLevel(1);
110
111     SetSizer( sizer );     
112     SetAutoLayout(true);
113     Layout();
114
115   }
116   //=====================================================================
117
118   //=====================================================================
119   /// Destructor
120   WxTreeView::~WxTreeView()
121   {
122     GimmickDebugMessage(1,"WxTreeView::~WxTreeView"
123                         <<std::endl);
124   }
125   //=====================================================================
126   
127   
128   //=====================================================================
129   struct ItemData
130   {
131     tree::Node* node;
132   };
133  
134   //=====================================================================
135    std::vector<tree::Node*> WxTreeView::GetSelected(int level)
136   {
137     int l = level - 1;
138     // the selection of upper level
139     std::vector<tree::Node*> sel;
140         
141     if (level == 1) 
142       {
143         sel.push_back(GetTreeHandler()->GetTree().GetTree());
144       }
145     else 
146       {
147         int n = GetCtrl(l-1)->GetItemCount();
148         for (int i = 0; i < n; i++)
149           {
150             if ( GetCtrl(l-1)->GetItemState(i,wxLIST_STATE_SELECTED))
151               {
152                 long adr = GetCtrl(l-1)->GetItemData(i);
153                 tree::Node* n = ((ItemData*)adr)->node;
154                 sel.push_back(n);
155               }
156           }     
157       }
158         
159           return sel;
160   }
161
162   //=====================================================================
163   
164   ///Removes selected nodes on given level
165   void WxTreeView::RemoveSelected( int level )
166   {
167           std::vector<tree::Node*> sel=GetSelected(level+1);
168           bool erase=false;
169           if (wxMessageBox(_T("Delete file(s) ?"),
170                          _T("Remove Files"),
171                          wxYES_NO,this ) == wxYES)
172           {
173             erase = true;
174           }
175           if(erase)
176           {
177                 std::vector<tree::Node*>::iterator i;
178                 for (i=sel.begin(); i!=sel.end(); ++i)
179                 {
180                         GimmickDebugMessage(2,
181                                         "deleting '"
182                                         <<(*i)->GetLabel()
183                                         <<"'"<<level
184                                         <<std::endl);
185                                 GetTreeHandler()->Remove(*i);
186                 }
187
188                 UpdateLevel(level);
189           }
190           
191   }
192     
193
194   //=====================================================================
195
196  
197   //=====================================================================
198   /// 
199   void WxTreeView::UpdateLevel( int level )
200   {
201     GimmickDebugMessage(1,
202                         GetTreeHandler()->GetTree().GetLabel()
203                         <<" view : updating level "<<level
204                         <<std::endl);
205     
206     wxBusyCursor busy;
207     RecursiveUpdateLevel(level);
208     int i;
209     for (i=0; i<level-1; i++)
210       {
211         if (!GetSplitter(i)->IsSplit()) 
212           GetSplitter(i)->SplitVertically(  GetCtrl(i), GetSplitter(i+1),
213                                             100 );
214       }
215     if (GetSplitter(i)->IsSplit()) GetSplitter(i)->Unsplit();    
216     
217   }
218   //=====================================================================
219   
220   /// 
221   void WxTreeView::RecursiveUpdateLevel( int level )
222   {
223           GimmickDebugMessage(2,
224                         GetTreeHandler()->GetTree().GetLabel()
225                         <<" view : updating level (recursive)"<<level
226                         <<std::endl);
227
228
229     std::vector<tree::Node*> sel=GetSelected(level);
230
231           int l = level - 1;
232  
233     // to speed up inserting we hide the control temporarily
234     GetCtrl(l)->Hide();
235     GetCtrl(l)->DeleteAllItems();
236     
237     std::vector<tree::Node*>::iterator i;
238     for (i=sel.begin(); i!=sel.end(); ++i)
239       {
240         GimmickDebugMessage(2,
241                             "adding children of '"
242                             <<(*i)->GetLabel()
243                             <<"'"<<level
244                             <<std::endl);
245         
246         //Adds columns
247         GetTreeHandler()->LoadChildren(*i,1);
248         tree::Node::ChildrenListType::reverse_iterator j;
249         for (j = (*i)->GetChildrenList().rbegin(); 
250              j!= (*i)->GetChildrenList().rend(); 
251              ++j)
252           {
253             wxListItem item;
254             item.SetMask(wxLIST_MASK_STATE | 
255                          wxLIST_MASK_TEXT |
256                          //                      wxLIST_MASK_IMAGE |
257                          wxLIST_MASK_DATA |
258                          //                      wxLIST_MASK_WIDTH |
259                          wxLIST_MASK_FORMAT
260                          );
261
262             ItemData* data = new ItemData;
263             data->node = *j;
264             item.SetData(data);
265             
266           
267             long id = GetCtrl(l)->InsertItem(item);
268
269             std::ostringstream oss;
270             int n= GetTreeHandler()->GetNumberOfChildren(*j);
271             
272             oss << n;
273             std::string s(oss.str());
274             
275             item.SetText( crea::std2wx(s));
276             //      item.SetTextColour(*wxRED);
277             //      item.SetBackgroundColour(*wxBLACK); 
278             item.SetColumn(0);
279
280                 //Sets the last level as selecte....How to make it select only the first time?
281                 //if (level==mLevelList.size()) item.SetState(wxLIST_STATE_SELECTED);
282
283             GetCtrl(l)->SetItem(item);
284                 
285             //      GetCtrl(l)->SetItem(id,0, crea::std2wx(s));
286             //      GetCtrl(l)->SetColumnWidth(0, wxLIST_AUTOSIZE );
287
288           for (int k=1; k<GetCtrl(l)->GetColumnCount(); k++)
289               {
290
291                 std::string val = (*j)->GetAttribute(mLevelList[l].key[k-1]);
292                 if (val.size()==0) val = "?";
293                 item.SetText( crea::std2wx(val));
294                 //              item.SetTextColour(*wxBLACK);
295                 //              item.SetBackgroundColour(*wxWHITE); 
296                 item.SetColumn(k);
297                 GetCtrl(l)->SetItem(item);
298
299                 //              GetCtrl(l)->SetItem(id,k, crea::std2wx(val));
300                 // GetCtrl(l)->SetColumnWidth(k, wxLIST_AUTOSIZE );
301                 
302               }
303             
304           }
305       }
306     
307     GetCtrl(l)->Show();
308
309     
310     if (level<mLevelList.size()) UpdateLevel(level+1);
311  }
312   //=====================================================================
313
314
315   //================================================================
316   void WxTreeView::OnSelectedChanged(wxListEvent& event)
317   { 
318     GimmickDebugMessage(1,
319                         GetTreeHandler()->GetTree().GetLabel()
320                         <<" view : item selected "
321                         <<std::endl);
322
323     wxListItem info;
324     info.m_itemId = event.m_itemIndex;
325     
326
327     // retrieve the level
328     wxObject* obj = event.GetEventObject();   
329     unsigned int level = 0;
330     for (level = 0; level<mLevelList.size(); ++level)
331       {
332         if ( GetCtrl(level) == obj ) break;
333       }
334     GimmickDebugMessage(1,
335                         " Level "<<level+1
336                         <<std::endl);
337     if (level<mLevelList.size()-1) UpdateLevel( level + 2 ); 
338         if (level==mLevelList.size()-1) ValidateSelectedImages ();
339
340   }
341   //================================================================
342
343 //================================================================
344   void WxTreeView::OnColClick(wxListEvent& event)
345   { 
346           /*
347         //Obtain the column name and the level that needs to be organized
348         int colNum=event.m_col;
349     GimmickMessage(1,
350                         " Column " <<event.m_col
351                         <<std::endl);
352
353         
354     wxObject* ctrl = event.GetEventObject(); 
355         unsigned int level = 0;
356     for (level = 0; level<mLevelList.size(); ++level)
357       {
358         if ( GetCtrl(level) == ctrl ) break;
359       }
360
361           wxBusyCursor busy;
362     std::vector<tree::Node*> sel=GetSelected(level+1);
363
364         tree::Node* nodes[20];
365
366           int l = level - 1;
367  
368     // to speed up inserting we hide the control temporarily
369     GetCtrl(level)->Hide();
370     GetCtrl(level)->DeleteAllItems();
371     
372     std::vector<tree::Node*>::iterator i;
373         int num=0;
374     for (i=sel.begin(); i!=sel.end(); ++i)
375       {
376         
377                 //Adds columns
378                 GetTreeHandler()->LoadChildren(*i,1);
379                 tree::Node::ChildrenListType::reverse_iterator j;
380                 
381                 for (j = (*i)->GetChildrenList().rbegin(); 
382                         j!= (*i)->GetChildrenList().rend(); 
383                         ++j)
384                         {
385                                 nodes[num]=*j;
386                                 num++;
387                         }
388       }
389         
390           //Sorting elements
391           int k, m; 
392           tree::Node* index;
393           
394         
395         for (k=1; k<num; ++k)
396         {
397                 index = nodes[k];
398                 m = k;
399                 GimmickMessage(1,
400                         "Comparison Key 1: "
401                             <<(nodes[m-1])->GetAttribute(mLevelList[level].key[colNum-1])
402                                 <<"Comparison Key 2: "<<(index)->GetAttribute(mLevelList[level].key[colNum-1])
403                             <<std::endl);
404                 while ((m > 0) && ((nodes[m-1])->GetAttribute(mLevelList[level].key[colNum-1]) > 
405                                                    (index)->GetAttribute(mLevelList[level].key[colNum-1])))
406                 {
407                 nodes[m] = nodes[m-1];
408                 m = m - 1;
409                 }
410                 nodes[m] = index;
411         }
412
413         for (m=0; m<num; ++m)
414         {
415                 tree::Node* node=nodes[m];
416             wxListItem item;
417             item.SetMask(wxLIST_MASK_STATE | 
418                          wxLIST_MASK_TEXT |
419                          //                      wxLIST_MASK_IMAGE |
420                          wxLIST_MASK_DATA |
421                          //                      wxLIST_MASK_WIDTH |
422                          wxLIST_MASK_FORMAT
423                          );
424
425             long id = GetCtrl(level)->InsertItem(item);
426                 int n;
427                 if ((node)->GetChildrenLoaded()) 
428                 {
429                         n=(node)->GetChildrenList().size();
430                 }
431                 else
432                 {
433                         n= GetTreeHandler()->GetNumberOfChildren(node);
434                 }
435                 std::ostringstream oss;
436                 
437                 oss << n;
438                 std::string s(oss.str());
439
440                 GetCtrl(level)->SetItem(id,0, crea::std2wx(s));
441                 GetCtrl(level)->SetColumnWidth(0, wxLIST_AUTOSIZE );
442                 
443           for (int k=1; k<GetCtrl(level)->GetColumnCount(); k++)
444               {
445                 std::string val = (node)->GetAttribute(mLevelList[level].key[k-1]);
446                 if (val.size()==0) val = "?";
447                 GetCtrl(level)->SetItem(id,k, crea::std2wx(val));
448                 GetCtrl(level)->SetColumnWidth(k, wxLIST_AUTOSIZE );
449                 
450               }
451             
452           }
453
454     
455     GetCtrl(level)->Show();
456 */
457   }
458   //================================================================
459
460   void WxTreeView::ValidateSelectedImages()
461   {
462         int level=mLevelList.size();
463         std::vector<tree::Node*> sel=GetSelected(level+1);
464         bool valid=true;
465         std::string mess;
466         if(sel.size()>0)
467         {
468                 std::vector<tree::Node*>::iterator i;
469                 std::string row;
470                 std::string col;
471                 std::string plane;
472                 
473                 
474                 //Validation between image sizes
475                 for (i=sel.begin(); i!=sel.end() && valid; ++i)
476                 {
477                         if(i==sel.begin())
478                         {
479                                 row=(*i)->GetAttribute(mLevelList[level-1].key[1]);
480                                 col=(*i)->GetAttribute(mLevelList[level-1].key[2]);
481                                 plane=(*i)->GetAttribute(mLevelList[level-1].key[3]);
482                         }
483                         else
484                         {
485                                 if(((*i)->GetAttribute(mLevelList[level-1].key[1]))!=row ||
486                                         ((*i)->GetAttribute(mLevelList[level-1].key[2]))!=col ||
487                                         ((*i)->GetAttribute(mLevelList[level-1].key[3]))!=plane)
488                                         {
489                                                 mess="The selected images are not compatible.";
490                                                 valid=false;
491                                         }
492                         }
493                 }
494
495                 //Dimention validation
496                 //Compatibility with maximum 
497                         if(valid)
498                         {       
499                                 
500                                 int rows;
501                                 int cols;
502                                 int planes;
503                                 std::string s;
504                                 std::istringstream t(s);
505                                 s=row;
506                                 t >> rows;
507                                 if(row==""){rows=1;}
508                                 s=col;
509                                 t >> cols;
510                                 if(col==""){cols=1;}
511                                 s=plane;
512                                 t >> planes;
513                                 if(plane==""){planes=1;}
514
515                                 int dim = 0;
516                                 if (planes>1) dim=3;
517                                 else if (cols>1) dim=2;
518                                 else if (rows>1) dim=1;
519                             
520                                 if (dim == 0) 
521                                 {
522                                         mess="Unknown image dimension : cannot select !";
523                                         valid= false;
524                                 }
525                                 else if (dim>GetMaxDimension())
526                                 {
527                                         mess="Selecting ";
528                                         mess+=dim;
529                                         mess+="D images is not allowed !";
530                                         valid= false;
531                                 }
532                                 if ( dim == GetMaxDimension() )
533                                 {
534                                         mess="Cannot add this image to selection : would result in a ";
535                                         mess+=(dim+1);
536                                         mess+="D image!";
537                                         
538                                         valid= false;
539                                 }
540                                 if ( dim < GetMinDimension() && sel.size()<2 )
541                                 {
542                                         mess="Cannot build the selection as it would result in a ";
543                                         mess+=dim;
544                                         mess+="D image, and the minimum is ";
545                                         mess+=GetMinDimension();
546                                         mess+="D!";
547                                         valid= false;
548                                 }
549                         }
550           }
551         else
552         {
553                 mess="Cannot have 0 images selected";
554                 valid=false;
555         }
556         
557                 //Send an event telling wether the selection is valid or not
558                 wxCommandEvent event( 0, GetId() );
559                 event.SetEventObject( this );
560                 if(valid)
561                 {
562                         mess="Selection OK !";
563                         event.SetInt(0);
564                 }
565                 else
566                 {event.SetInt(1);}
567                 event.SetString(crea::std2wx(mess));
568                 GetEventHandler()->ProcessEvent( event );
569           
570         
571   }
572
573   //================================================================
574   vtkImageData* WxTreeView::GetSelectedImage(int dim)
575   {
576         
577         return NULL;
578   }
579
580   void WxTreeView::GetSelectedImages(std::vector<vtkImageData*>& f, int dim)
581   {
582           /*
583         std::vector<tree::Node*> im=GetSelected(level+1);
584         
585     // Create the output data
586     if (im.size()==1) 
587       {
588                 // Only one image : give it
589                 vtkImageData* out = vtkImageData::New();
590                 out->ShallowCopy(mReader.GetImage(im.front()->ImageGetFullFileName()));
591                 f.push_back( out );
592       }
593     else if (im.size()>1)
594       {
595         vtkImageData* first = mReader.GetImage( im.front()->ImageGetFullFileName() );
596         if (first->GetDataDimension()==2) 
597           {     
598             // n2D to 3D
599             vtkImageData* out = vtkImageData::New();
600             out->CopyStructure(first);  
601             out->SetScalarType(first->GetScalarType());
602             int ext[6];
603             first->GetExtent(ext);
604             ext[5] = im.size();
605             out->SetExtent(ext);
606             // LG : TODO : Z Spacing  ?
607             
608             out->AllocateScalars();
609             
610             //first->Print(std::cout);
611             //      out->Print(std::cout);
612             
613             int dim[3];
614             first->GetDimensions(dim);
615             unsigned long imsize = 
616               ( (unsigned long)first->GetScalarPointer(0,1,0)
617                 - (unsigned long)first->GetScalarPointer(0,0,0))
618               *dim[1];
619
620             int slice = 0;
621             std::vector<DicomNode*>::iterator it;
622             for (it=im.begin(); it!=im.end(); ++it) 
623               {
624                 //std::cout << "copying slice "<<slice <<std::endl;
625                 vtkImageData* cur = mReader.GetImage( (*it)->ImageGetFullFileName() );
626                 
627                 void* src = cur->GetScalarPointer(0,0,0);
628                 void* dst = out->GetScalarPointer(0,0,slice);
629                 //              std::cout << "src="<<src<<std::endl;
630                 //              std::cout << "dst="<<dst<<std::endl;
631                 //              std::cout << "siz="<<imsize<<std::endl;
632                 memcpy(dst,src,imsize);
633
634                 slice++;
635               }
636             f.push_back(out);
637           }
638         else 
639           {
640             // n3D
641             std::vector<DicomNode*>::iterator it;
642             for (it=im.begin(); it!=im.end(); ++it) 
643               {
644                 vtkImageData* out = vtkImageData::New();
645                 out->ShallowCopy(mReader.GetImage((*it)->ImageGetFullFileName()));
646                 f.push_back(out);
647               }
648           }
649       }
650           */
651   }
652   BEGIN_EVENT_TABLE(WxTreeView, wxPanel)
653   /*
654     EVT_SIZE(MyFrame::OnSize)
655
656     EVT_MENU(LIST_QUIT, MyFrame::OnQuit)
657     EVT_MENU(LIST_ABOUT, MyFrame::OnAbout)
658     EVT_MENU(LIST_LIST_VIEW, MyFrame::OnListView)
659     EVT_MENU(LIST_REPORT_VIEW, MyFrame::OnReportView)
660     EVT_MENU(LIST_ICON_VIEW, MyFrame::OnIconView)
661     EVT_MENU(LIST_ICON_TEXT_VIEW, MyFrame::OnIconTextView)
662     EVT_MENU(LIST_SMALL_ICON_VIEW, MyFrame::OnSmallIconView)
663     EVT_MENU(LIST_SMALL_ICON_TEXT_VIEW, MyFrame::OnSmallIconTextView)
664     EVT_MENU(LIST_VIRTUAL_VIEW, MyFrame::OnVirtualView)
665     EVT_MENU(LIST_SMALL_VIRTUAL_VIEW, MyFrame::OnSmallVirtualView)
666
667     EVT_MENU(LIST_FOCUS_LAST, MyFrame::OnFocusLast)
668     EVT_MENU(LIST_TOGGLE_FIRST, MyFrame::OnToggleFirstSel)
669     EVT_MENU(LIST_DESELECT_ALL, MyFrame::OnDeselectAll)
670     EVT_MENU(LIST_SELECT_ALL, MyFrame::OnSelectAll)
671     EVT_MENU(LIST_DELETE, MyFrame::OnDelete)
672     EVT_MENU(LIST_ADD, MyFrame::OnAdd)
673     EVT_MENU(LIST_EDIT, MyFrame::OnEdit)
674     EVT_MENU(LIST_DELETE_ALL, MyFrame::OnDeleteAll)
675     EVT_MENU(LIST_SORT, MyFrame::OnSort)
676     EVT_MENU(LIST_SET_FG_COL, MyFrame::OnSetFgColour)
677     EVT_MENU(LIST_SET_BG_COL, MyFrame::OnSetBgColour)
678     EVT_MENU(LIST_TOGGLE_MULTI_SEL, MyFrame::OnToggleMultiSel)
679     EVT_MENU(LIST_SHOW_COL_INFO, MyFrame::OnShowColInfo)
680     EVT_MENU(LIST_SHOW_SEL_INFO, MyFrame::OnShowSelInfo)
681     EVT_MENU(LIST_FREEZE, MyFrame::OnFreeze)
682     EVT_MENU(LIST_THAW, MyFrame::OnThaw)
683     EVT_MENU(LIST_TOGGLE_LINES, MyFrame::OnToggleLines)
684     EVT_MENU(LIST_MAC_USE_GENERIC, MyFrame::OnToggleMacUseGeneric)
685
686     EVT_UPDATE_UI(LIST_SHOW_COL_INFO, MyFrame::OnUpdateShowColInfo)
687     EVT_UPDATE_UI(LIST_TOGGLE_MULTI_SEL, MyFrame::OnUpdateToggleMultiSel)
688 END_EVENT_TABLE()
689
690 BEGIN_EVENT_TABLE(MyListCtrl, wxListCtrl)
691     EVT_LIST_BEGIN_DRAG(LIST_CTRL, MyListCtrl::OnBeginDrag)
692     EVT_LIST_BEGIN_RDRAG(LIST_CTRL, MyListCtrl::OnBeginRDrag)
693     EVT_LIST_BEGIN_LABEL_EDIT(LIST_CTRL, MyListCtrl::OnBeginLabelEdit)
694     EVT_LIST_END_LABEL_EDIT(LIST_CTRL, MyListCtrl::OnEndLabelEdit)
695     EVT_LIST_DELETE_ITEM(LIST_CTRL, MyListCtrl::OnDeleteItem)
696     EVT_LIST_DELETE_ALL_ITEMS(LIST_CTRL, MyListCtrl::OnDeleteAllItems)
697 #if WXWIN_COMPATIBILITY_2_4
698     EVT_LIST_GET_INFO(LIST_CTRL, MyListCtrl::OnGetInfo)
699     EVT_LIST_SET_INFO(LIST_CTRL, MyListCtrl::OnSetInfo)
700 #endif
701   */
702     EVT_LIST_ITEM_SELECTED(-1, WxTreeView::OnSelectedChanged)
703   
704     EVT_LIST_ITEM_DESELECTED(-1, WxTreeView::OnSelectedChanged)
705         /*
706     EVT_LIST_KEY_DOWN(LIST_CTRL, MyListCtrl::OnListKeyDown)
707     EVT_LIST_ITEM_ACTIVATED(LIST_CTRL, MyListCtrl::OnActivated)
708     EVT_LIST_ITEM_FOCUSED(LIST_CTRL, MyListCtrl::OnFocused)
709
710     EVT_LIST_COL_RIGHT_CLICK(LIST_CTRL, MyListCtrl::OnColRightClick)
711         */
712     EVT_LIST_COL_CLICK(-1, WxTreeView::OnColClick)
713         /*
714     EVT_LIST_COL_BEGIN_DRAG(LIST_CTRL, MyListCtrl::OnColBeginDrag)
715     EVT_LIST_COL_DRAGGING(LIST_CTRL, MyListCtrl::OnColDragging)
716     EVT_LIST_COL_END_DRAG(LIST_CTRL, MyListCtrl::OnColEndDrag)
717
718     EVT_LIST_CACHE_HINT(LIST_CTRL, MyListCtrl::OnCacheHint)
719
720 #if USE_CONTEXT_MENU
721     EVT_CONTEXT_MENU(MyListCtrl::OnContextMenu)
722 #endif
723     EVT_CHAR(MyListCtrl::OnChar)
724
725     EVT_RIGHT_DOWN(MyListCtrl::OnRightClick)
726   */
727 END_EVENT_TABLE()
728   
729 } // EO namespace creaImageIO
730
731