Beispiel #1
0
        /// <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;
        }
Beispiel #2
0
        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;
        }
Beispiel #3
0
        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);
        }
Beispiel #4
0
 /// <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);
Beispiel #5
0
 /// <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.
 }
Beispiel #7
0
 /////////////////////////////////////////////////////////////////////
 ///
 internal void SetOwner(StylusDeviceBase stylusDevice)
 {
     _stylusDevice = stylusDevice;
 }