locsrv_plat/map_image_api/tsrc/testprovider/src/testprovidermapview.cpp
branchRCL_3
changeset 44 2b4ea9893b66
parent 42 02ba3f1733c6
child 45 6b6920c56e2f
equal deleted inserted replaced
42:02ba3f1733c6 44:2b4ea9893b66
     1 /*
       
     2 * Copyright (c) 2004 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: Map View for map and navigation test provider
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #include <coemain.h>
       
    21 #include <aknlists.h>
       
    22 #include <barsread.h>
       
    23 
       
    24 #include "debug.h"
       
    25 #include "testprovidermapview.h"
       
    26 
       
    27 // ============================ MEMBER FUNCTIONS ===============================
       
    28 
       
    29 // -----------------------------------------------------------------------------
       
    30 // -----------------------------------------------------------------------------
       
    31 //
       
    32 CTestProviderMapView* CTestProviderMapView::NewL( const TRect& aRect )
       
    33     {
       
    34     CTestProviderMapView* self = CTestProviderMapView::NewLC( aRect );
       
    35     CleanupStack::Pop( self );
       
    36     return self;
       
    37     }
       
    38 
       
    39 // -----------------------------------------------------------------------------
       
    40 // -----------------------------------------------------------------------------
       
    41 //
       
    42 CTestProviderMapView* CTestProviderMapView::NewLC( const TRect& aRect )
       
    43     {
       
    44     CTestProviderMapView* self = new ( ELeave ) CTestProviderMapView;
       
    45     CleanupStack::PushL( self );
       
    46     self->ConstructL( aRect );
       
    47     return self;
       
    48     }
       
    49 
       
    50 // -----------------------------------------------------------------------------
       
    51 // CTestProviderMapView::ConstructL()
       
    52 // Symbian 2nd phase constructor can leave.
       
    53 // -----------------------------------------------------------------------------
       
    54 //
       
    55 void CTestProviderMapView::ConstructL( const TRect& aRect )
       
    56     {
       
    57     // Create a window for this application view
       
    58     CreateWindowL();
       
    59 
       
    60     // Set the windows size
       
    61     SetRect( aRect );
       
    62 
       
    63     // Activate the window, which makes it ready to be drawn
       
    64     ActivateL();
       
    65     }
       
    66 
       
    67 // -----------------------------------------------------------------------------
       
    68 // -----------------------------------------------------------------------------
       
    69 //
       
    70 CTestProviderMapView::CTestProviderMapView()
       
    71     {
       
    72     }
       
    73 
       
    74 
       
    75 // -----------------------------------------------------------------------------
       
    76 // -----------------------------------------------------------------------------
       
    77 //
       
    78 CTestProviderMapView::~CTestProviderMapView()
       
    79     {
       
    80     }
       
    81 
       
    82 
       
    83 // -----------------------------------------------------------------------------
       
    84 // CTestProviderMapView::Draw()
       
    85 // Draws the display.
       
    86 // -----------------------------------------------------------------------------
       
    87 //
       
    88 void CTestProviderMapView::Draw( const TRect& /*aRect*/ ) const
       
    89     {
       
    90     // Get the standard graphics context
       
    91     CWindowGc& gc = SystemGc();
       
    92 
       
    93     // Gets the control's extent
       
    94     TRect rect = Rect();
       
    95 
       
    96     // Clears the screen
       
    97     gc.Clear( rect );
       
    98     }
       
    99