// EIKLABEL.H
//
// Copyright (c) 1997-1999 Symbian Ltd.  All rights reserved.
//

#if !defined(__EIKLABEL_H__)
#define __EIKLABEL_H__


#if !defined(__EIKALIGN_H__)
#include <eikalign.h>
#endif

class CEikLabel : public CEikAlignedControl
	{
public:  // new functions
	IMPORT_C ~CEikLabel();
	IMPORT_C CEikLabel();
public:  // from CCoeControl
	IMPORT_C TSize MinimumSize();
	IMPORT_C void ConstructFromResourceL(TResourceReader& aReader);
protected: // from CCoeControl
	IMPORT_C void Draw(const TRect& aRect) const;
public:  
	enum TTextEmphasis
		{
		ENoEmphasis		 =0x00,
		EPartialEmphasis =0x10,
		EFullEmphasis	 =0x20
		};
public:  // new functions
	IMPORT_C void SetTextL(const TDesC& aText);
	inline const TDesC* Text() const;
	IMPORT_C void SetBufferReserveLengthL(TInt aLength);
	IMPORT_C void SetFont(const CFont* aFont);
	inline const CFont* Font() const;
	IMPORT_C void SetEmphasis(TTextEmphasis aEmphasis);
	IMPORT_C void SetPixelGapBetweenLines(TInt aGap);
	IMPORT_C TInt PixelGapBetweenLines() const;
private: // from CCoeControl
	IMPORT_C void Reserved_1();
	IMPORT_C void Reserved_2();
private: // new functions
	TInt HeightInPixels() const;
	TInt WidthInPixels() const;
	void SetupGcForEmphasis(CGraphicsContext& aGc) const;
protected:
	HBufC* iText;
	const CFont* iFont;
	TUint8 iNumberOfLines;
	TUint8 iLabFlags;
	TInt iGapBetweenLines;
	};

inline const TDesC* CEikLabel::Text() const
	{ return(iText); }
inline const CFont* CEikLabel::Font() const
	{ return(iFont); }

#endif
