CtrlLib: TreeCtrl InsertDrop now returns ids of inserted nodes

git-svn-id: svn://ultimatepp.org/upp/trunk@1691 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2009-11-12 21:35:45 +00:00
parent b1a0f16d17
commit 418d282820
3 changed files with 7 additions and 6 deletions

View file

@ -1512,7 +1512,7 @@ void TreeCtrl::AdjustAction(int parent, PasteClip& d)
d.SetAction(DND_COPY);
}
void TreeCtrl::InsertDrop(int parent, int ii, const TreeCtrl& src, PasteClip& d)
Vector<int> TreeCtrl::InsertDrop(int parent, int ii, const TreeCtrl& src, PasteClip& d)
{
TreeCtrl copy;
Vector<int> sel = src.GetSel();
@ -1529,11 +1529,12 @@ void TreeCtrl::InsertDrop(int parent, int ii, const TreeCtrl& src, PasteClip& d)
}
for(int i = 0; i < did.GetCount(); i++)
SelectOne(did[i], true);
return did;
}
void TreeCtrl::InsertDrop(int parent, int ii, PasteClip& d)
Vector<int> TreeCtrl::InsertDrop(int parent, int ii, PasteClip& d)
{
InsertDrop(parent, ii, GetInternal<TreeCtrl>(d), d);
return InsertDrop(parent, ii, GetInternal<TreeCtrl>(d), d);
}
void TreeCtrl::Swap(int id1, int id2)

View file

@ -279,8 +279,8 @@ public:
void RemoveSelection() { Remove(GetSel()); }
void AdjustAction(int parent, PasteClip& x);
void InsertDrop(int parent, int ii, const TreeCtrl& src, PasteClip& x);
void InsertDrop(int parent, int ii, PasteClip& d);
Vector<int> InsertDrop(int parent, int ii, const TreeCtrl& src, PasteClip& x);
Vector<int> InsertDrop(int parent, int ii, PasteClip& d);
Image GetDragSample();
void StdLeftDouble();

View file

@ -720,4 +720,4 @@ pen]([@(0.0.255) bool]_[*@3 b]_`=_[@(0.0.255) true])&]
nSelect]([@(0.0.255) bool]_[*@3 b])&]
[s2;%% Sets canselect flag.&]
[s3; &]
[s0;%% ]
[s0; ]