/// <summary> /// constructor /// </summary> internal DocumentOutputType(RegionTag aMasterTag) { masterTag = aMasterTag; parentHtml = aMasterTag.parentHtml; selection = new Selection(aMasterTag.parentHtml); outputBounds = new RectangleF(0, 0, 99999, 99999); }
/// <summary> /// Constructor /// </summary> public CurrentStateType(MiniHtml aMiniHtml, float aWidthLimit) { parentHtml = aMiniHtml; state = tagStatusType.Normal; endPosition = startPosition + aWidthLimit; origWidthLimit = aWidthLimit; stateChanged = false; InitState(); }
/// <summary> /// Parse Html from string /// </summary> public static MiniHtml FromString(string html, string css, Int32 width) { MiniHtml mh = new MiniHtml(); mh.widthLimit = width; mh.parser.Parse(html); if (css != "") { mh.parser.ParseCss(css); } return(mh); }
/// <summary> /// Parse BBCode from string /// </summary> public static MiniHtml FromBBCode(string bbCode, string css, Int32 width) { MiniHtml mh = new MiniHtml(); mh.ParseMode = parseMode.BBCode; mh.widthLimit = width; mh.parser.Parse(bbCode); if (css != "") { mh.parser.ParseCss(css); } return(mh); }
public static void DebugUnit() { //string beforeTag="", afterTag="", tagName="", tagVar=""; //readNextTag("<!-- xyz --><a href=\"xyz\"><b>", ref beforeTag, ref afterTag, ref tagName, ref tagVar); //readNextTag(afterTag, ref beforeTag, ref afterTag, ref tagName, ref tagVar); //Console.WriteLine(beforeTag); //Console.WriteLine(afterTag); //Console.WriteLine(tagName); //Console.WriteLine(tagVar); string Html = "<b>test</b>"; MiniHtml mh = new MiniHtml(); mh.parser.Parse((new StringReader(Html))); mh.masterTag.childTags.PrintItems(); }
public static Bitmap DebugUnit() { MiniHtml mh = MiniHtml.FromString("QzMiniHtml.Net (c) 2005-2006 Leung Yat Chun Joseph", 200); mh.documentOutput.Update(); Bitmap b = new Bitmap(mh.widthLimit, (Int32)(mh.documentOutput.Height())); ((GraphicsOutputType)(mh.documentOutput)).outputGraphics = Graphics.FromImage(b); ((GraphicsOutputType)(mh.documentOutput)).outputGraphics.FillRectangle(Brushes.Wheat, new RectangleF(0, 0, mh.widthLimit, mh.documentOutput.Height())); mh.documentOutput.Output(); mh.documentOutput.PrintItems(); //b.Save("MiniHtml.Debug.bmp"); return(b); }
public TextParaser(MiniHtml mh, QuickZip.MiniCss.MiniCss ms) : base(mh, ms) { }
/// <summary> /// constructor /// </summary> public MiniCss(QuickZip.MiniHtml.MiniHtml mh) : base() { styleList = new TagCssStyleDictionary(); parentHtml = mh; }
/// <summary> /// Parse Html from string /// </summary> public static MiniHtml FromString(string html, Int32 width) { return(MiniHtml.FromString(html, "", width)); }
public BBCodeParaser(MiniHtml mh, QuickZip.MiniCss.MiniCss ms) : base(mh, ms) { }
/// <summary> /// Constructor /// </summary> public CustomParaser(MiniHtml mh, QuickZip.MiniCss.MiniCss ms) { parentHtml = mh; parentCss = ms; }
public Int32 selectedLine, selectedChar; //Selected line and char if TextTag /// <summary> /// constructor /// </summary> public MiniHtmlCursor(MiniHtml mh) { parentHtml = mh; SetCursor(); }
/// <summary> /// Constructor /// </summary> public TextParaser(MiniHtml mh) : base(mh) { }
public InternalParaser(MiniHtml mh, QuickZip.MiniCss.MiniCss ms) : base(mh, ms) { }
/// <summary> /// Constructor /// </summary> public InternalParaser(MiniHtml mh) : base(mh) { }
/// <summary> /// Constructor /// </summary> public CustomParaser(QuickZip.MiniCss.MiniCss ms) { parentHtml = null; parentCss = ms; }
/// <summary> /// Constructor /// </summary> public CustomParaser(MiniHtml mh) { parentHtml = mh; parentCss = new QuickZip.MiniCss.MiniCss(mh); }
public MiniHtmlCursor startCursor, endCursor; //Start Cursor and End Cursor /// <summary> /// Constructor /// </summary> public Selection(MiniHtml mh) { startCursor = new MiniHtmlCursor(mh); endCursor = new MiniHtmlCursor(mh); parentHtml = mh; }
/// <summary> /// Constructor /// </summary> public BBCodeParaser(MiniHtml mh) : base(mh) { }