1 eikfnlab.h |
1 /* |
|
2 * Copyright (c) 2002-2006 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 the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: Class declaration for EIKON file name label control. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef __EIKFNLAB_H__ |
|
20 #define __EIKFNLAB_H__ |
|
21 |
|
22 #include <eikbctrl.h> |
|
23 |
|
24 // forward declarations |
|
25 class CEikLabel; |
|
26 |
|
27 /** |
|
28 * File name label is a bordered control that displays the application name. |
|
29 * |
|
30 * @lib eikcoctl.lib |
|
31 * @since S60 0.9 |
|
32 */ |
|
33 class CEikFileNameLabel : public CEikBorderedControl |
|
34 { |
|
35 public: |
|
36 |
|
37 /** |
|
38 * C++ Default Constructor. |
|
39 * Sets the default border. |
|
40 */ |
|
41 IMPORT_C CEikFileNameLabel(); |
|
42 |
|
43 /** |
|
44 * Destructor. |
|
45 */ |
|
46 IMPORT_C ~CEikFileNameLabel(); |
|
47 |
|
48 /** |
|
49 * Second phase constructor. |
|
50 * Completes the construction of a file name label control. |
|
51 */ |
|
52 IMPORT_C void ConstructL(); |
|
53 |
|
54 /** |
|
55 * Updates the file name label with the name of the application. |
|
56 * If the application is file-based, then the file name of the |
|
57 * main document will be shown. |
|
58 * Otherwise the label will be the application's caption. |
|
59 */ |
|
60 IMPORT_C void UpdateL(); |
|
61 |
|
62 public: /** From @c CCoeControl. */ |
|
63 |
|
64 /** |
|
65 * <b> Not used in S60. </b> |
|
66 * |
|
67 * From @c CCoeControl |
|
68 * |
|
69 * @param aColorUseList Not used. |
|
70 */ |
|
71 IMPORT_C void GetColorUseListL(CArrayFix<TCoeColorUse>& aColorUseList) const; |
|
72 |
|
73 /** |
|
74 * Handles a change to the control's resources. |
|
75 * |
|
76 * The types of resources handled are those which are shared across |
|
77 * the environment, e.g. colours or fonts. For colour scheme changes, |
|
78 * @c DrawDeferred() is called in order to redraw the control. |
|
79 * |
|
80 * If overriding this method, the implementation must |
|
81 * include a base call to this method. |
|
82 * |
|
83 * From @c CCoeControl. |
|
84 * |
|
85 * @param aType The type of resource that has changed. |
|
86 */ |
|
87 IMPORT_C void HandleResourceChange(TInt aType); |
|
88 |
|
89 /** |
|
90 * Sets the control's minimum required size. |
|
91 * |
|
92 * This function should be overridden by the concrete control class if the |
|
93 * control is to be displayed inside a dialog. |
|
94 * |
|
95 * Dialogs set the size and position of their components |
|
96 * automatically, and use this function to enquire the minimum size that |
|
97 * a control requires. |
|
98 * |
|
99 * Other container controls that automatically calculate the layout |
|
100 * of their components may also use this function. |
|
101 * |
|
102 * From @c CCoeControl. |
|
103 * |
|
104 * @return The minimum size required by the control. |
|
105 */ |
|
106 IMPORT_C TSize MinimumSize(); |
|
107 |
|
108 /** |
|
109 * Handles pointer events. |
|
110 * |
|
111 * This function gets called whenever a pointer event occurs in the |
|
112 * control, i.e. when the pointer is within the control's extent, or when |
|
113 * the control has grabbed the pointer. |
|
114 * |
|
115 * If the pointer event occurs within this control, the function |
|
116 * will launch the task swapper. |
|
117 * |
|
118 * If overriding this method, the implementation must |
|
119 * include a base call to this method. |
|
120 * |
|
121 * From @c CCoeControl. |
|
122 * |
|
123 * @param aPointerEvent The pointer event. |
|
124 */ |
|
125 IMPORT_C void HandlePointerEventL(const TPointerEvent& aPointerEvent); |
|
126 |
|
127 protected: |
|
128 |
|
129 /** |
|
130 * Draws the borders of the control. |
|
131 * |
|
132 * The screen appearance of derived classes can be changed by overriding |
|
133 * this method. By default, this draws a border of the appropriate |
|
134 * type around the control. |
|
135 * |
|
136 * From @c CCoeControl. |
|
137 * |
|
138 * @param aRect Not used. |
|
139 */ |
|
140 IMPORT_C void Draw(const TRect& aRect) const; |
|
141 |
|
142 private: /** From @c CCoeControl. */ |
|
143 |
|
144 IMPORT_C void ConstructFromResourceL(TResourceReader& aReader); |
|
145 |
|
146 IMPORT_C TInt CountComponentControls() const; |
|
147 |
|
148 IMPORT_C CCoeControl* ComponentControl(TInt aIndex) const; |
|
149 |
|
150 IMPORT_C void SizeChanged(); |
|
151 |
|
152 private: /** From @c CAknControl. */ |
|
153 |
|
154 IMPORT_C void* ExtensionInterface( TUid aInterface ); |
|
155 |
|
156 private: |
|
157 CEikLabel* iLabel; |
|
158 TInt iSpare; |
|
159 }; |
|
160 |
|
161 #endif // __EIKFNLAB_H__ |