williamr@2: /* williamr@2: * Copyright (c) 2002-2006 Nokia Corporation and/or its subsidiary(-ies). williamr@2: * All rights reserved. williamr@2: * This component and the accompanying materials are made available williamr@2: * 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: * which accompanies this distribution, and is available williamr@2: * at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". williamr@2: * williamr@2: * Initial Contributors: williamr@2: * Nokia Corporation - initial contribution. williamr@2: * williamr@2: * Contributors: williamr@2: * williamr@2: * Description: Class declaration for EIKON file name label control. williamr@2: * williamr@2: */ williamr@2: williamr@2: williamr@2: #ifndef __EIKFNLAB_H__ williamr@2: #define __EIKFNLAB_H__ williamr@2: williamr@2: #include williamr@2: williamr@2: // forward declarations williamr@2: class CEikLabel; williamr@2: williamr@2: /** williamr@2: * File name label is a bordered control that displays the application name. williamr@2: * williamr@2: * @lib eikcoctl.lib williamr@2: * @since S60 0.9 williamr@2: */ williamr@2: class CEikFileNameLabel : public CEikBorderedControl williamr@2: { williamr@2: public: williamr@2: williamr@2: /** williamr@2: * C++ Default Constructor. williamr@2: * Sets the default border. williamr@2: */ williamr@2: IMPORT_C CEikFileNameLabel(); williamr@2: williamr@2: /** williamr@2: * Destructor. williamr@2: */ williamr@2: IMPORT_C ~CEikFileNameLabel(); williamr@2: williamr@2: /** williamr@2: * Second phase constructor. williamr@2: * Completes the construction of a file name label control. williamr@2: */ williamr@2: IMPORT_C void ConstructL(); williamr@2: williamr@2: /** williamr@2: * Updates the file name label with the name of the application. williamr@2: * If the application is file-based, then the file name of the williamr@2: * main document will be shown. williamr@2: * Otherwise the label will be the application's caption. williamr@2: */ williamr@2: IMPORT_C void UpdateL(); williamr@2: williamr@2: public: /** From @c CCoeControl. */ williamr@2: williamr@2: /** williamr@2: * Not used in S60. williamr@2: * williamr@2: * From @c CCoeControl williamr@2: * williamr@2: * @param aColorUseList Not used. williamr@2: */ williamr@2: IMPORT_C void GetColorUseListL(CArrayFix& aColorUseList) const; williamr@2: williamr@2: /** williamr@2: * Handles a change to the control's resources. williamr@2: * williamr@2: * The types of resources handled are those which are shared across williamr@2: * the environment, e.g. colours or fonts. For colour scheme changes, williamr@2: * @c DrawDeferred() is called in order to redraw the control. williamr@2: * williamr@2: * If overriding this method, the implementation must williamr@2: * include a base call to this method. williamr@2: * williamr@2: * From @c CCoeControl. williamr@2: * williamr@2: * @param aType The type of resource that has changed. williamr@2: */ williamr@2: IMPORT_C void HandleResourceChange(TInt aType); williamr@2: williamr@2: /** williamr@2: * Sets the control's minimum required size. williamr@2: * williamr@2: * This function should be overridden by the concrete control class if the williamr@2: * control is to be displayed inside a dialog. williamr@2: * williamr@2: * Dialogs set the size and position of their components williamr@2: * automatically, and use this function to enquire the minimum size that williamr@2: * a control requires. williamr@2: * williamr@2: * Other container controls that automatically calculate the layout williamr@2: * of their components may also use this function. williamr@2: * williamr@2: * From @c CCoeControl. williamr@2: * williamr@2: * @return The minimum size required by the control. williamr@2: */ williamr@2: IMPORT_C TSize MinimumSize(); williamr@2: williamr@2: /** williamr@2: * Handles pointer events. williamr@2: * williamr@2: * This function gets called whenever a pointer event occurs in the williamr@2: * control, i.e. when the pointer is within the control's extent, or when williamr@2: * the control has grabbed the pointer. williamr@2: * williamr@2: * If the pointer event occurs within this control, the function williamr@2: * will launch the task swapper. williamr@2: * williamr@2: * If overriding this method, the implementation must williamr@2: * include a base call to this method. williamr@2: * williamr@2: * From @c CCoeControl. williamr@2: * williamr@2: * @param aPointerEvent The pointer event. williamr@2: */ williamr@2: IMPORT_C void HandlePointerEventL(const TPointerEvent& aPointerEvent); williamr@2: williamr@2: protected: williamr@2: williamr@2: /** williamr@2: * Draws the borders of the control. williamr@2: * williamr@2: * The screen appearance of derived classes can be changed by overriding williamr@2: * this method. By default, this draws a border of the appropriate williamr@2: * type around the control. williamr@2: * williamr@2: * From @c CCoeControl. williamr@2: * williamr@2: * @param aRect Not used. williamr@2: */ williamr@2: IMPORT_C void Draw(const TRect& aRect) const; williamr@2: williamr@2: private: /** From @c CCoeControl. */ williamr@2: williamr@2: IMPORT_C void ConstructFromResourceL(TResourceReader& aReader); williamr@2: williamr@2: IMPORT_C TInt CountComponentControls() const; williamr@2: williamr@2: IMPORT_C CCoeControl* ComponentControl(TInt aIndex) const; williamr@2: williamr@2: IMPORT_C void SizeChanged(); williamr@2: williamr@2: private: /** From @c CAknControl. */ williamr@2: williamr@2: IMPORT_C void* ExtensionInterface( TUid aInterface ); williamr@2: williamr@2: private: williamr@2: CEikLabel* iLabel; williamr@2: TInt iSpare; williamr@2: }; williamr@2: williamr@2: #endif // __EIKFNLAB_H__