//=====================================================================
///Comparing function for ordering algorithm. Takes parameters as strings.
-int wxCALLBACK CompareFunctionStrings(long item1, long item2, long sortData)
+//int wxCALLBACK CompareFunctionStrings(long item1, long item2, long sortData)
+int wxCALLBACK CompareFunctionStrings(wxIntPtr item1, wxIntPtr item2, wxIntPtr sortData)
{
creaImageIO::ItemData* data1 = (creaImageIO::ItemData*)item1;
creaImageIO::ItemData* data2 = (creaImageIO::ItemData*)item2;
-
const std::string& s1(*(data1->attr));
- const std::string& s2(*(data2->attr));
-
+ const std::string& s2(*(data2->attr));
if(sortData==1)
{
// inverse the order
- if (s1 < s2)
- return 1;
- if (s1 > s2)
- return -1;
-
+ if (s1 < s2) return 1;
+ if (s1 > s2) return -1;
return 0;
- }
- else
- {
- if (s1 < s2)
- return -1;
- if (s1 > s2)
- return 1;
-
+ } else {
+ if (s1 < s2) return -1;
+ if (s1 > s2) return 1;
return 0;
-
- }
+ } // if sortData
}
//=====================================================================
val = "X";
}
item.SetText( crea::std2wx(val));
- item.SetColumn(k);
-
+ item.SetColumn(k);
GetCtrl(l)->SetItem(item);
} // for k
item.Clear();
-
- } // for j
- } // for i
-
+ } // for j
+ } // for i
SortLevel(l);
GetCtrl(l)->Show();
}
{
mLevelList[level].SortAscending = false;
}
-
SortLevel(level);
}
//================================================================
data->selected = true;
nbselected++;
} // if
- }// for
-
+ }// for
GimmickDebugMessage(1,
"WxTreeView::OnSort : "
<<nbselected<<" selected before sorting"
<<std::endl);
-
mIgnoreSelectedChanged = true;
//
if (mLevelList[level].SortAscending)