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