defaultapplicationsettings/server/src/das_view.cpp
changeset 10 0a74be98a8bc
parent 0 254040eb3b7d
child 11 10d0dd0e43f1
equal deleted inserted replaced
0:254040eb3b7d 10:0a74be98a8bc
     1 /*
       
     2 * Copyright (c) 2005-2006 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:  Implementation of the view class
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 // System includes
       
    21 
       
    22 #include "das_view.h"
       
    23 
       
    24 
       
    25 // ============================ MEMBER FUNCTIONS ===============================
       
    26 
       
    27 // -----------------------------------------------------------------------------
       
    28 // CDefaultAppView::NewL()
       
    29 // Two-phased constructor.
       
    30 // -----------------------------------------------------------------------------
       
    31 //
       
    32 CDefaultAppView* CDefaultAppView::NewL( const TRect& aRect )
       
    33     {
       
    34     CDefaultAppView* self = CDefaultAppView::NewLC( aRect );
       
    35     CleanupStack::Pop( self );
       
    36     return self;
       
    37     }
       
    38 
       
    39 // -----------------------------------------------------------------------------
       
    40 // CDefaultAppView::NewLC()
       
    41 // Two-phased constructor.
       
    42 // -----------------------------------------------------------------------------
       
    43 //
       
    44 CDefaultAppView* CDefaultAppView::NewLC( const TRect& aRect )
       
    45     {
       
    46     CDefaultAppView* self = new ( ELeave ) CDefaultAppView;
       
    47     CleanupStack::PushL( self );
       
    48     self->ConstructL( aRect );
       
    49     return self;
       
    50     }
       
    51 
       
    52 // -----------------------------------------------------------------------------
       
    53 // CDefaultAppView::ConstructL()
       
    54 // Symbian 2nd phase constructor can leave.
       
    55 // -----------------------------------------------------------------------------
       
    56 //
       
    57 void CDefaultAppView::ConstructL( const TRect& aRect )
       
    58     {
       
    59     // Create a window for this application view
       
    60     CreateWindowL();
       
    61 
       
    62     // Set the windows size
       
    63     SetRect( aRect );
       
    64 
       
    65     // Activate the window, which makes it ready to be drawn
       
    66     ActivateL();
       
    67     }
       
    68 
       
    69 // -----------------------------------------------------------------------------
       
    70 // CDefaultAppView::CDefaultAppView()
       
    71 // C++ default constructor can NOT contain any code, that might leave.
       
    72 // -----------------------------------------------------------------------------
       
    73 //
       
    74 CDefaultAppView::CDefaultAppView()
       
    75     {
       
    76     // No implementation required
       
    77     }
       
    78 
       
    79 
       
    80 // -----------------------------------------------------------------------------
       
    81 // CDefaultAppView::~CDefaultAppView()
       
    82 // Destructor.
       
    83 // -----------------------------------------------------------------------------
       
    84 //
       
    85 CDefaultAppView::~CDefaultAppView()
       
    86     {
       
    87     // No implementation required
       
    88     }
       
    89 
       
    90 
       
    91 // -----------------------------------------------------------------------------
       
    92 // CDefaultAppView::Draw()
       
    93 // Draws the display.
       
    94 // -----------------------------------------------------------------------------
       
    95 //
       
    96 void CDefaultAppView::Draw( const TRect& /*aRect*/ ) const
       
    97     {
       
    98     // Get the standard graphics context
       
    99     CWindowGc& gc = SystemGc();
       
   100 
       
   101     // Gets the control's extent
       
   102     TRect drawRect( Rect());
       
   103 
       
   104     
       
   105   	}
       
   106 
       
   107 // -----------------------------------------------------------------------------
       
   108 // CDefaultAppView::SizeChanged()
       
   109 // Called by framework when the view size is changed.
       
   110 // -----------------------------------------------------------------------------
       
   111 //
       
   112 void CDefaultAppView::SizeChanged()
       
   113     {  
       
   114     DrawNow();
       
   115     }