fep/aknfep/UiPlugins/AknFepUiInterface/AvkonImpl/inc/AknFepUIAvkonCtrlJapanesePredictiveListBoxModel.h
changeset 36 a7632c26d895
parent 35 0f326f2e628e
child 42 b3eaa440ab06
equal deleted inserted replaced
35:0f326f2e628e 36:a7632c26d895
     1 /*
       
     2 * Copyright (c) 2002-2004 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:            Predictive Candidate list
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 
       
    22 
       
    23 
       
    24 
       
    25 
       
    26 
       
    27 
       
    28 
       
    29 #ifndef CAKNFEPUICTRLJAPANESEPREDICTIVELISTBOXMODEL_H
       
    30 #define CAKNFEPUICTRLJAPANESEPREDICTIVELISTBOXMODEL_H
       
    31 
       
    32 // INCLUDES
       
    33 
       
    34 // CONSTANTS
       
    35 
       
    36 // FORWARD DECLARATIONS
       
    37 
       
    38 // CLASS DECLARATION
       
    39 
       
    40 /**
       
    41 *  TPredictivePopupElement class.
       
    42 *  This structure stores the information to display a candidate.
       
    43 *
       
    44 *  @lib AknFep.lib
       
    45 *  @since 2.6
       
    46 */
       
    47 struct TPredictivePopupElement
       
    48     {
       
    49     TInt iStartXPos;
       
    50     TInt iEndXPos;
       
    51     TInt iCandidateNo;
       
    52     };
       
    53 
       
    54 typedef CArrayFixFlat<TPredictivePopupElement> CPredictivePopupElementArray;
       
    55 
       
    56 // CLASS DECLARATION
       
    57 
       
    58 /**
       
    59 *  CPredictivePopupLineInfo class.
       
    60 *  This class stores a line information on predictive candidate list.
       
    61 *
       
    62 *  @lib AknFep.lib
       
    63 *  @since 2.6
       
    64 */
       
    65 NONSHARABLE_CLASS(CPredictivePopupLineInfo) : public CBase
       
    66     {
       
    67 public:
       
    68     inline CPredictivePopupLineInfo() {};
       
    69     virtual ~CPredictivePopupLineInfo();
       
    70 
       
    71     HBufC* iLineText;
       
    72     CPredictivePopupElementArray* iElementsOnLine;
       
    73     };
       
    74 
       
    75 typedef CArrayPtrFlat<CPredictivePopupLineInfo> CPredictivePopupLineInfoArray;
       
    76 
       
    77 
       
    78 // CLASS DECLARATION
       
    79 
       
    80 /**
       
    81 *  CAknFepUICtrlJapanesePredictiveListBoxModel class.
       
    82 *
       
    83 *  @lib AknFep.lib
       
    84 *  @since 2.6
       
    85 */
       
    86 NONSHARABLE_CLASS(CAknFepUICtrlJapanesePredictiveListBoxModel)
       
    87         : public CAknFilteredTextListBoxModel
       
    88     {
       
    89     public: // New functions
       
    90         /**
       
    91         * This function registeres the array of line information of candidate list.
       
    92         * @since 2,6
       
    93         * @param aLineInfoArray
       
    94         */
       
    95         void SetLineInfoArray(CPredictivePopupLineInfoArray* aLineInfoArray);
       
    96 
       
    97         /**
       
    98         * This function returns a arrary object that the information is included each line.
       
    99         * @since 2.6
       
   100         * @return array object
       
   101         */
       
   102         CPredictivePopupLineInfoArray* LineInfoArray() const;
       
   103 
       
   104         /**
       
   105         * This function searches a item index as key in a candidate number
       
   106         * 
       
   107         * @since 2.6
       
   108         * @param aCandidateNo   candidate number
       
   109         * @return item index
       
   110         */
       
   111         TInt SearchItemIndexFromCandidateNo(TInt aCandidateNo) const;
       
   112 
       
   113         /**
       
   114         * This function is that it checks whether the candidate is included in the line.
       
   115         * If including it, The displaying information is returned.
       
   116         * @since 2.6
       
   117         * @param aLineNo        line number
       
   118         * @param aCandidateNo   candidate number
       
   119         * @param aElement       display mode
       
   120         * @return ETrue if including candidate
       
   121         */
       
   122         TBool SearchElement(TInt aLineNo,
       
   123                             TInt aCandidateNo,
       
   124                             TPredictivePopupElement& aElement);
       
   125 
       
   126         /**
       
   127         * Set total item numbers in listbox
       
   128         * @since 2.6
       
   129         * @param aMaximumItems  total item numbers
       
   130         */
       
   131         void SetMaximumItems(TInt aMaximumItems);
       
   132 
       
   133         /**
       
   134         * Return total item numbers
       
   135         * @since 2.6
       
   136         * @return total item numbers
       
   137         */
       
   138         TInt MaximumItems();
       
   139 
       
   140         /**
       
   141         * This function searches a CandidateNo from linenumber and Position
       
   142         * @since 3.2
       
   143         * @param aLineNo        line number
       
   144         * @param aPoint         position
       
   145         * @eturn candidate number
       
   146         */
       
   147         TInt SearchCandidateNoFromPosition(
       
   148                 TInt aLineNo, const TPoint& aPoint) const;
       
   149 
       
   150     private:    // Data
       
   151         CPredictivePopupLineInfoArray* iLineInfoArray;
       
   152         TInt iMaximumItems;
       
   153     };
       
   154 
       
   155 #endif  // CAKNFEPUICTRLJAPANESEPREDICTIVELISTBOXMODEL_H
       
   156 
       
   157 // End of File