fep/aknfep/UiPlugins/AknFepUiInterface/inc/AknFepUICtrlPinyinPopup.h
changeset 0 eb1f2e154e89
child 3 f5a1e66df979
equal deleted inserted replaced
-1:000000000000 0:eb1f2e154e89
       
     1 /*
       
     2 * Copyright (c) 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:           
       
    15 *       Provides the CAknFepUICtrlPinyinPopup class definitions.
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 
       
    21 
       
    22 
       
    23 
       
    24 
       
    25 
       
    26 
       
    27 
       
    28 
       
    29 #ifndef __AKN_FEP_UI_PINYIN_POPUP_H
       
    30 #define __AKN_FEP_UI_PINYIN_POPUP_H
       
    31 
       
    32 #include <e32std.h>
       
    33 
       
    34 class MAknFepUICtrlPinyinPopup
       
    35 	{
       
    36 public:
       
    37     enum 
       
    38         {
       
    39         ESpellingChanged    = 0x0001,
       
    40         ESpellingNavigation = 0x0002,
       
    41 		EDispPageChanged	= 0x0004,
       
    42 		EChangeStatebyBackSpce = 0x1000//need by pinying phrase creation.
       
    43         };
       
    44 
       
    45     /**
       
    46      * The number of selections that can be displayed in the popup.
       
    47      */
       
    48     enum
       
    49         {
       
    50         EMaxToneMarkLength = 1,
       
    51         EMaxCandidates = 6,
       
    52         EMaxCandidateCharsNotIncludingToneMark = 6,
       
    53         EMaxCandidateChars = EMaxCandidateCharsNotIncludingToneMark + EMaxToneMarkLength,
       
    54         EMaxPhraseCandidate = 10
       
    55         };
       
    56 
       
    57     typedef TBufC<EMaxToneMarkLength> TToneMark;
       
    58 
       
    59 public:
       
    60     /**
       
    61      * This function returns the index of the selected phrase item .
       
    62      *
       
    63      * @return aIndex index of entry in window, zero based
       
    64      */
       
    65     virtual TInt CurrentSelection() const = 0;
       
    66     /**
       
    67      * This function returns the visible index of the selected item.
       
    68      *
       
    69      * @return aIndex index of entry in window, zero based
       
    70      */
       
    71     virtual TInt CurrentVisibleSelection() const = 0;
       
    72 
       
    73     /**
       
    74      * Enables the display of the control. Sets the control's 
       
    75      * window postion and visibility, but only if the value has
       
    76      * changed (so it's ok to call it excessively). 
       
    77      *
       
    78      * @param aEnable if ETrue, makes visible
       
    79      *                          if EFalse, makes non-visible
       
    80      *
       
    81      */
       
    82     virtual void Enable(TBool aEnable) = 0;
       
    83 	/**
       
    84      * set the number of selections that are visible
       
    85      *
       
    86      * @param aCount the number of visible selections, must be 
       
    87      *                          0 < aCount <= KMaxNumberOfSelections 
       
    88      */
       
    89     virtual void SetVisibleCount(TInt aCount) = 0;
       
    90 
       
    91     /**
       
    92      * get the current visible selection count
       
    93      *
       
    94      * @return visible selection count
       
    95      */
       
    96     virtual TInt VisibleSelectionCount() const = 0;
       
    97 
       
    98 
       
    99     /**
       
   100      * This sets the string of the internal buffer for the item index aIndex to aText,
       
   101      * even if the index falls outside the current visible candidates.
       
   102      *
       
   103      * @param aText new contents of text item
       
   104      * @return ETrue if successful
       
   105      *              EFalse if index outside visible candidates (but value is still set)
       
   106      *
       
   107      */
       
   108     virtual TBool SetItemText(TInt aIndex, const TDesC& aText) = 0;
       
   109 
       
   110     /**
       
   111     *   Sets the string of the internal buffer for visible item 
       
   112     */
       
   113     virtual TBool SetPhraseItemTexts() = 0;
       
   114     
       
   115     /**
       
   116      * This function gets the text at the index aIndex. 
       
   117      *
       
   118      * @param aIndex index of entry in window, zero based
       
   119      * @output aText contains contents of text item
       
   120      * @return ETrue always
       
   121      *
       
   122      */
       
   123     virtual TBool GetItemText(TInt aIndex, TDes& aText) const = 0;
       
   124 
       
   125     /**
       
   126      * This function sets the Tone Mark for a specific entry
       
   127      * 
       
   128      * @param aIndex index of entry
       
   129      * @param aToneMark the tone mark
       
   130      *
       
   131      */
       
   132     virtual void SetToneMark(TInt aIndex, const TDesC& aToneMark) = 0;
       
   133 
       
   134     /**
       
   135      * This function sets the validity of the tonemark
       
   136      *
       
   137      * @param aIndex index of the entry to be affected
       
   138      * @param aValid if ETrue, tonemark will be displayed as valid
       
   139      *                          if EFalse, tonemark will be displayed as not valid
       
   140      */
       
   141     virtual void SetItemToneMarkValidity(TInt aIndex, TBool aValid) = 0;
       
   142     /**
       
   143      * Is the control enabled for display?
       
   144      *
       
   145      * @return if not enabled, return EFalse
       
   146      */
       
   147     virtual TBool IsEnabled() const = 0;
       
   148 
       
   149     /**
       
   150      * Select the next visible item. If already on the last one, loop to the 
       
   151      * first one.
       
   152      *
       
   153      * @return ETrue if success, 
       
   154      *              EFalse if no items visible, or if selection is outside visible items
       
   155      */
       
   156     virtual TBool SelectNextPhrase() = 0;
       
   157 
       
   158     /**
       
   159      * Select the previous visible item. If already on the first one, loop to the 
       
   160      * last one.
       
   161      *
       
   162      * @return ETrue if success, 
       
   163      *              EFalse if no items visible, or if selection is outside visible items
       
   164      */
       
   165     virtual TBool SelectPrevPhrase() = 0;
       
   166 
       
   167     /**
       
   168 	*	Return Pinyin spelling candidate array 
       
   169 	*/
       
   170     virtual CDesCArrayFlat* PhoneticSpellingArray(void) = 0;
       
   171 
       
   172     /**
       
   173 	*	Split phrase pinyin spelling candidates into pages 
       
   174 	*/
       
   175     virtual void SplitPhraseSpellingIntoPages(void) = 0;
       
   176 
       
   177     /**
       
   178 	*	Split pinyin spelling candidates into pages 
       
   179 	*/
       
   180     virtual void SplitSpellingIntoPages(TInt aCount) = 0;
       
   181     
       
   182     /**
       
   183 	*	Set display page for deliberate selection 
       
   184 	*/
       
   185     virtual void SetDisplayPage(TInt aSelection) = 0;
       
   186 
       
   187     /**
       
   188 	 *	Return keystroke array 
       
   189 	 */
       
   190     virtual CDesCArrayFlat* KeystrokeArray(void) = 0;
       
   191     
       
   192     /**
       
   193 	 *	return in effect keystroke array
       
   194 	 */
       
   195     virtual CDesCArrayFlat* InEffectKeystrokeArray(void) = 0;    
       
   196 
       
   197     /**
       
   198      *	Return show keystroke array 
       
   199      */
       
   200     virtual CDesCArrayFlat* ShowKeystrokeArray(void) = 0;
       
   201     
       
   202     /**
       
   203      *	Return the optimize spelling array 
       
   204      */
       
   205     virtual CDesCArrayFlat* OptimizeSpelling(void) = 0;
       
   206     
       
   207     /**
       
   208      *  Return the temp spelling array 
       
   209      */
       
   210     virtual CDesCArrayFlat* TempSpelling(void) = 0;
       
   211     
       
   212     /**
       
   213      *	Return show keystroke array 
       
   214      */
       
   215     virtual CDesCArrayFlat* ChooseChineseCharacterArray(void) = 0;
       
   216     
       
   217     /**
       
   218      *	Return show keystroke array 
       
   219      */
       
   220     virtual CDesCArrayFlat* ChooseChineseCharacterArrayKeystroke(void) = 0;
       
   221 
       
   222     /**
       
   223      *	Return the tone mark state 
       
   224      */
       
   225     virtual TBool GetTonemarkState() = 0;
       
   226     
       
   227     /**
       
   228      *	set the tone mark state 
       
   229      */
       
   230     virtual void SetTonemarkState( TBool aState ) = 0; 
       
   231     
       
   232 
       
   233     /**
       
   234      *	Return show keystroke array 
       
   235      */
       
   236     virtual CDesCArrayFlat* PhoneticSpellingIndexArray(void) = 0;
       
   237     
       
   238     /**
       
   239 	*	Return current page start spelling index 
       
   240 	*/
       
   241     virtual TInt CurrentPageStartIndex(void) = 0;
       
   242     virtual void SetFlag(TInt aFlag) = 0;
       
   243     virtual void ClearFlag(TInt aFlag) = 0;
       
   244     virtual TBool IsFlagSet(TInt aFlag) const = 0;
       
   245     virtual void PopupSizeChanged() = 0;
       
   246     /**
       
   247      *  Set all the input pane not highlight
       
   248      */
       
   249     virtual void SetNoneHighlighted() = 0;
       
   250     
       
   251     virtual CDesCArrayFlat* KeystrokeArrayForStroke() = 0;
       
   252 
       
   253     virtual CDesCArrayFlat* InEffectKeystrokeArrayForStroke() = 0;
       
   254 
       
   255     virtual CDesCArrayFlat* ShowKeystrokeArrayForStroke() = 0;
       
   256 
       
   257     virtual CDesCArrayFlat* ChooseChineseCharacterArrayForStroke() = 0;
       
   258 
       
   259     virtual CDesCArrayFlat* ChooseChineseCharacterArrayKeystrokeForStroke() = 0;
       
   260     
       
   261     /**
       
   262      * Get the current content array displayed in eep control for Zhuyin method.
       
   263      */
       
   264     virtual CDesCArrayFlat* ZhuyinSymbols() = 0;
       
   265     
       
   266     /**
       
   267      * Get the current content array displayed in eep control for Zhuyin method.
       
   268      */
       
   269     virtual CDesCArrayFlat* ZhuyinShowSymbols() = 0;
       
   270     
       
   271     /**
       
   272      * Get the current valid zhuyin symbol group.
       
   273      */
       
   274     virtual CDesCArrayFlat* FirstValidZhuyinGrp() = 0;
       
   275     
       
   276     /**
       
   277      * Get the current chinese characters displayed in the eep control.
       
   278      */
       
   279     virtual CDesCArrayFlat* ChineseCharsDisped() = 0;
       
   280     
       
   281     /**
       
   282      * Get the corresponding zhuyin symbol array for chinese characters array.
       
   283      */
       
   284     virtual CDesCArrayFlat* ZhuyinSymbolsForChineseCharsDisped() = 0;
       
   285     
       
   286     virtual void SetEEPContent ( const TDes& aDes ) = 0;
       
   287     virtual TDes& GetEEPContent ( ) = 0;
       
   288     
       
   289     virtual void SetEEPContentValid ( TBool aValid ) = 0;
       
   290     virtual TBool GetEEPContentValid ( ) = 0;
       
   291     
       
   292     virtual void ResetStrokeArray() = 0;
       
   293     
       
   294     virtual void SetChangeState(TBool aChangeState) = 0;
       
   295     
       
   296     virtual TBool IsChangeStatet() const = 0;
       
   297     
       
   298     /**
       
   299      * Set whether state change from entry to spelling editing is automatical.
       
   300      * 
       
   301      * @param aState.1 for automatical, 0 for manual.
       
   302      * @return None.
       
   303      */
       
   304     virtual void SetState( TInt aState ) = 0;
       
   305     
       
   306     /**
       
   307      * Get state change status.
       
   308      */
       
   309     virtual TInt GetState() = 0;
       
   310     
       
   311     /**
       
   312      * Set whether state change from pinyin input state to pinyin phrase creation.
       
   313      * 
       
   314      * @param aState. ETrue for state change from pinyin input to phrase creation,
       
   315      *  EFalse is not.
       
   316      * @since S60 V5.0
       
   317      * @return None.
       
   318      */
       
   319     virtual void SetPhraseCreationState( TBool aState ) = 0;
       
   320     
       
   321     /**
       
   322      * Set whether at the editing state happen editing for pinyin phrase creation.
       
   323      * 
       
   324      * @param aState. ETrue happen editing,EFalse others.
       
   325      * @since S60 V5.0
       
   326      * @return None.
       
   327      */
       
   328     virtual void SetPhraseCreationEditingState( TBool aState ) = 0;
       
   329     
       
   330     /**
       
   331      * Get whether state change from pinyin input state to pinyin phrase creation.
       
   332      * 
       
   333      * @since S60 V5.0
       
   334      * @return ETrue for state change from pinyin input to phrase creation,
       
   335      *  EFalse is not.
       
   336      */
       
   337     virtual TBool GetPhraseCreationState() = 0;
       
   338     
       
   339     /**
       
   340      * Get whether at the editing state happen editing for pinyin phrase creation.
       
   341      * 
       
   342      * @since S60 V5.0
       
   343      * @return None.
       
   344      */
       
   345     virtual TBool GetPhraseCreationEditingState() = 0;
       
   346     
       
   347     /**
       
   348      * set flag whether from candidate state change state.
       
   349      * 
       
   350      * @param aFlag  ETrue from the candidate state change state, other EFalse.
       
   351      * @since S60 V5.0
       
   352      * @return none.
       
   353      */
       
   354     virtual void SetFromCandidateChangeStateFlag( TBool aFlag ) = 0;
       
   355     
       
   356     /**
       
   357      * Get flag whether from candidate state change state.
       
   358      * 
       
   359      * @since S60 V5.0
       
   360      * @return ETrue from the candidate state change state, other EFalse.
       
   361      */
       
   362     virtual TBool GetFromCandidateChangeStateFlag() = 0;
       
   363     
       
   364     /**
       
   365      * Set count of valid keystroke.
       
   366      * 
       
   367      * @since S60 V5.0
       
   368      * @return none
       
   369      */
       
   370     virtual void SetValidKeystrokeCount( TInt aCount ) = 0;
       
   371     
       
   372     /**
       
   373      * get count of valid keystroke.
       
   374      * 
       
   375      * @since S60 V5.0
       
   376      * @return count of valid keystroke.
       
   377      */
       
   378     virtual TInt GetValidKeystrokeCount() = 0;
       
   379     
       
   380     /**
       
   381      * Set last cba resouce id.
       
   382      * 
       
   383      * @since S60 V5.0
       
   384      * @return None
       
   385      */
       
   386     virtual void SetLastResouce( TInt aResouceId ) = 0;
       
   387     
       
   388     /**
       
   389      * Get last cba resouce id.
       
   390      * 
       
   391      * @since S60 V5.0
       
   392      * @return last resouce id
       
   393      */
       
   394     virtual TInt GetLastResouce() = 0;
       
   395     
       
   396     /**
       
   397      * Set change state from Edit to Spelling flag.
       
   398      * 
       
   399      * @param aFlag,If ETrue Change from Edit state to spelling state,EFalse others. 
       
   400      * @since S60 V5.0
       
   401      * @return none.
       
   402      */
       
   403     virtual void SetFromEditToSpellingFlag( TBool aFlag = EFalse ) = 0;
       
   404 
       
   405     /**
       
   406      * Set change state from Edit to Spelling flag.
       
   407      * 
       
   408      * @param none. 
       
   409      * @since S60 V5.0
       
   410      * @return ETrue Change from Edit state to spelling state,EFalse others..
       
   411      */
       
   412     virtual TInt GetFromEditToSpellingFlag() = 0;
       
   413     
       
   414     /**
       
   415      * Set valid keystroke change flag.
       
   416      * 
       
   417      * @param aFlag, ETrue valid keystroke changed,EFalse others.
       
   418      * @since S60 V5.0
       
   419      * @return none
       
   420      */
       
   421     virtual void SetValidKeystrokeChange( TBool aFlag ) = 0;
       
   422     
       
   423     /**
       
   424      * Get valid keystroke change flag.
       
   425      * 
       
   426      * @since S60 V5.0
       
   427      * @return ETrue,if vallid keystroke changed, others EFalse.
       
   428      */
       
   429     virtual TBool GetValidKeystrokeChange() = 0;
       
   430     
       
   431     /**
       
   432      * Set PreStateIsPredict flag.
       
   433      * 
       
   434      * @param aFlag, ETrue PreStateIsPredict,EFalse others.
       
   435      * @since S60 V5.0
       
   436      * @return none
       
   437      */
       
   438     virtual void SetPreStateIsPredictive( TBool aFlag ) = 0;
       
   439     
       
   440     /**
       
   441      * Get PreStateIsPredict flag.
       
   442      * 
       
   443      * @since S60 V5.0
       
   444      * @return ETrue,if PreStateIsPredict, others EFalse.
       
   445      */
       
   446     virtual TBool GetPreStateIsPredictive() = 0;
       
   447 
       
   448     virtual void SetInputLayoutMiniQwertyZhuyin() = 0;
       
   449     
       
   450     virtual void ResetInputLayoutMiniQwertyZhuyin() = 0;
       
   451 	};
       
   452 
       
   453 #endif // __AKN_FEP_UI_PINYIN_POPUP_H
       
   454 
       
   455 // End of file