Wt examples 3.1.10
Public Member Functions
ContactSuggestions Class Reference

A suggestion popup suggesting contacts from an addressbook. More...

#include <ContactSuggestions.h>

Inheritance diagram for ContactSuggestions:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 ContactSuggestions (WContainerWidget *parent=0)
 Create a new ContactSuggestions popup.
void setAddressBook (const std::vector< Contact > &contacts)
 Set the address book.

Detailed Description

A suggestion popup suggesting contacts from an addressbook.

This popup provides suggestions from a list of contact, by matching parts of the name or email adress with the current value being edited. It also supports editing a list of email addresses.

The popup is only available when JavaScript is available, and is implemented entirely on the client-side.

Definition at line 32 of file ContactSuggestions.h.


Constructor & Destructor Documentation

ContactSuggestions::ContactSuggestions ( WContainerWidget parent = 0)

Create a new ContactSuggestions popup.

Definition at line 24 of file ContactSuggestions.C.

  : WSuggestionPopup(WSuggestionPopup::generateMatcherJS(contactOptions),
                     WSuggestionPopup::generateReplacerJS(contactOptions),
                     parent)
{ }

Member Function Documentation

void ContactSuggestions::setAddressBook ( const std::vector< Contact > &  contacts)

Set the address book.

Definition at line 30 of file ContactSuggestions.C.

{
  clearSuggestions();

  for (unsigned i = 0; i < contacts.size(); ++i)
    addSuggestion(contacts[i].formatted(), contacts[i].formatted());
}

The documentation for this class was generated from the following files:

Generated on Wed Jul 27 2011 for the C++ Web Toolkit (Wt) by doxygen 1.7.4