• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/ap/gpl/amule/wxWidgets-2.8.12/src/generic/

Lines Matching refs:item

64 // the margin between the item image and the item text
75 // start editing the current item after half a second (if the mouse hasn't
93 wxTreeTextCtrl(wxGenericTreeCtrl *owner, wxGenericTreeItem *item);
97 const wxGenericTreeItem* item() const { return m_itemEdited; }
135 // a tree item
162 // returns the current image for the item (depending on its
244 // calculate and cache the item size using either the provided DC (which is
258 // return the item at given position (or NULL if no item), onButton is
259 // true if the point belongs to the item's button, otherwise it lies
260 // on the item's label
310 // calculate the size of this item, i.e. set m_width, m_height and
322 wxString m_text; // label to be rendered for item
329 wxGenericTreeItem *m_parent; // parent of this item
339 int m_width; // width of this item
340 int m_height; // height of this item
345 unsigned int m_hasPlus :1; // used for item which doesn't have
375 // check if the given item is under another one
376 static bool IsDescendantOf(const wxGenericTreeItem *parent, const wxGenericTreeItem *item)
378 while ( item )
380 if ( item == parent )
382 // item is a descendant of parent
386 item = item->GetParent();
417 wxGenericTreeItem *item)
418 : m_itemEdited(item), m_startValue(item->GetText())
427 m_owner->CalcScrolledPosition(item->GetX(), item->GetY(), &x, &y);
432 int image = item->GetCurrentImage();
491 // when an item remains unchanged, the owner
493 // not to change the tree item label, and that
506 // accepted, do rename the item
616 wxT("please call DeleteChildren() before deleting the item") );
677 // evaluate the item
762 // we usually fall back to the normal item, but try just the
1059 wxGenericTreeCtrl::GetChildrenCount(const wxTreeItemId& item,
1062 wxCHECK_MSG( item.IsOk(), 0u, wxT("invalid tree item") );
1064 return ((wxGenericTreeItem*) item.m_pItem)->GetChildrenCount(recursively);
1089 wxString wxGenericTreeCtrl::GetItemText(const wxTreeItemId& item) const
1091 wxCHECK_MSG( item.IsOk(), wxEmptyString, wxT("invalid tree item") );
1093 return ((wxGenericTreeItem*) item.m_pItem)->GetText();
1096 int wxGenericTreeCtrl::GetItemImage(const wxTreeItemId& item,
1099 wxCHECK_MSG( item.IsOk(), -1, wxT("invalid tree item") );
1101 return ((wxGenericTreeItem*) item.m_pItem)->GetImage(which);
1104 wxTreeItemData *wxGenericTreeCtrl::GetItemData(const wxTreeItemId& item) const
1106 wxCHECK_MSG( item.IsOk(), NULL, wxT("invalid tree item") );
1108 return ((wxGenericTreeItem*) item.m_pItem)->GetData();
1111 wxColour wxGenericTreeCtrl::GetItemTextColour(const wxTreeItemId& item) const
1113 wxCHECK_MSG( item.IsOk(), wxNullColour, wxT("invalid tree item") );
1115 wxGenericTreeItem *pItem = (wxGenericTreeItem*) item.m_pItem;
1119 wxColour wxGenericTreeCtrl::GetItemBackgroundColour(const wxTreeItemId& item) const
1121 wxCHECK_MSG( item.IsOk(), wxNullColour, wxT("invalid tree item") );
1123 wxGenericTreeItem *pItem = (wxGenericTreeItem*) item.m_pItem;
1127 wxFont wxGenericTreeCtrl::GetItemFont(const wxTreeItemId& item) const
1129 wxCHECK_MSG( item.IsOk(), wxNullFont, wxT("invalid tree item") );
1131 wxGenericTreeItem *pItem = (wxGenericTreeItem*) item.m_pItem;
1135 void wxGenericTreeCtrl::SetItemText(const wxTreeItemId& item, const wxString& text)
1137 wxCHECK_RET( item.IsOk(), wxT("invalid tree item") );
1139 wxGenericTreeItem *pItem = (wxGenericTreeItem*) item.m_pItem;
1145 void wxGenericTreeCtrl::SetItemImage(const wxTreeItemId& item,
1149 wxCHECK_RET( item.IsOk(), wxT("invalid tree item") );
1151 wxGenericTreeItem *pItem = (wxGenericTreeItem*) item.m_pItem;
1157 void wxGenericTreeCtrl::SetItemData(const wxTreeItemId& item, wxTreeItemData *data)
1159 wxCHECK_RET( item.IsOk(), wxT("invalid tree item") );
1162 data->SetId( item );
1164 ((wxGenericTreeItem*) item.m_pItem)->SetData(data);
1167 void wxGenericTreeCtrl::SetItemHasChildren(const wxTreeItemId& item, bool has)
1169 wxCHECK_RET( item.IsOk(), wxT("invalid tree item") );
1171 wxGenericTreeItem *pItem = (wxGenericTreeItem*) item.m_pItem;
1176 void wxGenericTreeCtrl::SetItemBold(const wxTreeItemId& item, bool bold)
1178 wxCHECK_RET( item.IsOk(), wxT("invalid tree item") );
1181 wxGenericTreeItem *pItem = (wxGenericTreeItem*) item.m_pItem;
1186 // recalculate the item size as bold and non bold fonts have different
1192 void wxGenericTreeCtrl::SetItemDropHighlight(const wxTreeItemId& item,
1195 wxCHECK_RET( item.IsOk(), wxT("invalid tree item") );
1205 wxGenericTreeItem *pItem = (wxGenericTreeItem*) item.m_pItem;
1211 void wxGenericTreeCtrl::SetItemTextColour(const wxTreeItemId& item,
1214 wxCHECK_RET( item.IsOk(), wxT("invalid tree item") );
1216 wxGenericTreeItem *pItem = (wxGenericTreeItem*) item.m_pItem;
1221 void wxGenericTreeCtrl::SetItemBackgroundColour(const wxTreeItemId& item,
1224 wxCHECK_RET( item.IsOk(), wxT("invalid tree item") );
1226 wxGenericTreeItem *pItem = (wxGenericTreeItem*) item.m_pItem;
1231 void wxGenericTreeCtrl::SetItemFont(const wxTreeItemId& item, const wxFont& font)
1233 wxCHECK_RET( item.IsOk(), wxT("invalid tree item") );
1235 wxGenericTreeItem *pItem = (wxGenericTreeItem*) item.m_pItem;
1263 // item status inquiries
1266 bool wxGenericTreeCtrl::IsVisible(const wxTreeItemId& item) const
1268 wxCHECK_MSG( item.IsOk(), false, wxT("invalid tree item") );
1270 // An item is only visible if it's not a descendant of a collapsed item
1271 wxGenericTreeItem *pItem = (wxGenericTreeItem*) item.m_pItem;
1286 if (!GetBoundingRect(item, rect))
1298 bool wxGenericTreeCtrl::ItemHasChildren(const wxTreeItemId& item) const
1300 wxCHECK_MSG( item.IsOk(), false, wxT("invalid tree item") );
1302 // consider that the item does have children if it has the "+" button: it
1306 // children for an item which does have them
1307 return ((wxGenericTreeItem*) item.m_pItem)->HasPlus();
1310 bool wxGenericTreeCtrl::IsExpanded(const wxTreeItemId& item) const
1312 wxCHECK_MSG( item.IsOk(), false, wxT("invalid tree item") );
1314 return ((wxGenericTreeItem*) item.m_pItem)->IsExpanded();
1317 bool wxGenericTreeCtrl::IsSelected(const wxTreeItemId& item) const
1319 wxCHECK_MSG( item.IsOk(), false, wxT("invalid tree item") );
1321 return ((wxGenericTreeItem*) item.m_pItem)->IsSelected();
1324 bool wxGenericTreeCtrl::IsBold(const wxTreeItemId& item) const
1326 wxCHECK_MSG( item.IsOk(), false, wxT("invalid tree item") );
1328 return ((wxGenericTreeItem*) item.m_pItem)->IsBold();
1335 wxTreeItemId wxGenericTreeCtrl::GetItemParent(const wxTreeItemId& item) const
1337 wxCHECK_MSG( item.IsOk(), wxTreeItemId(), wxT("invalid tree item") );
1339 return ((wxGenericTreeItem*) item.m_pItem)->GetParent();
1342 wxTreeItemId wxGenericTreeCtrl::GetFirstChild(const wxTreeItemId& item,
1345 wxCHECK_MSG( item.IsOk(), wxTreeItemId(), wxT("invalid tree item") );
1348 return GetNextChild(item, cookie);
1351 wxTreeItemId wxGenericTreeCtrl::GetNextChild(const wxTreeItemId& item,
1354 wxCHECK_MSG( item.IsOk(), wxTreeItemId(), wxT("invalid tree item") );
1356 wxArrayGenericTreeItems& children = ((wxGenericTreeItem*) item.m_pItem)->GetChildren();
1374 wxTreeItemId wxGenericTreeCtrl::GetFirstChild(const wxTreeItemId& item,
1377 wxCHECK_MSG( item.IsOk(), wxTreeItemId(), wxT("invalid tree item") );
1380 return GetNextChild(item, cookie);
1383 wxTreeItemId wxGenericTreeCtrl::GetNextChild(const wxTreeItemId& item,
1386 wxCHECK_MSG( item.IsOk(), wxTreeItemId(), wxT("invalid tree item") );
1388 wxArrayGenericTreeItems& children = ((wxGenericTreeItem*) item.m_pItem)->GetChildren();
1402 wxTreeItemId wxGenericTreeCtrl::GetLastChild(const wxTreeItemId& item) const
1404 wxCHECK_MSG( item.IsOk(), wxTreeItemId(), wxT("invalid tree item") );
1406 wxArrayGenericTreeItems& children = ((wxGenericTreeItem*) item.m_pItem)->GetChildren();
1410 wxTreeItemId wxGenericTreeCtrl::GetNextSibling(const wxTreeItemId& item) const
1412 wxCHECK_MSG( item.IsOk(), wxTreeItemId(), wxT("invalid tree item") );
1414 wxGenericTreeItem *i = (wxGenericTreeItem*) item.m_pItem;
1418 // root item doesn't have any siblings
1430 wxTreeItemId wxGenericTreeCtrl::GetPrevSibling(const wxTreeItemId& item) const
1432 wxCHECK_MSG( item.IsOk(), wxTreeItemId(), wxT("invalid tree item") );
1434 wxGenericTreeItem *i = (wxGenericTreeItem*) item.m_pItem;
1438 // root item doesn't have any siblings
1451 wxTreeItemId wxGenericTreeCtrl::GetNext(const wxTreeItemId& item) const
1453 wxCHECK_MSG( item.IsOk(), wxTreeItemId(), wxT("invalid tree item") );
1455 wxGenericTreeItem *i = (wxGenericTreeItem*) item.m_pItem;
1466 wxTreeItemId p = item;
1493 wxTreeItemId wxGenericTreeCtrl::GetNextVisible(const wxTreeItemId& item) const
1495 wxCHECK_MSG( item.IsOk(), wxTreeItemId(), wxT("invalid tree item") );
1497 wxTreeItemId id = item;
1509 wxTreeItemId wxGenericTreeCtrl::GetPrevVisible(const wxTreeItemId& item) const
1511 wxCHECK_MSG( item.IsOk(), wxTreeItemId(), wxT("invalid tree item") );
1524 // find the first item starting with the given prefix after the given item
1529 // to press Shift-letter to go to the item starting with a capital letter
1533 // determine the starting point: we shouldn't take the current item (this
1536 // continuing to type as otherwise he might easily skip the item he wanted
1543 // look for the item starting with the given prefix after it
1565 // If we haven't found the item, id.IsOk() will be false, as per
1592 wxGenericTreeItem *item =
1597 data->m_pItem = item;
1600 parent->Insert( item, previous == (size_t)-1 ? parent->GetChildren().size()
1604 return item;
1660 wxT("previous item in wxGenericTreeCtrl::InsertItem() is not a sibling") );
1667 void wxGenericTreeCtrl::SendDeleteEvent(wxGenericTreeItem *item)
1669 wxTreeEvent event(wxEVT_COMMAND_TREE_DELETE_ITEM, this, item);
1674 void wxGenericTreeCtrl::ChildrenClosing(wxGenericTreeItem* item)
1676 if (m_textCtrl != NULL && item != m_textCtrl->item() && IsDescendantOf(item, m_textCtrl->item())) {
1679 if (item != m_key_current && IsDescendantOf(item, m_key_current)) {
1682 if (IsDescendantOf(item, m_select_me)) {
1683 m_select_me = item;
1685 if (item != m_current && IsDescendantOf(item, m_current)) {
1688 m_select_me = item;
1696 wxGenericTreeItem *item = (wxGenericTreeItem*) itemId.m_pItem;
1697 ChildrenClosing(item);
1698 item->DeleteChildren(this);
1706 wxGenericTreeItem *item = (wxGenericTreeItem*) itemId.m_pItem;
1708 if (m_textCtrl != NULL && IsDescendantOf(item, m_textCtrl->item()))
1710 // can't delete the item being edited, cancel editing it first
1714 wxGenericTreeItem *parent = item->GetParent();
1717 if ( IsDescendantOf(item, m_key_current) )
1728 // a different item, in idle time.
1729 if ( m_select_me && IsDescendantOf(item, m_select_me) )
1734 if ( IsDescendantOf(item, m_current) )
1745 // remove the item from the tree
1748 parent->GetChildren().Remove( item ); // remove by value
1756 // and delete all of its children and the item itself now
1757 item->DeleteChildren(this);
1758 SendDeleteEvent(item);
1760 if (item == m_select_me)
1763 delete item;
1778 wxGenericTreeItem *item = (wxGenericTreeItem*) itemId.m_pItem;
1780 wxCHECK_RET( item, _T("invalid item in wxGenericTreeCtrl::Expand") );
1784 if ( !item->HasPlus() )
1787 if ( item->IsExpanded() )
1790 wxTreeEvent event(wxEVT_COMMAND_TREE_ITEM_EXPANDING, this, item);
1798 item->Expand();
1801 RefreshSubtree(item);
1812 wxGenericTreeItem *item = (wxGenericTreeItem*) itemId.m_pItem;
1814 if ( !item->IsExpanded() )
1817 wxTreeEvent event(wxEVT_COMMAND_TREE_ITEM_COLLAPSING, this, item);
1824 ChildrenClosing(item);
1825 item->Collapse();
1828 wxArrayGenericTreeItems& children = item->GetChildren();
1838 RefreshSubtree(item);
1844 void wxGenericTreeCtrl::CollapseAndReset(const wxTreeItemId& item)
1846 Collapse(item);
1847 DeleteChildren(item);
1852 wxGenericTreeItem *item = (wxGenericTreeItem*) itemId.m_pItem;
1854 if (item->IsExpanded())
1872 void wxGenericTreeCtrl::UnselectAllChildren(wxGenericTreeItem *item)
1874 if (item->IsSelected())
1876 item->SetHilight(false);
1877 RefreshLine(item);
1880 if (item->HasChildren())
1882 wxArrayGenericTreeItems& children = item->GetChildren();
1895 // the tree might not have the root item at all
1912 if (parent == NULL) // This is root item
1971 wxCHECK_RET( itemId.IsOk(), wxT("invalid tree item") );
1976 wxGenericTreeItem *item = (wxGenericTreeItem*) itemId.m_pItem;
1984 if (item->IsSelected())
1989 else if ( unselect_others && item->IsSelected() )
1991 // selection change if there is more than one item currently selected
1997 wxTreeEvent event(wxEVT_COMMAND_TREE_SEL_CHANGING, this, item);
2029 SelectItemRange(m_current, item);
2037 select=!item->IsSelected();
2039 m_current = m_key_current = item;
2045 // if no item is selected, so it must be after the
2055 wxGenericTreeItem * const item = (wxGenericTreeItem*) itemId.m_pItem;
2056 wxCHECK_RET( item, wxT("SelectItem(): invalid tree item") );
2060 if (!item->IsSelected())
2065 wxTreeEvent event(wxEVT_COMMAND_TREE_SEL_CHANGING, this, item);
2069 item->SetHilight(false);
2070 RefreshLine(item);
2077 void wxGenericTreeCtrl::FillArray(wxGenericTreeItem *item,
2080 if ( item->IsSelected() )
2081 array.Add(wxTreeItemId(item));
2083 if ( item->HasChildren() )
2085 wxArrayGenericTreeItems& children = item->GetChildren();
2105 void wxGenericTreeCtrl::EnsureVisible(const wxTreeItemId& item)
2107 wxCHECK_RET( item.IsOk(), wxT("invalid tree item") );
2109 if (!item.IsOk()) return;
2111 wxGenericTreeItem *gitem = (wxGenericTreeItem*) item.m_pItem;
2135 ScrollTo(item);
2138 void wxGenericTreeCtrl::ScrollTo(const wxTreeItemId &item)
2140 if (!item.IsOk()) return;
2151 wxGenericTreeItem *gitem = (wxGenericTreeItem*) item.m_pItem;
2153 // now scroll to the item
2205 wxCHECK_RET( itemId.IsOk(), wxT("invalid tree item") );
2207 wxGenericTreeItem *item = (wxGenericTreeItem*) itemId.m_pItem;
2212 wxArrayGenericTreeItems& children = item->GetChildren();
2327 int wxGenericTreeCtrl::GetLineHeight(wxGenericTreeItem *item) const
2330 return item->GetHeight();
2335 void wxGenericTreeCtrl::PaintItem(wxGenericTreeItem *item, wxDC& dc)
2337 item->SetFont(this, dc);
2339 wxCoord text_h = item->GetTextHeight();
2342 int image = item->GetCurrentImage();
2356 int total_h = GetLineHeight(item);
2360 if ( item->IsSelected() )
2368 wxTreeItemAttr * const attr = item->GetAttributes();
2388 wxRect rect( x, item->GetY()+offset, w, total_h-offset);
2392 if (!item->IsSelected())
2405 if ((item == m_current) && (m_hasFocus))
2413 if ( item->IsSelected() && image != NO_IMAGE )
2418 wxRect rect( item->GetX() + image_w - 2, item->GetY()+offset,
2419 item->GetWidth() - image_w + 2, total_h-offset );
2429 if ((item == m_current) && (m_hasFocus))
2436 // except for custom item backgrounds, works for both kinds of theme.
2439 wxRect rect( item->GetX()-2, item->GetY()+offset,
2440 item->GetWidth()+2, total_h-offset );
2456 if ((item == m_current) && (m_hasFocus))
2466 dc.SetClippingRegion( item->GetX(), item->GetY(), image_w-2, total_h );
2468 item->GetX(),
2469 item->GetY() +((total_h > image_h)?((total_h-image_h)/2):0),
2476 dc.DrawText( item->GetText(),
2477 (wxCoord)(image_w + item->GetX()),
2478 (wxCoord)(item->GetY() + extraH));
2484 // Now y stands for the top of the item, whereas it used to stand for middle !
2485 void wxGenericTreeCtrl::PaintLevel( wxGenericTreeItem *item, wxDC &dc, int level, int &y )
2496 wxArrayGenericTreeItems& children = item->GetChildren();
2517 item->SetX(x+m_spacing);
2518 item->SetY(y);
2520 int h = GetLineHeight(item);
2534 (item->IsSelected() && m_hasFocus) ? wxBLACK_PEN :
2539 if ( item->IsSelected()
2560 wxTreeItemAttr *attr = item->GetAttributes();
2572 PaintItem(item, dc);
2600 // should the item show a button?
2601 if ( item->HasPlus() && HasButtons() )
2608 int image = item->IsExpanded() ? wxTreeItemIcon_Expanded
2610 if ( item->IsSelected() )
2627 if (item->IsExpanded())
2629 if (item == m_underMouse)
2645 if (item->IsExpanded())
2647 wxArrayGenericTreeItems& children = item->GetChildren();
2685 void wxGenericTreeCtrl::DrawDropEffect(wxGenericTreeItem *item)
2687 if ( item )
2689 if ( item->HasPlus() )
2692 DrawBorder(item);
2696 // draw a line under the drop target because the item will be
2698 DrawLine(item, !m_dropEffectAboveItem );
2710 void wxGenericTreeCtrl::DrawBorder(const wxTreeItemId &item)
2712 wxCHECK_RET( item.IsOk(), _T("invalid item in wxGenericTreeCtrl::DrawLine") );
2714 wxGenericTreeItem *i = (wxGenericTreeItem*) item.m_pItem;
2727 void wxGenericTreeCtrl::DrawLine(const wxTreeItemId &item, bool below)
2729 wxCHECK_RET( item.IsOk(), _T("invalid item in wxGenericTreeCtrl::DrawLine") );
2731 wxGenericTreeItem *i = (wxGenericTreeItem*) item.m_pItem;
2838 // end : go to last item without opening parents
2839 // alnum : start or continue searching for the item with this prefix
2871 // Use the item's bounding rectangle to determine position for the event
2960 // also expand the item if it wasn't expanded yet
2963 //else: don't try to expand hidden root item (which can be the
3001 // <End> selects the last visible tree item
3010 // it may happen if the item was expanded but then all of
3012 // true, but GetLastChild() returned invalid item
3026 // <Home> selects the root item
3052 // find the next item starting with the given prefix
3058 // no such item
3068 // to use this prefix for a new item search
3111 // get the bounding rectangle of the item (or of its label only)
3112 bool wxGenericTreeCtrl::GetBoundingRect(const wxTreeItemId& item,
3116 wxCHECK_MSG( item.IsOk(), false, _T("invalid item in wxGenericTreeCtrl::GetBoundingRect") );
3118 wxGenericTreeItem *i = (wxGenericTreeItem*) item.m_pItem;
3127 int image = ((wxGenericTreeItem*) item.m_pItem)->GetCurrentImage();
3151 wxTextCtrl *wxGenericTreeCtrl::EditLabel(const wxTreeItemId& item,
3154 wxCHECK_MSG( item.IsOk(), NULL, _T("can't edit an invalid item") );
3156 wxGenericTreeItem *itemEdit = (wxGenericTreeItem *)item.m_pItem;
3183 // returns a pointer to the text edit control if the item is being
3184 // edited, NULL otherwise (it's assumed that no more than one item may
3191 void wxGenericTreeCtrl::EndEditLabel(const wxTreeItemId& WXUNUSED(item),
3199 bool wxGenericTreeCtrl::OnRenameAccept(wxGenericTreeItem *item,
3202 wxTreeEvent le(wxEVT_COMMAND_TREE_END_LABEL_EDIT, this, item);
3209 void wxGenericTreeCtrl::OnRenameCancelled(wxGenericTreeItem *item)
3212 wxTreeEvent le(wxEVT_COMMAND_TREE_END_LABEL_EDIT, this, item);
3230 // Is the mouse over a tree item button?
3254 // unhighlight old item
3266 // Determines what item we are hovering over and need a tooltip for
3283 // (pass to the user code), left dbl click (activate item) and
3300 wxGenericTreeItem *item = m_anchor->HitTest(pt, this, flags, 0);
3328 // we're going to drag this item
3352 if ( item != m_dropTarget )
3357 m_dropTarget = item;
3384 wxTreeEvent eventEndDrag(wxEVT_COMMAND_TREE_END_DRAG, this, item);
3406 // We skip even if we didn't hit an item because we still should
3407 // restore focus to the tree control even if we didn't exactly hit an item.
3417 if (item == NULL) return; /* we hit the blank area */
3421 // If the item is already selected, do not update the selection.
3422 // Multi-selections should not be cleared if a selected item is clicked.
3423 if (!IsSelected(item))
3425 DoSelectItem(item, true, false);
3428 wxTreeEvent nevent(wxEVT_COMMAND_TREE_ITEM_RIGHT_CLICK, this, item);
3434 wxTreeEvent nevent2(wxEVT_COMMAND_TREE_ITEM_MENU, this, item);
3440 wxTreeEvent nevent(wxEVT_COMMAND_TREE_ITEM_MIDDLE_CLICK, this, item);
3446 // this facilitates multiple-item drag-and-drop
3448 if ( /* item && */ HasFlag(wxTR_MULTIPLE))
3457 DoSelectItem(item, true, false);
3463 if ( (item == m_current) &&
3487 m_lastOnSame = item == m_current;
3492 // only toggle the item for a single click, double click on
3493 // the button doesn't do anything (it toggles the item twice)
3496 Toggle( item );
3499 // don't select the item if the button was clicked
3508 // but if Cmd is down, toggle selection of the clicked item
3509 if (!IsSelected(item) || event.CmdDown())
3518 DoSelectItem(item, unselect_others, extended_select);
3526 // double clicking should not start editing the item label
3533 wxTreeEvent nevent(wxEVT_COMMAND_TREE_ITEM_ACTIVATED, this, item);
3538 // handle it ourselves by toggling the item when it is
3540 if ( item->HasPlus() )
3542 Toggle(item);
3554 // Check if we need to select the root item
3557 // as required, when a first item is selected.
3572 void wxGenericTreeCtrl::CalculateSize( wxGenericTreeItem *WXUNUSED(item), wxDC &WXUNUSED(dc) )
3580 void wxGenericTreeCtrl::CalculateLevel( wxGenericTreeItem *item, wxDC &dc, int level, int &y )
3594 item->CalculateSize(this, dc);
3597 item->SetX( x+m_spacing );
3598 item->SetY( y );
3599 y += GetLineHeight(item);
3601 if ( !item->IsExpanded() )
3608 wxArrayGenericTreeItems& children = item->GetChildren();
3638 void wxGenericTreeCtrl::RefreshSubtree(wxGenericTreeItem *item)
3646 CalcScrolledPosition(0, item->GetY(), NULL, &rect.y);
3655 void wxGenericTreeCtrl::RefreshLine( wxGenericTreeItem *item )
3661 CalcScrolledPosition(0, item->GetY(), NULL, &rect.y);
3663 rect.height = GetLineHeight(item); //dc.GetCharHeight() + 6;
3679 void wxGenericTreeCtrl::RefreshSelectedUnder(wxGenericTreeItem *item)
3684 if ( item->IsSelected() )
3685 RefreshLine(item);
3687 const wxArrayGenericTreeItems& children = item->GetChildren();
3768 int wxGenericTreeCtrl::GetItemSelectedImage(const wxTreeItemId& item) const
3770 return GetItemImage(item, wxTreeItemIcon_Selected);
3773 void wxGenericTreeCtrl::SetItemSelectedImage(const wxTreeItemId& item, int image)
3775 SetItemImage(item, image, wxTreeItemIcon_Selected);