1 #include <creaImageIOWxTreeView.h>
2 #include <creaImageIOGimmickView.h>
3 #include <creaImageIOSystem.h>
4 #include <wx/splitter.h>
6 ///Comparing function for ordering algorithm. Takes parameters as strings.
7 int wxCALLBACK CompareFunctionStrings(long item1, long item2, long sortData)
9 std::string s1((char*)((long*)item1)[1]);
10 std::string s2((char*)((long*)item2)[1]);
34 ///Comparing function for ordering algorithm. Takes parameters as ints.
35 int wxCALLBACK CompareFunctionInts(long item1, long item2, long sortData)
37 int val1=atoi((char*)((long*)item1)[1]);
38 int val2=atoi((char*)((long*)item2)[1]);
64 //=====================================================================
66 WxTreeView::WxTreeView(TreeHandler* handler,
71 TreeView(handler,gimmick)
73 GimmickDebugMessage(1,"WxTreeView::WxTreeView"
77 // Split part below toolbar into notebook for views and panel
78 // for preview, messages...
80 // mSplitter = new wxSplitterWindow( this , -1);
83 wxBoxSizer *sizer = new wxBoxSizer(wxHORIZONTAL);
85 int ctrl_style = wxLC_REPORT | wxLC_VRULES;
86 int col_style = wxLIST_FORMAT_LEFT;
88 // Creating the ListCtrl for the levels > 0 (not for Root level)
90 i < handler->GetTree().GetNumberOfLevels();
94 GimmickDebugMessage(5,"Creating view for level "<<i
98 // If the first level : parent = this
99 wxWindow* sparent = this;
100 // else parent = last splitter
101 if (i>1) sparent = mLevelList[i-2].wxSplitter;
103 level.wxSplitter = new wxSplitterWindow( sparent , -1);
104 // level.wxSplitter->SetMinimumPaneSize(100);
106 wxListCtrl* ctrl = new wxListCtrl(level.wxSplitter,
112 level.wxSplitter->Initialize(ctrl);
114 // Create the first column : number of children
116 std::string title = "#";
117 if (i<handler->GetTree().GetNumberOfLevels()-1)
119 title += handler->GetTree().GetLevelDescriptor(i+1).GetName();
120 if (title[title.size()-1]!='s')
123 ctrl->InsertColumn(0,crea::std2wx(title),col_style);
126 // Create the columns : one for each attribute of the level
128 tree::LevelDescriptor::AttributeDescriptorListType::const_iterator a;
129 for (a = handler->GetTree().GetAttributeDescriptorList(i).begin();
130 a != handler->GetTree().GetAttributeDescriptorList(i).end();
134 GimmickDebugMessage(5,"Creating column "<<col<<" : "
137 ctrl->InsertColumn(col,
138 crea::std2wx(a->GetName()),
140 level.key.push_back(a->GetKey());
141 // ctrl->SetColumnWidth(col, wxLIST_AUTOSIZE );
147 mLevelList.push_back(level);
153 wxMenuItem* m1=menu->Append(wxID_ANY, _T("&Sort ascending"));
154 wxMenuItem* m2=menu->Append(wxID_ANY, _T("&Sort descending"));
155 wxMenuItem* m3=menu->Append(wxID_ANY, _T("&Filter"));
156 mAscendingID=m1->GetId();
157 mDescendingID=m2->GetId();
158 mFilterID=m3->GetId();
159 Connect( mAscendingID, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(WxTreeView::OnPopupSort) );
160 Connect( mDescendingID, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(WxTreeView::OnPopupSort) );
161 Connect( mFilterID, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(WxTreeView::OnPopupFilter) );
163 #endif // wxUSE_MENUS
166 /// Initialize the first level splitter
168 sizer->Add( mLevelList[0].wxSplitter ,1, wxGROW ,0);
172 mSelectionMade=false;
174 //CreateColorPalette();
182 //=====================================================================
184 //=====================================================================
186 WxTreeView::~WxTreeView()
188 GimmickDebugMessage(1,"WxTreeView::~WxTreeView"
191 //=====================================================================
194 //=====================================================================
201 //=====================================================================
202 std::vector<tree::Node*> WxTreeView::GetSelected(int level)
205 // the selection of upper level
206 std::vector<tree::Node*> sel;
210 sel.push_back(GetTreeHandler()->GetTree().GetTree());
214 int n = GetCtrl(l-1)->GetItemCount();
215 for (int i = 0; i < n; i++)
217 if ( GetCtrl(l-1)->GetItemState(i,wxLIST_STATE_SELECTED))
219 long adr = GetCtrl(l-1)->GetItemData(i);
220 tree::Node* n = ((ItemData*)adr)->node;
223 std::vector<tree::Node*>::iterator it;
225 it = sel.insert ( it , n );
238 //=====================================================================
240 ///Removes selected nodes on given level
241 void WxTreeView::RemoveSelected( int level )
243 std::vector<tree::Node*> sel=GetSelected(level+1);
245 if (wxMessageBox(_T("Delete file(s) ?"),
247 wxYES_NO,this ) == wxYES)
253 std::vector<tree::Node*>::iterator i;
254 for (i=sel.begin(); i!=sel.end(); ++i)
256 GimmickDebugMessage(2,
261 GetTreeHandler()->Remove(*i);
270 //=====================================================================
273 //=====================================================================
274 /// Updates a level of the view (adds or removes children, proganizes, etc.)
275 void WxTreeView::UpdateLevel( int level )
277 GimmickDebugMessage(1,
278 GetTreeHandler()->GetTree().GetLabel()
279 <<" view : updating level "<<level
283 RecursiveUpdateLevel(level);
285 for (i=0; i<level-1; i++)
287 if (!GetSplitter(i)->IsSplit())
288 GetSplitter(i)->SplitVertically( GetCtrl(i), GetSplitter(i+1),
291 if (GetSplitter(i)->IsSplit()) GetSplitter(i)->Unsplit();
294 //=====================================================================
296 /// Recursive method called upon by UpdateLevel to refresh all windows
297 void WxTreeView::RecursiveUpdateLevel( int level )
299 GimmickDebugMessage(2,
300 GetTreeHandler()->GetTree().GetLabel()
301 <<" view : updating level (recursive)"<<level
305 std::vector<tree::Node*> sel=GetSelected(level);
309 // to speed up inserting we hide the control temporarily
311 GetCtrl(l)->DeleteAllItems();
313 std::vector<tree::Node*>::iterator i;
315 //Adds the first item (filter)
317 for (i=sel.begin(); i!=sel.end(); ++i)
319 GimmickDebugMessage(2,
320 "adding children of '"
326 //Adds items (other than the first) and sets their attributes
327 GetCtrl(l)->InsertItem(0, _T("hELLO"));
328 GetTreeHandler()->LoadChildren(*i,1);
329 tree::Node::ChildrenListType::reverse_iterator j;
330 for (j = (*i)->GetChildrenList().rbegin();
331 j!= (*i)->GetChildrenList().rend();
334 wxListItem* item= new wxListItem;
335 item->SetMask(wxLIST_MASK_STATE |
337 // wxLIST_MASK_IMAGE |
339 // wxLIST_MASK_WIDTH |
343 ItemData* data = new ItemData;
354 //Setting first column (number of children)
355 std::ostringstream oss;
356 int n= GetTreeHandler()->GetNumberOfChildren(*j);
358 std::string s(oss.str());
359 item->SetText( crea::std2wx(s));
362 GetCtrl(l)->InsertItem(*item);
363 //GetCtrl(l)->SetItem(item);
365 //Setting other attributes
366 for (int k=1; k<GetCtrl(l)->GetColumnCount(); k++)
369 std::string val = (*j)->GetAttribute(mLevelList[l].key[k-1]);
370 if (val.size()==0) val = "?";
371 item->SetText( crea::std2wx(val));
373 GetCtrl(l)->SetItem(*item);
374 GetCtrl(l)->RefreshItem(*item);
378 GetCtrl(l)->DeleteItem(0);
383 if (level<mLevelList.size()) UpdateLevel(level+1);
386 //=====================================================================
389 //================================================================
390 void WxTreeView::OnSelectedChanged(wxListEvent& event)
392 GimmickDebugMessage(1,
393 GetTreeHandler()->GetTree().GetLabel()
394 <<" view : item selected "
398 info.m_itemId = event.m_itemIndex;
399 mLastSelected=event.m_itemIndex;
400 // retrieve the level
401 wxObject* obj = event.GetEventObject();
402 unsigned int level = 0;
403 for (level = 0; level<mLevelList.size(); ++level)
405 if ( GetCtrl(level) == obj ) break;
407 GimmickDebugMessage(1,
412 " Event type "<<event.GetEventType()
415 if(event.m_itemIndex!=0)
417 if(level<mLevelList.size()-1)
419 mSelected=GetSelected(level+2);
423 mLastLevelSelected=GetSelected(level+2);
430 if (level<mLevelList.size()-1)
432 UpdateLevel( level + 2 );
433 GetGimmickView()->ClearSelection();
435 if (level==mLevelList.size()-2) SelectLowerLevel();
436 if (level==(mLevelList.size()-1)&&mProcess)
438 if(event.GetEventType()==10145)
440 ValidateSelectedImages (true);
444 ValidateSelectedImages (false);
447 //SetColor(level,event.m_itemIndex);
451 if(event.GetEventType()==10145)
454 GetCtrl(level)->SetItemText(0,crea::std2wx(""));
455 GetCtrl(level)->EditLabel(event.m_itemIndex);
462 //================================================================
464 //================================================================
465 void WxTreeView::SelectLowerLevel()
468 int level=mLevelList.size()-1;
472 item = GetCtrl(level)->GetNextItem(item,
477 if(item==(GetCtrl(level)->GetItemCount()-1))
488 GetCtrl(level)->SetItemState(item,wxLIST_STATE_SELECTED, wxLIST_MASK_STATE
489 | wxLIST_MASK_TEXT |wxLIST_MASK_IMAGE | wxLIST_MASK_DATA | wxLIST_MASK_WIDTH | wxLIST_MASK_FORMAT);
497 //================================================================
498 //================================================================
500 void WxTreeView::OnColClick(wxListEvent& event)
502 mColumnSelected=event.m_col;
503 wxPoint clientpt = event.GetPoint();
504 senderCtrl = event.GetEventObject();
505 unsigned int level = 0;
506 for (level = 0; level<mLevelList.size(); ++level)
508 if ( GetCtrl(level) == senderCtrl ) break;
510 clientpt.x+=(mColumnSelected)*(GetCtrl(0)->GetColumnWidth(mColumnSelected));
511 clientpt.x+=level*105;
513 wxPoint screenpt = ClientToScreen(clientpt);
514 if(mColumnSelected!=0)
516 PopupMenu(menu, clientpt);
520 //================================================================
521 void WxTreeView::OnPopupFilter(wxCommandEvent& event)
524 GimmickDebugMessage(7,
525 "WxTreeView::OnEndLabelEdit"
527 wxObject* ctrl = event.GetEventObject();
528 unsigned int level = 0;
529 for (level = 0; level<mLevelList.size(); ++level)
531 if ( GetCtrl(level) == senderCtrl ) break;
533 std::string filter = wxGetTextFromUser(_T("Enter the filter to apply"), _T("Filter On Column"));
538 UpdateLevel(level+1);
543 it = GetCtrl(level)->GetNextItem(it,
548 long adr = GetCtrl(level)->GetItemData(it);
549 tree::Node* nod = ((ItemData*)adr)->node;
550 att=(*nod).GetAttribute(mLevelList[level].key[mColumnSelected-1]);
552 if(att.find(filter)>900)
554 GetCtrl(level)->DeleteItem(it);
558 GetGimmickView()->ClearSelection();
560 //================================================================
562 //================================================================
563 void WxTreeView::OnPopupSort(wxCommandEvent& event)
566 unsigned int level = 0;
567 for (level = 0; level<mLevelList.size(); ++level)
569 if ( GetCtrl(level) == senderCtrl ) break;
571 if(event.GetId()==mAscendingID)
575 else if(event.GetId()==mDescendingID)
582 //================================================================
583 void WxTreeView::OnSort(int level)
585 //Obtain the column name and the level that needs to be organized
587 if(mColumnSelected!=0)
590 //GetCtrl(level)->DeleteItem(0);
591 //Sets the data for the items to be sorted
594 int n = GetCtrl(level)->GetItemCount();
595 for (int i = 0; i < n; i++)
598 //Gets current item data
599 long adr = GetCtrl(level)->GetItemData(i);
601 //Extracts the node and the type of attribute
602 tree::Node* nod = ((ItemData*)adr)->node;
605 (*nod).GetAttributeDescriptor(mLevelList[level].key[mColumnSelected-1]).DecodeType(ty);
607 //Obtains the organizing attribute
608 att=(*nod).GetAttribute(mLevelList[level].key[mColumnSelected-1]);
610 char* d= new char [att.size()+1];
611 strcpy (d, att.c_str());
614 long* lp= new long[2];
618 //Sets it as the data
619 GetCtrl(level)->SetItemData(i,(long)lp);
626 GetCtrl(level)->SortItems(CompareFunctionInts, 0);
630 GetCtrl(level)->SortItems(CompareFunctionStrings, 0);
638 GetCtrl(level)->SortItems(CompareFunctionInts, 1);
642 GetCtrl(level)->SortItems(CompareFunctionStrings, 1);
646 //Resets original data
647 std::vector<tree::Node*>::iterator selection;
648 std::vector<long> change;
652 it = GetCtrl(level)->GetNextItem(it,
657 //Gets current item data, extracts the node and resets it
658 long item = GetCtrl(level)->GetItemData(it);
659 GetCtrl(level)->SetItemData(it,((long*)item)[0]);
660 tree::Node* n= ((ItemData*)((long*)item)[0])->node;
661 if(level<mLevelList.size()-1)
663 for(selection=mSelected.begin();selection!=mSelected.end();++selection)
665 if((*selection)->GetAttribute("ID").compare(n->GetAttribute("ID"))==0)
667 change.push_back(it);
673 for(selection=mLastLevelSelected.begin();selection!=mLastLevelSelected.end();++selection)
675 if((*selection)->GetAttribute("ID").compare(n->GetAttribute("ID"))==0)
677 change.push_back(it);
684 //Resets the selected items
685 std::vector<long>::iterator selectedIts;
686 for(selectedIts=change.begin();selectedIts!=change.end();++selectedIts)
688 GetCtrl(level)->SetItemState(*selectedIts,wxLIST_STATE_SELECTED, wxLIST_MASK_STATE
689 | wxLIST_MASK_TEXT |wxLIST_MASK_IMAGE | wxLIST_MASK_DATA | wxLIST_MASK_WIDTH | wxLIST_MASK_FORMAT);
692 //GetCtrl(level)->InsertItem(0,_T("Filter:"));
696 //================================================================
697 void WxTreeView::OnBeginLabelEdit(wxListEvent& event)
699 GimmickDebugMessage(7,
700 "WxTreeView::OnBeginLabelEdit"
702 if(event.m_itemIndex!=0)
709 //================================================================
710 void WxTreeView::OnEndLabelEdit(wxListEvent& event)
712 GimmickDebugMessage(7,
713 "WxTreeView::OnEndLabelEdit"
715 wxObject* ctrl = event.GetEventObject();
716 unsigned int level = 0;
717 for (level = 0; level<mLevelList.size(); ++level)
719 if ( GetCtrl(level) == ctrl ) break;
721 std::string filter = crea::wx2std(event.m_item.m_text.c_str());
726 UpdateLevel(level+1);
731 it = GetCtrl(level)->GetNextItem(it,
737 long adr = GetCtrl(level)->GetItemData(it);
738 for (int j=1;j<GetCtrl(level)->GetColumnCount()-1&&!contains;j++)
740 tree::Node* nod = ((ItemData*)adr)->node;
741 att=(*nod).GetAttribute(mLevelList[level].key[j-1]);
743 if(att.find(filter)<900)
750 GetCtrl(level)->DeleteItem(it);
754 GetGimmickView()->ClearSelection();
755 //GetCtrl(level)->DeleteAllItems();
758 //================================================================
759 void WxTreeView::ValidateSelectedImages(bool isSelection)
761 GimmickDebugMessage(7,
762 "WxTreeView::ValidateSelectedImages"
764 std::vector<tree::Node*> sel(GetSelected(mLevelList.size()+1));
765 GetGimmickView()->OnSelectionChange(sel,isSelection,(mLastSelected-1), mProcess);
768 //================================================================
771 //================================================================
772 void WxTreeView::GetNodes(std::vector<tree::Node*>& nodes, bool direction)
774 long item = mLastSelected;
775 int level=mLevelList.size()-1;
776 //Gets current item data
777 long adr = GetCtrl(level)->GetItemData(item);
779 tree::Node* nod = ((ItemData*)adr)->node;
784 item = GetCtrl(level)->GetNextItem(item,
789 item = GetCtrl(level)->GetNextItem(item,
796 if(GetCtrl(level)->GetItemState(item, wxLIST_STATE_SELECTED)==0 && item!=0)
798 adr = GetCtrl(level)->GetItemData(item);
799 nod = ((ItemData*)adr)->node;
800 nodes.push_back(nod);
806 //================================================================
807 void WxTreeView::GetSelectedAsString(std::vector<std::string>&s)
809 int level=mLevelList.size();
810 std::vector<tree::Node*> sel=GetSelected(level+1);
811 std::vector<tree::Node*>::iterator i;
813 for (i=sel.begin(); i!=sel.end(); ++i)
815 std::string filename=(*i)->GetAttribute("FullFileName");
816 s.push_back(filename);
820 //================================================================
821 void WxTreeView::SetColor(int l, int item)
824 GetCtrl(l)->SetItemTextColour(item, wxColourDatabase().Find
825 (crea::std2wx(mColorPalette[colorId])));
826 GetCtrl(l)->SetItemState(item,wxLIST_STATE_SELECTED | wxLIST_STATE_FOCUSED, wxLIST_STATE_SELECTED); /*
828 //Setting the color according to the parent
831 item.SetBackgroundColour
832 (wxColourDatabase().Find
833 (crea::std2wx(mColorPalette[colorId])));
836 (*j,wxColourDatabase().Find
837 (crea::std2wx(mColorPalette[colorId]))));
847 else if(l!=mLevelList.size()-1)
849 item.SetBackgroundColour(mColorMap[*i]);
850 mColorMap.insert(NodeColorPair(*j,mColorMap[*i]));
854 item.SetBackgroundColour(mColorMap[*i]);
857 //================================================================
858 void WxTreeView::CreateColorPalette()
860 GimmickDebugMessage(6,"WxTreeView::CreateColorPalette");
861 mColorPalette.push_back("WHITE");
862 mColorPalette.push_back("LIGHT GREY");
863 mColorPalette.push_back("AQUAMARINE");
864 mColorPalette.push_back("MEDIUM FOREST GREEN");
865 mColorPalette.push_back("INDIAN RED");
866 mColorPalette.push_back("KHAKI");
867 mColorPalette.push_back("ORANGE");
868 mColorPalette.push_back("LIGHT BLUE");
869 mColorPalette.push_back("LIGHT STEEL BLUE");
870 mColorPalette.push_back("PINK");
871 mColorPalette.push_back("PLUM");
872 mColorPalette.push_back("PURPLE");
873 mColorPalette.push_back("RED");
874 mColorPalette.push_back("SEA GREEN");
875 mColorPalette.push_back("SIENNA");
876 mColorPalette.push_back("SKY BLUE");
877 mColorPalette.push_back("SLATE BLUE");
878 mColorPalette.push_back("SPRING GREEN");
879 mColorPalette.push_back("TAN");
880 mColorPalette.push_back("THISTLE");
881 mColorPalette.push_back("TURQUOISE");
882 mColorPalette.push_back("VIOLET");
883 mColorPalette.push_back("VIOLET RED");
884 mColorPalette.push_back("WHEAT");
885 mColorPalette.push_back("YELLOW");
886 mColorPalette.push_back("YELLOW GREEN");
887 mColorPalette.push_back("BLUE");
888 mColorPalette.push_back("BLUE VIOLET");
889 mColorPalette.push_back("BROWN");
890 mColorPalette.push_back("CADET BLUE");
891 mColorPalette.push_back("CORAL");
892 mColorPalette.push_back("CORNFLOWER BLUE");
893 mColorPalette.push_back("CYAN");
894 mColorPalette.push_back("DARK GREY");
895 mColorPalette.push_back("DARK GREEN");
896 mColorPalette.push_back("DARK OLIVE GREEN");
897 mColorPalette.push_back("DARK ORCHID");
898 mColorPalette.push_back("DARK SLATE BLUE");
899 mColorPalette.push_back("DARK SLATE GREY");
900 mColorPalette.push_back("DARK TURQUOISE");
901 mColorPalette.push_back("FIREBRICK");
902 mColorPalette.push_back("FOREST GREEN");
903 mColorPalette.push_back("GOLD");
904 mColorPalette.push_back("GOLDENROD");
905 mColorPalette.push_back("GREY");
906 mColorPalette.push_back("GREEN");
907 mColorPalette.push_back("GREEN YELLOW");
908 mColorPalette.push_back("LIME GREEN");
909 mColorPalette.push_back("MAGENTA");
910 mColorPalette.push_back("MAROON");
911 mColorPalette.push_back("MEDIUM AQUAMARINE");
912 mColorPalette.push_back("MEDIUM BLUE");
913 mColorPalette.push_back("MEDIUM GOLDENROD");
914 mColorPalette.push_back("MEDIUM ORCHID");
915 mColorPalette.push_back("MEDIUM SEA GREEN");
916 mColorPalette.push_back("MEDIUM SLATE BLUE");
917 mColorPalette.push_back("MEDIUM SPRING GREEN");
918 mColorPalette.push_back("MEDIUM TURQUOISE");
919 mColorPalette.push_back("MEDIUM VIOLET RED");
920 mColorPalette.push_back("MIDNIGHT BLUE");
921 mColorPalette.push_back("NAVY");
922 mColorPalette.push_back("ORANGE RED");
923 mColorPalette.push_back("ORCHID, PALE GREEN");
924 mColorPalette.push_back("STEEL BLUE");
925 mColorPalette.push_back("BLACK");
929 //================================================================
930 BEGIN_EVENT_TABLE(WxTreeView, wxPanel)
932 EVT_SIZE(MyFrame::OnSize)
934 EVT_MENU(LIST_QUIT, MyFrame::OnQuit)
935 EVT_MENU(LIST_ABOUT, MyFrame::OnAbout)
936 EVT_MENU(LIST_LIST_VIEW, MyFrame::OnListView)
937 EVT_MENU(LIST_REPORT_VIEW, MyFrame::OnReportView)
938 EVT_MENU(LIST_ICON_VIEW, MyFrame::OnIconView)
939 EVT_MENU(LIST_ICON_TEXT_VIEW, MyFrame::OnIconTextView)
940 EVT_MENU(LIST_SMALL_ICON_VIEW, MyFrame::OnSmallIconView)
941 EVT_MENU(LIST_SMALL_ICON_TEXT_VIEW, MyFrame::OnSmallIconTextView)
942 EVT_MENU(LIST_VIRTUAL_VIEW, MyFrame::OnVirtualView)
943 EVT_MENU(LIST_SMALL_VIRTUAL_VIEW, MyFrame::OnSmallVirtualView)
945 EVT_MENU(LIST_FOCUS_LAST, MyFrame::OnFocusLast)
946 EVT_MENU(LIST_TOGGLE_FIRST, MyFrame::OnToggleFirstSel)
947 EVT_MENU(LIST_DESELECT_ALL, MyFrame::OnDeselectAll)
948 EVT_MENU(LIST_SELECT_ALL, MyFrame::OnSelectAll)
949 EVT_MENU(LIST_DELETE, MyFrame::OnDelete)
950 EVT_MENU(LIST_ADD, MyFrame::OnAdd)
951 EVT_MENU(LIST_EDIT, MyFrame::OnEdit)
952 EVT_MENU(LIST_DELETE_ALL, MyFrame::OnDeleteAll)
953 EVT_MENU(LIST_SORT, MyFrame::OnSort)
954 EVT_MENU(LIST_SET_FG_COL, MyFrame::OnSetFgColour)
955 EVT_MENU(LIST_SET_BG_COL, MyFrame::OnSetBgColour)
956 EVT_MENU(LIST_TOGGLE_MULTI_SEL, MyFrame::OnToggleMultiSel)
957 EVT_MENU(LIST_SHOW_COL_INFO, MyFrame::OnShowColInfo)
958 EVT_MENU(LIST_SHOW_SEL_INFO, MyFrame::OnShowSelInfo)
959 EVT_MENU(LIST_FREEZE, MyFrame::OnFreeze)
960 EVT_MENU(LIST_THAW, MyFrame::OnThaw)
961 EVT_MENU(LIST_TOGGLE_LINES, MyFrame::OnToggleLines)
962 EVT_MENU(LIST_MAC_USE_GENERIC, MyFrame::OnToggleMacUseGeneric)
964 EVT_UPDATE_UI(LIST_SHOW_COL_INFO, MyFrame::OnUpdateShowColInfo)
965 EVT_UPDATE_UI(LIST_TOGGLE_MULTI_SEL, MyFrame::OnUpdateToggleMultiSel)
968 BEGIN_EVENT_TABLE(MyListCtrl, wxListCtrl)
969 EVT_LIST_BEGIN_DRAG(LIST_CTRL, MyListCtrl::OnBeginDrag)
970 EVT_LIST_BEGIN_RDRAG(LIST_CTRL, MyListCtrl::OnBeginRDrag)
972 EVT_LIST_BEGIN_LABEL_EDIT(-1, WxTreeView::OnBeginLabelEdit)
973 EVT_LIST_END_LABEL_EDIT(-1, WxTreeView::OnEndLabelEdit)
975 EVT_LIST_DELETE_ITEM(LIST_CTRL, MyListCtrl::OnDeleteItem)
976 EVT_LIST_DELETE_ALL_ITEMS(LIST_CTRL, MyListCtrl::OnDeleteAllItems)
977 #if WXWIN_COMPATIBILITY_2_4
978 EVT_LIST_GET_INFO(LIST_CTRL, MyListCtrl::OnGetInfo)
979 EVT_LIST_SET_INFO(LIST_CTRL, MyListCtrl::OnSetInfo)
982 EVT_LIST_ITEM_SELECTED(-1, WxTreeView::OnSelectedChanged)
984 EVT_LIST_ITEM_DESELECTED(-1, WxTreeView::OnSelectedChanged)
986 EVT_LIST_KEY_DOWN(LIST_CTRL, MyListCtrl::OnListKeyDown)
987 EVT_LIST_ITEM_ACTIVATED(LIST_CTRL, MyListCtrl::OnActivated)
988 EVT_LIST_ITEM_FOCUSED(LIST_CTRL, MyListCtrl::OnFocused)
990 EVT_LIST_COL_RIGHT_CLICK(-1, WxTreeView::OnColClick)
992 EVT_LIST_COL_CLICK(-1, WxTreeView::OnColClick)
994 EVT_LIST_COL_BEGIN_DRAG(LIST_CTRL, MyListCtrl::OnColBeginDrag)
995 EVT_LIST_COL_DRAGGING(LIST_CTRL, MyListCtrl::OnColDragging)
996 EVT_LIST_COL_END_DRAG(LIST_CTRL, MyListCtrl::OnColEndDrag)
998 EVT_LIST_CACHE_HINT(LIST_CTRL, MyListCtrl::OnCacheHint)
1000 #if USE_CONTEXT_MENU
1001 EVT_CONTEXT_MENU(MyListCtrl::OnContextMenu)
1003 EVT_CHAR(MyListCtrl::OnChar)
1005 EVT_RIGHT_DOWN(MyListCtrl::OnRightClick)
1009 } // EO namespace creaImageIO