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:
@@ -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,
|
||||
|
Reference in New Issue
Block a user