1.1 --- a/epoc32/include/coefontprovider.h Tue Mar 16 16:12:26 2010 +0000
1.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
1.3 @@ -1,68 +0,0 @@
1.4 -// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
1.5 -// All rights reserved.
1.6 -// This component and the accompanying materials are made available
1.7 -// 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
1.8 -// which accompanies this distribution, and is available
1.9 -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
1.10 -//
1.11 -// Initial Contributors:
1.12 -// Nokia Corporation - initial contribution.
1.13 -//
1.14 -// Contributors:
1.15 -//
1.16 -// Description:
1.17 -//
1.18 -
1.19 -#ifndef __COEFONTPROVIDER_H__
1.20 -#define __COEFONTPROVIDER_H__
1.21 -
1.22 -#include <e32base.h>
1.23 -#include <e32def.h>
1.24 -#include <coefont.h>
1.25 -#include <coemain.h>
1.26 -#include <coeaui.h>
1.27 -#include <coecntss.h>
1.28 -
1.29 -/** A helper object designed to make obtaining a font easier, taking into account
1.30 -zoom factors.
1.31 -
1.32 -@publishedAll
1.33 -@released
1.34 -*/
1.35 -class CCoeFontProvider : public CBase
1.36 - {
1.37 -public: // life
1.38 - IMPORT_C static CCoeFontProvider* NewL();
1.39 - IMPORT_C static CCoeFontProvider* NewL(const TDesC& aTypefaceName);
1.40 - ~CCoeFontProvider();
1.41 -public: // methods
1.42 - IMPORT_C const CFont& Font(const TCoeFont& aFont, const TZoomFactor& aZoomFactor) const;
1.43 -public: // properties
1.44 - IMPORT_C void SetTypeface(const TTypeface aTypeface);
1.45 - IMPORT_C void UseSystemTypeface();
1.46 - IMPORT_C TTypeface Typeface() const;
1.47 -public: //but not exported
1.48 - void RefetchPixelMappingL();
1.49 -
1.50 -private:
1.51 - CCoeFontProvider(const TDesC& aTypefaceName);
1.52 - void ConstructL();
1.53 - void ReleaseAllFonts();
1.54 -private:
1.55 - class TFont
1.56 - {
1.57 - public:
1.58 - TFont(const TCoeFont& aFontSpec, TInt aZoomFactor, const CFont* aFont = NULL);
1.59 - static TInt Compare(const TFont& aFirst, const TFont& aSecond);
1.60 - public:
1.61 - const TCoeFont iCoeFont;
1.62 - const TInt iZoomFactor;
1.63 - const CFont* iFont;
1.64 - };
1.65 -private:
1.66 - mutable RArray<TFont> iFonts;
1.67 - TTypeface iTypeface;
1.68 - RArray<TInt> iLogicalToPixelSizes;
1.69 - };
1.70 -
1.71 -#endif // __COEFONTPROVIDER_H__