1. some minor compilation fixes in datetime.cppm

2. implemented wxTreeCtrl::Insert(size_t index)
3. draft of wxCalendarCtrl


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@5135 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
1999-12-29 10:28:20 +00:00
parent f59d80ca00
commit 2ef31e80ee
7 changed files with 429 additions and 35 deletions

View File

@@ -1052,6 +1052,30 @@ wxTreeItemId wxTreeCtrl::InsertItem(const wxTreeItemId& parent,
return DoInsertItem(parent, idPrevious, text, image, selectedImage, data);
}
wxTreeItemId wxTreeCtrl::InsertItem(const wxTreeItemId& parent,
size_t index,
const wxString& text,
int image, int selectedImage,
wxTreeItemData *data)
{
// find the item from index
long cookie;
wxTreeItemId idPrev, idCur = GetFirstChild(parent, cookie);
while ( index != 0 && idCur.IsOk() )
{
index--;
idPrev = idCur;
idCur = GetNextChild(parent, cookie);
}
// assert, not check: if the index is invalid, we will append the item
// to the end
wxASSERT_MSG( index == 0, _T("bad index in wxTreeCtrl::InsertItem") );
return DoInsertItem(parent, idPrev, text, image, selectedImage, data);
}
wxTreeItemId wxTreeCtrl::AppendItem(const wxTreeItemId& parent,
const wxString& text,
int image, int selectedImage,