textinput/peninputarc/inc/peninputlayoutcontrolinc/peninputlayoutmicfcustomdraw.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:
       
    15 *
       
    16 */
       
    17 #ifndef CMICFCUSTOMDRAW_H
       
    18 #define CMICFCUSTOMDRAW_H
       
    19 
       
    20 #include <e32base.h>
       
    21 #include <frmtlay.h>
       
    22 
       
    23 class CFepLayoutMultiLineIcfEditor;
       
    24 
       
    25 class CFepLayoutMIcfCustomDraw : public CBase,
       
    26                                  public MFormCustomDraw
       
    27     {
       
    28 public:
       
    29     CFepLayoutMIcfCustomDraw(CFepLayoutMultiLineIcfEditor* aParentControl);
       
    30     virtual ~CFepLayoutMIcfCustomDraw();
       
    31 
       
    32 public: 
       
    33     // functions from base class MFormCustomDraw
       
    34     void DrawBackground(const TParam& aParam,
       
    35                         const TRgb& aRgb,
       
    36                         TRect& aDrawn) const;
       
    37     
       
    38     void DrawText( const TParam& aParam, const TLineInfo& aLineInfo, 
       
    39     		       const TCharFormat& aFormat, const TDesC& aText, 
       
    40     		       const TPoint& aTextOrigin,TInt aExtraPixels ) const;
       
    41     
       
    42     void DrawText( const TParam& aParam,const TLineInfo& aLineInfo,
       
    43     		       const TCharFormat& aFormat, const TDesC& aText,
       
    44     		       const TInt aStart, const TInt aEnd, 
       
    45     		       const TPoint& aTextOrigin,TInt aExtraPixels) const;
       
    46     
       
    47 private:
       
    48     mutable CFepLayoutMultiLineIcfEditor* iParentControl;
       
    49     };
       
    50 
       
    51 class CFepLayoutMIcfCustomWrap : public CBase,
       
    52                                  public MFormCustomWrap                             
       
    53     {
       
    54 public:    
       
    55     TBool LineBreakPossible(TUint aPrevClass, TUint aNextClass, TBool aHaveSpaces) const;
       
    56     TUint LineBreakClass(TUint aCode,TUint& aRangeStart,TUint& aRangeEnd) const;
       
    57     };
       
    58 
       
    59 #endif // CMICFCUSTOMDRAW_H