textinput/peninputgenerichwr/inc/peninputgenerichwrlafdatamgr.h
changeset 0 eb1f2e154e89
equal deleted inserted replaced
-1:000000000000 0:eb1f2e154e89
       
     1 /*
       
     2 * Copyright (c) 2002-2005 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:  peninput vkb laf manager
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef C_CPENINPUTGENERICHWRLAFDATAMGR_H
       
    20 #define C_CPENINPUTGENERICHWRLAFDATAMGR_H
       
    21 
       
    22 // System includes
       
    23 #include <e32base.h>
       
    24 #include <w32std.h>
       
    25 #include <AknFepGlobalEnums.h>
       
    26 // User includes
       
    27 
       
    28 // Forward decalaration
       
    29 
       
    30 // laf type definition
       
    31 enum TPeninputHwrLayoutType
       
    32 	{
       
    33 	ELayoutNone 	= -1,
       
    34 	ELayoutLatin,
       
    35 	ELayoutNonLatin 
       
    36 	};
       
    37 
       
    38 struct TPeninputHwrButtonLayoutData
       
    39 	{
       
    40 	TRect iRect;
       
    41 	TRect iInnerRect;
       
    42 	};
       
    43 	
       
    44 struct TPeninputHwrEntryLayoutData
       
    45 	{
       
    46 	TRect iRect;
       
    47 	//const CFont* iPromptTextFont;
       
    48 	const CFont* iTextFont;
       
    49 	};
       
    50 
       
    51 struct TPeninputHwrRangeBarLayoutData
       
    52 	{
       
    53 	TRect iRect;
       
    54 	TPeninputHwrButtonLayoutData 	iAlphaButton;
       
    55 	TPeninputHwrButtonLayoutData 	iNumberButton;	
       
    56 	TPeninputHwrButtonLayoutData 	iSymbolButton;
       
    57 
       
    58 	};
       
    59 
       
    60 class CPeninputHwrLayoutDataInfo : public CBase
       
    61 	{
       
    62 public:
       
    63 	static CPeninputHwrLayoutDataInfo* NewLC();
       
    64 	TRect iHwrWndRect;
       
    65 	TRect iWriteAreaRect;
       
    66 	TPeninputHwrButtonLayoutData 	iCloseButton;
       
    67 	TPeninputHwrButtonLayoutData 	iOptionButton;
       
    68 	TPeninputHwrEntryLayoutData  	iICF;
       
    69 	TPeninputHwrButtonLayoutData	iMoveButton;	
       
    70 	TPeninputHwrRangeBarLayoutData	iRangbar;
       
    71 	TPeninputHwrButtonLayoutData	iLanguageButton;
       
    72 	TPeninputHwrButtonLayoutData	iSwitchButton;
       
    73 	};
       
    74 	
       
    75 /**
       
    76  *  Peninput HWR data management class
       
    77  *  This class manager the data of HWR
       
    78  *  
       
    79  *  @lib peninputgenerichwr.lib
       
    80  *  @since S60 v3.2
       
    81  */
       
    82 class CPeninputGenericHwrLafMgr : public CBase 
       
    83     {   
       
    84 public:
       
    85 
       
    86     /**
       
    87      * Two-phased constructor
       
    88      *
       
    89      * @since S60 v3.2
       
    90      * @return The pointer to CPeninputGenericVkbLafMgr object
       
    91      */
       
    92     static CPeninputGenericHwrLafMgr* NewL(TPeninputHwrLayoutType aLayoutType);
       
    93 
       
    94     /**
       
    95      * Two-phased constructor
       
    96      *
       
    97      * @since S60 v3.2
       
    98      * @return The pointer to CPeninputGenericHwrLafMgr object
       
    99      */
       
   100     static CPeninputGenericHwrLafMgr* NewLC(TPeninputHwrLayoutType aLayoutType);
       
   101 
       
   102     /**
       
   103      * Destructor
       
   104      *
       
   105      * @since S60 v3.2
       
   106      * @return None
       
   107      */
       
   108     virtual ~CPeninputGenericHwrLafMgr();
       
   109 
       
   110   	/**
       
   111      * ConstructL
       
   112      *
       
   113      * @since S60 v3.2
       
   114      * @return None
       
   115      */
       
   116 	void ConstructL();
       
   117 
       
   118 	/**
       
   119      * Set current layout type;
       
   120      * @param aLayoutType  Hwr layout type( latin or non lation )
       
   121      * @since S60 v3.2
       
   122      * @return None
       
   123      */
       
   124 	inline void SetLayoutType(TPeninputHwrLayoutType aLayoutType);	
       
   125 	inline TPeninputHwrLayoutType LayoutType() const;
       
   126 	
       
   127 	/**
       
   128      * Get button laf data
       
   129      *
       
   130      * @since S60 v3.2
       
   131      * @param aButtonID 	button id
       
   132      * @param aOutterRect	button rect
       
   133      * @param aInnerRect	button forground rect
       
   134      * @return None
       
   135      */	
       
   136 	void GetButtonRect( TPeninputCommonCtrlID aButtonID, 
       
   137 						TRect& aOutterRect,
       
   138 						TRect& aInnerRect );
       
   139 	
       
   140 	inline const TRect& EntirePaneRect() const;						
       
   141 	inline const TRect& RangbarRect() const;
       
   142 	inline const TRect& TextAreaRect() const;
       
   143 	inline const TRect& WriteAreaRect() const;						
       
   144 
       
   145 protected:
       
   146 	
       
   147 	CPeninputGenericHwrLafMgr(TPeninputHwrLayoutType aLayoutType);
       
   148 	
       
   149 	void ReadLafInfoL();
       
   150 	
       
   151 	void GetHwrLayoutDataInfo( const TRect& aParentWndRect, 
       
   152 							   TInt aLayoutType, 
       
   153 							   CPeninputHwrLayoutDataInfo& aDataInfo );
       
   154 	
       
   155 	inline TBool IsValid() const;
       
   156 private:
       
   157 	TPeninputHwrLayoutType iCurLayoutType;
       
   158 	TBool iIsValid;
       
   159 	RPointerArray<CPeninputHwrLayoutDataInfo> iLayoutData;
       
   160     };
       
   161 
       
   162 #endif //C_CPENINPUTGENERICHWRLAFDATAMGR_H