]> Creatis software - creaImageIO.git/blob - creaImageIOWxTreeView.cpp
b2998c7b7901460886cd2ae91d78b5c0bf8551f3
[creaImageIO.git] / 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         //Adds columns
302         GetTreeHandler()->LoadChildren(*i,1);
303         tree::Node::ChildrenListType::reverse_iterator j;
304         for (j = (*i)->GetChildrenList().rbegin(); 
305              j!= (*i)->GetChildrenList().rend(); 
306              ++j)
307           {
308             wxListItem item;
309             item.SetMask(wxLIST_MASK_STATE | 
310                          wxLIST_MASK_TEXT |
311                          //                      wxLIST_MASK_IMAGE |
312                          wxLIST_MASK_DATA |
313                          //                      wxLIST_MASK_WIDTH |
314                          wxLIST_MASK_FORMAT
315                          );
316
317             ItemData* data = new ItemData;
318             
319                 data->node = *j;
320                 item.SetId(_id);
321                 /*
322                 std::string a=(*j)->GetAttribute(mLevelList[l].key[mColumnSelected-1]);
323                 GimmickMessage(1,
324                         "State Check: Att VAL"
325                             <<a
326                             <<std::endl);
327         */
328                 data->id = _id;
329             item.SetData(data);
330             
331                 _id++;
332           
333             long id = GetCtrl(l)->InsertItem(item);
334
335             std::ostringstream oss;
336             int n= GetTreeHandler()->GetNumberOfChildren(*j);
337             
338             oss << n;
339             std::string s(oss.str());
340             
341                 
342             item.SetText( crea::std2wx(s));
343             //      item.SetTextColour(*wxRED);
344             //      item.SetBackgroundColour(*wxBLACK); 
345             item.SetColumn(0);
346
347                 //Sets the last level as selecte....How to make it select only the first time?
348                 //if (level==mLevelList.size()) item.SetState(wxLIST_STATE_SELECTED);
349
350             GetCtrl(l)->SetItem(item);
351                 
352             //      GetCtrl(l)->SetItem(id,0, crea::std2wx(s));
353             //      GetCtrl(l)->SetColumnWidth(0, wxLIST_AUTOSIZE );
354
355           for (int k=1; k<GetCtrl(l)->GetColumnCount(); k++)
356               {
357   
358                 std::string val = (*j)->GetAttribute(mLevelList[l].key[k-1]);
359                 if (val.size()==0) val = "?";
360                 item.SetText( crea::std2wx(val));
361                 //              item.SetTextColour(*wxBLACK);
362                 //              item.SetBackgroundColour(*wxWHITE); 
363                 item.SetColumn(k);
364                 GetCtrl(l)->SetItem(item);
365
366                 //              GetCtrl(l)->SetItem(id,k, crea::std2wx(val));
367                 // GetCtrl(l)->SetColumnWidth(k, wxLIST_AUTOSIZE );
368                 
369               }
370             
371           }
372       }
373     
374     GetCtrl(l)->Show();
375
376     
377     if (level<mLevelList.size()) UpdateLevel(level+1);
378  }
379   //=====================================================================
380
381
382   //================================================================
383   void WxTreeView::OnSelectedChanged(wxListEvent& event)
384   { 
385     GimmickDebugMessage(1,
386                         GetTreeHandler()->GetTree().GetLabel()
387                         <<" view : item selected "
388                         <<std::endl);
389
390     wxListItem info;
391     info.m_itemId = event.m_itemIndex;
392     mLastSelected=event.m_itemIndex;
393         
394     // retrieve the level
395     wxObject* obj = event.GetEventObject();   
396     unsigned int level = 0;
397     for (level = 0; level<mLevelList.size(); ++level)
398       {
399         if ( GetCtrl(level) == obj ) break;
400       }
401     GimmickDebugMessage(1,
402                         " Level "<<level+1
403                         <<std::endl);
404
405         
406         mSelected=GetSelected(level+2);
407         
408     if (level<mLevelList.size()-1) UpdateLevel( level + 2 ); 
409
410     if (level==mLevelList.size()-1) ValidateSelectedImages ();
411
412   }
413   //================================================================
414
415 //================================================================
416   void WxTreeView::OnColClick(wxListEvent& event)
417   {       
418         //Obtain the column name and the level that needs to be organized
419         mColumnSelected=event.m_col;
420     GimmickDebugMessage(1,
421                 " Column selected: " <<event.m_col
422                         <<std::endl);
423
424         if(mColumnSelected!=0)
425         {
426                 wxObject* ctrl = event.GetEventObject(); 
427                 unsigned int level = 0;
428                 for (level = 0; level<mLevelList.size(); ++level)
429                 {
430                 if ( GetCtrl(level) == ctrl ) break;
431                 }
432                 
433                 UpdateLevel(level+1);
434                 
435                 wxBusyCursor busy;
436          
437                 int l = level - 1;
438                 
439                 //Sets the data for the items to be sorted
440                 std::string att;
441                 unsigned int ty=0;
442                 int n = GetCtrl(level)->GetItemCount();
443                 for (int i = 0; i < n; i++)
444                 {
445                           
446                         //Gets current item data
447                         long adr = GetCtrl(level)->GetItemData(i);
448                         //Extracts the node and the type of attribute
449                         tree::Node* nod = ((ItemData*)adr)->node;
450                         if(i==0)
451                         {
452                                 (*nod).GetAttributeDescriptor(mLevelList[level].key[mColumnSelected-1]).DecodeType(ty);
453                         }
454                         //Obtains the organizing attribute
455                         att=(*nod).GetAttribute(mLevelList[level].key[mColumnSelected-1]);
456                         
457                         char* d= new char [att.size()+1];
458                         strcpy (d, att.c_str());
459
460                         //Creates array
461                         long* lp= new long[2];
462                         lp[0]=adr;
463                         lp[1]=(long)d;
464                          
465                         //Sets it as the data
466                         GetCtrl(level)->SetItemData(i,(long)lp);
467                 }       
468                   
469                 if(mDirection)
470                 {
471                         if(ty==1)
472                         {
473                                 GetCtrl(level)->SortItems(CompareFunctionInts, 0);
474                         }
475                         else
476                         {
477                                 GetCtrl(level)->SortItems(CompareFunctionStrings, 0);
478                         }
479                         
480                         mDirection=false;
481                 }
482                 else
483                 {
484                         if(ty==1)
485                         {
486                                 GetCtrl(level)->SortItems(CompareFunctionInts, 1);
487                         }
488                         else
489                         {
490                                 GetCtrl(level)->SortItems(CompareFunctionStrings, 1);
491                         }
492                         mDirection=true;
493                 }
494
495                 //Resets original data
496                 std::vector<tree::Node*>::iterator selection;
497                 std::vector<long> change;
498                 long it = -1;
499                 for ( ;; )
500                 {
501                         it = GetCtrl(level)->GetNextItem(it,
502                                                                                 wxLIST_NEXT_ALL);
503                         if ( it == -1 )
504                                 break;
505                         //Gets current item data, extracts the node and resets it
506                         long item = GetCtrl(level)->GetItemData(it);
507                         GetCtrl(level)->SetItemData(it,((long*)item)[0]);
508                         tree::Node* n= ((ItemData*)((long*)item)[0])->node;
509                         for(selection=mSelected.begin();selection!=mSelected.end();++selection)
510                         {
511                                 if((*selection)->GetAttribute("ID").compare(n->GetAttribute("ID"))==0)
512                                 {
513                                         change.push_back(it);   
514                                 }
515                         }
516                         
517                 }
518                 std::vector<long>::iterator selectedIts;
519                 for(selectedIts=change.begin();selectedIts!=change.end();++selectedIts)
520                 {
521                         GetCtrl(level)->SetItemState(*selectedIts,wxLIST_STATE_SELECTED, wxLIST_MASK_STATE 
522                 | wxLIST_MASK_TEXT |wxLIST_MASK_IMAGE | wxLIST_MASK_DATA | wxLIST_MASK_WIDTH | wxLIST_MASK_FORMAT);
523                         
524                 }
525         }
526         
527    }
528   //================================================================
529
530
531   //================================================================
532   void WxTreeView::ValidateSelectedImages()
533   {
534     GimmickDebugMessage(7,
535                         "WxTreeView::ValidateSelectedImages" 
536                         <<std::endl);
537     std::vector<tree::Node*> sel(GetSelected(mLevelList.size()+1));
538     GetGimmickView()->OnSelectionChange(sel);
539     /*
540     //Send an event telling wether the selection is valid or not
541     wxCommandEvent event( 0, GetId() );
542     event.SetEventObject( this );
543     std::vector<tree::Node*> sel=GetSelected((mLevelList.size()+1));
544     event.SetClientData(&sel);
545     GetEventHandler()->ProcessEvent( event );
546     */
547     // 
548   }
549   //================================================================
550
551
552   //================================================================
553   void WxTreeView::GetNodes(std::vector<tree::Node*>& nodes, bool direction)
554   {
555         long item = mLastSelected;
556         int level=mLevelList.size()-1;
557         //Gets current item data
558         long adr = GetCtrl(level)->GetItemData(item);
559         //Extracts the node
560         tree::Node* nod = ((ItemData*)adr)->node;
561     for ( ;; )
562     {
563                 if(direction)
564                 {
565                         item = GetCtrl(level)->GetNextItem(item,
566                                      wxLIST_NEXT_ABOVE);
567                 }
568                 else
569                 {
570                         item = GetCtrl(level)->GetNextItem(item,
571                                      wxLIST_NEXT_BELOW);
572                 }
573         if ( item == -1 )
574                 {
575             break;
576                 }
577                 if(GetCtrl(level)->GetItemState(item, wxLIST_STATE_SELECTED)==0)
578                 {
579                         adr = GetCtrl(level)->GetItemData(item);
580                         nod = ((ItemData*)adr)->node;
581                         nodes.push_back(nod);
582                 }
583     }
584
585   }
586
587   //================================================================
588   void WxTreeView::GetSelectedAsString(std::vector<std::string>&s)
589   {
590           int level=mLevelList.size();
591         std::vector<tree::Node*> sel=GetSelected(level+1);
592         std::vector<tree::Node*>::iterator i;
593         
594     for (i=sel.begin(); i!=sel.end(); ++i)
595       {
596                   std::string filename=(*i)->GetAttribute("FullFileName");
597                   s.push_back(filename);
598           }
599   }
600   //================================================================
601   BEGIN_EVENT_TABLE(WxTreeView, wxPanel)
602   /*
603     EVT_SIZE(MyFrame::OnSize)
604
605     EVT_MENU(LIST_QUIT, MyFrame::OnQuit)
606     EVT_MENU(LIST_ABOUT, MyFrame::OnAbout)
607     EVT_MENU(LIST_LIST_VIEW, MyFrame::OnListView)
608     EVT_MENU(LIST_REPORT_VIEW, MyFrame::OnReportView)
609     EVT_MENU(LIST_ICON_VIEW, MyFrame::OnIconView)
610     EVT_MENU(LIST_ICON_TEXT_VIEW, MyFrame::OnIconTextView)
611     EVT_MENU(LIST_SMALL_ICON_VIEW, MyFrame::OnSmallIconView)
612     EVT_MENU(LIST_SMALL_ICON_TEXT_VIEW, MyFrame::OnSmallIconTextView)
613     EVT_MENU(LIST_VIRTUAL_VIEW, MyFrame::OnVirtualView)
614     EVT_MENU(LIST_SMALL_VIRTUAL_VIEW, MyFrame::OnSmallVirtualView)
615
616     EVT_MENU(LIST_FOCUS_LAST, MyFrame::OnFocusLast)
617     EVT_MENU(LIST_TOGGLE_FIRST, MyFrame::OnToggleFirstSel)
618     EVT_MENU(LIST_DESELECT_ALL, MyFrame::OnDeselectAll)
619     EVT_MENU(LIST_SELECT_ALL, MyFrame::OnSelectAll)
620     EVT_MENU(LIST_DELETE, MyFrame::OnDelete)
621     EVT_MENU(LIST_ADD, MyFrame::OnAdd)
622     EVT_MENU(LIST_EDIT, MyFrame::OnEdit)
623     EVT_MENU(LIST_DELETE_ALL, MyFrame::OnDeleteAll)
624     EVT_MENU(LIST_SORT, MyFrame::OnSort)
625     EVT_MENU(LIST_SET_FG_COL, MyFrame::OnSetFgColour)
626     EVT_MENU(LIST_SET_BG_COL, MyFrame::OnSetBgColour)
627     EVT_MENU(LIST_TOGGLE_MULTI_SEL, MyFrame::OnToggleMultiSel)
628     EVT_MENU(LIST_SHOW_COL_INFO, MyFrame::OnShowColInfo)
629     EVT_MENU(LIST_SHOW_SEL_INFO, MyFrame::OnShowSelInfo)
630     EVT_MENU(LIST_FREEZE, MyFrame::OnFreeze)
631     EVT_MENU(LIST_THAW, MyFrame::OnThaw)
632     EVT_MENU(LIST_TOGGLE_LINES, MyFrame::OnToggleLines)
633     EVT_MENU(LIST_MAC_USE_GENERIC, MyFrame::OnToggleMacUseGeneric)
634
635     EVT_UPDATE_UI(LIST_SHOW_COL_INFO, MyFrame::OnUpdateShowColInfo)
636     EVT_UPDATE_UI(LIST_TOGGLE_MULTI_SEL, MyFrame::OnUpdateToggleMultiSel)
637 END_EVENT_TABLE()
638
639 BEGIN_EVENT_TABLE(MyListCtrl, wxListCtrl)
640     EVT_LIST_BEGIN_DRAG(LIST_CTRL, MyListCtrl::OnBeginDrag)
641     EVT_LIST_BEGIN_RDRAG(LIST_CTRL, MyListCtrl::OnBeginRDrag)
642     EVT_LIST_BEGIN_LABEL_EDIT(LIST_CTRL, MyListCtrl::OnBeginLabelEdit)
643     EVT_LIST_END_LABEL_EDIT(LIST_CTRL, MyListCtrl::OnEndLabelEdit)
644     EVT_LIST_DELETE_ITEM(LIST_CTRL, MyListCtrl::OnDeleteItem)
645     EVT_LIST_DELETE_ALL_ITEMS(LIST_CTRL, MyListCtrl::OnDeleteAllItems)
646 #if WXWIN_COMPATIBILITY_2_4
647     EVT_LIST_GET_INFO(LIST_CTRL, MyListCtrl::OnGetInfo)
648     EVT_LIST_SET_INFO(LIST_CTRL, MyListCtrl::OnSetInfo)
649 #endif
650   */
651     EVT_LIST_ITEM_SELECTED(-1, WxTreeView::OnSelectedChanged)
652   
653     EVT_LIST_ITEM_DESELECTED(-1, WxTreeView::OnSelectedChanged)
654         /*
655     EVT_LIST_KEY_DOWN(LIST_CTRL, MyListCtrl::OnListKeyDown)
656     EVT_LIST_ITEM_ACTIVATED(LIST_CTRL, MyListCtrl::OnActivated)
657     EVT_LIST_ITEM_FOCUSED(LIST_CTRL, MyListCtrl::OnFocused)
658
659     EVT_LIST_COL_RIGHT_CLICK(LIST_CTRL, MyListCtrl::OnColRightClick)
660         */
661     EVT_LIST_COL_CLICK(-1, WxTreeView::OnColClick)
662         /*
663     EVT_LIST_COL_BEGIN_DRAG(LIST_CTRL, MyListCtrl::OnColBeginDrag)
664     EVT_LIST_COL_DRAGGING(LIST_CTRL, MyListCtrl::OnColDragging)
665     EVT_LIST_COL_END_DRAG(LIST_CTRL, MyListCtrl::OnColEndDrag)
666
667     EVT_LIST_CACHE_HINT(LIST_CTRL, MyListCtrl::OnCacheHint)
668
669 #if USE_CONTEXT_MENU
670     EVT_CONTEXT_MENU(MyListCtrl::OnContextMenu)
671 #endif
672     EVT_CHAR(MyListCtrl::OnChar)
673
674     EVT_RIGHT_DOWN(MyListCtrl::OnRightClick)
675   */
676 END_EVENT_TABLE()
677   
678 } // EO namespace creaImageIO
679