generate middle click events (patch 1521314)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@40296 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
40f5126298
commit
da87911d65
@ -166,6 +166,7 @@ All (GUI):
|
||||
- Added wxTopLevelWindow::SetTransparent and CanSetTransparent, with
|
||||
implementations (so far) for wxMSW and wxMac.
|
||||
- Allow customizing individual grid lines appearance (Søren Lassen)
|
||||
- Fixed middle click events generation in generic wxTreeCtrl (Olly Betts)
|
||||
|
||||
wxMSW:
|
||||
|
||||
|
@ -3016,11 +3016,12 @@ void wxGenericTreeCtrl::OnMouse( wxMouseEvent &event )
|
||||
}
|
||||
#endif
|
||||
|
||||
// we process left mouse up event (enables in-place edit), right down
|
||||
// we process left mouse up event (enables in-place edit), middle/right down
|
||||
// (pass to the user code), left dbl click (activate item) and
|
||||
// dragging/moving events for items drag-and-drop
|
||||
if ( !(event.LeftDown() ||
|
||||
event.LeftUp() ||
|
||||
event.MiddleDown() ||
|
||||
event.RightDown() ||
|
||||
event.LeftDClick() ||
|
||||
event.Dragging() ||
|
||||
@ -3171,6 +3172,12 @@ void wxGenericTreeCtrl::OnMouse( wxMouseEvent &event )
|
||||
nevent2.m_pointDrag = CalcScrolledPosition(pt);
|
||||
GetEventHandler()->ProcessEvent(nevent2);
|
||||
}
|
||||
else if ( event.MiddleDown() )
|
||||
{
|
||||
wxTreeEvent nevent(wxEVT_COMMAND_TREE_ITEM_MIDDLE_CLICK, this, item);
|
||||
nevent.m_pointDrag = CalcScrolledPosition(pt);
|
||||
event.Skip(!GetEventHandler()->ProcessEvent(nevent));
|
||||
}
|
||||
else if ( event.LeftUp() )
|
||||
{
|
||||
// this facilitates multiple-item drag-and-drop
|
||||
@ -3210,7 +3217,7 @@ void wxGenericTreeCtrl::OnMouse( wxMouseEvent &event )
|
||||
m_lastOnSame = false;
|
||||
}
|
||||
}
|
||||
else // !RightDown() && !LeftUp() ==> LeftDown() || LeftDClick()
|
||||
else // !RightDown() && !MiddleDown() && !LeftUp() ==> LeftDown() || LeftDClick()
|
||||
{
|
||||
if ( event.LeftDown() )
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user