textinput/peninputarc/inc/peninputlayoutcontrolinc/peninputlayoutbasecontrol.h
branchRCL_3
changeset 44 ecbabf52600f
parent 43 ebd48d2de13c
--- a/textinput/peninputarc/inc/peninputlayoutcontrolinc/peninputlayoutbasecontrol.h	Tue Aug 31 15:31:50 2010 +0300
+++ b/textinput/peninputarc/inc/peninputlayoutcontrolinc/peninputlayoutbasecontrol.h	Wed Sep 01 12:23:33 2010 +0100
@@ -43,6 +43,10 @@
 //base control type
 typedef TInt64 TControlType;
 
+const TInt KPenInputOwnDeviceChange = -1;
+const TInt KPenInputOwnDeviceResourceChange = -2;
+
+const TUint KFepCtrlExtId = 0x00000000;
 //UI layout leave code
 enum TUiLayoutErrorCode
     {
@@ -200,6 +204,64 @@
 friend class CControlGroup;    
 friend class CInsertionPoint;
 public:
+    NONSHARABLE_CLASS(CFepUiBaseCtrlExtension) : public CBase
+        {
+        public: 
+            
+        CFepUiBaseCtrlExtension();
+        
+        /**
+         * Set Tactile Feedback Type
+         * Advanced Tactile feedback REQ417-47932
+         */
+        void SetTactileFeedbackType(TInt aTactileType);
+        
+        /**
+        * Return tactile feedback type
+        *
+        * Advanced Tactile feedback REQ417-47932
+        * @return the tactile feedback type
+        */  
+        IMPORT_C TInt TactileFeedbackType();
+public:
+            TBool iExtResponseAreaActive;
+            TRect iExtResponseArea;
+            TBool iExtResponseAreaEnabled;
+            TRect  iExtResponseAreaMargin;
+                
+        private:
+        /**
+         * Tactile Feedback type
+         */
+        TInt iTactileType;    
+
+        public:
+            ~CFepUiBaseCtrlExtension();
+            CFbsBitmap* Bitmap() { return iBitmap;}
+            CFbsBitmap* MaskBitmap() { return iMaskBitmap;}
+            CFbsBitGc* Gc() { return iGc;}
+            CFbsBitmapDevice* BitmapDevice() { return iBitmapDevice;}
+            CFbsBitmapDevice* MaskBitmapDevice() { return iMaskBitmapDevice;}
+
+            void SetBitmap(CFbsBitmap* aBmp) { iBitmap = aBmp;}
+            void SetGc(CFbsBitGc* aGc) { iGc = aGc;}
+            void SetBmpDevice(CFbsBitmapDevice* aDevice) { iBitmapDevice = aDevice;}
+            void SetMaskBmpDevice(CFbsBitmapDevice* aDevice) { iMaskBitmapDevice = aDevice;}
+            
+        private:
+            CFbsBitmap* iBitmap; // not own, don't delete
+            CFbsBitmap* iMaskBitmap; // not own, don't delete
+            /** 
+             * graphic context
+             * Not own
+             */    
+            CFbsBitGc* iGc;
+            CFbsBitmapDevice* iBitmapDevice;
+            CFbsBitmapDevice* iMaskBitmapDevice;
+friend class CFepUiBaseCtrl;            
+        };
+		
+public:
     enum TZOrder
         {
         EOrderBackground = 1500, //order for background control
@@ -765,7 +827,7 @@
      * @param aRect the rect to be flushed in screen
      * @param aUpdateFlag ETrue if full update.
      */
-    IMPORT_C void UpdateArea(const TRect& aRect,TBool aUpdateFlag= EFalse); 
+    IMPORT_C virtual void UpdateArea(const TRect& aRect,TBool aUpdateFlag= EFalse); 
 
     /**
      * Update layout area immediately
@@ -904,6 +966,25 @@
      */                                                       
     TBool CompareOrderInSameGroup(CFepUiBaseCtrl* aCtrl);
     
+    /**
+     * Enable/disable extra response area support
+     * 
+     * @param aEnable ETrue to enable, or EFalse to disable
+     * @param aExtMargin margin of extra response area
+     * @return none
+     */
+    IMPORT_C void EnableExtResponseArea( TBool aEnable, const TRect& aExtMargin );
+    
+    /**
+     * Active extra response area
+     */
+    IMPORT_C void ActiveExtResponseArea();
+    
+    /**
+     * Cancel extra response area
+     */
+    IMPORT_C void CancelExtResponseArea();
+       
 protected:
          
     /**
@@ -967,28 +1048,28 @@
      * @since S60 V4.0
      * @return The graphic context
      */
-    inline CBitmapContext* BitGc();
+    IMPORT_C CBitmapContext* BitGc();
 
     /**
      * get Bitmap device for sprite or window
      * @since S60 V4.0
      * @return The bitmap device
      */
-    inline CFbsBitmapDevice* BitmapDevice();
+    IMPORT_C CFbsBitmapDevice* BitmapDevice();
 
     /**
      * get Mask bitmap device for sprite or window
      * @since S60 V4.0
      * @return The mask bitmap device
      */
-    inline CFbsBitmapDevice* MaskBitmapDevice();
+    IMPORT_C CFbsBitmapDevice* MaskBitmapDevice();
     
     /**
      * get control background mask bmp
      * @since S60 V4.0
      * @return The background mask bitmap
      */
-    inline CFbsBitmap* BkMaskBmp();
+    IMPORT_C CFbsBitmap* BkMaskBmp();    
     
     /**
      * get control background  bmp
@@ -1153,6 +1234,9 @@
     virtual IMPORT_C void GraphicDeviceSizeChanged();
     
     inline void SetHidenFlag(TBool aFlag);
+    void CreateOwnDeviceL(CFbsBitmap* aBmp, CFbsBitmap* aMaskBmp = 0);
+    
+    void ResizeDeviceL();
 private:
     /**
      * Draw shadow bitmap
@@ -1162,6 +1246,14 @@
      * @param aIndex The shadow bitmap position index
      */   
     void DrawShadowBitmap(const TRect& aRect,TInt aIndex);
+
+    /**
+     * Update extra response area
+     * 
+     * @param aRect new response area
+     * @return none
+     */
+    void UpdateExtResponseArea( const TRect& aRect );
     
 protected:
     /**
@@ -1340,43 +1432,20 @@
     RRegion iClipRegionWithoutLockedArea;     
     
     
-    TInt iOrdinalPos; 
+    TInt iOrdinalPos;
+
+    //class CFepUiBaseCtrlExtension;
+
     /**
      * Reservered
      */
-    TInt iReservered1;
+    CFepUiBaseCtrlExtension* iExtension;
 
     /**
      * Reservered
      */
     TInt iReservered2;   
-    
-    NONSHARABLE_CLASS(CFepUiBaseCtrlExtension)
-    	{
-    	public: 
-    		
-		CFepUiBaseCtrlExtension(TInt aTactileType);
-		
-		/**
-		 * Set Tactile Feedback Type
-		 * Advanced Tactile feedback REQ417-47932
-		 */
-		void SetTactileFeedbackType(TInt aTactileType);
-		
-		/**
-		* Return tactile feedback type
-		*
-		* Advanced Tactile feedback REQ417-47932
-		* @return the tactile feedback type
-		*/  
-		IMPORT_C TInt TactileFeedbackType();
-		
-    	private:
-        /**
-         * Tactile Feedback type
-         */
-        TInt iTactileType;
-    	};
+   
     };
 //end of class CFepUiBaseCtrl
 #include "peninputlayoutbasecontrol.inl"