phoneuis/BubbleManager/Src/BMBubbleOutlook.cpp
branchRCL_3
changeset 25 5266b1f337bd
parent 0 5f000ab63145
equal deleted inserted replaced
24:41a7f70b3818 25:5266b1f337bd
       
     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:  Outlook
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 // INCLUDE FILES
       
    20 #include    "BMBubbleOutlook.h"
       
    21 #include    "BMLayout.h"
       
    22 #include    <eiklabel.h> 
       
    23 #include    <eikenv.h>
       
    24 
       
    25 #include    <AknsBasicBackgroundControlContext.h>
       
    26 #include    <AknsDrawUtils.h>
       
    27 #include    <AknsUtils.h>
       
    28 
       
    29 // ========================= MEMBER FUNCTIONS ================================
       
    30 
       
    31 CBubbleOutlook::CBubbleOutlook( CBubbleManager& aBubbleManager )
       
    32 : iBubbleManager( aBubbleManager )
       
    33     {
       
    34     }
       
    35 
       
    36 // ---------------------------------------------------------------------------
       
    37 // CBubbleOutlook::ConstructL(const TRect& aRect)
       
    38 // Symbian OS two phased constructor
       
    39 // 
       
    40 // ---------------------------------------------------------------------------
       
    41 //
       
    42 void CBubbleOutlook::ConstructL( )
       
    43     {
       
    44     }
       
    45 
       
    46 // Destructor
       
    47 CBubbleOutlook::~CBubbleOutlook()
       
    48     {
       
    49     AknsUtils::DeregisterControlPosition( this );
       
    50     }
       
    51 
       
    52 // ---------------------------------------------------------------------------
       
    53 //  CBubbleOutlook::PositionChanged
       
    54 //  
       
    55 //  
       
    56 // ---------------------------------------------------------------------------
       
    57 //
       
    58 void CBubbleOutlook::PositionChanged()
       
    59     {
       
    60     AknsUtils::RegisterControlPosition( this );
       
    61     }
       
    62 
       
    63 // ---------------------------------------------------------------------------
       
    64 //  CBubbleOutlook::CountComponentControls
       
    65 //  
       
    66 //  
       
    67 // ---------------------------------------------------------------------------
       
    68 //
       
    69 TInt CBubbleOutlook::CountComponentControls( ) const
       
    70     {
       
    71     return 0; // Default. Child class may override.
       
    72     }
       
    73 
       
    74 // ---------------------------------------------------------------------------
       
    75 //  CBubbleOutlook::ComponentControl
       
    76 //  
       
    77 //  
       
    78 // ---------------------------------------------------------------------------
       
    79 //
       
    80 CCoeControl* CBubbleOutlook::ComponentControl( TInt /*aIndex*/ ) const
       
    81     {
       
    82     return NULL; // Default. Child class may override.
       
    83     }
       
    84 
       
    85 // ---------------------------------------------------------------------------
       
    86 //  CBubbleOutlook::Draw
       
    87 //  
       
    88 //  
       
    89 // ---------------------------------------------------------------------------
       
    90 //
       
    91 void CBubbleOutlook::Draw( const TRect& /*aRect*/ ) const
       
    92     {
       
    93     // Empty. Child class may override.
       
    94     }
       
    95 
       
    96 // ---------------------------------------------------------------------------
       
    97 //  CBubbleOutlook::DrawLabelNow
       
    98 //  
       
    99 //  
       
   100 // ---------------------------------------------------------------------------
       
   101 //
       
   102 void CBubbleOutlook::DrawLabelNow( const CCoeControl* aLabel )
       
   103     {
       
   104     if ( aLabel == NULL )
       
   105         {
       
   106         return;
       
   107         }
       
   108     DrawLabelNow( *aLabel );
       
   109     }
       
   110 
       
   111 // ---------------------------------------------------------------------------
       
   112 //  CBubbleOutlook::DrawLabelNow
       
   113 //  
       
   114 //  
       
   115 // ---------------------------------------------------------------------------
       
   116 //
       
   117 void CBubbleOutlook::DrawLabelNow( const CCoeControl& aLabel )
       
   118     {
       
   119     // Clears also the label background. If CCoeControl::DrawNow() would
       
   120     // be used then background drawing should be provided. However,
       
   121     // CCoeControl::DrawDeferred() serves the purpose here.
       
   122     aLabel.DrawDeferred();
       
   123     }
       
   124 
       
   125 // ---------------------------------------------------------------------------
       
   126 //  CBubbleOutlook::ReleaseBitmaps
       
   127 // ---------------------------------------------------------------------------
       
   128 //
       
   129 void CBubbleOutlook::ReleaseBitmaps()
       
   130     {
       
   131     // default: do nothing. Derived class may override.
       
   132     }
       
   133 
       
   134 // ---------------------------------------------------------------------------
       
   135 //  CBubbleOutlook::RebuildBitmaps
       
   136 // ---------------------------------------------------------------------------
       
   137 //
       
   138 void CBubbleOutlook::RebuildBitmaps()
       
   139     {
       
   140     // default: do nothing. Derived class may override.
       
   141     }
       
   142 
       
   143 // ---------------------------------------------------------------------------
       
   144 //  CBubbleOutlook::SetCallObjectDisplay
       
   145 // ---------------------------------------------------------------------------
       
   146 //    
       
   147 void CBubbleOutlook::SetCallObjectDisplay( TBool aActive )
       
   148     {
       
   149     iCallObjectDisplay = aActive;    
       
   150     }
       
   151 
       
   152 // End of File