|
1 /* |
|
2 * Copyright (c) 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: Base for containers |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 // INCLUDE FILES |
|
20 #include <eikapp.h> |
|
21 #include <gulicon.h> |
|
22 #include <AknUtils.h> |
|
23 #include <aknbutton.h> |
|
24 #include <AknsUtils.h> |
|
25 #include <AknsDrawUtils.h> |
|
26 #include <AknLayout2Def.h> |
|
27 #include <AknsSkinInstance.h> |
|
28 #include <AknsControlContext.h> |
|
29 #include <aknlayoutscalable_apps.cdl.h> |
|
30 |
|
31 #include "cdialercontainerbase.h" |
|
32 #include "dialercommon.h" |
|
33 #include "dialertrace.h" |
|
34 |
|
35 // Constructor |
|
36 CDialerContainerBase::CDialerContainerBase( |
|
37 CCoeControl& aContainer ) |
|
38 : iParentControl( aContainer ) |
|
39 { |
|
40 // empty |
|
41 } |
|
42 |
|
43 |
|
44 // Destructor |
|
45 CDialerContainerBase::~CDialerContainerBase() |
|
46 { |
|
47 AknsUtils::DeregisterControlPosition( this ); |
|
48 |
|
49 } |
|
50 |
|
51 // --------------------------------------------------------------------------- |
|
52 // CDialerContainerBase::ConstructL |
|
53 // Symbian OS two phased constructor |
|
54 // |
|
55 // --------------------------------------------------------------------------- |
|
56 // |
|
57 void CDialerContainerBase::BaseConstructL( ) |
|
58 { |
|
59 DIALER_PRINT("ContainerBase::BaseConstructL<"); |
|
60 SetContainerWindowL( iParentControl ); |
|
61 SetParent( &iParentControl ); |
|
62 |
|
63 // Define variety according to features available etc. |
|
64 SetVariety(); |
|
65 |
|
66 DIALER_PRINT("ContainerBase::BaseConstructL>"); |
|
67 } |
|
68 |
|
69 // --------------------------------------------------------------------------- |
|
70 // CDialerContainerBase::MopSupplyObject |
|
71 // |
|
72 // --------------------------------------------------------------------------- |
|
73 // |
|
74 TTypeUid::Ptr CDialerContainerBase::MopSupplyObject( TTypeUid aId ) |
|
75 { |
|
76 return CCoeControl::MopSupplyObject( aId ); |
|
77 } |
|
78 |
|
79 // --------------------------------------------------------------------------- |
|
80 // CDialerContainerBase::SizeChanged |
|
81 // |
|
82 // --------------------------------------------------------------------------- |
|
83 // |
|
84 void CDialerContainerBase::SizeChanged( ) |
|
85 { |
|
86 SetVariety(); |
|
87 SetLayout(); |
|
88 } |
|
89 |
|
90 // --------------------------------------------------------------------------- |
|
91 // CDialerContainerBase::PositionChanged |
|
92 // |
|
93 // --------------------------------------------------------------------------- |
|
94 // |
|
95 void CDialerContainerBase::PositionChanged() |
|
96 { |
|
97 AknsUtils::RegisterControlPosition( this ); |
|
98 } |
|
99 |
|
100 // --------------------------------------------------------------------------- |
|
101 // CDialerContainerBase::HandleResourceChange |
|
102 // |
|
103 // --------------------------------------------------------------------------- |
|
104 // |
|
105 void CDialerContainerBase::HandleResourceChange( TInt aType ) |
|
106 { |
|
107 // Call implementation class SizeChanged() |
|
108 SizeChanged(); |
|
109 CCoeControl::HandleResourceChange( aType ); |
|
110 } |
|
111 |
|
112 // End of File |