Exemplo n.º 1
0
        internal static StylusPlugInCollectionBase Create(StylusPlugInCollection wrapper)
        {
            StylusPlugInCollectionBase instance;

            if (StylusLogic.IsPointerStackEnabled)
            {
                instance = new PointerStylusPlugInCollection();
            }
            else
            {
                instance = new WispStylusPlugInCollection();
            }

            instance.Wrapper = wrapper;

            return(instance);
        }
Exemplo n.º 2
0
        /////////////////////////////////////////////////////////////////////
        /// <summary>
        ///     [TBS]
        /// </summary>
        /// <param name="report">[TBS]</param>
        /// <param name="tabletToElementTransform">[TBS]</param>
        /// <param name="targetPlugInCollection">[TBS]</param>
        internal RawStylusInput(
            RawStylusInputReport report,
            GeneralTransform tabletToElementTransform,
            StylusPlugInCollection targetPlugInCollection)
        {
            if (report == null)
            {
                throw new ArgumentNullException("report");
            }
            if (tabletToElementTransform.Inverse == null)
            {
                throw new ArgumentException(SR.Get(SRID.Stylus_MatrixNotInvertable), "tabletToElementTransform");
            }
            if (targetPlugInCollection == null)
            {
                throw new ArgumentNullException("targetPlugInCollection");
            }

            // We should always see this GeneralTransform is frozen since we access this from multiple threads.
            System.Diagnostics.Debug.Assert(tabletToElementTransform.IsFrozen);
            _report = report;
            _tabletToElementTransform = tabletToElementTransform;
            _targetPlugInCollection   = targetPlugInCollection;
        }
Exemplo n.º 3
0
 /////////////////////////////////////////////////////////////////////
 // (in Dispatcher)
 internal void Added(StylusPlugInCollection plugInCollection)
 {
     _pic = plugInCollection;
     OnAdded();
     InvalidateIsActiveForInput(); // Make sure we fire OnIsActivateForInputChanged.
 }