os_directory_list


A directory list.

An os_directory_list is a list consisting of a collection of os_list_item objects. Within an os_directory_list , each os_list_item is typically a maximum of 20 characters in length.

An os_directory_list is a block-structuring page element that begins a new block on the page and typically arranges its items into a single column, one item per line, similar to an os_unordered_list . Some browsers precede each item with a bullet. Other browsers may arrange the items into multiple columns across the page, with each column typically 24 characters wide, thereby differing from an os_unordered_list .

Items are inserted into an os_directory_list through either the add() member functions or operator<< . An os_directory_list header can be specified in the constructor or through the header() member function. A compact rendering, reducing the vertical space between list items, can be specified in the constructor or through the spacing() member function.

Note that the HTML feature supported by os_directory_list is deprecated in HTML 3.0.

Declaration

#include <ospace/web/dirlst.h>
class os_directory_list : public os_element_group

Enums

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

Interface

Constructor
os_directory_list( space spacing )
Constructs an empty directory list with spacing s pacing (default not_compact ) and no header.
Constructor
os_directory_list( const os_element& header , space
spacing )
Constructs an empty directory list, with a copy of header as the list header and spacing spacing (default not_compact ).
Constructor
os_directory_list( const string& header , space spacing )
Constructs an empty directory list, with an os_text header created from header and spacing spacing (default not_compact ).
Constructor
os_directory_list( const os_directory_list& rhs )
Constructs a directory list that is a copy of rhs .
Destructor
/* virtual */ ~os_directory_list()
Destroys the directory list.
<<
/* virtual */ os_directory_list& operator<<( const os_element& element )
Inserts an os_list_item containing a copy of element , and returns a reference to the directory list.
<<
os_directory_list& operator<<( const os_list_item& list_item )
Inserts a copy of list_item and returns a reference to the directory list.
<<
/* virtual */ os_directory_list& operator<<( const string& text )
Inserts an os_list_item created from text and returns a reference to the directory list.
=
os_directory_list& operator=( const os_directory_list& rhs )
Replaces the directory list contents with a copy of rhs and returns a reference to the directory list.
add
os_element* add( const os_list_item& list_item )
Adds a copy of list_item to the directory list and returns a pointer to the new element.
add
/* virtual */ os_element* add( const os_element& element )
Adds to the directory list an os_list_item created from element , and returns a pointer to the new element.
add
/* virtual */ os_element* add( const string& text )
Adds to the directory list an os_list_item 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 directory list.
header
os_element* header() const
Returns a pointer to the list header, or 0 if not set.
header
os_directory_list& header( const string& header )
Sets the list header to an os_text element created from header , and returns a reference to the directory list.
header
os_directory_list& header( const os_element& header )
Sets the list header to a copy of header and returns a reference to the directory list.
print
/* virtual */ void print( ostream& os ) const
Prints the directory 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 directory list.
spacing
os_directory_list& spacing( space spacing )
Sets the spacing between list items to spacing , and returns a reference to the directory list.
spacing
int spacing() const
Returns the list item spacing, or os_directory_list::not_compact if not set.

Copyright©1994-2026 Recursion Software LLC
All Rights Reserved