akntoolbarextension.h

Go to the documentation of this file.
00001 /*
00002 * ============================================================================
00003 *  Name        : akntoolbarextension.h
00004 *  Part of     : UI Framework / Avkon
00005 *  Interface   : SDK, Toolbar API
00006 *  Description : Toolbar extension component
00007 *  Version     : %version: 6 % << Don't touch! Updated by Synergy at check-out.
00008 *
00009 *  Copyright © 2007 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 CAKNTOOLBAREXTENSION_H
00022 #define CAKNTOOLBAREXTENSION_H
00023 
00024 #include <aknbutton.h>
00025 
00026 class CAknToolbarItem;
00027 class CAknToolbarExtensionView;
00028 class CAknToolbar; 
00029 
00030 
00040 NONSHARABLE_CLASS( CAknToolbarExtension ) : public CAknButton, 
00041     public MCoeControlObserver
00042     {
00043 
00044 public:
00045 
00051     static CAknToolbarExtension* NewL( );
00052 
00053 
00060     IMPORT_C static CAknToolbarExtension* NewL( TInt aResourceId );
00061 
00062 
00069     IMPORT_C static CAknToolbarExtension* NewLC( TInt aResourceId );
00070 
00074     ~CAknToolbarExtension();
00075 
00076 // from base class CCoeControl
00077 
00084     void ConstructFromResourceL( TResourceReader& aReader );
00085 
00093     TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent, TEventCode aType );
00094 
00101     void HandleResourceChange( TInt aType ); 
00102 
00109     void MakeVisible( TBool aVisible ); 
00110 
00111 
00112 // from base class MCoeControlObserver
00113 
00122     void HandleControlEventL( CCoeControl* aControl, TCoeEvent aEventType );
00123 
00124 
00125 // new functions
00126     
00132     TInt ExtensionPosition(); 
00133 
00138     void ShowViewViaIdle(); 
00139 
00145     static TInt ShowView( TAny* aThis ); 
00146 
00151     void ViewClosed(); 
00152 
00159     IMPORT_C CCoeControl* ControlOrNull( TInt aCommandId ) const; 
00160 
00172     IMPORT_C void AddItemL( CCoeControl* aItem,
00173                             TInt aType,
00174                             TInt aCommandId,
00175                             TInt aFlags,
00176                             TInt aIndex );
00177 
00178 
00185     IMPORT_C void RemoveItemL( TInt aCommandId );
00186 
00192     TInt ExtensionFlags(); 
00193 
00199     IMPORT_C TBool IsShown() const; 
00200 
00206     IMPORT_C void SetShown( TBool aShown ); 
00207 
00213     CCoeControl* ExtensionView(); 
00214 
00221     IMPORT_C void SetItemDimmed( TInt aCommandId, TBool aDimmed ); 
00222 
00230     IMPORT_C void HideItemL( TInt aCommandId, TBool aHide ); 
00231 
00232 private:
00233 
00237     CAknToolbarExtension();
00238 
00242     void BaseConstructL();
00243 
00249     void ConstructFromResourceL( const TInt aResourceId );  
00250 
00251 private: // data
00252 
00257     CAknToolbarExtensionView* iView;
00258 
00264     CAknToolbar* iToolbar; 
00265 
00271     CIdle* iIdle; 
00272 
00276     TInt iFlags; 
00277     };
00278 
00279 #endif // CAKNTOOLBAREXTENSION_H

Copyright © Nokia Corporation 2001-2007
Back to top