m_tree = tree;
}
+ // give it a virtual dtor: not really needed as the class is never used
+ // polymorphically and not even allocated on heap at all, but this is safer
+ // (in case it ever is) and silences the compiler warnings for now
+ virtual ~wxTreeTraversal() { }
+
// do traverse the tree: visit all items (recursively by default) under the
// given one; return true if all items were traversed or false if the
// traversal was aborted because OnVisit returned false
void wxTreeCtrl::SetAnyImageList(wxImageList *imageList, int which)
{
// no error return
- TreeView_SetImageList(GetHwnd(),
- imageList ? imageList->GetHIMAGELIST() : 0,
- which);
+ (void) TreeView_SetImageList(GetHwnd(),
+ imageList ? imageList->GetHIMAGELIST() : 0,
+ which);
}
void wxTreeCtrl::SetImageList(wxImageList *imageList)
// for compatibility only
#if WXWIN_COMPATIBILITY_2_4
-/* This appears to hide base class GetImageList()
-wxImageList *wxTreeCtrl::GetImageList(int) const
-{
- return wxTreeCtrlBase::GetImageList();
-}
-*/
-
void wxTreeCtrl::SetImageList(wxImageList *imageList, int)
{
SetImageList(imageList);
hitTestInfo.pt.x = (int)point.x;
hitTestInfo.pt.y = (int)point.y;
- TreeView_HitTest(GetHwnd(), &hitTestInfo);
+ (void) TreeView_HitTest(GetHwnd(), &hitTestInfo);
flags = 0;
int x = GET_X_LPARAM(lParam),
y = GET_Y_LPARAM(lParam);
HTREEITEM htItem = GetItemFromPoint(GetHwnd(), x, y);
-
+
TV_HITTESTINFO tvht;
tvht.pt.x = x;
tvht.pt.y = y;
-
- TreeView_HitTest(GetHwnd(), &tvht);
+
+ (void) TreeView_HitTest(GetHwnd(), &tvht);
switch ( nMsg )
{
{
m_htClickedItem = (WXHTREEITEM) htItem;
m_ptClick = wxPoint(x, y);
-
+
if ( wParam & MK_CONTROL )
{
SetFocus();
{
// avoid doing anything if we click on the only
// currently selected item
-
+
SetFocus();
wxArrayTreeItemIds selections;
tv.hdr.hwndFrom = GetHwnd();
tv.hdr.idFrom = ::GetWindowLong( GetHwnd(), GWL_ID );
tv.hdr.code = TVN_BEGINDRAG;
-
+
tv.itemNew.hItem = HITEM(m_htClickedItem);
-
+
TVITEM tviAux;
ZeroMemory(&tviAux, sizeof(tviAux));
tviAux.hItem = HITEM(m_htClickedItem);
tviAux.mask = TVIF_STATE | TVIF_PARAM;
tviAux.stateMask = 0xffffffff;
TreeView_GetItem( GetHwnd(), &tviAux );
-
+
tv.itemNew.state = tviAux.state;
tv.itemNew.lParam = tviAux.lParam;
-
+
tv.ptDrag.x = x;
tv.ptDrag.y = y;
-
+
::SendMessage( pWnd, WM_NOTIFY, tv.hdr.idFrom, (LPARAM)&tv );
}
m_htClickedItem.Unset();
}
}
#endif // __WXWINCE__
-
+
if ( m_dragImage )
{
m_dragImage->Move(wxPoint(x, y));
}
#endif // wxUSE_TREECTRL
-