textinput/peninputarc/inc/peninputlayoutcontrolinc/peninputaknvkbpreviewbubblerenderer.h
branchRCL_3
changeset 7 a47de9135b21
equal deleted inserted replaced
3:f5a1e66df979 7:a47de9135b21
       
     1 /*
       
     2 * Copyright (c) 2005-2006 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 file of virtual keyboard control
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef C_PENINPUTVKBPREVIEWBUBBLERENDERER_H
       
    19 #define C_PENINPUTVKBPREVIEWBUBBLERENDERER_H
       
    20 
       
    21 // User includes
       
    22 #include "peninputvkbpreviewbubblerenderer.h"
       
    23 
       
    24 // Forward declarations
       
    25 class CPeninputFloatingBubble;
       
    26 
       
    27 // CLASS DECLARATION
       
    28 
       
    29 /**
       
    30  * CPeninputAknVkbPreviewBubbleRenderer
       
    31  * CCoeControl-based preview bubble extension  
       
    32  *  
       
    33  */
       
    34 class CPeninputAknVkbPreviewBubbleRenderer : public CBase, 
       
    35                                              public MPeninputVkbPreviewBubbleRenderer
       
    36 {
       
    37 public:
       
    38     /**
       
    39      * Symbian constructor
       
    40      *
       
    41      * @since S60 v5.0
       
    42      * @return The pointer to created object
       
    43      */
       
    44     IMPORT_C static CPeninputAknVkbPreviewBubbleRenderer* NewL();
       
    45     
       
    46     /**
       
    47      * C++ destructor
       
    48      *
       
    49      * @since S60 v5.0
       
    50      * @return None
       
    51      */    
       
    52     virtual ~CPeninputAknVkbPreviewBubbleRenderer();
       
    53     
       
    54 protected: //from base class MPeninputVkbPreviewBubbleRenderer
       
    55     /**
       
    56      * Attach this extension to a virtual keyboard object.
       
    57      * Increase reference count
       
    58      * 
       
    59      * @since S60 S60 v5.0
       
    60      * @return None.
       
    61      */    
       
    62     virtual void Attach();
       
    63     
       
    64     /**
       
    65      * Detach this extension from a virtual keyboard object.
       
    66      * decrease reference count
       
    67      * 
       
    68      * @since S60 S60 v5.0
       
    69      * @return None.
       
    70      */        
       
    71     virtual void Detach();
       
    72     
       
    73     /**
       
    74      * Enable preview bubble. 
       
    75      * 
       
    76      * @since S60 S60 v5.0
       
    77      * @param aFlag ETrue to enable preview bubble.
       
    78      * @return None.
       
    79      */     
       
    80     virtual void ShowBubble( TBool aFlag );
       
    81     
       
    82     /**
       
    83      * Draw preview bubble.
       
    84      * 
       
    85      * @since S60 S60 v5.0
       
    86      * @param aKey Virtual key.
       
    87      * @param aVkbPos Position of virtual keyboard.
       
    88      * @param aLayoutPos Position of layout, in screen coord-sys.
       
    89      * @param aSize Size of bubble.
       
    90      * @return None.
       
    91      */     
       
    92     virtual void DrawBubble( CVirtualKey* aKey, const TPoint& aVkbPos, 
       
    93                              const TPoint& aLayoutPos, const TSize& aSize );
       
    94     
       
    95     /**
       
    96      * Clear preview bubble.
       
    97      * 
       
    98      * @since S60 S60 v5.0
       
    99      * @return None.
       
   100      */     
       
   101     virtual void ClearBubble();
       
   102 
       
   103     /**
       
   104      * Set icon and background of bubble.
       
   105      * 
       
   106      * @since S60 S60 v5.0
       
   107      * @param aBmpId Bitmap of icon.
       
   108      * @param aMaskBmpId Bitmap of mask.
       
   109      * @param aBgSkinId Skin id of background.
       
   110      * @return None.
       
   111      */    
       
   112     virtual void SetBubbleBitmapParam( CFbsBitmap* aBmpId, CFbsBitmap* aMaskBmpId, 
       
   113                                        TAknsItemID aBgSkinId );
       
   114     
       
   115     /**
       
   116      * Set text format
       
   117      * 
       
   118      * @since S60 S60 v5.0
       
   119      * @param aTextFormat Text format.
       
   120      * @return None.
       
   121      */      
       
   122     virtual void SetTextFormat( TAknTextLineLayout aTextFormat );
       
   123     
       
   124     
       
   125     /**
       
   126      * Set margin of bubble
       
   127      * 
       
   128      * @since S60 S60 v5.0
       
   129      * @param aLeftDiff Left margin.
       
   130      * @param aTopDiff Top margin.
       
   131      * @param aRightDiff Right margin.
       
   132      * @param aBottomDiff Bottom margin.
       
   133      * @return None.
       
   134      */    
       
   135     virtual void SetFrameDiff( TInt aLeftDiff, TInt aTopDiff, 
       
   136                                TInt aRightDiff,TInt aBottomDiff );
       
   137 
       
   138 private:
       
   139     /**
       
   140      * C++ constructor
       
   141      *
       
   142      * @since S60 v5.0
       
   143      * @return None
       
   144      */    
       
   145     CPeninputAknVkbPreviewBubbleRenderer();
       
   146     
       
   147     /**
       
   148      * Symbian constructor
       
   149      * 
       
   150      * @since S60 v5.0
       
   151      * @return None
       
   152      */    
       
   153     void ConstructL();
       
   154 
       
   155 private:
       
   156     /**
       
   157      * reference count
       
   158      */
       
   159 	TInt iRefCount;
       
   160 	
       
   161 	/**
       
   162 	 * Bubble control
       
   163 	 * Own
       
   164 	 */
       
   165 	CPeninputFloatingBubble* iBubbleCtrlEx;
       
   166 	
       
   167 };
       
   168 
       
   169 #endif //C_PENINPUTVKBPREVIEWBUBBLERENDERER_H