htmlNoBreak
Non-wrapping text class
[Previous] [Main] [Next]


Description
htmlNoBreak encapsulates the <NOBR></NOBR> tags. It is derived from the htmlText class, and is used to output text lines that will not wrap to the next line. It is useful for words or phrases that must be kept together on one line. Note that if the text is longer than the display area of the browser, the user will need to scroll to view the text.  
 
Declaration
#include <dcmicro/htmlpp/nobreak.h>  
 
Hierarchy
htmlnobreak.gif  
 
See Also
htmlText, htmlLiteral  
 
Related Constants/Definitions
None.  
 
Constructors
htmlNoBreak()  
Constructs an empty object.  
 
htmlNoBreak( const String& text )  
Constructs an object, inserting the string text into it.  
 
htmlNoBreak( const htmlNoBreak& rhs )  
Copy constructor.  
 
Destructors
virtual ~htmlNoBreak()  
Destroys the object.  
 
Member Methods
ClonehtmlObject FAR * Clone() const  
Returns a base-class pointer to a deep copy of the object.  
 
Example One
 
#include <stdio.h>  
#include <stdlib.h>  
#include <dcmicro/htmlpp/htmlpp.h>  
 
int main( void )  
{  
   htmlCgi   server ;  
   htmlPage  page( "html++ example application" ) ;  
 
   htmlText    regular_text ;  
   regular_text << "This is regular text. As words "  
       "reach the right side of the display, they "  
       "are automatically wrapped to the beginning "  
       "of the next line." ;  
 
   htmlNoBreak nobreak_text ;  
   nobreak_text << "This text does not wrap to the "  
       "next line. As words approach the right side "  
       "of the display, they disappear from view "  
       "until the user scrolls the display." ;  
 
   page << regular_text   
        << htmlParagraph()  
        << nobreak_text ;  
 
   server << page ;  
   return 0 ;  
}  
 
Program Output
 
Content-Type: text/html  
<HTML>  
<HEAD>  
<TITLE>html++ example application</TITLE>  
</HEAD>  
<BODY>  
This is regular text. As words reach the right side of the display, they are automatically wrapped to the beginning of the next line.<P></P>  
<NOBR>This text does not wrap to the next line. As words approach the right side of the display, they disappear from view until the user scrolls the display.</NOBR>  
</BODY>  
</HTML>  
 
 
nobreak.gif  



©1998 DC Micro Development. All rights reserved.
No portion of this document may be c opied or reproduced without expressed written consent.
html++ is a trademark of DC Micro Development.