os_body


Top-level container of page content.

An os_body is the portion of an os_page rendered by a browser. An os_body and an os_head comprise an os_page. Refer to the " os_head " section for details on this class.

An os_page has an os_body by containment, making it unnecessary in most cases to create an os_body explicitly. Most functions in os_body are also found in os_page . The os_page class simply forwards the functions to the contained os_body for convenience.

Elements are inserted into an os_body through either the add() member function or operator<< . The elements within an os_body , such as os_paragraph and os_heading , form the contents of the page. A background image for the body can be specified either in the constructor or through the background() member function.

Declaration

#include <ospace/web/body.h>
class os_body : public os_element_group

Interface

Constructor
os_body()
Constructs an empty body with no background image.
Constructor
os_body( const string& background )
Constructs an empty body with background image URL background .
background
os_body& background( const string& background )
Sets the background image URL to background and returns a reference to the body.
background
string background() const
Returns the background image URL, or the empty string if not set.
clone
/* virtual */ os_element* clone() const
Returns a base class pointer to a heap-based deep copy of the body.
print
/* virtual */ void print( ostream& os ) const
Prints the body to os .

Copyright©1994-2026 Recursion Software LLC
All Rights Reserved