Example #1
0
 private void RemovePreviousCaption(ICaptionHost cluster, CaptionType type)
 {
     if (_hostAwaitingCaption.CapMgr().FreeDraw != null)
     {
         _doc.BeginRemoveSingleShape(_hostAwaitingCaption.CapMgr().FreeDraw.Id());
     }
     if (_hostAwaitingCaption.CapMgr().text != null)
     {
         _doc.BeginRemoveSingleShape(_hostAwaitingCaption.CapMgr().text.Id());
     }
 }
Example #2
0
        //shape can be either cluster, text, free draw
        private void CleanupClusterCaptions(IVdShape shape, int indirectOwner)
        {
            ICaptionHost capHost = null;

            switch (shape.ShapeCode())
            {
            case VdShapeType.FreeForm:
                capHost = DocTools.GetCaptionHost(GetShapes(), shape);
                if (capHost != null)
                {
                    capHost.CapMgr().InvalidateCaption(shape);
                }

                //caption removed locally, update cluster
                if (capHost != null && shape.Id() == recentLocallyRemovedShapeId)
                {
                    _rt.clienRt.SendSyncState(capHost.Id(),
                                              capHost.GetState(TopicId));
                }
                break;

            case VdShapeType.Text:
                capHost = DocTools.GetCaptionHost(GetShapes(), shape);
                if (capHost != null)
                {
                    capHost.CapMgr().InvalidateCaption(shape);
                }

                //caption removed locally, update cluster
                if (capHost != null && shape.Id() == recentLocallyRemovedShapeId)
                {
                    _rt.clienRt.SendSyncState(capHost.Id(),
                                              capHost.GetState(TopicId));
                }
                break;

            case VdShapeType.Cluster:
            case VdShapeType.ClusterLink:
                //cluster removed locally, remove captions
                capHost = (ICaptionHost)shape;
                if (indirectOwner == _palette.GetOwnerId())
                {
                    if (capHost.CapMgr().text != null)
                    {
                        BeginRemoveSingleShape(capHost.CapMgr().text.Id());
                    }

                    if (capHost.CapMgr().FreeDraw != null)
                    {
                        BeginRemoveSingleShape(capHost.CapMgr().FreeDraw.Id());
                    }
                }
                break;
            }
        }
Example #3
0
 private void updateHostCaptions(ICaptionHost capHost)
 {
     capHost.CapMgr().SetBounds();
 }
Example #4
0
 private void updateHostCaptions(ICaptionHost capHost)
 {
     capHost.CapMgr().SetBounds();
 }