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