[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Dotgnu-pnet-commits] CVS: pnetlib/System.Drawing.Xsharp DrawingWindow.c
From: |
Rhys Weatherley <address@hidden> |
Subject: |
[Dotgnu-pnet-commits] CVS: pnetlib/System.Drawing.Xsharp DrawingWindow.cs, 1.10, 1.11 |
Date: |
Mon, 28 Jul 2003 05:57:11 -0400 |
Update of /cvsroot/dotgnu-pnet/pnetlib/System.Drawing.Xsharp
In directory subversions:/tmp/cvs-serv15510/System.Drawing.Xsharp
Modified Files:
DrawingWindow.cs
Log Message:
Modify "MapKey" to add the modifier masks.
Index: DrawingWindow.cs
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnetlib/System.Drawing.Xsharp/DrawingWindow.cs,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -r1.10 -r1.11
*** DrawingWindow.cs 25 Jul 2003 23:32:35 -0000 1.10
--- DrawingWindow.cs 28 Jul 2003 09:57:09 -0000 1.11
***************
*** 221,225 ****
// Map an Xsharp key description into a "ToolkitKeys" value.
! internal static ToolkitKeys MapKey(KeyName key, ModifierMask modifiers)
{
switch(key)
--- 221,225 ----
// Map an Xsharp key description into a "ToolkitKeys" value.
! private static ToolkitKeys MapKey(KeyName key)
{
switch(key)
***************
*** 329,332 ****
--- 329,351 ----
}
return ToolkitKeys.None;
+ }
+
+ // Map an Xsharp key description into a "ToolkitKeys" value.
+ internal static ToolkitKeys MapKey(KeyName key, ModifierMask modifiers)
+ {
+ ToolkitKeys toolkitKey = MapKey(key);
+ if((modifiers & ModifierMask.ControlMask) != 0)
+ {
+ toolkitKey |= ToolkitKeys.Control;
+ }
+ if((modifiers & ModifierMask.ShiftMask) != 0)
+ {
+ toolkitKey |= ToolkitKeys.Shift;
+ }
+ if((modifiers & ModifierMask.Mod1Mask) != 0)
+ {
+ toolkitKey |= ToolkitKeys.Alt;
+ }
+ return toolkitKey;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Dotgnu-pnet-commits] CVS: pnetlib/System.Drawing.Xsharp DrawingWindow.cs, 1.10, 1.11,
Rhys Weatherley <address@hidden> <=