|
1 /* |
|
2 * Copyright (c) 2008 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: Call status indicator |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef C_BUBBLEMAINPANECONTROL_H |
|
20 #define C_BUBBLEMAINPANECONTROL_H |
|
21 |
|
22 #include "BMBubbleManager.h" |
|
23 #include <coecntrl.h> |
|
24 |
|
25 class CBubbleCallObjectManager; |
|
26 class CTelBubbleCustomElement; |
|
27 class CBubbleCustomManager; |
|
28 class CFbsBitmap; |
|
29 |
|
30 /** |
|
31 * Displays caller image in main pane. |
|
32 * |
|
33 * |
|
34 * @lib BubbleManager.lib |
|
35 * @since S60 v5.0 |
|
36 */ |
|
37 NONSHARABLE_CLASS( CBubbleMainPaneControl ) : public CCoeControl |
|
38 { |
|
39 public: |
|
40 /** |
|
41 * Two-phased constructor. |
|
42 * @param aBubbleManager Bubble manager. |
|
43 * @param aCallObjectManager Call object manager. |
|
44 */ |
|
45 static CBubbleMainPaneControl* NewL( |
|
46 CBubbleManager& aBubbleManager, |
|
47 CBubbleCallObjectManager& aCallObjectManager ); |
|
48 |
|
49 /** |
|
50 * Destructor. |
|
51 */ |
|
52 virtual ~CBubbleMainPaneControl(); |
|
53 |
|
54 /** |
|
55 * Read bubble header. |
|
56 * @param aHeader Bubble header. |
|
57 */ |
|
58 void ReadBubbleHeader( const CBubbleHeader& aHeader ); |
|
59 |
|
60 /** |
|
61 * Reset. |
|
62 */ |
|
63 void Reset(); |
|
64 |
|
65 /** |
|
66 * Draw bitmaps. |
|
67 * @param aRect Rectangle to be redrawn. |
|
68 */ |
|
69 void DrawBitmaps( const TRect& aRect ) const; |
|
70 |
|
71 /** |
|
72 * Returns bubble id that image is related to. |
|
73 */ |
|
74 CBubbleManager::TBubbleId BubbleId() const; |
|
75 |
|
76 /** |
|
77 * Returns ETrue when image is being displayed. |
|
78 */ |
|
79 TBool IsUsed() const; |
|
80 |
|
81 private: |
|
82 CBubbleMainPaneControl( CBubbleManager& aCustomManager, |
|
83 CBubbleCallObjectManager& aCallObjectManager ); |
|
84 void ConstructL(); |
|
85 void SizeChanged(); |
|
86 void PrepareBitmapsL( CFbsBitmap*& aBitmap, |
|
87 TBool& aBitmapOwnership, |
|
88 CFbsBitmap*& aMask, |
|
89 TBool& aMaskOwnership, |
|
90 TBool aIsScalable ); |
|
91 |
|
92 private: // data |
|
93 CBubbleManager& iBubbleManager; |
|
94 CBubbleCallObjectManager& iCallObjectManager; |
|
95 CBubbleManager::TBubbleId iBubble; |
|
96 TBool iThreeLinedBubble; |
|
97 CTelBubbleCustomElement* iCallImage; |
|
98 TBool iIsUsed; |
|
99 CFbsBitmap* iBitmap; // not owned |
|
100 CFbsBitmap* iMask; // not owned |
|
101 }; |
|
102 |
|
103 #endif // C_BUBBLEMAINPANECONTROL_H |