Code:
/ DotNET / DotNET / 8.0 / untmp / WIN_WINDOWS / lh_tools_devdiv_wpf / Windows / wcp / Core / 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.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- DataGridViewRowHeightInfoNeededEventArgs.cs
- RowParagraph.cs
- FilePresentation.cs
- OdbcDataReader.cs
- ReplacementText.cs
- AudienceUriMode.cs
- ReadOnlyDataSourceView.cs
- IndentedTextWriter.cs
- MarkupExtensionSerializer.cs
- CalloutQueueItem.cs
- ToggleButton.cs
- SafeRightsManagementPubHandle.cs
- AttributeCollection.cs
- DrawToolTipEventArgs.cs
- DocumentViewerAutomationPeer.cs
- AsyncResult.cs
- ChannelAcceptor.cs
- LoadedOrUnloadedOperation.cs
- sqlser.cs
- Annotation.cs
- LostFocusEventManager.cs
- ShaderEffect.cs
- DetailsViewDeleteEventArgs.cs
- SctClaimSerializer.cs
- OperationPickerDialog.cs
- SHA512Managed.cs
- GZipDecoder.cs
- ipaddressinformationcollection.cs
- MulticastOption.cs
- RpcCryptoRequest.cs
- SystemFonts.cs
- GridSplitter.cs
- Geometry.cs
- TagNameToTypeMapper.cs
- TextFormatterContext.cs
- MenuEventArgs.cs
- TypeBinaryExpression.cs
- QilExpression.cs
- DataKey.cs
- DataControlPagerLinkButton.cs
- COM2EnumConverter.cs
- ValidationEventArgs.cs
- GenericIdentity.cs
- DeclarativeCatalogPartDesigner.cs
- EdgeProfileValidation.cs
- ExpanderAutomationPeer.cs
- IntegerValidatorAttribute.cs
- DeviceContext2.cs
- ProvideValueServiceProvider.cs
- SmtpAuthenticationManager.cs
- WebControl.cs
- XsdDuration.cs
- DateTimeOffsetStorage.cs
- StaticSiteMapProvider.cs
- ClusterRegistryConfigurationProvider.cs
- DataException.cs
- NamespaceList.cs
- DrawingCollection.cs
- SoapCommonClasses.cs
- Currency.cs
- FormsAuthenticationUserCollection.cs
- AnnotationService.cs
- LogicalTreeHelper.cs
- XmlBinaryReader.cs
- KeyFrames.cs
- DetailsViewDeletedEventArgs.cs
- ProfilePropertyNameValidator.cs
- HttpCookieCollection.cs
- XmlIterators.cs
- IDQuery.cs
- AuthenticationModulesSection.cs
- UInt32Converter.cs
- IIS7UserPrincipal.cs
- OdbcParameterCollection.cs
- NodeInfo.cs
- CodeIndexerExpression.cs
- SafeNativeMethodsCLR.cs
- WindowsFont.cs
- PropertyEmitter.cs
- DeviceFilterDictionary.cs
- ApplicationInfo.cs
- SafeNativeMethods.cs
- DateBoldEvent.cs
- Validator.cs
- IntegerValidatorAttribute.cs
- IUnknownConstantAttribute.cs
- SiteMapDataSourceView.cs
- AsyncCodeActivityContext.cs
- TabControlToolboxItem.cs
- AutoResetEvent.cs
- ToolStripDesignerAvailabilityAttribute.cs
- SiteMapDataSourceDesigner.cs
- UpdatableGenericsFeature.cs
- ControlUtil.cs
- ForAllOperator.cs
- ParameterToken.cs
- SoapExtension.cs
- AlphabetConverter.cs
- CTreeGenerator.cs
- ImageSource.cs