00001 /* 00002 * ============================================================================ 00003 * Name : eikmnbut.h 00004 * Part of : Eikstd / eikcoctl 00005 * Description : Uikon legacy button that launches a menu when activated 00006 * Version : %version: 4 % 00007 * 00008 * Copyright © 2000-2006 Nokia. All rights reserved. 00009 * This material, including documentation and any related computer 00010 * programs, is protected by copyright controlled by Nokia. All 00011 * rights are reserved. Copying, including reproducing, storing, 00012 * adapting or translating, any or all of this material requires the 00013 * prior written consent of Nokia. This material also contains 00014 * confidential information which may not be disclosed to others 00015 * without the prior written consent of Nokia. 00016 * ============================================================================ 00017 * Template version: 4.1 00018 */ 00019 // Copyright (c) 1997-1999 Symbian Ltd. All rights reserved. 00020 00021 #if !defined(__EIKMNBUT_H__) 00022 #define __EIKMNBUT_H__ 00023 00024 #if !defined(__EIKMOBS_H__) 00025 #include <eikmobs.h> 00026 #endif 00027 00028 #if !defined(__EIKCMBUT_H__) 00029 #include <eikcmbut.h> 00030 #endif 00031 00032 class CEikMenuPane; 00033 00042 class CEikMenuButton : public CEikCommandButton, private MEikMenuObserver 00043 { 00044 public: 00048 IMPORT_C CEikMenuButton(); 00049 00053 IMPORT_C ~CEikMenuButton(); 00054 00060 IMPORT_C void ConstructFromResourceL(TResourceReader& aReader); 00061 00067 IMPORT_C void LaunchPopupMenuL(MEikMenuObserver* aObserver); 00068 00074 IMPORT_C void SetMenuPaneId(TInt aMenuPaneId); 00075 00076 protected: 00077 00085 IMPORT_C void WriteInternalStateL(RWriteStream& aWriteStream) const; 00086 00087 public: // from CEikButtonBase 00088 00092 IMPORT_C void Animate(); 00093 00094 public: // From CCoeControl 00095 00104 IMPORT_C void HandlePointerEventL(const TPointerEvent& aPointerEvent); 00105 00106 private: 00107 00115 IMPORT_C void ProcessCommandL(TInt aCommandId); 00116 00130 IMPORT_C void SetEmphasis(CCoeControl* aMenuControl,TBool aEmphasis); 00131 00132 private: 00133 void ClosePopupMenu(); 00134 void DoLaunchPopupMenuL(); 00135 private: 00139 IMPORT_C void* ExtensionInterface( TUid aInterface ); 00140 00141 private: 00146 MEikMenuObserver* iMenuObserver; 00147 00152 CEikMenuPane* iMenuPopup; 00153 00157 TInt iMenuPaneId; 00158 00159 TInt iSpare; 00160 }; 00161 00162 #endif