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