Add ability to control cursors in multiplot
Drag cursors to the nearest plot line and the value is displayed on the title bar
This commit is contained in:
@@ -109,6 +109,12 @@ bool mpInfoLayer::Inside( const wxPoint& point ) const
|
||||
}
|
||||
|
||||
|
||||
bool mpInfoLayer::OnDoubleClick( const wxPoint& point, mpWindow& w )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
void mpInfoLayer::Move( wxPoint delta )
|
||||
{
|
||||
m_dim.SetX( m_reference.x + delta.x );
|
||||
@@ -1373,6 +1379,7 @@ EVT_MOUSEWHEEL( mpWindow::onMouseWheel ) // JLB
|
||||
EVT_MAGNIFY( mpWindow::onMagnify )
|
||||
EVT_MOTION( mpWindow::onMouseMove ) // JLB
|
||||
EVT_LEFT_DOWN( mpWindow::onMouseLeftDown )
|
||||
EVT_LEFT_DCLICK( mpWindow::onMouseLeftDClick )
|
||||
EVT_LEFT_UP( mpWindow::onMouseLeftRelease )
|
||||
|
||||
EVT_MENU( mpID_CENTER, mpWindow::OnCenter )
|
||||
@@ -1610,6 +1617,23 @@ void mpWindow::onMouseLeftDown( wxMouseEvent& event )
|
||||
}
|
||||
|
||||
|
||||
void mpWindow::onMouseLeftDClick( wxMouseEvent& event )
|
||||
{
|
||||
wxPoint pointClicked = event.GetPosition();
|
||||
|
||||
if( mpInfoLayer* infoLayer = IsInsideInfoLayer( pointClicked ) )
|
||||
{
|
||||
if( infoLayer->OnDoubleClick( pointClicked, *this ) )
|
||||
{
|
||||
UpdateAll();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
event.Skip();
|
||||
}
|
||||
|
||||
|
||||
void mpWindow::onMouseLeftRelease( wxMouseEvent& event )
|
||||
{
|
||||
wxPoint release( event.GetX(), event.GetY() );
|
||||
|
||||
Reference in New Issue
Block a user