phonebookui/Phonebook2/UIControls/inc/CPbk2ThumbnailPopupControl.h
branchRCL_3
changeset 20 f4a778e096c2
parent 0 e686773b3f54
equal deleted inserted replaced
19:5b6f26637ad3 20:f4a778e096c2
       
     1 /*
       
     2 * Copyright (c) 2005-2007 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:  Phonebook 2 thumbnail popup control.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef CPBK2THUMBNAILPOPUPCONTROL_H
       
    20 #define CPBK2THUMBNAILPOPUPCONTROL_H
       
    21 
       
    22 //  INCLUDES
       
    23 #include <coecntrl.h>
       
    24 #include "MPbk2ThumbnailPopupControl.h"
       
    25 #include "CPbk2ThumbnailPopup.h"
       
    26 
       
    27 // FORWARD DECLARATIONS
       
    28 class CEikListBox;
       
    29 class CFbsBitmap;
       
    30 class CAknsBasicBackgroundControlContext;
       
    31 
       
    32 // CLASS DECLARATION
       
    33 
       
    34 /**
       
    35  * Phonebook 2 thumbnail popup control.
       
    36  */
       
    37 NONSHARABLE_CLASS(CPbk2ThumbnailPopupControl) :
       
    38             public CCoeControl,
       
    39             public MPbk2ThumbnailPopupControl
       
    40     {
       
    41     public:  // Constructors and destructor
       
    42 
       
    43         /**
       
    44          * Creates a new instance of this class.
       
    45          *
       
    46          * @param aThumbnailLocation Location where thumbnail is drawn.
       
    47          * @return  A new instance of this class.
       
    48          */
       
    49         static CPbk2ThumbnailPopupControl* NewL(
       
    50             TPbk2ThumbnailLocation aThumbnailLocation,
       
    51             const CEikListBox* aListBox );
       
    52 
       
    53         /**
       
    54          * Destructor.
       
    55          */
       
    56         virtual ~CPbk2ThumbnailPopupControl();
       
    57 
       
    58     public: // From MPbk2ThumbnailPopupControl
       
    59         void SetBitmap(CFbsBitmap* aBitmap);
       
    60         void SetThumbnailBackg(
       
    61                 CFbsBitmap* aThumbBackg,
       
    62                 CFbsBitmap* aThumbBackgMask );
       
    63         void MakeControlVisible(
       
    64                 TBool aVisible );
       
    65 
       
    66     private: // From CCoeControl
       
    67         void Draw(
       
    68                 const TRect& aRect) const;
       
    69         void HandleResourceChange(TInt aType);
       
    70 
       
    71     private:  // Implementation
       
    72         CPbk2ThumbnailPopupControl( TPbk2ThumbnailLocation aThumbnailLocation,
       
    73                                     const CEikListBox* aListBox );
       
    74         void ConstructL();
       
    75         void Layout();
       
    76         void SetupSkinContext();
       
    77 
       
    78     private: // Data
       
    79         /// Ref: Bitmap in the popup window
       
    80         CFbsBitmap* iBitmap;
       
    81         /// Ref: Thumbnail background
       
    82         CFbsBitmap* iThumbBackg;
       
    83         /// Ref: Thumbnail background mask
       
    84         CFbsBitmap* iThumbBackgMask;
       
    85         /// Own: Thumbnail location
       
    86         TPbk2ThumbnailLocation iThumbnailLocation;
       
    87         /// Ref: pointer to a listbox to calculate the window position
       
    88         const CEikListBox* iListBox;
       
    89         /// Own: skin background context
       
    90         CAknsBasicBackgroundControlContext* iBgContext;
       
    91         
       
    92         TSize iThumbSize;
       
    93 
       
    94     };
       
    95 
       
    96 #endif // CPBK2THUMBNAILPOPUPCONTROL_H
       
    97 
       
    98 
       
    99 // End of File