classicui_pub/editors_api/inc/EIKEDWIN.H
branchRCL_3
changeset 21 978afdc0236f
parent 20 d48ab3b357f1
equal deleted inserted replaced
20:d48ab3b357f1 21:978afdc0236f
   498 		
   498 		
   499 		/**
   499 		/**
   500 		 * Record if text view has been actually hidden.
   500 		 * Record if text view has been actually hidden.
   501 		 */
   501 		 */
   502 		TBool iTextViewHidden;
   502 		TBool iTextViewHidden;
       
   503         /**
       
   504          * Record the buff of "Tap To write" in current language.
       
   505          * 
       
   506          * Own.
       
   507          */
       
   508         HBufC* iT2WBuf;
       
   509         enum TT2WFlag
       
   510             {
       
   511             ESplitInputEnabled  = 0x00000001,
       
   512             EFocusOn            = 0x00000002,
       
   513             ERecordCursor       = 0x00000004,
       
   514             ECursorVisible      = 0x00000008
       
   515             };
       
   516         /**
       
   517          * Record internal status of of "tap to write".
       
   518          */
       
   519 		TInt iT2WState;
   503         };
   520         };
   504 
   521 
   505 public:
   522 public:
   506 
   523 
   507     /**
   524     /**
  2383     TBool ConvertSmileyForDeleteL( TInt aDocPos, TBool aBackSpace ); 
  2400     TBool ConvertSmileyForDeleteL( TInt aDocPos, TBool aBackSpace ); 
  2384     void ConvertSmileyForDeleteL( const TCursorSelection &aSelect );
  2401     void ConvertSmileyForDeleteL( const TCursorSelection &aSelect );
  2385     TBool AdjustCursorPosByMovementL( TCursorPosition::TMovementType aMovement, 
  2402     TBool AdjustCursorPosByMovementL( TCursorPosition::TMovementType aMovement, 
  2386         TBool aSelect );
  2403         TBool aSelect );
  2387     void HandleSelectionForSmiley( TCursorSelection aSelect );
  2404     void HandleSelectionForSmiley( TCursorSelection aSelect );
  2388 	    
  2405     
       
  2406     /**
       
  2407      * 1,If the editor is read only or it is display only "tap to write" is disabled
       
  2408      * 2,If iEdwinExtension->iT2WBuf is NULL, "tap to write" is disabled. 
       
  2409      * 3,If Qwerty key borad is opened, "tap to write" is disabled
       
  2410      * 4,If focus off, "tap to write" is disabled
       
  2411      * 5,If split input is enabled, "tap to write" is disabled 
       
  2412      */    
       
  2413     TBool IsT2WEnabled() const;
  2389 protected:
  2414 protected:
  2390 
  2415 
  2391     /**
  2416     /**
  2392      * Specifies the end points of the editable area.
  2417      * Specifies the end points of the editable area.
  2393      */
  2418      */
  2776     TKeyResponse ScrollReadOnlyNoCursorDisplayL(TUint aKeyCode);
  2801     TKeyResponse ScrollReadOnlyNoCursorDisplayL(TUint aKeyCode);
  2777     void ReplaceParaDelimitersL( TInt aStartPos, TInt aLength );
  2802     void ReplaceParaDelimitersL( TInt aStartPos, TInt aLength );
  2778     TRect AdjustedViewRect() const;
  2803     TRect AdjustedViewRect() const;
  2779     void SetVKBStatus();
  2804     void SetVKBStatus();
  2780     void ScrollViewToCursorLineL();
  2805     void ScrollViewToCursorLineL();
       
  2806 
       
  2807     /**
       
  2808      * Scrolls view so that cursor is visible.
       
  2809      */
       
  2810     void MoveViewToCursorLineL();
       
  2811 
  2781     void PerformRecordedOperationL();
  2812     void PerformRecordedOperationL();
  2782     void ScrollIfAtTopOrBottomL();
  2813     void ScrollIfAtTopOrBottomL();
  2783     void SetSelectionVisibilityL( TBool aIsVisable );
  2814     void SetSelectionVisibilityL( TBool aIsVisable );
  2784     
  2815     
  2785     /**
  2816     /**
  2803     void EnableRateScrolling( TBool aEnable );
  2834     void EnableRateScrolling( TBool aEnable );
  2804 
  2835 
  2805 private:
  2836 private:
  2806 
  2837 
  2807 	void DrawFirstLineTextL() const;
  2838 	void DrawFirstLineTextL() const;
       
  2839 	
       
  2840     /**
       
  2841      * Draws "Tap to write" text to help user to navigate to virtual input
       
  2842      * This text is drawn when the text length of the editor field is zero
       
  2843      * 
       
  2844      * @param  none
       
  2845      * @return none
       
  2846      */
       
  2847     void DrawT2WTextL() const;
       
  2848     
       
  2849     /**
       
  2850      * Draws "Tap to write" text if text length is zero
       
  2851      * 
       
  2852      * @param  aClean. When aClean is set to ETrue and the codition of "tap to write" is False,
       
  2853      *     The editor will be redraw and "tap to write" will be clean.
       
  2854      * @return none
       
  2855      */
       
  2856     void TryToDrawT2W( TBool aClean = EFalse );
       
  2857     
       
  2858     /**
       
  2859      * Get the align of the first line text
       
  2860      * 
       
  2861      * @param  none
       
  2862      * @return text align for first line text
       
  2863      */
       
  2864     CGraphicsContext::TTextAlign AlignForFirstLineText( const TPtr & aReorderedTextPtr ) const;
       
  2865     
       
  2866     /**
       
  2867      * Get the rect of the first line text
       
  2868      * 
       
  2869      * @param  none
       
  2870      * @return rect of the first line
       
  2871      */
       
  2872     TRect RectForFirstLineText() const;
       
  2873     
  2808     CAknEdwinDrawingModifier* AknEdwinDrawingModifier();
  2874     CAknEdwinDrawingModifier* AknEdwinDrawingModifier();
  2809     TBool EditorSupportsNeutralProtection() const;
  2875     TBool EditorSupportsNeutralProtection() const;
  2810 
  2876 
  2811     /**
  2877     /**
  2812     * Main routine for neutral protection.  This routine returns a boolean stating if there is a
  2878     * Main routine for neutral protection.  This routine returns a boolean stating if there is a
  3087      *
  3153      *
  3088      * @return ETrue if editor content fits to view rect.
  3154      * @return ETrue if editor content fits to view rect.
  3089      */
  3155      */
  3090 	TBool ContentFitsToViewRect() const;
  3156 	TBool ContentFitsToViewRect() const;
  3091 
  3157 
       
  3158     /**
       
  3159      * Set the "Tap To Write" enable or not
       
  3160      * There are two ways to use this API. The first way is: after construct a editor you can 
       
  3161      * call EnableT2WL( ETrue ) to enable the feature, then editor will display or hide 
       
  3162      * "tap to write" by the internal status of editor. It means that "tap to write" will 
       
  3163      * display and hide automatically as internal logical of editor.
       
  3164      * Enable the feature: 
       
  3165      * CEikEdwin *editor = new (ELeave) CEikEdwin;
       
  3166      * editor->ConstructL();
       
  3167      * editor->EnableT2WL( ETrue );
       
  3168      * 
       
  3169      * The second way is application can call EnableT2WL( ETrue/EFalse )
       
  3170      * to display or hide "tap to write" immediately according to its own logic.
       
  3171      * Display:
       
  3172      * editor->EnableT2WL( ETrue );
       
  3173      * Hide:
       
  3174      * editor->EnableT2WL( EFalse );
       
  3175      * 
       
  3176      * @param ETure for enable EFalse for not disable.
       
  3177      * @return none.
       
  3178      */
       
  3179     IMPORT_C void EnableT2WL( TBool aEnable );
  3092 protected:
  3180 protected:
  3093 
  3181 
  3094     /**
  3182     /**
  3095      * Edwin user flags.
  3183      * Edwin user flags.
  3096      */
  3184      */