os_glossary_list


A glossary list.

An os_glossary_list is a list of terms. The terms are defined as os_glossary_term objects, and their corresponding definitions are defined as os_glossary_definition objects.

An os_glossary_list is a block-structuring page element that begins a new block on the page. An os_glossary_list is typically rendered as two columns, with terms in a column flush with the left margin and definitions in a column to the right. The term column is typically one-third the width of the display.

Terms and definitions are inserted into the os_glossary_list through either the add() member functions or operator<< . A term is inserted first, followed by its definition. Consecutive terms can be inserted to correspond to a single definition. Consecutive definitions should not be inserted.

A header for an os_glossary_list can be specified in the constructor or through the header() member function. A compact rendering, reducing the vertical space between term definition pairs and possibly the width of the term column, can be specified in the constructor or through the spacing() member function.

Declaration

#include <ospace/web/gloslst.h>
class os_glossary_list : public os_element_group

Enums

enum os_glossary_list::space
  {
  not_compact,  // Renders the list full size.
  compact       // Renders the list with reduced space between the list items.
  };

Interface

Constructor
os_glossary_list( space spacing )
Constructs an empty glossary list with spacing spacing (default not_compact ).
Constructor
os_glossary_list( const os_element& header , space spacing )
Constructs an empty glossary list, with a copy of header as its header and spacing spacing (default not_compact ).
Constructor
os_glossary_list( const string& header , space spacing )
Constructs an empty glossary list, with an os_text header created from header and spacing spacing (default not_compact ).
Constructor
os_glossary_list( const os_glossary_list& rhs )
Constructs a glossary list that is a copy of rhs .
Destructor
/* virtual */ ~os_glossary_list()
Destroys the glossary list.
<<
os_glossary_list& operator<<( const os_glossary_definition& glossary_definition )
Inserts a copy of glossary_definition and returns a reference to the glossary list.
<<
os_glossary_list& operator<<( const os_glossary_term& glossary_term )
Inserts a copy of glossary_term and returns a reference to the glossary list.
<<
os_glossary_list& operator<<( const os_element& element )
Inserts an os_glossary_definition created from element and returns a reference to the glossary list.
<<
os_glossary_list& operator<<( const string& text )
Inserts an os_glossary_definition created from text and returns a reference to the glossary list.
=
os_glossary_list& operator=( const os_glossary_list& rhs )
Replaces the glossary list contents with a copy of rhs and returns a reference to the glossary list.
add
os_element* add( const os_glossary_term& glossary_term )
Adds a copy of glossary_term to the glossary list and returns a pointer to the new element.
add
os_element* add( const os_glossary_definition& glossary_definition )
Adds a copy of glossary_definition to the glossary list and returns a pointer to the new element.
add
/* virtual */ os_element* add( const os_element& element )
Adds an os_glossary_definition created from element to the glossary list, and returns a pointer to the new element.
add
/* virtual */ os_element* add( const string& text )
Adds to the glossary list an os_glossary_definition created from text , and returns a pointer to the new element.
clone
/* virtual */ os_element* clone() const
Returns a base class pointer to a heap-based deep copy of the glossary list.
header
os_glossary_list& header( const string& header )
Sets the header to an os_text element created from header and returns a reference to the glossary list.
header
os_element* header() const
Returns a pointer to the header, or 0 if not set.
header
os_glossary_list& header( const os_element& header )
Sets the header to a copy of header and returns a reference to the glossary list.
print
/* virtual */ void print( ostream& os ) const
Prints the glossary list to os .
report_constraint_violation

/* virtual */ void report_constraint_violation( const os_element& element , ostream& os ) const
Prints a constraint violation notice to os for element within a glossary list.
spacing
int spacing() const
Returns the spacing, or os_glossary_list::not_compact if not set.
spacing
os_glossary_list& spacing( space spacing )
Sets the spacing to spacing and returns a reference to the glossary list.

Copyright©1994-2026 Recursion Software LLC
All Rights Reserved