os_break


A line break.

An os_break is a line break. When an os_break is inserted into a block-structuring page element, like os_paragraph or os_address, the current line terminates at the point the os_break occurs. The next element in the block begins on a new line, which by default is immediately beneath the terminated line.

If text flows beside an image, it may be desirable to specify placement for the element following the os_break. For example, placement can be specified as the next line beside the image, or on a line that is flush with the left, right, or both margins. The clear margin for the element following the os_break can be specified in the constructor or through the clear() member function. Note that the specification of a clear margin supports a feature proposed for HTML 3.0 and may not be supported by all browsers.

Declaration

#include <ospace/web/break.h>
class os_break : public os_element

Enums

enum os_break::clear_margin
  {
  left,   // Continues on the next line whose left margin is clear.
  right,  // Continues on the next line whose right margin is clear.
  all     // Continues on the next line where both margins are clear.
  };

Interface

Constructor
os_break()
Constructs a break, without setting the clear margin, for text that follows the line break.
Constructor
os_break( clear_margin margin )
Constructs a break with the clear margin for text that follows the line break of margin .
clear
os_break& clear( clear_margin margin )
Sets the clear margin to margin for text that follows the line break, and returns a reference to the break.
clear
int clear() const
Returns the clear margin for text that follows the line break, or os_element::use_default if not set.
clone
/* virtual */ os_element* clone() const
Returns a base class pointer to a heap-based deep copy of the break.
print
/* virtual */ void print( ostream& os ) const
Prints the break to os .

Copyright©1994-2026 Recursion Software LLC
All Rights Reserved