Class PageComponent.

Inherits EventHandler. Inherited by AddView, ArchiveMailbox, ArchiveMailboxes, ArchiveMessage, ArchiveSearch, ArchiveThread, EditView, Error301, Error404, FormMail, LoginForm, MailboxList, SearchBox, Sendmail, ViewList and WebmailIndex.

A PageComponent has a list of FrontMatter objects that it requires, and, once it's done(), contents() returns the text of the component.

PageComponent::PageComponent( const String & divClass )

Creates a new PageComponent with the div class name divClass.

void PageComponent::addFrontMatter( FrontMatter * fm )

Adds fm to the list of FrontMatter objects for this component.

static String PageComponent::address( Address * a )

Returns an HTML representation of a.

static String PageComponent::address( const UString & a )

Returns an HTML representation of a, assuming that a is really an address or something which reminds the user of an address (such as an alias).

String PageComponent::contents() const

Returns the contents of this component as an HTML-quoted string. The return value is meaningful only if done() is true.

String PageComponent::divClass() const

Returns the div class name for this component, as set in the call to the constructor.

bool PageComponent::done() const

Returns true if this component has finished assembling its contents(), and false otherwise.

List<FrontMatter> * PageComponent::frontMatter() const

Returns a non-zero pointer to the list of FrontMatter objects that this component requires.

WebPage * PageComponent::page() const

Returns a pointer to this component's WebPage, which will be 0 until the component has been added to a WebPage.

static String PageComponent::quoted( const String & s )

Returns an HTML-quoted version of s.

static String PageComponent::quoted( const UString & u )

Returns an HTML-quoted version of u.

void PageComponent::setContents( const String & s )

Sets the contents of this component to s, and signal the WebPage that owns this component of its completion. After this call, done() will return true, and contents() will return s. This function is meant for use by subclasses.

void PageComponent::setPage( WebPage * page )

Informs this component that it is being used in page.

void PageComponent::setStatus( uint status )

Sets the numeric HTTP status for this component to status.

uint PageComponent::status() const

Returns a numeric HTTP status appropriate to this component. The default value is 200.

uint PageComponent::uniqueNumber()

A wrapper around WebPage::uniqueNumber(), so calling it is less work.

This web page based on source code belonging to Oryx Mail Systems GmbH. All rights reserved.