상속: IDisposable
예제 #1
0
 public void UnBind()
 {
     //clear
     this.canvas = null;
     this.htmlContainer = null;
     this.clipStacks.Clear();
     this.latestClip = new Rectangle(0, 0, CssBoxConstConfig.BOX_MAX_RIGHT, CssBoxConstConfig.BOX_MAX_BOTTOM);
 }
예제 #2
0
 public void UnBind()
 {
     this.htmlContainer = null;
     if (dicStripPool != null) dicStripPool.Clear();
     if (listStripPool != null) listStripPool.Clear();
     readyDicStrip.Clear();
     readyListStrip.Clear();
     totalMarginLeftAndRight = 0;
 }
예제 #3
0
 public void ChildRequestImage(ImageBinder binder, HtmlContainer htmlCont, object reqFrom, bool _sync)
 {
     if (this.requestImage != null)
     {
         ImageRequestEventArgs resReq = new ImageRequestEventArgs(binder);
         resReq.requestBy = reqFrom;
         requestImage(this, resReq);
     }
 }
예제 #4
0
 public void Bind(HtmlContainer htmlCont)
 {
     this.htmlContainer = htmlCont;
     if (episodeId == ushort.MaxValue - 1)
     {
         //reset
         totalLayoutIdEpisode = 1;
         episodeId = totalLayoutIdEpisode++;
     }
 }
예제 #5
0
        internal static PaintVisitor GetSharedPainter(HtmlContainer htmlCont, Canvas canvas)
        {
            PaintVisitor painter = null;
            if (painterStock.Count == 0)
            {
                painter = new PaintVisitor();
            }
            else
            {
                painter = painterStock.Dequeue();
            }

            painter.Bind(htmlCont, canvas);
            return painter;
        }
예제 #6
0
        static PaintVisitor GetSharedPainter(LayoutFarm.HtmlBoxes.HtmlContainer htmlCont, PixelFarm.Drawing.DrawBoard canvas)
        {
            PaintVisitor painter = null;

            if (painterStock.Count == 0)
            {
                painter = new PaintVisitor();
            }
            else
            {
                painter = painterStock.Dequeue();
            }

            painter.Bind(htmlCont, canvas);
            return(painter);
        }
예제 #7
0
        public static HtmlBoxes.HtmlHost CreateHtmlHost(SampleViewport sampleViewport,
                                                        EventHandler <ContentManagers.ImageRequestEventArgs> imageReqHandler,
                                                        EventHandler <ContentManagers.TextRequestEventArgs> textReq)
        {
            HtmlBoxes.HtmlHost htmlhost = new HtmlBoxes.HtmlHost();
            htmlhost.SetRootGraphics(sampleViewport.Root);

            List <HtmlBoxes.HtmlContainer> updateList = new List <HtmlBoxes.HtmlContainer>();

            sampleViewport.Root.ClearingBeforeRender += (s, e) =>
            {
                //1.
                htmlhost.ClearUpdateWaitingCssBoxes();
                int j = updateList.Count;
                for (int i = 0; i < j; ++i)
                {
                    HtmlBoxes.HtmlContainer htmlCont = updateList[i];
                    htmlCont.RefreshDomIfNeed();
                    htmlCont.IsInUpdateQueue = false;
                }
                updateList.Clear();
            };

            htmlhost.RegisterCssBoxGenerator(new LayoutFarm.CustomWidgets.MyCustomCssBoxGenerator(htmlhost));
            htmlhost.AttachEssentailHandlers(imageReqHandler, textReq);
            htmlhost.SetHtmlContainerUpdateHandler(htmlCont =>
            {
                if (!htmlCont.IsInUpdateQueue)
                {
                    htmlCont.IsInUpdateQueue = true;
                    updateList.Add(htmlCont);
                }
                ////add that to waiting queue
                //sampleViewport.Root.AddToUpdateQueue(htmlCont);
            });



            return(htmlhost);
        }
예제 #8
0
 internal void NotifyHtmlContainerUpdate(HtmlContainer htmlCont)
 {
     if (htmlContainerUpdateHandler != null)
     {
         htmlContainerUpdateHandler(htmlCont);
     }
 }
 public void Unbind()
 {
     this._htmlContainer = null;
     this._isBinded      = false;
 }
예제 #10
0
 public void Bind(HtmlContainer htmlCont)
 {
     this._htmlContainer = htmlCont;
     _isBinded           = htmlCont != null;
     this.ifonts         = htmlCont.GetTextService();// ((RootGraphic)htmlCont.RootCssBox.GetInternalRootGfx()).IFonts;
 }
예제 #11
0
 public void Bind(HtmlContainer htmlCont)
 {
     this._htmlContainer = htmlCont;
     _isBinded           = htmlCont != null;
 }
예제 #12
0
 public void Bind(HtmlContainer htmlCont)
 {
     this._htmlContainer = htmlCont;
     _isBinded           = htmlCont != null;
     this.ifonts         = ((RootGraphic)htmlCont.RootCssBox.RootGfx).IFonts;
 }
예제 #13
0
 public void Bind(HtmlContainer htmlCont, Canvas canvas)
 {
     this.htmlContainer = htmlCont;
     this.canvas        = canvas;
 }
예제 #14
0
 public void Unbind()
 {
     this._htmlContainer = null;
     this._isBinded = false;
 }
예제 #15
0
 public void Bind(HtmlContainer htmlCont)
 {
     this._htmlContainer = htmlCont;
     _isBinded = htmlCont != null;
 }
예제 #16
0
 public void Bind(HtmlContainer htmlCont, DrawBoard canvas)
 {
     this.htmlContainer = htmlCont;
     this.canvas        = canvas;
 }
예제 #17
0
 public LayoutFarm.HtmlBoxes.LayoutVisitor GetSharedHtmlLayoutVisitor(HtmlContainer htmlCont)
 {
     LayoutFarm.HtmlBoxes.LayoutVisitor lay = null;
     if (htmlLayoutVisitorStock.Count == 0)
     {
         lay = new LayoutVisitor();
     }
     else
     {
         lay = this.htmlLayoutVisitorStock.Dequeue();
     }
     lay.Bind(htmlCont);
     return lay;
 }
예제 #18
0
 public void Bind(HtmlContainer htmlCont, Canvas canvas)
 {
     this.htmlContainer = htmlCont;
     this.canvas = canvas;
 }