os_division


A logical group within a page.

An os_division marks a block of elements as a logical group and terminates a preceding block-structuring page element like os_paragraph . An os_division specifies generic properties for the entire block and more formally organizes page content.

Rather than containing text or images directly, an os_division is a block-structuring element, similar to os_blockquote , that contains other block-structuring elements and elements like lists, tables, and forms.

Elements are inserted into an os_division through either the add() member function or operator<< . Alignment of the elements within an os_division can be specified in a constructor or through the align() member function.

Note that os_division supports a feature proposed for HTML 3.0 and may not be supported by all browsers.

Declaration

#include <ospace/web/division.h>
class os_division : public os_element_group

Enums

enum os_division::alignment
  {
  left,    // Aligns the division's contents along the left margin.
  center,  // Centers the the division's contents between the left and right margins.
  right    // Aligns the division's contents along the right margin.
  };
	

Interface

Constructor
os_division()
Constructs an empty division.
Constructor
os_division( alignment align )
Constructs an empty division with alignment align .
align
os_division& align( alignment align )
Sets the alignment to align and returns a reference to the division.
align
int align() const
Returns the alignment, 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 division.

Copyright©1994-2026 Recursion Software LLC
All Rights Reserved