Inheritance: IDisposable
Ejemplo n.º 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);
 }
Ejemplo n.º 2
0
 public void UnBind()
 {
     this.htmlContainer = null;
     if (dicStripPool != null) dicStripPool.Clear();
     if (listStripPool != null) listStripPool.Clear();
     readyDicStrip.Clear();
     readyListStrip.Clear();
     totalMarginLeftAndRight = 0;
 }
Ejemplo n.º 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);
     }
 }
Ejemplo n.º 4
0
 public void Bind(HtmlContainer htmlCont)
 {
     this.htmlContainer = htmlCont;
     if (episodeId == ushort.MaxValue - 1)
     {
         //reset
         totalLayoutIdEpisode = 1;
         episodeId = totalLayoutIdEpisode++;
     }
 }
Ejemplo n.º 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;
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 8
0
 internal void NotifyHtmlContainerUpdate(HtmlContainer htmlCont)
 {
     if (htmlContainerUpdateHandler != null)
     {
         htmlContainerUpdateHandler(htmlCont);
     }
 }
Ejemplo n.º 9
0
 public void Unbind()
 {
     this._htmlContainer = null;
     this._isBinded      = false;
 }
Ejemplo n.º 10
0
 public void Bind(HtmlContainer htmlCont)
 {
     this._htmlContainer = htmlCont;
     _isBinded           = htmlCont != null;
     this.ifonts         = htmlCont.GetTextService();// ((RootGraphic)htmlCont.RootCssBox.GetInternalRootGfx()).IFonts;
 }
Ejemplo n.º 11
0
 public void Bind(HtmlContainer htmlCont)
 {
     this._htmlContainer = htmlCont;
     _isBinded           = htmlCont != null;
 }
Ejemplo n.º 12
0
 public void Bind(HtmlContainer htmlCont)
 {
     this._htmlContainer = htmlCont;
     _isBinded           = htmlCont != null;
     this.ifonts         = ((RootGraphic)htmlCont.RootCssBox.RootGfx).IFonts;
 }
Ejemplo n.º 13
0
 public void Bind(HtmlContainer htmlCont, Canvas canvas)
 {
     this.htmlContainer = htmlCont;
     this.canvas        = canvas;
 }
Ejemplo n.º 14
0
 public void Unbind()
 {
     this._htmlContainer = null;
     this._isBinded = false;
 }
Ejemplo n.º 15
0
 public void Bind(HtmlContainer htmlCont)
 {
     this._htmlContainer = htmlCont;
     _isBinded = htmlCont != null;
 }
Ejemplo n.º 16
0
 public void Bind(HtmlContainer htmlCont, DrawBoard canvas)
 {
     this.htmlContainer = htmlCont;
     this.canvas        = canvas;
 }
Ejemplo n.º 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;
 }
Ejemplo n.º 18
0
 public void Bind(HtmlContainer htmlCont, Canvas canvas)
 {
     this.htmlContainer = htmlCont;
     this.canvas = canvas;
 }