emailuis/emailui/src/ncseditor.cpp
branchRCL_3
changeset 80 726fba06891a
parent 73 c8382f7b54ef
equal deleted inserted replaced
73:c8382f7b54ef 80:726fba06891a
    26 #include <AknsConstants.h>
    26 #include <AknsConstants.h>
    27 #include <AknsUtils.h>
    27 #include <AknsUtils.h>
    28 #include <AknsSkinInstance.h>
    28 #include <AknsSkinInstance.h>
    29 #include <aknedsts.h>
    29 #include <aknedsts.h>
    30 #include <AknsBasicBackgroundControlContext.h>
    30 #include <AknsBasicBackgroundControlContext.h>
    31 #include <centralrepository.h>
       
    32 
    31 
    33 #include "ncseditor.h"
    32 #include "ncseditor.h"
    34 #include "ncsutility.h"
    33 #include "ncsutility.h"
    35 #include "ncscustomdraw.h"
    34 #include "ncscustomdraw.h"
    36 #include "ncseditorcustomdraw.h"
    35 #include "ncseditorcustomdraw.h"
    37 #include "freestyleemailcenrepkeys.h"
       
    38 
    36 
    39 // ========================= MEMBER FUNCTIONS ==================================
    37 // ========================= MEMBER FUNCTIONS ==================================
    40 
    38 
    41 // ---------------------------------------------------------------------------
    39 // ---------------------------------------------------------------------------
    42 // constructor
    40 // constructor
    71     CEikRichTextEditor::ConstructL( aParent, aNumberOfLines, aTextLimit,
    69     CEikRichTextEditor::ConstructL( aParent, aNumberOfLines, aTextLimit,
    72             CEikEdwin::EAvkonEditor | CEikEdwin::EResizable |
    70             CEikEdwin::EAvkonEditor | CEikEdwin::EResizable |
    73             CEikEdwin::ENoAutoSelection | CEikEdwin::EInclusiveSizeFixed |
    71             CEikEdwin::ENoAutoSelection | CEikEdwin::EInclusiveSizeFixed |
    74             CEikEdwin::ENoHorizScrolling | CEikRichTextEditor::EPasteAsPlainText );
    72             CEikEdwin::ENoHorizScrolling | CEikRichTextEditor::EPasteAsPlainText );
    75     
    73     
    76     CRepository* repository = NULL;
       
    77     TRAPD( err, repository = CRepository::NewL( KFreestyleEmailCenRep ) );
       
    78     if ( !err )
       
    79         {
       
    80         TInt value( 0 );
       
    81         err = repository->Get( KEmailFeatureSplitScreen, value );
       
    82         if( !err && value )
       
    83             {
       
    84             SetAknEditorFlags( AknEditorFlags() | EAknEditorFlagEnablePartialScreen );  
       
    85             }
       
    86         }
       
    87     delete repository;
       
    88     repository = NULL;
       
    89     iGlobalCharFormat = CCharFormatLayer::NewL();
    74     iGlobalCharFormat = CCharFormatLayer::NewL();
    90     iGlobalCharFormat->SetBase( GlobalText()->GlobalCharFormatLayer() );
    75     iGlobalCharFormat->SetBase( GlobalText()->GlobalCharFormatLayer() );
    91     GlobalText()->SetGlobalCharFormat( iGlobalCharFormat );
    76     GlobalText()->SetGlobalCharFormat( iGlobalCharFormat );
    92     }
    77     }
    93 
    78 
   127 
   112 
   128 // -----------------------------------------------------------------------------
   113 // -----------------------------------------------------------------------------
   129 // CNcsEditor::GetLineRectL() const
   114 // CNcsEditor::GetLineRectL() const
   130 // -----------------------------------------------------------------------------
   115 // -----------------------------------------------------------------------------
   131 //
   116 //
   132 void CNcsEditor::GetLineRect( TRect& aLineRect ) const
   117 void CNcsEditor::GetLineRectL( TRect& aLineRect ) const
   133     {
   118     {
   134     FUNC_LOG;
   119     FUNC_LOG;
   135     TPoint position;
   120     TPoint position;
   136     TRAP_IGNORE( iLayout->DocPosToXyPosL( CursorPos(), position ) );
   121     iLayout->DocPosToXyPosL( CursorPos(), position );
   137     iLayout->GetLineRect( position.iY, aLineRect );
   122     iLayout->GetLineRect( position.iY, aLineRect );
   138     }
   123     }
   139 
   124 
   140 // -----------------------------------------------------------------------------
   125 // -----------------------------------------------------------------------------
   141 // CNcsEditor::CursorLineNumber() const
   126 // CNcsEditor::CursorLineNumber() const
   668 
   653 
   669 
   654 
   670 void CNcsEditor::SetPhysicsEmulationOngoing( TBool aPhysOngoing )
   655 void CNcsEditor::SetPhysicsEmulationOngoing( TBool aPhysOngoing )
   671     {
   656     {
   672     iPhysOngoing = aPhysOngoing;
   657     iPhysOngoing = aPhysOngoing;
   673     if ( IsFocused() )
   658     this->SetCursorVisible( !aPhysOngoing );
   674         {
       
   675         SetCursorVisible( !aPhysOngoing );
       
   676         }
       
   677     }
   659     }
   678 
   660 
   679 TBool CNcsEditor::IsPhysicsEmulationOngoing() const
   661 TBool CNcsEditor::IsPhysicsEmulationOngoing() const
   680     {
   662     {
   681     return iPhysOngoing;
   663     return iPhysOngoing;