S60 3rd Edition API Reference: akntextdecorationmetrics.h Source File

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 #start_since SINCE_3_1_SDK
00023 #include <aknfontcategory.hrh>
00024 #end_since SINCE_3_1_SDK
00025 
00026 class CFont;
00027 class TAknFontSpecification;
00028 #start_since SINCE_3_1_SDK
00029 class TAknWindowComponentLayout;
00030 class TAknTextComponentLayout;
00031 #end_since SINCE_3_1_SDK
00032 
00048 class TAknTextDecorationMetrics
00049     {
00050 public:
00051     // C++ Constructors
00057     IMPORT_C TAknTextDecorationMetrics( TInt aFontId );
00058 
00065     IMPORT_C TAknTextDecorationMetrics( const CFont* aFont );
00066 
00074     IMPORT_C TAknTextDecorationMetrics( const TAknFontSpecification& aFontSpecification );
00075 
00076 public:
00086     IMPORT_C void GetLeftAndRightMargins( TInt& aLeft, TInt& aRight ) const;
00087 
00097     IMPORT_C void GetTopAndBottomMargins( TInt& aTop, TInt& aBottom ) const;
00098 
00105     IMPORT_C TInt CursorWidth() const;
00106 
00120     IMPORT_C TInt BaselineToUnderlineOffset() const;
00121 
00128     IMPORT_C TInt UnderlineHeight() const;
00129 
00130 private: // Internal routines for construction
00131     void SetMetricsFromSizeAndBoldness( 
00132         TAknFontCategory aCategory, 
00133         TInt aTextHeight, 
00134         TBool aIsBold );
00135     void SetDefaultMetrics( 
00136         TAknFontCategory aCategory, 
00137         TBool aIsBold );
00138     void GetHighlightLayoutsFromCategory( 
00139         TAknFontCategory aCategory,
00140         TAknWindowComponentLayout& aHighlightParentPane,
00141         TAknTextComponentLayout& aHighlightTextPane,
00142         TAknWindowComponentLayout& aHighlightPane ) const;
00143     void GetCursorLayoutsFromCategory( 
00144         TAknFontCategory aCategory,
00145         TAknWindowComponentLayout& aCursorLayout,
00146         TAknWindowComponentLayout& aCursorLayoutGraphic ) const;
00147 
00148 private:
00149         TInt16 iTopMargin;
00150         TInt16 iBottomMargin;
00151         TInt16 iLeftMargin;
00152         TInt16 iRightMargin;
00153     TInt16 iCursorWidth;
00154     TInt16 iBaselineToUnderlineOffset;
00155     TInt16 iUnderlineHeight;
00156     TInt16 iSpare;
00157     };
00158 
00159 #endif
00160 // End of File

Copyright © Nokia Corporation 2001-2007
Back to top