// Token: 0x06007BDF RID: 31711 RVA: 0x0022D34B File Offset: 0x0022B54B
 internal AttachedAnnotation(LocatorManager manager, Annotation annotation, AnnotationResource anchor, object attachedAnchor, AttachmentLevel attachmentLevel, DependencyObject parent)
 {
     this._annotation     = annotation;
     this._anchor         = anchor;
     this._locatorManager = manager;
     this.Update(attachedAnchor, attachmentLevel, parent);
 }
Example #2
0
        //------------------------------------------------------
        //
        //  Constructors
        //
        //------------------------------------------------------
        
        #region Constructors

        /// <summary>
        ///     Creates an instance of SubTreeProcessor.  Subclasses should
        ///     pass the manager that created and owns them.
        /// </summary>
        /// <param name="manager">the manager that owns this processor</param>
        /// <exception cref="ArgumentNullException">manager is null</exception>
        protected SubTreeProcessor(LocatorManager manager)
        {
            if (manager == null)
                throw new ArgumentNullException("manager");

            _manager = manager;
        }
 // Token: 0x06007C2A RID: 31786 RVA: 0x0022EA55 File Offset: 0x0022CC55
 protected SubTreeProcessor(LocatorManager manager)
 {
     if (manager == null)
     {
         throw new ArgumentNullException("manager");
     }
     this._manager = manager;
 }
Example #4
0
        //------------------------------------------------------
        //
        //  Constructors
        //
        //------------------------------------------------------

        #region Constructors

        /// <summary>
        ///     Creates an instance of SubTreeProcessor.  Subclasses should
        ///     pass the manager that created and owns them.
        /// </summary>
        /// <param name="manager">the manager that owns this processor</param>
        /// <exception cref="ArgumentNullException">manager is null</exception>
        protected SubTreeProcessor(LocatorManager manager)
        {
            if (manager == null)
            {
                throw new ArgumentNullException(nameof(manager));
            }

            _manager = manager;
        }
        /// <summary>
        ///     Create an instance of AttachedAnnotation with a specified parent.  Takes an optional 
        ///     parent for the attached annotation.  This is useful when the parent is known before
        ///     hand and not available through the normal means (such as in printing).
        /// </summary>
        /// <param name="manager">the LocatorManager providing processors for this anchored annotation</param>
        /// <param name="annotation">the annotation itself</param>
        /// <param name="anchor">the annotation's anchor represented by the attached anchor</param>
        /// <param name="attachedAnchor">the attached anchor itself</param>
        /// <param name="attachmentLevel">the level of the attached anchor</param>
        /// <param name="parent">parent of the selection</param>
        internal AttachedAnnotation(LocatorManager manager, Annotation annotation, AnnotationResource anchor, Object attachedAnchor, AttachmentLevel attachmentLevel, DependencyObject parent)
        {
            Debug.Assert(manager != null, "LocatorManager can not be null");
            Debug.Assert(annotation != null, "Annotation can not be null");
            Debug.Assert(anchor != null, "Anchor can not be null");
            Debug.Assert(attachedAnchor != null, "AttachedAnchor can not be null");

            _annotation = annotation;
            _anchor = anchor;
            _locatorManager = manager;
            Update(attachedAnchor, attachmentLevel, parent);
        }
Example #6
0
        /// <summary>
        ///     Create an instance of AttachedAnnotation with a specified parent.  Takes an optional
        ///     parent for the attached annotation.  This is useful when the parent is known before
        ///     hand and not available through the normal means (such as in printing).
        /// </summary>
        /// <param name="manager">the LocatorManager providing processors for this anchored annotation</param>
        /// <param name="annotation">the annotation itself</param>
        /// <param name="anchor">the annotation's anchor represented by the attached anchor</param>
        /// <param name="attachedAnchor">the attached anchor itself</param>
        /// <param name="attachmentLevel">the level of the attached anchor</param>
        /// <param name="parent">parent of the selection</param>
        internal AttachedAnnotation(LocatorManager manager, Annotation annotation, AnnotationResource anchor, Object attachedAnchor, AttachmentLevel attachmentLevel, DependencyObject parent)
        {
            Debug.Assert(manager != null, "LocatorManager can not be null");
            Debug.Assert(annotation != null, "Annotation can not be null");
            Debug.Assert(anchor != null, "Anchor can not be null");
            Debug.Assert(attachedAnchor != null, "AttachedAnchor can not be null");

            _annotation     = annotation;
            _anchor         = anchor;
            _locatorManager = manager;
            Update(attachedAnchor, attachmentLevel, parent);
        }
        //------------------------------------------------------
        //
        //  Constructors
        //
        //------------------------------------------------------

        #region Constructors

        /// <summary>
        ///     Create an instance of AttachedAnnotation.
        /// </summary>
        /// <param name="manager">the LocatorManager providing processors for this anchored annotation</param>
        /// <param name="annotation">the annotation itself</param>
        /// <param name="anchor">the annotation's anchor represented by the attached anchor</param>
        /// <param name="attachedAnchor">the attached anchor itself</param>
        /// <param name="attachmentLevel">the level of the attached anchor</param>
        internal AttachedAnnotation(LocatorManager manager, Annotation annotation, AnnotationResource anchor, Object attachedAnchor, AttachmentLevel attachmentLevel)
            : this(manager, annotation, anchor, attachedAnchor, attachmentLevel, null)
        {
        }
        /// <summary>
        ///     Create an instance of AnnotationDocumentPaginator for a given document and annotation store. 
        /// </summary>
        /// <param name="originalPaginator">document to add annotations to</param> 
        /// <param name="annotationStore">store to retrieve annotations from</param> 
        /// <param name="flowDirection"></param>
        public AnnotationDocumentPaginator(DocumentPaginator originalPaginator, AnnotationStore annotationStore, FlowDirection flowDirection) 
        {
            _isFixedContent = originalPaginator is FixedDocumentPaginator || originalPaginator is FixedDocumentSequencePaginator;

            if (!_isFixedContent && !(originalPaginator is FlowDocumentPaginator)) 
                throw new ArgumentException(SR.Get(SRID.OnlyFlowAndFixedSupported));
 
            _originalPaginator = originalPaginator; 
            _annotationStore = annotationStore;
            _locatorManager = new LocatorManager(_annotationStore); 
            _flowDirection = flowDirection;

            // Register for events
            _originalPaginator.GetPageCompleted += new GetPageCompletedEventHandler(HandleGetPageCompleted); 
            _originalPaginator.ComputePageCountCompleted += new AsyncCompletedEventHandler(HandleComputePageCountCompleted);
            _originalPaginator.PagesChanged += new PagesChangedEventHandler(HandlePagesChanged); 
        } 
 // Token: 0x06007BDE RID: 31710 RVA: 0x0022D33B File Offset: 0x0022B53B
 internal AttachedAnnotation(LocatorManager manager, Annotation annotation, AnnotationResource anchor, object attachedAnchor, AttachmentLevel attachmentLevel) : this(manager, annotation, anchor, attachedAnchor, attachmentLevel, null)
 {
 }
Example #10
0
        //------------------------------------------------------
        //
        //  Constructors
        //
        //------------------------------------------------------

        #region Constructors

        /// <summary>
        ///     Creates an instance of FixedPageProcessor.
        /// </summary>
        /// <param name="manager">the manager that owns this processor</param>
        /// <exception cref="ArgumentNullException">manager is null</exception>
        public FixedPageProcessor(LocatorManager manager) : base(manager)
        {
        }
Example #11
0
        //------------------------------------------------------
        //
        //  Constructors
        //
        //------------------------------------------------------
        
        #region Constructors

        /// <summary>
        ///     Creates an instance of DataIdProcessor.
        /// </summary>
        /// <param name="manager">the manager that owns this processor</param>
        /// <exception cref="ArgumentNullException">manager is null</exception>
        public DataIdProcessor(LocatorManager manager) : base(manager)
        {            
        }
Example #12
0
        //------------------------------------------------------
        //
        //  Private Methods
        //
        //------------------------------------------------------

        #region Private Methods


        /// <summary>
        ///     Initializes the service on this tree node.
        /// </summary>
        /// <param name="root">the tree node the service is being created on</param>
        private void Initialize(DependencyObject root)
        {
            Invariant.Assert(root != null, "Parameter 'root' is null.");

            // Root of the subtree this service will operate on
            _root = root;

            // Object that resolves and generates locators
            _locatorManager = new LocatorManager();

            // sets up dependency for AnnotationComponentManager
            _annotationComponentManager = new AnnotationComponentManager(this);

            //set known component types priorities
            AdornerPresentationContext.SetTypeZLevel(typeof(StickyNoteControl), 0);
            AdornerPresentationContext.SetTypeZLevel(typeof(MarkedHighlightComponent), 1);
            AdornerPresentationContext.SetTypeZLevel(typeof(HighlightComponent), 1);
            //set ZRanges for the ZLevels
            AdornerPresentationContext.SetZLevelRange(0, Int32.MaxValue / 2 + 1, Int32.MaxValue);
            AdornerPresentationContext.SetZLevelRange(1, 0, 0);
        }
Example #13
0
        //------------------------------------------------------
        //
        //  Constructors
        //
        //------------------------------------------------------
        
        #region Constructors

        /// <summary>
        ///     Creates an instance of FixedPageProcessor.
        /// </summary>
        /// <param name="manager">the manager that owns this processor</param>
        /// <exception cref="ArgumentNullException">manager is null</exception>
        public FixedPageProcessor(LocatorManager manager) : base(manager)
        {
        }
Example #14
0
        //------------------------------------------------------
        //
        //  Constructors
        //
        //------------------------------------------------------

        #region Constructors

        /// <summary>
        ///     Creates an instance of DataIdProcessor.
        /// </summary>
        /// <param name="manager">the manager that owns this processor</param>
        /// <exception cref="ArgumentNullException">manager is null</exception>
        public DataIdProcessor(LocatorManager manager) : base(manager)
        {
        }