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); }
public void UnBind() { this.htmlContainer = null; if (dicStripPool != null) dicStripPool.Clear(); if (listStripPool != null) listStripPool.Clear(); readyDicStrip.Clear(); readyListStrip.Clear(); totalMarginLeftAndRight = 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); } }
public void Bind(HtmlContainer htmlCont) { this.htmlContainer = htmlCont; if (episodeId == ushort.MaxValue - 1) { //reset totalLayoutIdEpisode = 1; episodeId = totalLayoutIdEpisode++; } }
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; }
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); }
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); }
internal void NotifyHtmlContainerUpdate(HtmlContainer htmlCont) { if (htmlContainerUpdateHandler != null) { htmlContainerUpdateHandler(htmlCont); } }
public void Unbind() { this._htmlContainer = null; this._isBinded = false; }
public void Bind(HtmlContainer htmlCont) { this._htmlContainer = htmlCont; _isBinded = htmlCont != null; this.ifonts = htmlCont.GetTextService();// ((RootGraphic)htmlCont.RootCssBox.GetInternalRootGfx()).IFonts; }
public void Bind(HtmlContainer htmlCont) { this._htmlContainer = htmlCont; _isBinded = htmlCont != null; }
public void Bind(HtmlContainer htmlCont) { this._htmlContainer = htmlCont; _isBinded = htmlCont != null; this.ifonts = ((RootGraphic)htmlCont.RootCssBox.RootGfx).IFonts; }
public void Bind(HtmlContainer htmlCont, Canvas canvas) { this.htmlContainer = htmlCont; this.canvas = canvas; }
public void Bind(HtmlContainer htmlCont, DrawBoard canvas) { this.htmlContainer = htmlCont; this.canvas = canvas; }
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; }