locationlandmarksrefappfors60/Inc/LandmarksListBoxModel.h
branchRCL_3
changeset 17 1fc85118c3ae
parent 16 8173571d354e
child 18 870918037e16
equal deleted inserted replaced
16:8173571d354e 17:1fc85118c3ae
     1 /*
       
     2 * Copyright (c) 2004-2005 Nokia Corporation and/or its subsidiary(-ies). 
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  
       
    15 *     See class description below
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 #ifndef __LANDMARKS_LIST_BOX_MODEL_H__
       
    21 #define __LANDMARKS_LIST_BOX_MODEL_H__
       
    22 
       
    23 
       
    24 #include <AknUtils.h>
       
    25 
       
    26 
       
    27 
       
    28 /**
       
    29 *  CLandmarksListBoxModel bypasses the default filtering algorithm provided by 
       
    30 *  CAknFilteredTextListBoxModel. The filtering responsibility is forwarded to 
       
    31 *  the CCoeControl instance owning the list box. That instance must update the
       
    32 *  model when the filter has been modified.
       
    33 */
       
    34 class CLandmarksListBoxModel : public CAknFilteredTextListBoxModel
       
    35     {
       
    36     public: // from CAknFilteredTextListBoxModel
       
    37 
       
    38         /**
       
    39         * Gets an array of strings to be displayed in the listbox for 
       
    40         * incremental matching of typed characters. This array always contains 
       
    41         * the total number of items rather than a subset filtered out from the 
       
    42         * model.
       
    43         *
       
    44         * @return A text array for matching.
       
    45         */
       
    46         const MDesCArray* MatchableTextArray() const;
       
    47 
       
    48         /**
       
    49         * Gets the number of text items in this list box model. This number is 
       
    50         * always the total number of items in the model rather than a subset 
       
    51         * filtered out from the model
       
    52         *
       
    53         * @return The number of text items in this list box model
       
    54         */
       
    55         TInt NumberOfItems() const;
       
    56 
       
    57         /**
       
    58         * Gets the text to be displayed in the list box control for a specific 
       
    59         * item.
       
    60         *
       
    61         * @param aItemIndex Index of an item
       
    62         * @return Text string to be displayed
       
    63         */
       
    64         TPtrC ItemText(TInt aItemIndex) const;
       
    65 
       
    66     };
       
    67 
       
    68 #endif // __LANDMARKS_LIST_BOX_MODEL_H__
       
    69