Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / Orcas / NetFXw7 / wpf / src / Core / CSharp / System / Windows / Input / Stylus / RawStylusSystemGestureInputReport.cs / 1 / RawStylusSystemGestureInputReport.cs
using System; using System.ComponentModel; using System.Security; using System.Security.Permissions; using SR=MS.Internal.PresentationCore.SR; using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Input { ///////////////////////////////////////////////////////////////////////// ////// [TBS] /// internal class RawStylusSystemGestureInputReport : RawStylusInputReport { // We don't want to publically expose the double tap system gesture so we define it here. internal const SystemGesture InternalSystemGestureDoubleTap = (SystemGesture)0x11; ///////////////////////////////////////////////////////////////////// ////// Constructs an instance of the RawStylusSystemGestureInputReport class. /// /// /// The mode in which the input is being provided. /// /// /// The time when the input occured. /// /// /// The PresentationSource over which the stylus moved. /// /// /// PenContext that generated this event. /// /// /// tablet id. /// /// /// Stylus device id. /// /// /// System Gesture. /// /// /// X location of the system gesture (in tablet device coordindates). /// /// /// Y location of the system gesture (in tablet device coordindates). /// /// /// Button state info data. /// ////// Critical:This handles critical data in the form of PresentationSource /// TreatAsSafe:There are demands on the critical data(PresentationSource) /// [SecurityCritical,SecurityTreatAsSafe] internal RawStylusSystemGestureInputReport( InputMode mode, int timestamp, PresentationSource inputSource, PenContext penContext, int tabletId, int stylusDeviceId, SystemGesture systemGesture, int gestureX, int gestureY, int buttonState) : base( mode, timestamp, inputSource, penContext, RawStylusActions.SystemGesture, tabletId, stylusDeviceId, new int[] {}) { if (systemGesture != SystemGesture.None && systemGesture != SystemGesture.Tap && systemGesture != SystemGesture.RightTap && systemGesture != SystemGesture.Drag && systemGesture != SystemGesture.RightDrag && systemGesture != SystemGesture.HoldEnter && systemGesture != SystemGesture.HoldLeave && systemGesture != SystemGesture.HoverEnter && systemGesture != SystemGesture.HoverLeave && systemGesture != InternalSystemGestureDoubleTap && systemGesture != SystemGesture.Flick) { throw new InvalidEnumArgumentException(SR.Get( SRID.Enum_Invalid, "systemGesture")); } _id = systemGesture; _gestureX = gestureX; _gestureY = gestureY; _buttonState = buttonState; } ///////////////////////////////////////////////////////////////////// ////// Read-only access to the stylus gesture id. /// internal SystemGesture SystemGesture { get { return _id; } } ///////////////////////////////////////////////////////////////////// ////// Read-only access to the X location of the system gesture /// in tablet device coordinates. /// internal int GestureX { get { return _gestureX; } } ///////////////////////////////////////////////////////////////////// ////// Read-only access to the Y location of the system gesture /// in tablet device coordinates. /// internal int GestureY { get { return _gestureY; } } ///////////////////////////////////////////////////////////////////// ////// Read-only access to the button state info (useful for flicks). /// internal int ButtonState { get { return _buttonState; } } ///////////////////////////////////////////////////////////////////// SystemGesture _id; int _gestureX;// gesture location in tablet device coordinates int _gestureY; int _buttonState; } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved. using System; using System.ComponentModel; using System.Security; using System.Security.Permissions; using SR=MS.Internal.PresentationCore.SR; using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Input { ///////////////////////////////////////////////////////////////////////// ////// [TBS] /// internal class RawStylusSystemGestureInputReport : RawStylusInputReport { // We don't want to publically expose the double tap system gesture so we define it here. internal const SystemGesture InternalSystemGestureDoubleTap = (SystemGesture)0x11; ///////////////////////////////////////////////////////////////////// ////// Constructs an instance of the RawStylusSystemGestureInputReport class. /// /// /// The mode in which the input is being provided. /// /// /// The time when the input occured. /// /// /// The PresentationSource over which the stylus moved. /// /// /// PenContext that generated this event. /// /// /// tablet id. /// /// /// Stylus device id. /// /// /// System Gesture. /// /// /// X location of the system gesture (in tablet device coordindates). /// /// /// Y location of the system gesture (in tablet device coordindates). /// /// /// Button state info data. /// ////// Critical:This handles critical data in the form of PresentationSource /// TreatAsSafe:There are demands on the critical data(PresentationSource) /// [SecurityCritical,SecurityTreatAsSafe] internal RawStylusSystemGestureInputReport( InputMode mode, int timestamp, PresentationSource inputSource, PenContext penContext, int tabletId, int stylusDeviceId, SystemGesture systemGesture, int gestureX, int gestureY, int buttonState) : base( mode, timestamp, inputSource, penContext, RawStylusActions.SystemGesture, tabletId, stylusDeviceId, new int[] {}) { if (systemGesture != SystemGesture.None && systemGesture != SystemGesture.Tap && systemGesture != SystemGesture.RightTap && systemGesture != SystemGesture.Drag && systemGesture != SystemGesture.RightDrag && systemGesture != SystemGesture.HoldEnter && systemGesture != SystemGesture.HoldLeave && systemGesture != SystemGesture.HoverEnter && systemGesture != SystemGesture.HoverLeave && systemGesture != InternalSystemGestureDoubleTap && systemGesture != SystemGesture.Flick) { throw new InvalidEnumArgumentException(SR.Get( SRID.Enum_Invalid, "systemGesture")); } _id = systemGesture; _gestureX = gestureX; _gestureY = gestureY; _buttonState = buttonState; } ///////////////////////////////////////////////////////////////////// ////// Read-only access to the stylus gesture id. /// internal SystemGesture SystemGesture { get { return _id; } } ///////////////////////////////////////////////////////////////////// ////// Read-only access to the X location of the system gesture /// in tablet device coordinates. /// internal int GestureX { get { return _gestureX; } } ///////////////////////////////////////////////////////////////////// ////// Read-only access to the Y location of the system gesture /// in tablet device coordinates. /// internal int GestureY { get { return _gestureY; } } ///////////////////////////////////////////////////////////////////// ////// Read-only access to the button state info (useful for flicks). /// internal int ButtonState { get { return _buttonState; } } ///////////////////////////////////////////////////////////////////// SystemGesture _id; int _gestureX;// gesture location in tablet device coordinates int _gestureY; int _buttonState; } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- FastEncoder.cs
- TemplateBuilder.cs
- ConnectionInterfaceCollection.cs
- MouseEvent.cs
- OleCmdHelper.cs
- WindowsImpersonationContext.cs
- WebConfigurationManager.cs
- InkCanvasFeedbackAdorner.cs
- CapabilitiesUse.cs
- ReflectEventDescriptor.cs
- GeneralTransformCollection.cs
- ControlBuilder.cs
- RectangleGeometry.cs
- XmlNodeWriter.cs
- MULTI_QI.cs
- ObjectDataProvider.cs
- ValidatingReaderNodeData.cs
- input.cs
- HttpClientCertificate.cs
- ConstraintConverter.cs
- Utility.cs
- RandomNumberGenerator.cs
- _AcceptOverlappedAsyncResult.cs
- SqlConnectionPoolProviderInfo.cs
- RoleManagerModule.cs
- path.cs
- ComponentChangedEvent.cs
- OdbcConnectionHandle.cs
- OleDbCommandBuilder.cs
- Logging.cs
- ToolStripDropDownMenu.cs
- NetNamedPipeSecurityElement.cs
- ElementHostPropertyMap.cs
- Command.cs
- PolyBezierSegment.cs
- XPathDescendantIterator.cs
- TextEndOfParagraph.cs
- EventLogEntry.cs
- EmptyElement.cs
- HtmlToClrEventProxy.cs
- CookielessHelper.cs
- FlatButtonAppearance.cs
- ControlBindingsCollection.cs
- SqlDataSourceView.cs
- BrowserTree.cs
- PublishLicense.cs
- ColumnMapVisitor.cs
- AsyncResult.cs
- CharAnimationUsingKeyFrames.cs
- Group.cs
- ObjectIDGenerator.cs
- ManagementInstaller.cs
- VerificationAttribute.cs
- StorageComplexTypeMapping.cs
- SqlDataReaderSmi.cs
- PropertyBuilder.cs
- BasicExpandProvider.cs
- AutomationPropertyInfo.cs
- UnsafeNativeMethods.cs
- ApplicationFileCodeDomTreeGenerator.cs
- ObjectPropertyMapping.cs
- WebPartUtil.cs
- OleDbReferenceCollection.cs
- ByteRangeDownloader.cs
- StorageMappingItemCollection.cs
- ToolZone.cs
- QueryStringHandler.cs
- XmlTextEncoder.cs
- TemplateParser.cs
- HMACSHA384.cs
- AddressingVersion.cs
- BooleanKeyFrameCollection.cs
- WebPartExportVerb.cs
- Win32Native.cs
- SqlDataSourceConfigureSelectPanel.cs
- RequiredArgumentAttribute.cs
- CellTreeNodeVisitors.cs
- BoolLiteral.cs
- SQLBytesStorage.cs
- BaseParaClient.cs
- BaseAsyncResult.cs
- Model3DCollection.cs
- SiteMapPathDesigner.cs
- DataServices.cs
- SerialReceived.cs
- Transform3D.cs
- FilterableAttribute.cs
- MostlySingletonList.cs
- ResourcesBuildProvider.cs
- DynamicDiscoveryDocument.cs
- MessageDispatch.cs
- DescendantOverDescendantQuery.cs
- FlowDocumentPaginator.cs
- CodeArrayCreateExpression.cs
- WebHostUnsafeNativeMethods.cs
- ProcessManager.cs
- AttributeTable.cs
- CodeMemberField.cs
- InternalControlCollection.cs
- Separator.cs