textinput/peninputvkbjp/inc/peninputvkbwindow.h
changeset 0 eb1f2e154e89
equal deleted inserted replaced
-1:000000000000 0:eb1f2e154e89
       
     1 /*
       
     2 * Copyright (c) 2002-2007 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:  Interface of vkb ui state
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef C_PENINPUTVKBWINDOW_H
       
    20 #define C_PENINPUTVKBWINDOW_H
       
    21 
       
    22 // system includes
       
    23 #include <peninputlayoutwindowjp.h>
       
    24 
       
    25 /** class forward decalaration */
       
    26 
       
    27 // Forward declarations
       
    28 class CPeninputVkbCtrlExtJp;
       
    29 class CAknFepCtrlRangeBar;
       
    30 class CAknFepCtrlEventButton;
       
    31 
       
    32 // class declarations
       
    33 /**
       
    34  *  vkb window class
       
    35  *
       
    36  *  @lib peninputvkbjp.lib
       
    37  *  @since S60 v3.2
       
    38  */
       
    39 class CPeninputVkbWindow : public CPeninputLayoutWindowJp
       
    40     {
       
    41 public:
       
    42 
       
    43     /**
       
    44      * Create one CPeninputVkbWindow object
       
    45      *
       
    46      * @since S60 v3.2
       
    47      * @param aUiLayout The layout plugin
       
    48      * @param aControlId This control ID
       
    49      * @param aDataProvider The interface of data provider
       
    50      * @return The CPeninputVkbWindow object.
       
    51      */
       
    52     static CPeninputVkbWindow* NewL(CFepUiLayout* aUiLayout,
       
    53         MPeninputLayoutContext* aLayoutContext );
       
    54 
       
    55     /**
       
    56      * Create one CPeninputVkbWindow object
       
    57      *
       
    58      * @since S60 v3.2
       
    59      * @param aUiLayout The layout plugin
       
    60      * @param aControlId This control ID
       
    61      * @param aDataProvider The interface of data provider
       
    62      * @return The CPeninputVkbWindow object.
       
    63      */
       
    64     static CPeninputVkbWindow* NewLC(CFepUiLayout* aUiLayout,
       
    65         MPeninputLayoutContext* aLayoutContext );
       
    66 
       
    67     /**
       
    68      * Destructor
       
    69      *
       
    70      * @since S60 v3.2
       
    71      * @return None.
       
    72      */
       
    73     virtual ~CPeninputVkbWindow();
       
    74 
       
    75     /**
       
    76      * from CPeninputLayoutWindow
       
    77      * Handle event
       
    78      * @since Series 60 3.2
       
    79      * @param aEventType The event type
       
    80      * @param aCtrl The control who sends the event
       
    81      * @param aEventData The event data
       
    82      * @return None
       
    83      */
       
    84     void HandleControlEvent(TInt aEventType, CFepUiBaseCtrl* aCtrl, const TDesC& aEventData);
       
    85 
       
    86     /**
       
    87      * from CPeninputLayoutWindow
       
    88      * Get id of window config resource
       
    89      *
       
    90      * @since S60 v3.2
       
    91      * @return The id of window config resource
       
    92      */
       
    93     virtual TInt GetWindowConfigResId();
       
    94 
       
    95     /**
       
    96      * from CPeninputLayoutWindow
       
    97      * Get id of window resource
       
    98      *
       
    99      * @since S60 v3.2
       
   100      * @return The id of window resource
       
   101      */
       
   102     virtual TInt GetWindowResId();
       
   103 
       
   104     /**
       
   105      * from CPeninputLayoutWindow
       
   106      * Get file name of window config resource
       
   107      *
       
   108      * @since S60 v3.2
       
   109      * @param aLangID The id of language
       
   110      * @return The file name of window config resource
       
   111      */
       
   112     virtual const TDesC&
       
   113         GetWindowConfigResFileName( TInt aLangID );
       
   114 
       
   115     /**
       
   116      * from CPeninputLayoutWindow
       
   117      * Get file name of window resource
       
   118      *
       
   119      * @since S60 v3.2
       
   120      * @return The file name of window resource
       
   121      */
       
   122     virtual const TDesC& GetWindowResFileName();
       
   123 
       
   124     /**
       
   125      * from CPeninputLayoutWindow
       
   126      * Change unit size
       
   127      *
       
   128      * @since S60 v3.2
       
   129      * @return The rect of whole window
       
   130      */
       
   131     virtual const TRect ChangeUnitSize();
       
   132 
       
   133     /**
       
   134      * from CPeninputLayoutWindow
       
   135      * Change size of client area
       
   136      *
       
   137      * @since S60 v3.2
       
   138      * @param aLeftTopPoint The left top point of client area
       
   139      * @return None
       
   140      */
       
   141     virtual void ChangeClientSize();
       
   142 
       
   143     /**
       
   144      * from CPeninputLayoutWindow
       
   145      * Create VKB and HWR common controls
       
   146      *
       
   147      * @since S60 v3.2
       
   148      * @return None
       
   149      */
       
   150     virtual void CreateAllControlsL();
       
   151 
       
   152     /**
       
   153      * from CPeninputLayoutWindow
       
   154      * Pop up choice list
       
   155      *
       
   156      * @since S60 v3.2
       
   157      * @return None
       
   158      */
       
   159     virtual void PopupChoiceList();
       
   160 
       
   161     /**
       
   162      * from CPeninputLayoutWindow
       
   163      * Re-organize all controls in the assigned client area layout
       
   164      *
       
   165      * @since S60 v3.2
       
   166      * @param aClientLayoutId The id of client area layout
       
   167      * @return None
       
   168      */
       
   169     virtual void ReorganizeControls( TInt aClientLayoutId, TBool aNeedReset );
       
   170 
       
   171     /**
       
   172      * From CPeninputLayoutWindowJp
       
   173      * Get id of prediction pane scroll up button resource
       
   174      *
       
   175      * @since S60 v3.2
       
   176      * @return The id of prediction pane scroll up button resource
       
   177      */
       
   178     TInt GetScrollUpBtnResId();
       
   179 
       
   180     /**
       
   181      * From CPeninputLayoutWindowJp
       
   182      * Get id of prediction pane scroll down button resource
       
   183      *
       
   184      * @since S60 v3.2
       
   185      * @return The id of prediction pane scroll down button resource
       
   186      */
       
   187     TInt GetScrollDownBtnResId();
       
   188 
       
   189     /**
       
   190      * Do when case changed
       
   191      *
       
   192      * @since S60 v3.2
       
   193      * @param aNewCase The new case
       
   194      * @return None
       
   195      */
       
   196     virtual void DoCaseChange( TInt aNewCase );
       
   197 
       
   198     /**
       
   199      * update rangebar when range changed
       
   200      *
       
   201      * @since S60 v3.2
       
   202      * @return None
       
   203      */
       
   204     void DoRangeChange();
       
   205 
       
   206     /**
       
   207      * Dim a key
       
   208      *
       
   209      * @since S60 V4.0
       
   210      * @param aFlag The dim status
       
   211      */
       
   212     void SetDimmed(TBool aDimFlag);
       
   213 
       
   214     /**
       
   215      * From CFepUiBaseCtrl,CControlGroup
       
   216      * Hide or shoe control. A hiden control will not handle the event.
       
   217      *
       
   218      * @since S60 V4.0
       
   219      * @param aFlag ETrue if want to hide the control.
       
   220      */
       
   221     virtual void Hide(TBool aFlag);
       
   222 
       
   223     /**
       
   224      * Set if enable option button
       
   225      *
       
   226      * @since S60 v3.2
       
   227      * @param aEnable The enable flag
       
   228      * @return None
       
   229      */ 
       
   230     void SetEnableSettingBtnJp(TBool aEnable);
       
   231 
       
   232     /**
       
   233      *
       
   234      * To Call CAknFepCtrlButton::ResizeBitmaps()
       
   235      * @since S60 v3.2
       
   236      * @return None
       
   237      */
       
   238     void SetSizeToRangeButtons();
       
   239 
       
   240 protected:
       
   241 
       
   242     /**
       
   243      * Construct function
       
   244      *
       
   245      * @since S60 v3.2
       
   246      * @param aUiLayout The layout plugin
       
   247      * @param aControlId This control ID
       
   248      * @param aDataProvider The interface of data provider
       
   249      * @return None.
       
   250      */
       
   251     CPeninputVkbWindow(CFepUiLayout* aUiLayout,
       
   252                                MPeninputLayoutContext* aLayoutContext );
       
   253 
       
   254 private:
       
   255 
       
   256     /**
       
   257      * Add button to client area
       
   258      *
       
   259      * @since S60 v3.2
       
   260      * @param aControlId The control id
       
   261      * @param aEventId The control's event id
       
   262      * @param aResId The control's resource id
       
   263      * @param aUnicode The control's unicode
       
   264      * @param aIsRepeat The TBool indicating whether the
       
   265      *        control is repeated or not
       
   266      * @return The pointer to CAknFepCtrlEventButton object
       
   267      */
       
   268     CAknFepCtrlEventButton* AddButtonL(const TInt aControlId,
       
   269                                        const TInt aEventId,
       
   270                                        const TInt aResId,
       
   271                                        const TInt aUnicode = 0,
       
   272                                        const TBool aIsRepeat = EFalse);
       
   273 
       
   274     /**
       
   275      * Add range bar into client area
       
   276      *
       
   277      * @since Series 60 3.2
       
   278      * @return None
       
   279      */
       
   280     void AddRangeBarL();
       
   281 
       
   282     /**
       
   283      * SetWholeWindowRect
       
   284      *
       
   285      * @since Series 60 3.2
       
   286      * @param aRect The rect of clientpane
       
   287      * @return None
       
   288      */
       
   289     void SetWholeWindowRect(const TRect& aRect);
       
   290 
       
   291     /**
       
   292      * Add context field into the window
       
   293      *
       
   294      * @since S60 v3.2
       
   295      * @return None
       
   296      */
       
   297     void AddContextFieldJpL();
       
   298 
       
   299 private: // data
       
   300 
       
   301     /**
       
   302      * The vkb extenting control for vkb area
       
   303      * Not own
       
   304      */
       
   305     CPeninputVkbCtrlExtJp* iVkbCtrl;
       
   306 
       
   307     /**
       
   308      * The range bar
       
   309      * Not own
       
   310      */
       
   311     CAknFepCtrlRangeBar* iRangeBar;
       
   312 
       
   313     /**
       
   314      * The current japanese
       
   315      * Hirakana/Katakana
       
   316      */
       
   317     TInt iCurrentJapanese;
       
   318     };
       
   319 
       
   320 #endif // C_PENINPUTVKBWINDOW_H
       
   321 
       
   322 // End Of File