|
Unordered Lists
| [Previous] [Main] [Next] |
|
| |
| An unordered list is a list in which the list items are preceded by a bullet symbol instead of a sequential number.
| |
|
| |
| To create an unordered list, specify unordered_list as the first argument to the htmlList constructor, or use the Type() method.
| |
|
| |
| Several options exist for specifying the bullet style used for the list:
| |
|
| |
| The bullet style can be specified as the second argument in the constructor, or via the Numbering() method.
| |
|
| |
| As with ordered lists, unordered lists can be also nested. To create a sublist with it's own set of bullets, simply instantiate another htmlList object, populate it with the list items of interest, then insert the entire list into the parent list.
| |
|
| |
|
| |
| #include <stdio.h>
| |
| #include <stdlib.h>
| |
| #include <dcmicro/htmlpp/htmlpp.h>
| |
|
| |
| int main( void )
| |
| {
| |
| htmlCgi server ;
| |
| htmlPage page( "html++ example application" ) ;
| |
|
| |
| // Create the sublist of lossless algorithms
| |
| htmlList lossless( unordered_list, bullet_square ) ;
| |
| lossless << "Crusher"
| |
| << "LZ77"
| |
| << "LZW"
| |
| << "Huffman" ;
| |
|
| |
| // Create the sublist of lossy algorithms
| |
| htmlList lossy( unordered_list, bullet_square ) ;
| |
| lossy << "JPEG"
| |
| << "Fractal"
| |
| << "Wavelet" ;
| |
|
| |
| // Create the main list of topics and subtopics
| |
| htmlList topics( unordered_list, bullet_disc ) ;
| |
| topics << "Lossless algorithms"
| |
| << lossless
| |
| << "Lossy algorithms"
| |
| << lossy ;
| |
|
| |
| // Insert the entire list, along with a heading,
| |
| // into the page.
| |
| page << htmlHeading(2, "Types of Compression Alogithms" )
| |
| << topics ;
| |
|
| |
| server << page ;
| |
| return 0 ;
| |
| }
| |
|
| |
|
| |
| Content-Type: text/html
| |
| <HTML>
| |
| <HEAD>
| |
| <TITLE>html++ example application</TITLE>
| |
| </HEAD>
| |
| <BODY>
| |
| <H2>Types of Compression Alogithms</H2>
| |
| <UL TYPE="DISC"><LI>Lossless algorithms</LI>
| |
| <UL TYPE="SQUARE"><LI>Crusher</LI>
| |
| <LI>LZ77</LI>
| |
| <LI>LZW</LI>
| |
| <LI>Huffman</LI>
| |
| </UL>
| |
| <LI>Lossy algorithms</LI>
| |
| <UL TYPE="SQUARE"><LI>JPEG</LI>
| |
| <LI>Fractal</LI>
| |
| <LI>Wavelet</LI>
| |
| </UL>
| |
| </UL>
| |
| </BODY>
| |
| </HTML>
| |
|
| |
|
| |
