os_table_row


A row within a table.

An os_table_row is a row of cells within an os_table , and is composed of two types of cells: os_table_header and os_table_data . A cell is inserted into an os_table_row through either the add() member functions or operator<< .

An os_table_row can specify the default horizontal and vertical alignment for the contents of its cells in a constructor or through the align() and valign() member functions. An individual cell can override these default alignment specifications.

Note that os_table_row , and all other table classes, support features proposed for HTML 3.0 and may not be supported by all browsers.

Declaration

#include <ospace/web/tablerow.h>
class os_table_row : public os_element_group

Enums

enum os_table_row::alignment
  {
  left,     // Aligns the cell contents horizontally against the left margin of the cell.
  center,   // Centers the cell contents horizontally between the left and right margins of the cell.
  right     // Aligns the cell contents horizontally against the right margin of the cell.
  };


enum os_table_row::valignment
  {
  top,      // Aligns the cell contents vertically against the top margin of the cell.
  middle,   // Centers the cell contents vertically between the top and bottom margins of the cell.
  bottom,   // Aligns the cell contents vertically against the bottom margin of the cell.
  baseline  // Aligns the cell contents vertically with the baseline of text in adjacent cells of the same row.
  };
	

Interface

Constructor
os_table_row()
Constructs an empty row.
Constructor
os_table_row( alignment align , valignment valign )
Constructs an empty row, with horizontal alignment align and vertical alignment valign .
<<
os_table_row& operator<<( const os_table_header&
table_header )
Inserts a copy of the table_header cell into the row and returns a reference to the table row.
<<
os_table_row& operator<<( const os_table_data& table_data )
Inserts a copy of the table_data cell into the row and returns a reference to the table row.
<<
os_table_row& operator<<( const os_element& element )
Inserts an os_table_data cell containing a copy of element into the row, and returns a reference to the table row.
<<
os_table_row& operator<<( const string& text )
Inserts an os_table_data cell containing an os_text element created from text into the row, and returns a reference to the table row.
add
os_element* add( const os_table_header& table_header )
Adds a copy of the table_header cell to the row and returns a pointer to the new cell.
add
os_element* add( const os_table_data& table_data )
Adds a copy of the table_data cell to the row and returns a pointer to the new cell.
add
/* virtual */ os_element* add( const os_element& element )
Adds an os_table_data cell containing a copy of element to the row, and returns a pointer to the new cell.
add
/* virtual */ os_element* add( const string& text )
Adds an os_table_data cell containing an os_text element created from text to the row, and returns a pointer to the new cell.
align
os_table_row& align( alignment align )
Sets the horizontal alignment to align and returns a reference to the table row.
align
int align() const
Returns the horizontal alignment, or os_element::align if not set.
clone
/* virtual */ os_element* clone() const
Returns a base class pointer to a heap-based deep copy of the table row.
print
/* virtual */ void print( ostream& os ) const
Prints the table row to os .
valign
os_table_row& valign( valignment valign )
Sets the vertical alignment to valign , and returns a reference to the table row.
valign
int valign() const
Returns the vertical alignment, or os_element::valign if not set.

Copyright©1994-2026 Recursion Software LLC
All Rights Reserved