calendarui/views/src/calendaylistboxdata.cpp
changeset 0 f979ecb2b13e
equal deleted inserted replaced
-1:000000000000 0:f979ecb2b13e
       
     1 /*
       
     2 * Copyright (c) 2002 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:   Drawing Day View Listbox data.
       
    15  *                Event bar and Event icon, event indicator
       
    16  *
       
    17 */
       
    18 
       
    19 
       
    20 
       
    21 //debug
       
    22 #include "calendarui_debug.h"
       
    23 
       
    24 // INCLUDE FILES
       
    25 #include    "calendaylistboxdata.h"
       
    26 
       
    27 #include    <eikenv.h>
       
    28 #include    <AknUtils.h>
       
    29 
       
    30 // ================= MEMBER FUNCTIONS =======================
       
    31 
       
    32 // Destructor
       
    33 CCalenDayListboxData::~CCalenDayListboxData()
       
    34     {
       
    35     TRACE_ENTRY_POINT;
       
    36     TRACE_EXIT_POINT;  
       
    37     }
       
    38 
       
    39 // Constructor
       
    40 CCalenDayListboxData::CCalenDayListboxData()
       
    41     {
       
    42     TRACE_ENTRY_POINT;
       
    43     TRACE_EXIT_POINT;  
       
    44     }
       
    45 
       
    46 // Two-phased constructor.
       
    47 CCalenDayListboxData* CCalenDayListboxData::NewL()
       
    48     {
       
    49     TRACE_ENTRY_POINT; 
       
    50     
       
    51     CCalenDayListboxData* self = new(ELeave) CCalenDayListboxData();
       
    52     // Construct list animation by default
       
    53     self->ConstructLD( KAknsIIDQsnAnimList );
       
    54     CleanupStack::PushL(self);
       
    55     CleanupStack::Pop(); // self
       
    56     
       
    57     TRACE_EXIT_POINT; 
       
    58     return self;
       
    59     }
       
    60 
       
    61 // ----------------------------------------------------
       
    62 // CCalenDayListboxData::Draw
       
    63 // Drawing item data and highlight
       
    64 // (other items were commented in a header).
       
    65 // ----------------------------------------------------
       
    66 //
       
    67 void CCalenDayListboxData::Draw(
       
    68     TListItemProperties aProperties,// Item property
       
    69     CWindowGc& aGc,                 // Graphics context
       
    70     const TDesC* aText,             // Drawing item text
       
    71     const TRect& aRect,             // Item rectangle
       
    72     TBool aHighlight,               // ETrue: hilighted
       
    73     const TColors& aColors) const   // Item color
       
    74     {
       
    75     TRACE_ENTRY_POINT; 
       
    76     
       
    77     // Based on AVKON's CFormattedCellListBoxData
       
    78     // Removed code is commented out. 
       
    79     const TRect &aItemRect = aRect;
       
    80     //DrawDefaultHighlight(aGc, aItemRect, aHighlight);
       
    81 
       
    82     // Draw the actual items.
       
    83     DrawFormatted(aProperties,aGc,aText,aItemRect,aHighlight,aColors);
       
    84 
       
    85     aGc.Reset();
       
    86     
       
    87     TRACE_EXIT_POINT; 
       
    88     }
       
    89 
       
    90 // End of File