00001 /* 00002 * ============================================================================ 00003 * Name : aknnavilabel.h 00004 * Part of : AVKON 00005 * 00006 * Description: 00007 * Label control to the status pane's navigation pane. 00008 * 00009 * Version: 00010 * 00011 * Copyright © 2002 Nokia Corporation. 00012 * This material, including documentation and any related 00013 * computer programs, is protected by copyright controlled by 00014 * Nokia Corporation. All rights are reserved. Copying, 00015 * including reproducing, storing, adapting or translating, any 00016 * or all of this material requires the prior written consent of 00017 * Nokia Corporation. This material also contains confidential 00018 * information which may not be disclosed to others without the 00019 * prior written consent of Nokia Corporation. 00020 * ============================================================================ 00021 */ 00022 00023 #ifndef AKNNAVILABEL_H 00024 #define AKNNAVILABEL_H 00025 00026 #include <AknControl.h> 00027 00028 class CAknNaviLabelExtension; 00029 class TAknLayoutText; 00030 00034 class CAknNaviLabel : public CAknControl 00035 { 00036 public: 00037 enum TNaviLabelType 00038 { 00039 ENavigationLabel, 00040 EAdditionalInfoLabel, 00041 EHintText 00042 }; 00043 00044 public: // new functions 00045 00049 IMPORT_C CAknNaviLabel(); 00050 00054 IMPORT_C ~CAknNaviLabel(); 00055 00060 IMPORT_C void SetNaviLabelType(TNaviLabelType aNaviLabelType); 00061 00066 IMPORT_C TNaviLabelType NaviLabelType(); 00067 00072 IMPORT_C void SetTextL(const TDesC& aText); 00073 00078 inline const TDesC* Text() const; 00079 00080 public: 00081 00086 IMPORT_C void HandlePointerEventL(const TPointerEvent& aPointerEvent); 00087 00088 protected: // from CCoeControl 00089 00093 IMPORT_C virtual void SizeChanged(); 00094 00100 IMPORT_C void Draw(const TRect& aRect) const; 00101 private: 00105 IMPORT_C void* ExtensionInterface( TUid aInterface ); 00106 00107 private: 00112 TInt WidthInsideMargins() const; 00113 00118 TAknLayoutText LayoutText() const; 00119 00120 private: 00121 HBufC* iText; 00122 CAknNaviLabelExtension* iExtension; 00123 const CFont* iFont; 00124 TInt iLeftMargin; 00125 TInt iRightMargin; 00126 TInt iSpare; 00127 TInt iRightOffset; 00128 TRgb iColor; 00129 00130 TNaviLabelType iLabelType; 00131 }; 00132 00133 00134 inline const TDesC* CAknNaviLabel::Text() const 00135 { return(iText); } 00136 00137 00138 // AKNNAVILABEL_H 00139 #endif