epoc32/include/mw/eiktxlbm.h
author William Roberts <williamr@symbian.org>
Wed, 31 Mar 2010 12:33:34 +0100
branchSymbian3
changeset 4 837f303aceeb
parent 2 2fe1408b6811
permissions -rw-r--r--
Current Symbian^3 public API header files (from PDK 3.0.h)
This is the epoc32/include tree with the "platform" subtrees removed, and
all but a selected few mbg and rsg files removed.
williamr@2
     1
/*
williamr@2
     2
* Copyright (c) 1997-1999 Nokia Corporation and/or its subsidiary(-ies).
williamr@2
     3
* All rights reserved.
williamr@2
     4
* This component and the accompanying materials are made available
williamr@4
     5
* under the terms of "Eclipse Public License v1.0"
williamr@2
     6
* which accompanies this distribution, and is available
williamr@4
     7
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
williamr@2
     8
*
williamr@2
     9
* Initial Contributors:
williamr@2
    10
* Nokia Corporation - initial contribution.
williamr@2
    11
*
williamr@2
    12
* Contributors:
williamr@2
    13
*
williamr@2
    14
* Description:
williamr@2
    15
*
williamr@2
    16
*/
williamr@2
    17
williamr@2
    18
williamr@2
    19
williamr@2
    20
#if !defined(__EIKTXLBM_H__)
williamr@2
    21
#define __EIKTXLBM_H__  
williamr@2
    22
williamr@2
    23
#if !defined(__EIKLBM_H__)
williamr@2
    24
#include <eiklbm.h>
williamr@2
    25
#endif
williamr@2
    26
williamr@2
    27
/**
williamr@2
    28
* Text list box model.
williamr@2
    29
*/
williamr@2
    30
class CTextListBoxModel : public CBase, public MTextListBoxModel
williamr@2
    31
    {
williamr@2
    32
    public:
williamr@2
    33
        /**
williamr@2
    34
        * Default constructor.
williamr@2
    35
        */
williamr@2
    36
        IMPORT_C CTextListBoxModel();
williamr@2
    37
williamr@2
    38
        /**
williamr@2
    39
        * destructor
williamr@2
    40
        */
williamr@2
    41
        IMPORT_C virtual ~CTextListBoxModel();
williamr@2
    42
williamr@2
    43
        /**
williamr@2
    44
        * Gets the number of text items in this list box model.
williamr@2
    45
        * @return The number of text items.
williamr@2
    46
        */
williamr@2
    47
        IMPORT_C virtual TInt NumberOfItems() const;
williamr@2
    48
williamr@2
    49
        /**
williamr@2
    50
        * Gets an array of strings for incremental matching of
williamr@2
    51
        * typed characters. For the text list box model, these
williamr@2
    52
        * strings are those that are displayed (see ItemText()).
williamr@2
    53
        *
williamr@2
    54
        * @return A text array for matching.
williamr@2
    55
        */
williamr@2
    56
        IMPORT_C virtual const MDesCArray* MatchableTextArray() const;
williamr@2
    57
williamr@2
    58
        /**
williamr@2
    59
        * Gets the text to be displayed in the list box control
williamr@2
    60
        * for the specified item.
williamr@2
    61
        *
williamr@2
    62
        * @param aItemIndex Index of an item. 
williamr@2
    63
        * @return Text string to be displayed. 
williamr@2
    64
        */
williamr@2
    65
        IMPORT_C virtual TPtrC ItemText( TInt aItemIndex ) const;
williamr@2
    66
williamr@2
    67
        /**
williamr@2
    68
        * Second-phase constructor.
williamr@2
    69
        *
williamr@2
    70
        * This function completes construction of a
williamr@2
    71
        * default-constructed CTextListBoxModel, initialising any
williamr@2
    72
        * members which are stored on the heap. Whether ownership of
williamr@2
    73
        * the array is taken depends on the value of the
williamr@2
    74
        * TListBoxModelItemArrayOwnership enum.
williamr@2
    75
        *
williamr@2
    76
        * @param aItemTextArray The item array. 
williamr@2
    77
        * @param aOwnershipType Whether or not to take ownership of the array. 
williamr@2
    78
        */
williamr@2
    79
        IMPORT_C virtual void ConstructL( MDesCArray* aItemTextArray = NULL,
williamr@2
    80
                                          TListBoxModelItemArrayOwnership aOwnershipType = ELbmOwnsItemArray );
williamr@2
    81
williamr@2
    82
        /**
williamr@2
    83
        * Sets a new text item array. Panics if aItemTextArray is NULL.
williamr@2
    84
        *
williamr@2
    85
        * @param aItemTextArray New item text array. 
williamr@2
    86
        */
williamr@2
    87
        IMPORT_C void SetItemTextArray( MDesCArray* aItemTextArray );
williamr@2
    88
williamr@2
    89
        /**
williamr@2
    90
        * Sets the item array ownership type.
williamr@2
    91
        *
williamr@2
    92
        * @param aOwnershipType Item array ownership. 
williamr@2
    93
        */
williamr@2
    94
        IMPORT_C void SetOwnershipType( TListBoxModelItemArrayOwnership aOwnershipType );
williamr@2
    95
williamr@2
    96
        /**
williamr@2
    97
        * The array of text items modelled by this text list box model.
williamr@2
    98
        *
williamr@2
    99
        * @return A pointer to the array.
williamr@2
   100
        */
williamr@2
   101
        IMPORT_C MDesCArray* ItemTextArray() const;
williamr@2
   102
williamr@2
   103
    protected:
williamr@2
   104
        /**
williamr@2
   105
        * Gets the item array ownership type.
williamr@2
   106
        *
williamr@2
   107
        * @return Item array ownership. 
williamr@2
   108
        */
williamr@2
   109
        IMPORT_C TListBoxModelItemArrayOwnership ItemArrayOwnershipType() const;
williamr@2
   110
        
williamr@2
   111
    private: // from MListBoxModel
williamr@2
   112
        IMPORT_C virtual TAny* MListBoxModel_Reserved();
williamr@2
   113
        
williamr@2
   114
    protected:
williamr@2
   115
        /**
williamr@2
   116
        * The array of text items modelled by this text list box model.
williamr@2
   117
        */
williamr@2
   118
        MDesCArray* iItemTextArray;
williamr@2
   119
        
williamr@2
   120
    private:
williamr@2
   121
        TListBoxModelItemArrayOwnership iItemArrayOwnershipType;
williamr@2
   122
    }; 
williamr@2
   123
williamr@2
   124
williamr@2
   125
#endif