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)
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)
{
WXLOWIN_MENU_RCLICK,
WXLOWIN_MENU_LCLICK,
WXLOWIN_MENU_DBLCLICK,
- WXLOWIN_MENU_LAST = WXLOWIN_MENU_DBLCLICK
+ WXLOWIN_MENU_MOUSEMOVE,
+ WXLOWIN_MENU_LAST = WXLOWIN_MENU_MOUSEMOVE
};
/**
void OnLeftMouseClick(wxMouseEvent& event) { OnMouse(WXLOWIN_MENU_LCLICK, event); }
void OnRightMouseClick(wxMouseEvent& event) { OnMouse(WXLOWIN_MENU_RCLICK, event); }
void OnMouseDblClick(wxMouseEvent& event) { OnMouse(WXLOWIN_MENU_DBLCLICK, event); }
+ void OnMouseMove(wxMouseEvent &event) { OnMouse(WXLOWIN_MENU_MOUSEMOVE, event) ; }
void OnSetFocus(wxFocusEvent &ev);
void OnKillFocus(wxFocusEvent &ev);
//@}
bool m_DoPopupMenu;
/// Should InternalPaint() scroll to cursor.
bool m_ScrollToCursor;
+ /// Do we currently have a non-standard cursor?
+ bool m_HandCursor;
/// the menu
wxMenu * m_PopupMenu;
/// for derived classes, set when mouse is clicked