if ((point.x > m_xCross-5) && (point.x < m_xCross+5) &&
(point.y > m_yCross-5) && (point.y < m_yCross+5) &&
(IsExpanded() || HasPlus()))
if ((point.x > m_xCross-5) && (point.x < m_xCross+5) &&
(point.y > m_yCross-5) && (point.y < m_yCross+5) &&
(IsExpanded() || HasPlus()))
return item.m_pItem->GetImage();
}
int wxTreeCtrl::GetItemSelectedImage(const wxTreeItemId& item) const
{
return item.m_pItem->GetImage();
}
int wxTreeCtrl::GetItemSelectedImage(const wxTreeItemId& item) const
{
return item.m_pItem->GetSelectedImage();
}
wxTreeItemData *wxTreeCtrl::GetItemData(const wxTreeItemId& item) const
{
return item.m_pItem->GetSelectedImage();
}
wxTreeItemData *wxTreeCtrl::GetItemData(const wxTreeItemId& item) const
{
return item.m_pItem->GetData();
}
void wxTreeCtrl::SetItemText(const wxTreeItemId& item, const wxString& text)
{
return item.m_pItem->GetData();
}
void wxTreeCtrl::SetItemText(const wxTreeItemId& item, const wxString& text)
{
item.m_pItem->SetData(data);
}
void wxTreeCtrl::SetItemHasChildren(const wxTreeItemId& item, bool has)
{
item.m_pItem->SetData(data);
}
void wxTreeCtrl::SetItemHasChildren(const wxTreeItemId& item, bool has)
{
return !item.m_pItem->GetChildren().IsEmpty();
}
bool wxTreeCtrl::IsExpanded(const wxTreeItemId& item) const
{
return !item.m_pItem->GetChildren().IsEmpty();
}
bool wxTreeCtrl::IsExpanded(const wxTreeItemId& item) const
{
return item.m_pItem->GetParent();
}
wxTreeItemId wxTreeCtrl::GetFirstChild(const wxTreeItemId& item, long& cookie) const
{
return item.m_pItem->GetParent();
}
wxTreeItemId wxTreeCtrl::GetFirstChild(const wxTreeItemId& item, long& cookie) const
{
wxArrayTreeItems& children = item.m_pItem->GetChildren();
return (children.IsEmpty() ? wxTreeItemId() : wxTreeItemId(children.Last()));
wxArrayTreeItems& children = item.m_pItem->GetChildren();
return (children.IsEmpty() ? wxTreeItemId() : wxTreeItemId(children.Last()));
wxClientDC dc(this);
m_anchor = new wxGenericTreeItem((wxGenericTreeItem *)NULL, text, dc,
wxClientDC dc(this);
m_anchor = new wxGenericTreeItem((wxGenericTreeItem *)NULL, text, dc,
int index = parent->GetChildren().Index(idPrevious.m_pItem);
wxASSERT_MSG( index != wxNOT_FOUND,
int index = parent->GetChildren().Index(idPrevious.m_pItem);
wxASSERT_MSG( index != wxNOT_FOUND,
return DoInsertItem(parentId, (size_t)index, text, image, selImage, data);
}
return DoInsertItem(parentId, (size_t)index, text, image, selImage, data);
}
}
wxTextCtrl *wxTreeCtrl::EditLabel( const wxTreeItemId& WXUNUSED(item),
wxClassInfo* WXUNUSED(textCtrlClass) )
{
}
wxTextCtrl *wxTreeCtrl::EditLabel( const wxTreeItemId& WXUNUSED(item),
wxClassInfo* WXUNUSED(textCtrlClass) )
{
return (wxTextCtrl*)NULL;
}
void wxTreeCtrl::EndEditLabel(const wxTreeItemId& WXUNUSED(item), bool WXUNUSED(discardChanges))
{
return (wxTextCtrl*)NULL;
}
void wxTreeCtrl::EndEditLabel(const wxTreeItemId& WXUNUSED(item), bool WXUNUSED(discardChanges))
{
static int tree_ctrl_compare_func(wxGenericTreeItem **item1,
wxGenericTreeItem **item2)
{
static int tree_ctrl_compare_func(wxGenericTreeItem **item1,
wxGenericTreeItem **item2)
{
int wxTreeCtrl::OnCompareItems(const wxTreeItemId& item1,
const wxTreeItemId& item2)
{
int wxTreeCtrl::OnCompareItems(const wxTreeItemId& item1,
const wxTreeItemId& item2)
{
wxGenericTreeItem *item = itemId.m_pItem;
wxCHECK_RET( !s_treeBeingSorted,
wxGenericTreeItem *item = itemId.m_pItem;
wxCHECK_RET( !s_treeBeingSorted,
int total_h = (image_h > text_h) ? image_h : text_h;
if(m_lineHeight > total_h) total_h = m_lineHeight;
int total_h = (image_h > text_h) ? image_h : text_h;
if(m_lineHeight > total_h) total_h = m_lineHeight;
- dc.DrawRectangle( item->GetX()-2, item->GetY(), image_w+text_w+2, total_h );
+ dc.DrawRectangle( item->GetX()-2, item->GetY(), image_w+text_w+4, total_h );