startupservices/Startup/src/startupview.cpp
branchRCL_3
changeset 19 924385140d98
parent 0 2e3d3ce01487
child 20 c2c61fdca848
equal deleted inserted replaced
18:0818dd463d41 19:924385140d98
     1 /*
     1 /*
     2 * Copyright (c) 2007,2008 Nokia Corporation and/or its subsidiary(-ies). 
     2 * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). 
     3 * All rights reserved.
     3 * All rights reserved.
     4 * This component and the accompanying materials are made available
     4 * This component and the accompanying materials are made available
     5 * under the terms of "Eclipse Public License v1.0"
     5 * under the terms of "Eclipse Public License v1.0"
     6 * which accompanies this distribution, and is available
     6 * which accompanies this distribution, and is available
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
    14 * Description:  Implementation of CStartupView class
    14 * Description:  Implementation of CStartupView class
    15 *
    15 *
    16 */
    16 */
    17 
    17 
    18 
    18 
    19 #include <aknappui.h>
    19 
    20 #include <AknsBasicBackgroundControlContext.h> // Skin support
       
    21 #include <AknsDrawUtils.h> // Skin support
       
    22 
    20 
    23 #include "startupview.h"
    21 #include "startupview.h"
    24 #include "StartupDefines.h"
    22 #include "StartupDefines.h"
    25 
    23 
    26 // ======== MEMBER FUNCTIONS ========
    24 // ======== MEMBER FUNCTIONS ========
    50 // ---------------------------------------------------------------------------
    48 // ---------------------------------------------------------------------------
    51 //
    49 //
    52 CStartupView::~CStartupView()
    50 CStartupView::~CStartupView()
    53     {
    51     {
    54     TRACES("CStartupView::~CStartupView()");
    52     TRACES("CStartupView::~CStartupView()");
    55     delete iBgContext;
    53     
    56     TRACES("CStartupView::~CStartupView(): End");
    54     TRACES("CStartupView::~CStartupView(): End");
    57     }
    55     }
    58 
    56 
    59 
    57 
    60 // ---------------------------------------------------------------------------
    58 // ---------------------------------------------------------------------------
    92 //
    90 //
    93 // ---------------------------------------------------------------------------
    91 // ---------------------------------------------------------------------------
    94 void CStartupView::SizeChanged()
    92 void CStartupView::SizeChanged()
    95     {
    93     {
    96     TRACES("CStartupView::SizeChanged()");
    94     TRACES("CStartupView::SizeChanged()");
    97 
       
    98     if (iBgContext)
       
    99     	{
       
   100     	iBgContext->SetRect( Rect() );
       
   101     	}
       
   102     
       
   103     if ( iComponent )
    95     if ( iComponent )
   104         {
    96         {
   105         iComponent->SetRect( Rect() );
    97         iComponent->SetRect( Rect() );
   106         }
    98         }
   107 
    99 
   142 void CStartupView::Draw( const TRect& aRect ) const
   134 void CStartupView::Draw( const TRect& aRect ) const
   143     {
   135     {
   144     TRACES("CStartupView::Draw()");
   136     TRACES("CStartupView::Draw()");
   145 
   137 
   146     CWindowGc& gc = SystemGc();
   138     CWindowGc& gc = SystemGc();
   147     MAknsSkinInstance* skin = AknsUtils::SkinInstance();
   139  
   148     gc.SetPenStyle( CGraphicsContext::ENullPen );
   140     gc.SetPenStyle( CGraphicsContext::ENullPen );
   149     gc.SetBrushStyle( CGraphicsContext::ESolidBrush );
   141     gc.SetBrushStyle( CGraphicsContext::ESolidBrush );
   150     
   142     gc.SetClippingRect( aRect );
   151     // Draw skin background
   143     gc.SetBrushColor( KRgbWhite );
   152     if ( !AknsDrawUtils::Background( skin, iBgContext, gc, aRect ) )
   144     gc.Clear();
   153         {
       
   154         // If Skin is missing, clear with default color
       
   155         gc.SetClippingRect( aRect );
       
   156         gc.SetBrushColor( KRgbWhite );
       
   157         gc.Clear();
       
   158         }
       
   159 
       
   160     TRACES("CStartupView::Draw(): End");
   145     TRACES("CStartupView::Draw(): End");
   161     }
   146     }
   162 
       
   163 
   147 
   164 // ---------------------------------------------------------------------------
   148 // ---------------------------------------------------------------------------
   165 // CStartupView::CStartupView
   149 // CStartupView::CStartupView
   166 //
   150 //
   167 // ---------------------------------------------------------------------------
   151 // ---------------------------------------------------------------------------
   170     {
   154     {
   171     TRACES("CStartupView::CStartupView()");
   155     TRACES("CStartupView::CStartupView()");
   172     TRACES("CStartupView::CStartupView(): End");
   156     TRACES("CStartupView::CStartupView(): End");
   173     }
   157     }
   174 
   158 
   175 
       
   176 // ---------------------------------------------------------------------------
   159 // ---------------------------------------------------------------------------
   177 // CStartupView::ConstructL
   160 // CStartupView::ConstructL
   178 //
   161 //
   179 // ---------------------------------------------------------------------------
   162 // ---------------------------------------------------------------------------
   180 //
   163 //
   181 void CStartupView::ConstructL( const TRect& aRect )
   164 void CStartupView::ConstructL( const TRect& aRect )
   182     {
   165     {
   183     TRACES("CStartupView::ConstructL()");
   166     TRACES("CStartupView::ConstructL()");
   184 
       
   185     iAvkonAppUi->StatusPane()->MakeVisible( EFalse );
       
   186     CreateWindowL();
   167     CreateWindowL();
   187     SetRect( aRect );
   168     SetRect( aRect );
   188 
   169 
   189 	// Create background drawing context    
   170 	// Create background drawing context    
   190     TRect bgrect(aRect.Size());
   171     TRect bgrect(aRect.Size());
   191     iBgContext = CAknsBasicBackgroundControlContext::NewL( 
       
   192             KAknsIIDQsnBgScreen,
       
   193     		bgrect, EFalse );
       
   194 
       
   195     ActivateL();
   172     ActivateL();
   196 
       
   197     TRACES("CStartupView::ConstructL(): End");
   173     TRACES("CStartupView::ConstructL(): End");
   198     }
   174     }