added more methods to transparently convert wxTreeItemIdValue to wxTreeItemId to wxArrayTreeItemIds

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35780 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2005-10-03 17:54:09 +00:00
parent 27a1fd5880
commit 14ba002a91
2 changed files with 15 additions and 10 deletions

View File

@@ -123,11 +123,19 @@ protected:
WX_DEFINE_EXPORTED_ARRAY_PTR(wxTreeItemIdValue, wxArrayTreeItemIdsBase);
// this is a wrapper around the array class defined above which allow to wok
// with vaue of natural wxTreeItemId type instead of using wxTreeItemIdValue
// and does it without any loss of efficiency
class WXDLLEXPORT wxArrayTreeItemIds : public wxArrayTreeItemIdsBase
{
public:
void Add(const wxTreeItemId& id)
{ wxArrayTreeItemIdsBase::Add(id.m_pItem); }
void Insert(const wxTreeItemId& id, size_t pos)
{ wxArrayTreeItemIdsBase::Insert(id.m_pItem, pos); }
wxTreeItemId Item(size_t i) const
{ return wxTreeItemId(wxArrayTreeItemIdsBase::Item(i)); }
wxTreeItemId operator[](size_t i) const { return Item(i); }
};
// ----------------------------------------------------------------------------