Interface for widgets that can generate HTML output
|
All widgets that implement Womb.Gtk.IHtmlizable use some css tags you can set to customize output.
Tag | Description |
---|---|
table#womb | id to use for formatting a womb-generated table |
wombcell | style for text within a table cell |
wombcolheader | style for text within a column header |
Example: generate a dump from a Womb.Gtk.AtomTab with custom colours and fonts:
C# Example |
using System.Text; using Womb.Gtk; void DumpHtml (IHtmlizable widget) { string css_chunk; StringBuilder html; // Construct some random css tags to customize our output css_chunk = ".wombcell { font-family:Verdana,Arial,Helvetica; padding:2px; font-size:12px; color:#616161; }" + "table#womb {background-color:#FFFFFF; padding:4px; }"; // Create a StringBuilder to assemble the html output html = new StringBuilder (); // Construct an html page by adding tags, css from our stylesheet and // the html output from the widget html.Append ("<html><head><style>" + css_chunk + "</style></head>"); html.Append ("<body>" + widget.ToHtml () + "</body></html>"); Console.WriteLine (html.ToString ()); } |
Generate HTML output