S60 3rd Edition SDK for Symbian OS
Example Applications Guide

LandmarksListBoxModel.h

00001 /*
00002 * ==============================================================================
00003 *  Name        : LandmarksListBoxModel.h
00004 *  Part of     : Landmark Reference Application
00005 *  Interface   : Application Engine API
00006 *  Description : See class description below
00007 *  Version     : 1.0
00008 *
00009 *  Copyright (c) 2004-2006 Nokia Corporation.
00010 *  This material, including documentation and any related 
00011 *  computer programs, is protected by copyright controlled by 
00012 *  Nokia Corporation.
00013 * ==============================================================================
00014 */
00015 
00016 #ifndef __LANDMARKS_LIST_BOX_MODEL_H__
00017 #define __LANDMARKS_LIST_BOX_MODEL_H__
00018 
00019 // INCLUDES
00020 #include <aknutils.h>
00021 
00022 // CLASS DECLARATION
00023 
00024 /**
00025 *  CLandmarksListBoxModel bypasses the default filtering algorithm provided by 
00026 *  CAknFilteredTextListBoxModel. The filtering responsibility is forwarded to 
00027 *  the CCoeControl instance owning the list box. That instance must update the
00028 *  model when the filter has been modified.
00029 */
00030 class CLandmarksListBoxModel : public CAknFilteredTextListBoxModel
00031     {
00032     public: // from CAknFilteredTextListBoxModel
00033 
00034         /**
00035         * Gets an array of strings to be displayed in the listbox for 
00036         * incremental matching of typed characters. This array always contains 
00037         * the total number of items rather than a subset filtered out from the 
00038         * model.
00039         *
00040         * @return A text array for matching.
00041         */
00042         const MDesCArray* MatchableTextArray() const;
00043 
00044         /**
00045         * Gets the number of text items in this list box model. This number is 
00046         * always the total number of items in the model rather than a subset 
00047         * filtered out from the model
00048         *
00049         * @return The number of text items in this list box model
00050         */
00051         TInt NumberOfItems() const;
00052 
00053         /**
00054         * Gets the text to be displayed in the list box control for a specific 
00055         * item.
00056         *
00057         * @param aItemIndex Index of an item
00058         * @return Text string to be displayed
00059         */
00060         TPtrC ItemText(TInt aItemIndex) const;
00061 
00062     };
00063 
00064 #endif // __LANDMARKS_LIST_BOX_MODEL_H__
00065 
00066 // End of File
00067 

© Nokia 2006

Back to top