|
htmlCode
Code text class | [Previous] [Main] [Next] |
| htmlCode encapsulates the <CODE></CODE> tags. It is used to render regions of text, such as source code listings, in a monospaced font.
| |
|
| |
| #include <dcmicro/htmlpp/styles.h>
| |
|
| |
| |
|
| |
| Text Formatting Classes in the User's Guide
| |
|
| |
| None.
| |
|
| |
| htmlCode()
| |
| Constructs an empty object.
| |
|
| |
| htmlCode( const htmlObject& element )
| |
| Constructs an object, inserting element into it.
| |
|
| |
| htmlCode( const String& text )
| |
| Constructs an object, inserting the string text into it.
| |
|
| |
| virtual ~htmlCode()
| |
| Destroys the object.
| |
|
| |
|
| |
| #include <stdio.h>
| |
| #include <stdlib.h>
| |
| #include <dcmicro/htmlpp/htmlpp.h>
| |
|
| |
| int main( void )
| |
| {
| |
| htmlCgi server ;
| |
| htmlPage page( "html++ example application" ) ;
| |
|
| |
| htmlBreak br ;
| |
| htmlParagraph p ;
| |
| p << "line 1" << br
| |
| << "line 2" << br
| |
| << "abcdefghijklmnopqrstuvwxyz" ;
| |
|
| |
| page << htmlCode( p ) ;
| |
|
| |
| server << page ;
| |
| return 0 ;
| |
| }
| |
|
| |
|
| |
| Content-Type: text/html
| |
| <HTML>
| |
| <HEAD>
| |
| <TITLE>html++ example application</TITLE>
| |
| </HEAD>
| |
| <BODY>
| |
| <CODE><P>line1<BR>
| |
| line2<BR>
| |
| abcdefghijklmnopqrstuvwxyz</P>
| |
| </CODE>
| |
| </BODY>
| |
| </HTML>
| |
|
| |
| |
