// EIKFONTD.H
//
// Copyright (c) 1997-1999 Symbian Ltd.  All rights reserved.
//

#if !defined(__EIKFONTD_H__)
#define __EIKFONTD_H__

#if !defined(__EIKDIALG_H__)
#include <eikdialg.h>
#endif

#if !defined(__TXTFRMAT_H__)
#include <txtfrmat.h>
#endif

#if !defined(__BADESCA_H__)
#include <badesca.h>
#endif

#if !defined(__EIKFTFLG_HRH__)
#include <eikftflg.hrh>
#endif

#if !defined(__GDI_H__)
#include <gdi.h>
#endif

class CEikFontDialog : public CEikDialog  
	{
public:
	IMPORT_C CEikFontDialog(TCharFormat& aFormat,TCharFormatMask& aAttribChangedMask,TInt aFonts=EEikNoSymbolFonts,
							CGraphicsDevice* aGraphicsDevice=NULL, TInt aFontControlFlags=EEikFontControlAll,
							const TRgb aBackGroundColor=KRgbWhite);
	IMPORT_C CEikFontDialog(TCharFormat& aFormat,TCharFormatMask& aAttribChangedMask,TCharFormatMask& aUndeterminedMask,
							TDesC& aTextSelection,TInt aFonts=EEikNoSymbolFonts,
							CGraphicsDevice* aGraphicsDevice=NULL, TInt aFontControlFalgs=EEikFontControlAll,
							const TRgb aBackGroundColor=KRgbWhite);
	IMPORT_C ~CEikFontDialog();
private: // framework
	void PreLayoutDynInitL();
	void PostLayoutDynInitL();
	void HandleControlStateChangeL(TInt aControlId);
private: // personal
	void BuildFontNameListL();
	void UpdateHeightListL();
	void ConstructArraysL();
	void SetFontPreviewL();
	void DoFontPreviewL();
private:
	TInt iFontFlags;
	TInt iFontControlFlags;
	CGraphicsDevice* iGraphicsDevice;
	TCharFormat* iActiveFormat;
	TCharFormatMask* iAttribChangedMask; 
	TCharFormatMask iUndeterminedMask;	
	CDesCArray* iFontHeightList;
	CDesCArray* iFontNameList;  
	CArrayFixFlat<TInt>* iTwipsList;
	CFbsFont* iPreviewFont;
	TPtrC iTextSelection;
	TInt iHeightInTwips;
	TRgb iBackGroundColor;
	};

#endif
