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
- GridViewRowCollection.cs
- SubstitutionResponseElement.cs
- WCFModelStrings.Designer.cs
- ExpressionBuilder.cs
- dbdatarecord.cs
- ProxyElement.cs
- ColumnHeaderConverter.cs
- FormViewInsertedEventArgs.cs
- HwndSourceKeyboardInputSite.cs
- DataGridViewRowDividerDoubleClickEventArgs.cs
- EventManager.cs
- OutputCacheProfile.cs
- MailMessageEventArgs.cs
- XmlComplianceUtil.cs
- Span.cs
- CacheHelper.cs
- LineBreakRecord.cs
- SafeNativeMethodsMilCoreApi.cs
- ReadOnlyNameValueCollection.cs
- UnauthorizedWebPart.cs
- DataSourceDesigner.cs
- ImageAutomationPeer.cs
- PrivilegeNotHeldException.cs
- XmlTextReaderImplHelpers.cs
- TableItemProviderWrapper.cs
- DefaultAssemblyResolver.cs
- FragmentQuery.cs
- NumericUpDown.cs
- ExceptionDetail.cs
- DynamicResourceExtension.cs
- DeviceSpecific.cs
- SettingsBase.cs
- TemplateInstanceAttribute.cs
- TransactionWaitAsyncResult.cs
- ReadWriteSpinLock.cs
- ArgumentDesigner.xaml.cs
- ManagementException.cs
- NullReferenceException.cs
- VisualTransition.cs
- MergeLocalizationDirectives.cs
- OleDbWrapper.cs
- MemoryRecordBuffer.cs
- BitmapCodecInfo.cs
- SubqueryRules.cs
- CodeGenerator.cs
- FileChangesMonitor.cs
- FormsAuthenticationTicket.cs
- UInt64Converter.cs
- EndpointConfigContainer.cs
- ProfileParameter.cs
- IpcPort.cs
- DetailsViewRow.cs
- ConstraintManager.cs
- EnvironmentPermission.cs
- EncodingNLS.cs
- ReadOnlyNameValueCollection.cs
- WindowsEditBox.cs
- StringConverter.cs
- MediaElement.cs
- ScriptBehaviorDescriptor.cs
- StyleCollectionEditor.cs
- SourceSwitch.cs
- XmlBinaryReader.cs
- XmlSchemaCollection.cs
- SimpleTypeResolver.cs
- ArrayElementGridEntry.cs
- DetailsView.cs
- HierarchicalDataSourceIDConverter.cs
- ExtensionQuery.cs
- MembershipUser.cs
- OutputCacheSettingsSection.cs
- CacheOutputQuery.cs
- UserUseLicenseDictionaryLoader.cs
- TdsParser.cs
- PlanCompilerUtil.cs
- VirtualPathData.cs
- SourceFilter.cs
- TableChangeProcessor.cs
- AutoCompleteStringCollection.cs
- OLEDB_Enum.cs
- Tracer.cs
- GenericEnumerator.cs
- SHA384.cs
- Token.cs
- DataGridRow.cs
- CompiledRegexRunnerFactory.cs
- HttpStreamFormatter.cs
- InvokePattern.cs
- SqlUserDefinedTypeAttribute.cs
- TransactionBridgeSection.cs
- SqlOuterApplyReducer.cs
- QilIterator.cs
- CatalogUtil.cs
- ImpersonateTokenRef.cs
- CookielessHelper.cs
- Thickness.cs
- DefinitionUpdate.cs
- SafeProcessHandle.cs
- TextRangeBase.cs
- SqlConnectionPoolGroupProviderInfo.cs