akntextdecorationmetrics.h

Go to the documentation of this file.
00001 /*
00002 * ============================================================================
00003 *  Name     : AknTextDecorationMetrics.h
00004 *  Part of  : Avkon
00005 *
00006 *  Copyright © 2002-2004 Nokia. All rights reserved.
00007 *  This material, including documentation and any related 
00008 *  computer programs, is protected by copyright controlled by 
00009 *  Nokia. All rights are reserved. Copying, including 
00010 *  reproducing, storing, adapting or translating, any 
00011 *  or all of this material requires the prior written consent of 
00012 *  Nokia. This material also contains confidential 
00013 *  information which may not be disclosed to others without the 
00014 *  prior written consent of Nokia.
00015 * ==============================================================================
00016 */
00017 
00018 #ifndef AKNTEXTDECORATIONMETRICS_H
00019 #define AKNTEXTDECORATIONMETRICS_H
00020 
00021 #include <e32std.h>
00022 #include <aknfontcategory.hrh>
00023 
00024 class CFont;
00025 class TAknFontSpecification;
00026 class TAknWindowComponentLayout;
00027 class TAknTextComponentLayout;
00028 
00044 class TAknTextDecorationMetrics
00045     {
00046 public:
00047     // C++ Constructors
00053     IMPORT_C TAknTextDecorationMetrics( TInt aFontId );
00054 
00061     IMPORT_C TAknTextDecorationMetrics( const CFont* aFont );
00062 
00070     IMPORT_C TAknTextDecorationMetrics( const TAknFontSpecification& aFontSpecification );
00071 
00072 public:
00082     IMPORT_C void GetLeftAndRightMargins( TInt& aLeft, TInt& aRight ) const;
00083 
00093     IMPORT_C void GetTopAndBottomMargins( TInt& aTop, TInt& aBottom ) const;
00094 
00101     IMPORT_C TInt CursorWidth() const;
00102 
00116     IMPORT_C TInt BaselineToUnderlineOffset() const;
00117 
00124     IMPORT_C TInt UnderlineHeight() const;
00125 
00126 private: // Internal routines for construction
00127     void SetMetricsFromSizeAndBoldness( 
00128         TAknFontCategory aCategory, 
00129         TInt aTextHeight, 
00130         TBool aIsBold );
00131     void SetDefaultMetrics( 
00132         TAknFontCategory aCategory, 
00133         TBool aIsBold );
00134     void GetHighlightLayoutsFromCategory( 
00135         TAknFontCategory aCategory,
00136         TAknWindowComponentLayout& aHighlightParentPane,
00137         TAknTextComponentLayout& aHighlightTextPane,
00138         TAknWindowComponentLayout& aHighlightPane ) const;
00139     void GetCursorLayoutsFromCategory( 
00140         TAknFontCategory aCategory,
00141         TAknWindowComponentLayout& aCursorLayout,
00142         TAknWindowComponentLayout& aCursorLayoutGraphic ) const;
00143 
00144 private:
00145         TInt16 iTopMargin;
00146         TInt16 iBottomMargin;
00147         TInt16 iLeftMargin;
00148         TInt16 iRightMargin;
00149     TInt16 iCursorWidth;
00150     TInt16 iBaselineToUnderlineOffset;
00151     TInt16 iUnderlineHeight;
00152     TInt16 iSpare;
00153     };
00154 
00155 #endif
00156 // End of File

Copyright © Nokia Corporation 2001-2008
Back to top