[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Dotgnu-pnet-commits] CVS: pnetlib/System.Drawing.Xsharp DrawingTopLeve
From: |
Rhys Weatherley <address@hidden> |
Subject: |
[Dotgnu-pnet-commits] CVS: pnetlib/System.Drawing.Xsharp DrawingTopLevelWindow.cs,1.6,1.7 DrawingWindow.cs,1.5,1.6 |
Date: |
Sun, 22 Jun 2003 21:04:23 -0400 |
Update of /cvsroot/dotgnu-pnet/pnetlib/System.Drawing.Xsharp
In directory subversions:/tmp/cvs-serv2600/System.Drawing.Xsharp
Modified Files:
DrawingTopLevelWindow.cs DrawingWindow.cs
Log Message:
Implement key event dispatching.
Index: DrawingTopLevelWindow.cs
===================================================================
RCS file:
/cvsroot/dotgnu-pnet/pnetlib/System.Drawing.Xsharp/DrawingTopLevelWindow.cs,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -r1.6 -r1.7
*** DrawingTopLevelWindow.cs 22 Jun 2003 04:07:52 -0000 1.6
--- DrawingTopLevelWindow.cs 23 Jun 2003 01:04:21 -0000 1.7
***************
*** 327,330 ****
--- 327,331 ----
ModifierMask modifiers, String str)
{
+ bool processed = false;
if(sink != null)
{
***************
*** 333,337 ****
if(keyData != ToolkitKeys.None)
{
! sink.ToolkitKeyDown(keyData);
}
--- 334,341 ----
if(keyData != ToolkitKeys.None)
{
! if(sink.ToolkitKeyDown(keyData))
! {
! processed = true;
! }
}
***************
*** 341,351 ****
foreach(char ch in str)
{
! sink.ToolkitKeyChar(ch);
}
}
}
! // The key has been processed.
! return true;
}
--- 345,371 ----
foreach(char ch in str)
{
!
if(sink.ToolkitKeyChar(ch))
! {
! processed =
true;
! }
}
}
}
+ return processed;
+ }
! // Override the key release event from Xsharp.
! protected override bool OnKeyRelease(KeyName key, ModifierMask
modifiers)
! {
! if(sink != null)
! {
! // Emit the "KeyUp" event.
! ToolkitKeys keyData =
DrawingWindow.MapKey(key, modifiers);
! if(keyData != ToolkitKeys.None)
! {
! return
sink.ToolkitKeyUp(keyData);
! }
! }
! return false;
}
Index: DrawingWindow.cs
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnetlib/System.Drawing.Xsharp/DrawingWindow.cs,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** DrawingWindow.cs 22 Jun 2003 04:07:52 -0000 1.5
--- DrawingWindow.cs 23 Jun 2003 01:04:21 -0000 1.6
***************
*** 296,299 ****
--- 296,300 ----
ModifierMask modifiers, String str)
{
+ bool processed = false;
if(sink != null)
{
***************
*** 302,306 ****
if(keyData != ToolkitKeys.None)
{
! sink.ToolkitKeyDown(keyData);
}
--- 303,310 ----
if(keyData != ToolkitKeys.None)
{
! if(sink.ToolkitKeyDown(keyData))
! {
! processed = true;
! }
}
***************
*** 310,320 ****
foreach(char ch in str)
{
! sink.ToolkitKeyChar(ch);
}
}
}
! // The key has been processed.
! return true;
}
--- 314,340 ----
foreach(char ch in str)
{
!
if(sink.ToolkitKeyChar(ch))
! {
! processed =
true;
! }
}
}
}
+ return processed;
+ }
! // Override the key release event from Xsharp.
! protected override bool OnKeyRelease(KeyName key, ModifierMask
modifiers)
! {
! if(sink != null)
! {
! // Emit the "KeyUp" event.
! ToolkitKeys keyData = MapKey(key,
modifiers);
! if(keyData != ToolkitKeys.None)
! {
! return
sink.ToolkitKeyUp(keyData);
! }
! }
! return false;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Dotgnu-pnet-commits] CVS: pnetlib/System.Drawing.Xsharp DrawingTopLevelWindow.cs,1.6,1.7 DrawingWindow.cs,1.5,1.6,
Rhys Weatherley <address@hidden> <=
- Prev by Date:
[Dotgnu-pnet-commits] CVS: pnetlib/Xsharp InputOnlyWidget.cs,1.3,1.4 TopLevelWindow.cs,1.7,1.8
- Next by Date:
[Dotgnu-pnet-commits] CVS: pnetlib/System.Windows.Forms Control.cs,1.17,1.18 Form.cs,1.11,1.12 Message.cs,1.1,1.2 Win32Constants.cs,1.1,1.2
- Previous by thread:
[Dotgnu-pnet-commits] CVS: pnetlib/Xsharp InputOnlyWidget.cs,1.3,1.4 TopLevelWindow.cs,1.7,1.8
- Next by thread:
[Dotgnu-pnet-commits] CVS: pnetlib/System.Windows.Forms Control.cs,1.17,1.18 Form.cs,1.11,1.12 Message.cs,1.1,1.2 Win32Constants.cs,1.1,1.2
- Index(es):