|
From: Ethan M. <merritt@u.washington.edu> - 2012-01-08 23:36:08
|
On Sunday, 08 January 2012, Mojca Miklavec wrote: > 4.) I would like to understand what part of gnuplot's source code is > aware of mouse scrolling events (is receiving signals from operating > system, so that GE_buttonrelease is set for example). The terminals notifies the core mousing routines by filling in an event structure and calling do_event() in mouse.c. For the qt terminal the sequence of calls is thread 1: m_eventHandler->postTermEvent( event_type, x, y, parameter1, parameter2, winid ) thread 2: qt_waitforinput() -> qt_processTermEvent(gp_event_t* event) -> do_event() The methods for specific event types are defined in QtGnuplotScene.cpp: QtGnuplotScene::wheelEvent(QGraphicsSceneWheelEvent* event) QtGnuplotScene::keyPressEvent(QKeyEvent* event) QtGnuplotScene::mouseReleaseEvent(QGraphicsSceneMouseEvent* event) and so on. Does that answer the question? |