textinput/peninputfingerhwrar/inc/peninputfingerhwrarlafmanager.h
branchRCL_3
changeset 3 f5a1e66df979
child 5 a47de9135b21
equal deleted inserted replaced
0:eb1f2e154e89 3:f5a1e66df979
       
     1 /*
       
     2 * Copyright (c) 2005-2008 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:  Header of LAF manager.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef C_PENINPUTFINGERHWRARLAFMANAGER_H
       
    20 #define C_PENINPUTFINGERHWRARLAFMANAGER_H
       
    21 
       
    22 /**
       
    23 * Class  PeninputFingerHwrArLafManager
       
    24 *  
       
    25 * Wrapper of L&F data.
       
    26 *
       
    27 * @lib peninputfingerhwrar.lib
       
    28 * @since S60 v5.0
       
    29 */
       
    30 class CPeninputFingerHwrArLafManager : public CBase 
       
    31     {
       
    32 public:
       
    33     /**
       
    34      * Symbian constructor.
       
    35      *
       
    36      * @since S60 v5.0
       
    37      * @return Pointer to created object.
       
    38      */    
       
    39     static CPeninputFingerHwrArLafManager* NewL();
       
    40     
       
    41     /**
       
    42      * Symbian constructor.
       
    43      *
       
    44      * @since S60 v5.0
       
    45      * @return Pointer to created object.
       
    46      */  
       
    47     static CPeninputFingerHwrArLafManager* NewLC();
       
    48     
       
    49     /**
       
    50      * standard c++ destructor.
       
    51      *
       
    52      * @since S60 v5.0
       
    53      * @return None
       
    54      */    
       
    55     ~CPeninputFingerHwrArLafManager();
       
    56    
       
    57 public:
       
    58     /**
       
    59      * read laf data.
       
    60      *
       
    61      * @since S60 v5.0
       
    62      * @return None
       
    63      */    
       
    64     void ReadLafInfo();
       
    65     
       
    66     /**
       
    67      * get screen orientation.
       
    68      * 
       
    69      * @since S60 v5.0
       
    70      * @return ETrue if is landscape.
       
    71      */
       
    72     TBool IsLandscape();
       
    73 
       
    74     /**
       
    75      * get rect of layout.
       
    76      * 
       
    77      * @since S60 v5.0
       
    78      * @return rect of layout.
       
    79      */    
       
    80     TRect LayoutRect();
       
    81     
       
    82     /**
       
    83      * get rect of specified control.
       
    84      * 
       
    85      * @since S60 v5.0
       
    86      * @param aCtrlId specifies control id.
       
    87      * @return rect of specified control.
       
    88      */
       
    89     TRect CtrlRect( TInt aCtrlId );
       
    90     
       
    91 public: // icf
       
    92     /**
       
    93      * get rect of ICF control.
       
    94      * 
       
    95      * @since S60 v5.0
       
    96      * @return rect of icf.
       
    97      */      
       
    98     TRect IcfRect();
       
    99     
       
   100     /**
       
   101      * get left margin of icf.
       
   102      * 
       
   103      * @since S60 v5.0
       
   104      * @return left margin of icf.
       
   105      */
       
   106     TInt IcfLeftMargin();
       
   107     
       
   108     /**
       
   109      * get Right margin of icf.
       
   110      * 
       
   111      * @since S60 v5.0
       
   112      * @return Right margin of icf.
       
   113      */    
       
   114     TInt IcfRightMargin();
       
   115     
       
   116     /**
       
   117      * get top margin of icf.
       
   118      * 
       
   119      * @since S60 v5.0
       
   120      * @return top margin of icf.
       
   121      */    
       
   122     TInt IcfTopMargin();
       
   123     
       
   124     /**
       
   125      * get bottom margin of icf.
       
   126      * 
       
   127      * @since S60 v5.0
       
   128      * @return bottom margin of icf.
       
   129      */    
       
   130     TInt IcfBottomMargin();
       
   131     
       
   132     /**
       
   133      * get line spacing of icf.
       
   134      * 
       
   135      * @since S60 v5.0
       
   136      * @return line spacing of icf.
       
   137      */      
       
   138     TInt IcfLineSpaceMargin();
       
   139   
       
   140     /**
       
   141      * get font of icf.
       
   142      * 
       
   143      * @since S60 v5.0
       
   144      * @return font of icf.
       
   145      */       
       
   146     CFont* IcfFont();
       
   147     
       
   148     /**
       
   149      * get text height of icf.
       
   150      * 
       
   151      * @since S60 v5.0
       
   152      * @return text height of icf.
       
   153      */       
       
   154     TInt IcfTextHeight();
       
   155     
       
   156 public: //buttons
       
   157     
       
   158     /**
       
   159      * get inner padding of buttons.
       
   160      * 
       
   161      * @since S60 v5.0
       
   162      * @return inner padding of buttons.
       
   163      */      
       
   164     TSize ButtonInnerPadding();
       
   165     
       
   166 public: //num pad
       
   167     /**
       
   168      * get cell size of virtual numpad.
       
   169      * 
       
   170      * @since S60 v5.0
       
   171      * @return cell size of virtual numpad.
       
   172      */    
       
   173     TRect VirtualNumpadCellSize();
       
   174         
       
   175     /**
       
   176      * get text layout of virtual numpad.
       
   177      * 
       
   178      * @since S60 v5.0
       
   179      * @return a TAknTextLineLayout object to layout cell text.
       
   180      */
       
   181     TAknTextLineLayout NumpadKeyTxtLayout();
       
   182     
       
   183 public: //sct pad
       
   184   
       
   185     /**
       
   186      * get row count of virtual sctpad.
       
   187      * 
       
   188      * @since S60 v5.0
       
   189      * @return row count of virtual sctpad.
       
   190      */      
       
   191     TInt VirtualSctpadRowCount();
       
   192     
       
   193     /**
       
   194      * get column count of virtual sctpad.
       
   195      * 
       
   196      * @since S60 v5.0
       
   197      * @return column count of virtual sctpad.
       
   198      */        
       
   199     TInt VirtualSctpadColCount();
       
   200     
       
   201     /**
       
   202      * get cell size of virtual sctpad.
       
   203      * 
       
   204      * @since S60 v5.0
       
   205      * @return cell size of virtual sctpad.
       
   206      */     
       
   207     TRect VirtualSctpadCellSize();
       
   208     
       
   209     /**
       
   210      * Get cell size of Space and Enter
       
   211      * 
       
   212      * @since S60 v5.0
       
   213      * @return cell size of virtual sctpad.
       
   214      */     
       
   215     TRect FixVirtualSctpadCellSize();
       
   216     
       
   217     /**
       
   218      * get cell rect of virtual sctpad.
       
   219      * 
       
   220      * @since S60 v5.0
       
   221      * @param aArrayRects a TRect array to receive cell rect.
       
   222      * @return none.
       
   223      */     
       
   224     void GetVirtualKeyRects( RArray<TRect>& aArrayRects );
       
   225     
       
   226     /**
       
   227      * get cell rect of Space and Enter.
       
   228      * 
       
   229      * @since S60 v5.0
       
   230      * @param aArrayRects a TRect array to receive cell rect.
       
   231      * @return none.
       
   232      */     
       
   233     void GetFixVirtualKeyRects( RArray<TRect>& aArrayRects );
       
   234     
       
   235     
       
   236     /**
       
   237      * get text layout of virtual sctpad.
       
   238      * 
       
   239      * @since S60 v5.0
       
   240      * @return a TAknTextLineLayout object to layout cell text.
       
   241      */    
       
   242     TAknTextLineLayout SctpadKeyTxtLayout();
       
   243     
       
   244     /**
       
   245      * Get text layout about Space and Enter
       
   246      * 
       
   247      * @since S60 v5.0
       
   248      * @return a TAknTextLineLayout object to layout cell text.
       
   249      */    
       
   250     TAknTextLineLayout FixSctpadKeyTxtLayout();
       
   251     
       
   252     /**
       
   253      * get preview bubble rect.
       
   254      * 
       
   255      * @since S60 v5.0
       
   256      * @return a TRect object to preview bubble rect.
       
   257      */    
       
   258     TRect PreviewBubbleRect();
       
   259     
       
   260     /**
       
   261      * get preview bubble inner rect.
       
   262      * 
       
   263      * @since S60 v5.0
       
   264      * @return a TRect object to preview bubble inner rect.
       
   265      */    
       
   266     TRect PreviewBubbleInnerRect();
       
   267     
       
   268     /**
       
   269      * get preview bubble font.
       
   270      * 
       
   271      * @since S60 v5.0
       
   272      * @return a CFont pointer to preview bubble font.
       
   273      */    
       
   274     const CFont* PreviewBubbleFont();
       
   275     
       
   276     /**
       
   277      * get preview bubble text layout.
       
   278      * 
       
   279      * @since S60 v5.0
       
   280      * @return a TAknTextLineLayout object to preview bubble text layout.
       
   281      */    
       
   282     TAknTextLineLayout PreviewBubbleTextLayout();
       
   283     
       
   284 public: // candidate list
       
   285     
       
   286     /**
       
   287      * get width unit of candidate list.
       
   288      * 
       
   289      * @since S60 v5.0
       
   290      * @return width unit of candidate list.
       
   291      */      
       
   292     TInt CandidateUnitWidth();
       
   293     
       
   294     /**
       
   295      * get height unit of candidate list.
       
   296      * 
       
   297      * @since S60 v5.0
       
   298      * @return height unit of candidate list.
       
   299      */ 
       
   300     TInt CandidateUnitHeight();  
       
   301     
       
   302 
       
   303     /**
       
   304      * get horizontal margin of candidate list.
       
   305      * 
       
   306      * @since S60 v5.0
       
   307      * @return horizontal margin of candidate list.
       
   308      */    
       
   309     TInt CandidateHorizontalMargin();
       
   310 
       
   311     /**
       
   312      * get vertical margin of candidate list.
       
   313      * 
       
   314      * @since S60 v5.0
       
   315      * @return vertical margin of candidate list.
       
   316      */      
       
   317     TInt CandidateVerticalMargin();
       
   318 
       
   319     /**
       
   320      * get top-left position of candidate list.
       
   321      * 
       
   322      * @since S60 v5.0
       
   323      * @return top-left position of candidate list.
       
   324      */     
       
   325     TPoint CandidateLTPos();
       
   326 
       
   327     /**
       
   328      * get top-left position of predictive list.
       
   329      * 
       
   330      * @since S60 v5.0
       
   331      * @return top-left position of predictive list.
       
   332      */     
       
   333     TPoint PredictiveLTPos();
       
   334     
       
   335     /**
       
   336      * get font of candidate list.
       
   337      * 
       
   338      * @since S60 v5.0
       
   339      * @return font of candidate list.
       
   340      */     
       
   341     const CFont* CandidateFont();
       
   342     
       
   343 public: //sct paging buttons
       
   344     /**
       
   345      * get text layout of sct paging button.
       
   346      * 
       
   347      * @since S60 v5.0
       
   348      * @return a TAknTextLineLayout object to layout text.
       
   349      */    
       
   350     TAknTextLineLayout SctPageBtnTxtLayout();
       
   351 	TSize SymbolGroupButtonSize();
       
   352 private:
       
   353     
       
   354     /**
       
   355      * C++ constructor
       
   356      *
       
   357      * @since S60 v5.0
       
   358      * @return None
       
   359      */    
       
   360     CPeninputFingerHwrArLafManager();
       
   361     
       
   362     /**
       
   363      * Symbian second-phase constructor
       
   364      *
       
   365      * @since S60 v5.0
       
   366      * @return None
       
   367      */    
       
   368     void ConstructL();    
       
   369     
       
   370 private: //datas
       
   371     
       
   372     TBool iIsLandscape;
       
   373     
       
   374     // constrols position
       
   375     TRect iRectIcf;
       
   376     TRect iRectWritingBox;
       
   377     TRect iRectNumpad;
       
   378     TRect iRectSctpad;
       
   379     TRect iRectFixSctpad;
       
   380     TRect iRectSpase;
       
   381     TRect iRectEnter;
       
   382         
       
   383     TRect iRectBtnClose;
       
   384     TRect iRectBtnRangeChn;
       
   385     TRect iRectBtnRangeEng;
       
   386     TRect iRectBtnRangeNum;
       
   387     TRect iRectBtnRangeSmb;
       
   388     TRect iRectBtnBackspace;
       
   389     TRect iRectBtnArrowLeft;
       
   390     TRect iRectBtnArrowRight;
       
   391     TRect iRectBtnArrowUp;
       
   392     TRect iRectBtnArrowDown;
       
   393     TRect iRectBtnOption;
       
   394     TRect iRectBtnImeSwitch;
       
   395     TRect iRectBtnSctPage;
       
   396     
       
   397     TSize iSizeBtnPadding;
       
   398     TSize iSizeNumpadCell;
       
   399     
       
   400     TInt iSctpadRowCount;
       
   401     TInt iSctpadColCount;
       
   402     TSize iSizeSctpadCell;
       
   403     TSize iSizeFixSctpadCell;
       
   404 
       
   405     TRect iLayoutRect;
       
   406     TPoint iLayoutOffset;
       
   407     
       
   408 	TInt iIcfTextLeftMarginCn;
       
   409 	TInt iIcfTextRightMarginCn;
       
   410 	TInt iIcfTextTopMarginCn;
       
   411 	TInt iIcfTextBottomMarginCn;
       
   412 	TInt iIcfTextLineSpaceMarginCn;
       
   413 	TInt iIcfTextHeightCn;
       
   414     TInt iIcfTextAlignment;
       
   415     CFont* iIcfFont;
       
   416     
       
   417     TInt iCandsHorizontalMargin;
       
   418     TInt iCandsVerticalMargin;
       
   419     TInt iCandsUnitWidth;
       
   420     TInt iCandsUnitHeight;
       
   421     TInt iCandsNaviHeight;
       
   422     TPoint iCandidateLTPos;
       
   423     TPoint iPredictiveLTPos;
       
   424     CFont* iCandsFont;
       
   425     TInt iCandsTextMargin;
       
   426     
       
   427     TSize iScreenSize;
       
   428     
       
   429     RArray<TRect> iSCTrectArray;
       
   430     
       
   431     // preview bubble
       
   432     TRect iPreviewWndRect;
       
   433     TRect iPreviewWndInnerRect;
       
   434     const CFont* iBubbleFont;
       
   435 	TAknTextLineLayout iPreviewWndText;
       
   436 	TSize iSymButtonSize;
       
   437 	TRect iRectOfSymbolTable;
       
   438     };
       
   439 
       
   440 #endif // C_PENINPUTFINGERHWRARLAFMANAGER_H
       
   441 
       
   442 // End Of File