|
htmlBreak
Line break class | [Previous] [Main] [Next] |
| htmlBreak encapsulates the <BR> tag. It inserts a line break in text. No extra space is added before the new line. If text is wrapping around an element (such as an image) the ClearMargin() method can be used to force the text to continue at the next clear line (i.e., it stops wrapping around the element).
| |
|
| |
| #include <dcmicro/htmlpp/break.h>
| |
|
| |
|
| |
| htmlParagraph, htmlNoBreak
| |
| Text Formatting Classes in the User's Guide
| |
|
| |
| typedef enum {
| |
| clear_default = 0,
| |
| clear_left, // continue on next line with clear LEFT margin
| |
| clear_right, // continue on next line withclear RIGHT margin
| |
| clear_all // continue on next line with BOTH margins clear
| |
| } MarginType ;
| |
|
| |
| htmlBreak()
| |
| Constructs an empty object.
| |
|
| |
| htmlBreak( MarginType clear_margin )
| |
| Constructs an object, using the specified margin type.
| |
|
| |
| virtual ~htmlBreak()
| |
| Destroys the object.
| |
|
| |
| ClearMargin | htmlBreak& ClearMargin( MarginType clear_margin )
| |
| Set margin for clearing to the specified type, preventing text from wrapping around one or both sides of an element such as an image.
| |
|
| |
|
|
| |
| ClearMargin | MarginType ClearMargin() const
| |
| Return the current margin type.
| |
|
| |
| void Print( ostream& os ) const
| ||
| Output the object to os.
| |
|
| |
| Clone | htmlObject FAR * Clone() const
| |
| Returns a base-class pointer to a deep copy of the object.
| |
|
| |
|
| |
| #include <stdio.h>
| |
| #include <stdlib.h>
| |
| #include <dcmicro/htmlpp/htmlpp.h>
| |
|
| |
| int main( void )
| |
| {
| |
| htmlCgi server ;
| |
| htmlPage page( "html++ example application" ) ;
| |
|
| |
| htmlParagraph p ;
| |
| p << "Paragraph text has vertical space below it." ;
| |
|
| |
| page << p
| |
| << "Breaks begin new lines, but without"
| |
| << htmlBreak()
| |
| << "additional vertical space."
| |
| << htmlBreak() ;
| |
|
| |
| server << page ;
| |
| return 0 ;
| |
| }
| |
|
| |
|
| |
| Content-Type: text/html
| |
| <HTML>
| |
| <HEAD>
| |
| <TITLE>html++ example application</TITLE>
| |
| </HEAD>
| |
| <BODY>
| |
| <P>Paragraph text has vertical space below it.</P>
| |
| Breaks begin new lines, but without<BR>
| |
| additional vertical space.<BR>
| |
| </BODY>
| |
| </HTML>
| |
|
| |
| |
