Added variable cursor to highlight embedded user data.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2141 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Karsten Ballüder
1999-04-13 13:45:59 +00:00
parent 4846abaf45
commit 0454d4ca74
2 changed files with 24 additions and 1 deletions

View File

@@ -58,6 +58,7 @@ BEGIN_EVENT_TABLE(wxLayoutWindow,wxScrolledWindow)
EVT_LEFT_DOWN(wxLayoutWindow::OnLeftMouseClick)
EVT_RIGHT_DOWN(wxLayoutWindow::OnRightMouseClick)
EVT_LEFT_DCLICK(wxLayoutWindow::OnMouseDblClick)
EVT_MOTION (wxLayoutWindow::OnMouseMove)
EVT_MENU_RANGE(WXLOWIN_MENU_FIRST, WXLOWIN_MENU_LAST, wxLayoutWindow::OnMenu)
EVT_SET_FOCUS(wxLayoutWindow::OnSetFocus)
EVT_KILL_FOCUS(wxLayoutWindow::OnKillFocus)
@@ -142,6 +143,24 @@ wxLayoutWindow::OnMouse(int eventId, wxMouseEvent& event)
wxLogDebug("wxLayoutWindow::OnMouse: Found no object.");
#endif
//has the mouse only been moved?
if(eventId == WXLOWIN_MENU_MOUSEMOVE)
{
if(obj && obj->GetUserData() != NULL)
{
if(!m_HandCursor)
SetCursor(wxCURSOR_HAND);
m_HandCursor = TRUE;
}
else
{
if(m_HandCursor)
SetCursor(wxCURSOR_IBEAM);
m_HandCursor = FALSE;
}
return;
}
// always move cursor to mouse click:
if(obj && eventId == WXLOWIN_MENU_LCLICK)
{