00001 /* 00002 * ============================================================================ 00003 * Name : akncontext.h 00004 * Part of : AVKON 00005 * 00006 * Description: 00007 * A default control in the status pane's context 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 #ifndef AKNCONTEXT_H 00023 #define AKNCONTEXT_H 00024 00025 #include <AknControl.h> 00026 00027 class CEikImage; 00028 class CAknContextPaneExtension; 00029 00033 class CAknContextPane : public CAknControl 00034 { 00035 public: 00036 00037 DECLARE_TYPE_ID(0x101F8741) 00038 00039 public: 00040 00044 IMPORT_C CAknContextPane(); 00045 00049 IMPORT_C ~CAknContextPane(); 00050 00055 IMPORT_C void ConstructL(); 00056 00061 IMPORT_C void ConstructFromResourceL(TResourceReader& aReader); 00062 00069 IMPORT_C void SetPicture(const CFbsBitmap* aBitmap, 00070 const CFbsBitmap* aMaskBitmap = NULL); 00071 00077 IMPORT_C void SetPicture(CEikImage* aImage); 00078 00086 IMPORT_C void SetPictureFromFileL(const TDesC& aFileName, 00087 TInt aMainId, TInt aMaskId = -1); 00088 00092 IMPORT_C void SetFromResourceL(TResourceReader& aReader); 00093 00097 IMPORT_C void SetPictureToDefaultL(); 00098 00105 IMPORT_C const CEikImage& Picture() const; 00106 00114 IMPORT_C CEikImage* SwapPicture(CEikImage* aNewImage); 00115 00128 void SetNaviPaneBackgroundType(TInt aType); 00129 00134 IMPORT_C void HandlePointerEventL(const TPointerEvent& aPointerEvent); 00135 00136 protected: // from CCoeControl 00137 00141 IMPORT_C virtual void SizeChanged(); 00142 00148 IMPORT_C virtual void HandleResourceChange(TInt aType); 00149 00154 IMPORT_C virtual TInt CountComponentControls() const; 00155 00161 IMPORT_C virtual CCoeControl* ComponentControl(TInt aIndex) const; 00162 00163 private: // new functions 00164 void CommonConstructL(); 00165 00170 TUid AppUid(); 00171 void ReadFromResourceFileL(TResourceReader& aReader); 00172 void LoadNaviWipeBitmapL(); 00173 void InitL(); 00174 void SetPictureSize(CFbsBitmap* aPicture, TSize aSize); 00175 00176 private: // From CCoeControl 00177 IMPORT_C virtual void Draw(const TRect& aRect) const; 00178 00179 private: 00183 IMPORT_C void* ExtensionInterface( TUid aInterface ); 00184 00185 protected: 00186 // from CCoeControl 00187 TTypeUid::Ptr MopSupplyObject(TTypeUid aId); 00188 00189 private: 00190 CAknContextPaneExtension* iExtension; 00191 }; 00192 00193 00194 // AKNCONTEXT_H 00195 #endif