Ticket #33596: patch-wxt-scroll.diff

File patch-wxt-scroll.diff, 767 bytes (added by mojca (Mojca Miklavec), 13 years ago)

patch that enables horizontal scrolling in wxt terminal (already in gnuplot trunk, but not in 4.6.0)

  • src/wxterminal/wxt_gui.cpp

    old new void wxtPanel::OnRightUp( wxMouseEvent& event ) 
    10031003/* mouse wheel event */
    10041004void wxtPanel::OnMouseWheel( wxMouseEvent& event )
    10051005{
    1006         UpdateModifiers(event);
     1006    int mouse_button;
    10071007
    1008         wxt_exec_event(GE_buttonpress, 0, 0,
    1009                         event.GetWheelRotation() > 0 ? 4 : 5,
    1010                         0, this->GetId());
     1008        UpdateModifiers(event);
     1009        mouse_button = (event.GetWheelRotation() > 0 ? 4 : 5);
     1010#if wxCHECK_VERSION(2, 9, 0)
     1011        /* GetWheelAxis: 0 is the Y axis, 1 is the X axis. */
     1012        if (event.GetWheelAxis() > 0)
     1013            mouse_button += 2;
     1014#endif
     1015        wxt_exec_event(GE_buttonpress, 0, 0, mouse_button, 0, this->GetId());
    10111016}
    10121017
    10131018/* the state of the modifiers is checked each time a key is pressed instead of