const wxTreeListMainWindow *theCtrl,
int &flags, int& column, int level)
{
const wxTreeListMainWindow *theCtrl,
int &flags, int& column, int level)
{
wxTreeListItem* res = HitTest(point, theCtrl, flags, level);
wxTreeListItem* res = HitTest(point, theCtrl, flags, level);
int x = 0;
for(size_t i = 0; i < theCtrl->GetMainColumn(); ++i) {
int w = theCtrl->m_owner->GetHeaderWindow()->GetColumnWidth(i);
int x = 0;
for(size_t i = 0; i < theCtrl->GetMainColumn(); ++i) {
int w = theCtrl->m_owner->GetHeaderWindow()->GetColumnWidth(i);
// right : open if parent and go next (or expand on Win32)
// home : go to root
// end : go to last item without opening parents
// right : open if parent and go next (or expand on Win32)
// home : go to root
// end : go to last item without opening parents
if (point.x<0) flags |= wxTREE_HITTEST_TOLEFT;
if (point.x>w) flags |= wxTREE_HITTEST_TORIGHT;
if (point.y<0) flags |= wxTREE_HITTEST_ABOVE;
if (point.x<0) flags |= wxTREE_HITTEST_TOLEFT;
if (point.x>w) flags |= wxTREE_HITTEST_TORIGHT;
if (point.y<0) flags |= wxTREE_HITTEST_ABOVE;