# Patch created by pfeifleer # Date: Fr Feb 4 14:31:55 CET 2005 # Repository: pnetlib # Comments: # add wheel mouse support #### End of Preamble #### #### Patch data follows #### Index: System.Drawing.Xsharp/DrawingWindow.cs =================================================================== RCS file: /cvsroot/dotgnu-pnet/pnetlib/System.Drawing.Xsharp/DrawingWindow.cs,v retrieving revision 1.27 diff -c -r1.27 DrawingWindow.cs *** System.Drawing.Xsharp/DrawingWindow.cs 30 Dec 2004 07:31:17 -0000 1.27 --- System.Drawing.Xsharp/DrawingWindow.cs 4 Feb 2005 13:32:03 -0000 *************** *** 471,484 **** { if(sink != null) { ! sink.ToolkitMouseUp ! (MapButton(button), ! MapKey(KeyName.XK_VoidSymbol, modifiers), ! 1, x, y, 0); } this.button = 0; } - // Override the button double click event from Xsharp. protected override void OnButtonDoubleClick (int x, int y, ButtonName button, ModifierMask modifiers) --- 471,494 ---- { if(sink != null) { ! if( ButtonName.Button5 == button || ButtonName.Button4 == button ) ! { ! int iDelta = 120 * (ButtonName.Button4 == button?1:-1); ! sink.ToolkitMouseWheel ! (MapButton(button), ! MapKey(KeyName.XK_VoidSymbol, modifiers), ! 1, x, y, iDelta); ! } ! else ! { ! sink.ToolkitMouseUp ! (MapButton(button), ! MapKey(KeyName.XK_VoidSymbol, modifiers), ! 1, x, y, 0); ! } } this.button = 0; } // Override the button double click event from Xsharp. protected override void OnButtonDoubleClick (int x, int y, ButtonName button, ModifierMask modifiers) #### End of Patch data ####