os_noframes


An alternate page body to be displayed by browsers that do not support frames.

An os_noframes can be placed within an os_frameset to define alternate content for browsers that do not support frames. An os_noframes has an os_body by containment to hold the alternate content. For convenience, os_noframes provides forwarding functions for most of the interface to os_body . An os_noframes and its os_body are ignored by a browser that is capable of rendering frames.

It is unnecessary in most cases to create an os_noframes explicitly. The add_noframes() member functions in both os_frameset and os_framed_page implicitly create an os_noframes within the os_frameset , if one does not already exist.

Typically, it is only useful to define an os_noframes for the top-level frameset of an os_framed_page .

Elements are inserted into the os_body of an os_noframes through either the add() member function or operator<< . A background image for the os_body of a no_frames can be specified either in the constructor or through the background() member function.

The os_body can be accessed directly through the body() member function. The find, remove, and replace member functions search the encapsulated os_body for elements matching a specified key.

Declaration

#include <ospace/web/noframes.h>
class os_noframes : public os_element

Interface

Constructor
os_noframes()
Constructs an empty no-frames element.
Constructor
os_noframes( const string& background )
Constructs an empty no-frames element with background image URL background .
Constructor
os_noframes( const os_body& body )
Constructs a no-frames element and places a copy of body into the contents .
Constructor
os_noframes( const os_noframes& rhs )
Constructs a no-frames element that is a copy of rhs .
Destructor
/* virtual */ ~os_noframes()
Destroys the no-frames element.
<<
os_noframes& operator<<( const os_element& element )
Inserts a copy of element into the no-frames element and returns a reference to the no-frames element.
<<
os_noframes& operator<<( const string& text )
Inserts an os_text element created from text into the no-frames element, and returns a reference to the no-frames element.
=
os_noframes& operator=( const os_body& rhs )
Replaces the body of the no-frames body with a copy of rhs .
=
os_noframes& operator=( const os_noframes& rhs )
Replaces the contents of the no-frames element with a copy of rhs .
add
os_element* add( const string& text )
Adds an os_text element created from text to the no-frames element, and returns a pointer to the new element.
add
os_element* add( const os_element& element )
Adds a copy of element to the no-frames element and returns a reference to the new element.
background
os_noframes& background( const string& background )
Sets the background image URL to background and returns a reference to the no-frames element.
background
string background() const
Returns the background image URL.
body
os_body& body()
Returns a reference to the body of the no-frames element.
clone
/* virtual */ os_element* clone() const
Returns a base class pointer to a heap-based deep copy of the no-frames element.
find_all
/* virtual */ vector<os_element*> find_all( const string& key , os_element::search_depth depth )
Returns a list of pointers to the elements with key key found on a depth (default os_element::shallow) search of the no-frames body. Returns an empty list if no matching elements are found.
find_first
/* virtual */ os_element* find_first( const string& key , os_element::search_depth depth )
Returns a pointer to the first element with key key found on a depth (default os_element::shallow) search of the no-frames body. Returns 0 if no matching element is found.
print
/* virtual */ void print( ostream& os ) const
Prints the no-frames element to os .
remove_all
/* virtual */ int remove_all( const string& key , os_element::search_depth depth )
Removes all elements with key key found on depth (default os_element::shallow) search of the no-frames body, and returns the total number of elements removed. Returns 0 if no matching elements are found.
remove_first
/* virtual */ bool remove_first( const string& key , os_element::search_depth depth )
Removes the first element with key key found on depth (default os_element::shallow) search of the no-frames body, and returns true . Returns false if no matching element is found.
replace_all
/* virtual */ int replace_all( const string& key , const os_element& replacement , os_element::search_depth depth )
Replaces, with replacement , all elements with key key found on depth (default os_element::shallow) search of the no-frames body, and returns the total number of elements replaced. Returns 0 if no matching elements are found.
replace_first
/* virtual */ bool replace_first( const string& key , const os_element& replacement , os_element::search_depth depth )
Replaces, with replacement , the first element with key key found on depth (default os_element::shallow) search of the no-frames body, and returns true . Returns false if no matching element is found.

Copyright©1994-2026 Recursion Software LLC
All Rights Reserved