scim::CommonLookupTable Class Reference
[Accessories]

A common lookup table class. More...

#include <scim_lookup_table.h>

Inherits scim::LookupTable.

List of all members.

Public Member Functions

 CommonLookupTable (int page_size=10)
 CommonLookupTable (int page_size, const std::vector< WideString > &labels)
 Constructor.
 ~CommonLookupTable ()
virtual WideString get_candidate (int index) const
 Get a candidate.
virtual AttributeList get_attributes (int index) const
 Get the attributes of a candidate.
virtual uint32 number_of_candidates () const
 Return the number of candidates in this table.
virtual void clear ()
 Clear the table.
bool append_candidate (const WideString &cand, const AttributeList &attrs=AttributeList())
 Append a candidate string into the table.
bool append_candidate (ucs4_t cand, const AttributeList &attrs=AttributeList())
 Append a candidate char into the table.


Detailed Description

A common lookup table class.

This class implements the LookupTable interface in a common way.


Constructor & Destructor Documentation

scim::CommonLookupTable::CommonLookupTable ( int  page_size = 10  ) 

scim::CommonLookupTable::CommonLookupTable ( int  page_size,
const std::vector< WideString > &  labels 
)

Constructor.

Parameters:
page_size - the maximum page size, can be set by set_page_size () later.
labels - the strings to label the candidates in one page.

scim::CommonLookupTable::~CommonLookupTable (  ) 


Member Function Documentation

virtual WideString scim::CommonLookupTable::get_candidate ( int  index  )  const [virtual]

Get a candidate.

Parameters:
index - the candidate index in the lookup table.
Returns:
the content of this candidate.

Implements scim::LookupTable.

virtual AttributeList scim::CommonLookupTable::get_attributes ( int  index  )  const [virtual]

Get the attributes of a candidate.

Parameters:
index - the index in the lookup table.
Returns:
the AttributeList object holding the attributes of this candidate.

Implements scim::LookupTable.

virtual uint32 scim::CommonLookupTable::number_of_candidates (  )  const [virtual]

Return the number of candidates in this table.

Returns:
the number of entries currently in this table.

Implements scim::LookupTable.

virtual void scim::CommonLookupTable::clear (  )  [virtual]

Clear the table.

Implements scim::LookupTable.

bool scim::CommonLookupTable::append_candidate ( const WideString cand,
const AttributeList attrs = AttributeList() 
)

Append a candidate string into the table.

Parameters:
cand - a candidate string to be added into the table.
attrs - the attributes to control the display effect of this entry. It can be omitted if no attribute.
Returns:
true if success.

bool scim::CommonLookupTable::append_candidate ( ucs4_t  cand,
const AttributeList attrs = AttributeList() 
)

Append a candidate char into the table.

Parameters:
cand - a candidate char to be added into the table.
attrs - the attributes to control the display effect of this entry. It can be omitted if no attribute.
Returns:
true if success.


The documentation for this class was generated from the following file:
Generated on Sat Jun 21 21:12:58 2008 for scim by  doxygen 1.4.7