/// <summary> /// Constructor taking a base implementation /// </summary> /// <param name="impl">The base of the internal hierarchy</param> internal StylusDevice(StylusDeviceBase impl) { if (impl == null) { throw new ArgumentNullException(nameof(impl)); } StylusDeviceImpl = impl; }
internal StylusTouchDeviceBase(StylusDeviceBase stylusDevice) : base(stylusDevice.Id) { StylusDevice = stylusDevice; // DevDiv:652804 // This used to be statically defined, but this gave rise to issues with // calling GetIntermediateTouchPoints as the properties were likely to not // match the hardware. Now, we set this from the actual tablet queried // description so we can be assured they match save for when there is an // actual erroneous situation. _stylusPointDescription = StylusDevice?.TabletDevice?.TabletDeviceImpl?.StylusPointDescription ?? _stylusPointDescription; PromotingToOther = true; }
protected bool ValidateVisualForCapture(DependencyObject visual, StylusDeviceBase currentStylusDevice) { if (visual == null) { return(false); } PresentationSource presentationSource = PresentationSource.CriticalFromVisual(visual); if (presentationSource == null) { return(false); } if (currentStylusDevice != null && currentStylusDevice.CriticalActiveSource != presentationSource && currentStylusDevice.Captured == null) { return(false); } return(true); }
/// <summary> /// Updates the stylus capture for the particular stylus device /// </summary> /// <param name="stylusDevice"></param> /// <param name="oldStylusDeviceCapture"></param> /// <param name="newStylusDeviceCapture"></param> /// <param name="timestamp"></param> internal abstract void UpdateStylusCapture(StylusDeviceBase stylusDevice, IInputElement oldStylusDeviceCapture, IInputElement newStylusDeviceCapture, int timestamp);
/// <summary> /// Changes the over property of the given StylusDevice /// </summary> /// <param name="stylusDevice"></param> /// <param name="newOver"></param> internal abstract void UpdateOverProperty(StylusDeviceBase stylusDevice, IInputElement newOver);
internal void AddStylusDevice(int index, StylusDeviceBase stylusDevice) { base.Items.Insert(index, stylusDevice.StylusDevice); // add it to our list. }
///////////////////////////////////////////////////////////////////// /// internal void SetOwner(StylusDeviceBase stylusDevice) { _stylusDevice = stylusDevice; }