Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ MT-multithreading and servers » Htmls / HtamlTag class and table generation
Re: Htmls / HtamlTag class and table generation [message #34940 is a reply to message #34936] Sun, 18 December 2011 21:54 Go to previous messageGo to previous message
dolik.rce is currently offline  dolik.rce
Messages: 1789
Registered: August 2008
Location: Czech Republic
Ultimate Contributor

Hi Luigi,

Something like this?
#include <Web/Web.h>

CONSOLE_APP_MAIN{
	Htmls html;
	html << HtmlTable().Width(200) / (
		HtmlRow() / (
			HtmlTag("th") / "column 1"
			+ HtmlTag("th") / "column 2" 
		) + 
		HtmlRow() / (
			HtmlCell() / HtmlLink("http://ultimatepp.org") / "A1"
			+ HtmlCell() / "A2"
		) +
		HtmlRow() / (
			HtmlCell() / "B1"
			+ HtmlCell() / Htmls("<i>some</i> <b>html</b> blob")
		)
	);
	DUMP(html);
}

It seems messy, but when all the operation are performed in cycles and functions it is not that bad Smile The rule of thumb is that '+' adds tag on the same level and '/' places tag inside.

Best regards,
Honza
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Need a suggestion about mouse processing inside threads
Next Topic: Deadlock - what LeaveGMutexAll does?
Goto Forum:
  


Current Time: Mon Jun 10 11:17:28 CEST 2024

Total time taken to generate the page: 0.01865 seconds