|
1 /* |
|
2 * Copyright (c) 2007,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: Declaration of CStartupView class |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef STARTUPVIEW_H |
|
20 #define STARTUPVIEW_H |
|
21 |
|
22 #include <coecntrl.h> |
|
23 |
|
24 class CAknsBasicBackgroundControlContext; // Skin support |
|
25 |
|
26 /** |
|
27 * Main view for the Startup application. |
|
28 * |
|
29 * @lib None |
|
30 * @since S60 3.2 |
|
31 */ |
|
32 NONSHARABLE_CLASS( CStartupView ) : public CCoeControl |
|
33 { |
|
34 |
|
35 public: |
|
36 |
|
37 /** |
|
38 * Constructs a CStartupView object. |
|
39 * |
|
40 * @param aRect The rectangle that the control should occupy. |
|
41 * @return The new object |
|
42 */ |
|
43 static CStartupView* NewL( const TRect& aRect ); |
|
44 |
|
45 /** |
|
46 * Destructor. |
|
47 */ |
|
48 virtual ~CStartupView(); |
|
49 |
|
50 /** |
|
51 * Set a sub-control to this control. |
|
52 */ |
|
53 void SetComponent( CCoeControl& aComponent ); |
|
54 |
|
55 /** |
|
56 * Remove the sub-control from this control. |
|
57 */ |
|
58 void RemoveComponent(); |
|
59 |
|
60 private: |
|
61 |
|
62 /** |
|
63 * From CCoeControl. |
|
64 */ |
|
65 void SizeChanged(); |
|
66 |
|
67 /** |
|
68 * From CCoeControl. |
|
69 * Return the count of the components in the container. |
|
70 * |
|
71 * @return The number of contained controls. |
|
72 */ |
|
73 TInt CountComponentControls() const; |
|
74 |
|
75 /** |
|
76 * From CCoeControl. |
|
77 * Return a contained control by index. |
|
78 * |
|
79 * @return The contained control by index. Null if there is no contained |
|
80 * control for that index. |
|
81 */ |
|
82 CCoeControl* ComponentControl( TInt aIndex ) const; |
|
83 |
|
84 /** |
|
85 * From CCoeControl. |
|
86 * Draw the component on the screen. |
|
87 * |
|
88 * @param aRect The rectangular region of the control to be drawn. |
|
89 */ |
|
90 void Draw( const TRect& aRect ) const; |
|
91 |
|
92 private: |
|
93 |
|
94 /** |
|
95 * First phase constructor. |
|
96 */ |
|
97 CStartupView(); |
|
98 |
|
99 /** |
|
100 * Second phase constructor. |
|
101 * |
|
102 * @param aRect The rectangle that the control should occupy. |
|
103 */ |
|
104 void ConstructL( const TRect& aRect ); |
|
105 |
|
106 private: |
|
107 |
|
108 /** Component control. */ |
|
109 CCoeControl* iComponent; |
|
110 |
|
111 /** Skin support */ |
|
112 CAknsBasicBackgroundControlContext* iBgContext; |
|
113 |
|
114 }; |
|
115 |
|
116 #endif // STARTUPVIEW_H |