aknstyluspopupmenu.h

Go to the documentation of this file.
00001 /*
00002 * ============================================================================
00003 *  Name        : aknstyluspopupmenu.h
00004 *  Part of     : Eikstd / Eikcoctl
00005 *  Interface   : Stylus Popup Menu API
00006 *  Description : Interface for controlling stylus specific popup menu.
00007 *  Version     : %version: tr1s60#8.1.2 %
00008 *
00009 *  Copyright © 2005-2009 Nokia.  All rights reserved.
00010 *  This material, including documentation and any related computer
00011 *  programs, is protected by copyright controlled by Nokia.  All
00012 *  rights are reserved.  Copying, including reproducing, storing,
00013 *  adapting or translating, any or all of this material requires the
00014 *  prior written consent of Nokia.  This material also contains
00015 *  confidential information which may not be disclosed to others
00016 *  without the prior written consent of Nokia.
00017 * ============================================================================
00018 * Template version: 4.0
00019 */
00020 
00021 #ifndef CAKNSTYLUSPOPUPMENU_H
00022 #define CAKNSTYLUSPOPUPMENU_H
00023 
00024 
00025 #include <e32base.h>
00026 #include <coecobs.h> // MCoeControlObserver
00027 
00028 class CAknPreviewPopUpController;
00029 class CAknStylusPopUpMenuContent;
00030 class MEikMenuObserver;
00031 class TResourceReader;
00032 
00047 NONSHARABLE_CLASS( CAknStylusPopUpMenu ) : public CBase, 
00048                                            public MCoeControlObserver
00049     {
00050 public:
00051     enum TPositionType
00052         {
00053         EPositionTypeRightTop = 0,
00054         EPositionTypeLeftTop,
00055         EPositionTypeRightBottom,
00056         EPositionTypeLeftBottom      
00057         };
00067     IMPORT_C static CAknStylusPopUpMenu* NewL( MEikMenuObserver* aObserver, 
00068                                          const TPoint& aPoint,
00069                                          CAknPreviewPopUpController* aPopup );
00070     
00078     IMPORT_C static CAknStylusPopUpMenu* NewL( MEikMenuObserver* aObserver, 
00079                                          const TPoint& aPoint );
00080 
00090     IMPORT_C static CAknStylusPopUpMenu* NewLC( MEikMenuObserver* aObserver, 
00091                                          const TPoint& aPoint,
00092                                          CAknPreviewPopUpController* aPopup );
00096     ~CAknStylusPopUpMenu();
00097     
00106     IMPORT_C void AddMenuItemL( const TDesC& aItem, const TInt aCommandId );
00107     
00113     IMPORT_C void RemoveMenuItem( const TInt aCommandId );
00114 
00121     IMPORT_C void SetItemDimmed( const TInt aCommandId, const TBool aDimmed );
00122 
00127     IMPORT_C void ShowMenu();
00128         
00136     IMPORT_C void SetPosition( const TPoint& aPoint );    
00145     IMPORT_C void SetPosition( const TPoint& aPoint, TPositionType aPosType );    
00146     
00151     void UpdatePosition();
00152 // from base class CCoeControl
00153 
00159     IMPORT_C void ConstructFromResourceL( TResourceReader& aReader );
00160 
00161 // from base class MCoeControlObserver
00162     
00169     IMPORT_C void HandleControlEventL( CCoeControl* aControl,
00170                                        TCoeEvent aEventType );
00171 
00172 public:
00173 
00177     void ResetTimer(); 
00178 
00179 private:
00180 
00190     CAknStylusPopUpMenu( MEikMenuObserver* aObserver, const TPoint& aPoint,
00191                          CAknPreviewPopUpController* aPopup );
00192 
00196     void ConstructL();
00197 
00198 private: // data
00199 
00203     TPoint iPosition;
00204     
00209     CAknPreviewPopUpController* iController;
00210     
00215     CAknStylusPopUpMenuContent* iContent;
00216     
00221     MEikMenuObserver* iMenuObserver;
00222     
00230     CAknPreviewPopUpController* iPreviewPopup;
00231     
00232     };
00233 
00234 
00235 #endif // CAKNSTYLUSPOPUPMENU_H

Copyright © Nokia Corporation 2001-2007
Back to top