emailuis/emailui/src/ncseditor.cpp
branchRCL_3
changeset 19 b13141f05c3d
parent 16 4ce476e64c59
child 24 b5fbb9b25d57
equal deleted inserted replaced
17:8592a65ad3fb 19:b13141f05c3d
    81 // -----------------------------------------------------------------------------
    81 // -----------------------------------------------------------------------------
    82 //
    82 //
    83 CNcsEditor::~CNcsEditor()
    83 CNcsEditor::~CNcsEditor()
    84     {
    84     {
    85     FUNC_LOG;
    85     FUNC_LOG;
    86     // <cmail> Platform layout change
       
    87     delete iBgContext;
       
    88     // </cmail>
       
    89     delete iGlobalCharFormat;
    86     delete iGlobalCharFormat;
    90     
    87     delete iEditorCustomDrawer;
    91     if ( iEditorCustomDrawer )
       
    92         {
       
    93         delete iEditorCustomDrawer;        
       
    94         }
       
    95     delete iCaptionText;
    88     delete iCaptionText;
    96     }
    89     }
    97 
    90 
    98 // -----------------------------------------------------------------------------
    91 // -----------------------------------------------------------------------------
    99 // CNcsEditor::OpenVirtualKeyBoardL()
    92 // CNcsEditor::OpenVirtualKeyBoardL()
   194         UpdateFontSize();
   187         UpdateFontSize();
   195         }
   188         }
   196     }
   189     }
   197 
   190 
   198 // -----------------------------------------------------------------------------
   191 // -----------------------------------------------------------------------------
   199 // CNcsEditor::SetRect
       
   200 // -----------------------------------------------------------------------------
       
   201 //
       
   202 void CNcsEditor::SetRect( const TRect& aRect )
       
   203     {
       
   204     FUNC_LOG;
       
   205     //CCoeControl::SetRect( aRect );
       
   206     CEikRichTextEditor::SetRect( aRect );
       
   207     }
       
   208 
       
   209 // -----------------------------------------------------------------------------
       
   210 // CNcsEditor::HandleResourceChange
   192 // CNcsEditor::HandleResourceChange
   211 // -----------------------------------------------------------------------------
   193 // -----------------------------------------------------------------------------
   212 //
   194 //
   213 void CNcsEditor::HandleResourceChange( TInt aType )
   195 void CNcsEditor::HandleResourceChange( TInt aType )
   214     {
   196     {
   215     FUNC_LOG;
   197     FUNC_LOG;
   216     CEikRichTextEditor::HandleResourceChange( aType );
   198     CEikRichTextEditor::HandleResourceChange( aType );
   217 
   199 
   218     if ( aType == KAknsMessageSkinChange )
   200     if ( aType == KAknsMessageSkinChange )
   219         {
   201         {
   220         // S60 skin support
       
   221         UpdateGraphics();
       
   222         UpdateFontSize();
   202         UpdateFontSize();
   223         UpdateColors();
   203         UpdateColors();
   224         if ( iCustomDrawer )
   204         if ( iCustomDrawer )
   225             {
   205             {
   226             iCustomDrawer->UpdateColors();
   206             iCustomDrawer->UpdateColors();
   290 
   270 
   291     // Set the cursor position to initialize the edit control
   271     // Set the cursor position to initialize the edit control
   292     SetCursorPosL(0,EFalse);
   272     SetCursorPosL(0,EFalse);
   293     UpdateFontSize();
   273     UpdateFontSize();
   294     UpdateColors();
   274     UpdateColors();
   295     // <cmail> S60 skin support
   275     }
   296     UpdateGraphics();
       
   297     // </cmail>
       
   298 	}
       
   299 
   276 
   300 // -----------------------------------------------------------------------------
   277 // -----------------------------------------------------------------------------
   301 // CNcsEditor::LineCount() const
   278 // CNcsEditor::LineCount() const
   302 // -----------------------------------------------------------------------------
   279 // -----------------------------------------------------------------------------
   303 //
   280 //
   492     charFormatMask.SetAttrib(EAttColor);
   469     charFormatMask.SetAttrib(EAttColor);
   493     charFormatMask.SetAttrib(EAttFontTypeface);
   470     charFormatMask.SetAttrib(EAttFontTypeface);
   494     charFormatMask.SetAttrib(EAttFontHeight);
   471     charFormatMask.SetAttrib(EAttFontHeight);
   495     iGlobalCharFormat->SetL(charFormat, charFormatMask);
   472     iGlobalCharFormat->SetL(charFormat, charFormatMask);
   496     GlobalText()->SetGlobalCharFormat( iGlobalCharFormat );
   473     GlobalText()->SetGlobalCharFormat( iGlobalCharFormat );
   497     }
       
   498 
       
   499 // </cmail>
       
   500 
       
   501 // -----------------------------------------------------------------------------
       
   502 // CNcsEditor::UpdateGraphics
       
   503 // -----------------------------------------------------------------------------
       
   504 //
       
   505 void CNcsEditor::UpdateGraphics()
       
   506     {
       
   507     TRAP_IGNORE( DoUpdateGraphicsL() );
       
   508     }
       
   509 
       
   510 // -----------------------------------------------------------------------------
       
   511 // CNcsEditor::DoUpdateGraphicsL
       
   512 // -----------------------------------------------------------------------------
       
   513 //
       
   514 void CNcsEditor::DoUpdateGraphicsL()
       
   515     {
       
   516 	// <cmail> S60 Skin support
       
   517     delete iBgContext;
       
   518     iBgContext = NULL;
       
   519 
       
   520     TSize mainPaneSize;
       
   521  	AknLayoutUtils::LayoutMetricsSize(
       
   522  	    AknLayoutUtils::EMainPane, mainPaneSize );
       
   523 
       
   524     iBgContext = CAknsBasicBackgroundControlContext::NewL(
       
   525         //KAknsIIDQgnFsGrafEmailContent,
       
   526         KAknsIIDQsnBgAreaMain,
       
   527         TRect( mainPaneSize ),
       
   528         EFalse );
       
   529 
       
   530     SetSkinBackgroundControlContextL( iBgContext );
       
   531 	// </cmail>
       
   532     }
   474     }
   533 
   475 
   534 // ---------------------------------------------------------------------------
   476 // ---------------------------------------------------------------------------
   535 // CNcsEditor::GetLabelText
   477 // CNcsEditor::GetLabelText
   536 // ---------------------------------------------------------------------------
   478 // ---------------------------------------------------------------------------