eikccpu.h

Go to the documentation of this file.
00001 /*
00002 * ============================================================================
00003 *  Name        : EikCcpu.h
00004 *  Part of     : S60 UI Framework / EikCoCtl
00005 *  Description : Provides support for cut, copy, paste and
00006 *                undo functionality in editors.
00007 *  Version     :
00008 *
00009 *  Copyright © 2002-2006 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 */
00019 
00020 #ifndef EIKCCPU_H
00021 #define EIKCCPU_H
00022 
00023 #include <coecntrl.h>
00024 #include <eikdef.h>
00025 #include <eikmobs.h>
00026 #include <babitflags.h>
00027 #include <AknControl.h>
00028 
00029 class CEikButtonGroupContainer;
00030 class CEikMenuBar;
00031 
00032 
00036 class MEikCcpuEditor
00037         {
00038 public:
00047         virtual TBool CcpuIsFocused() const = 0;
00048         
00057         virtual TBool CcpuCanCut() const = 0;
00058         
00065         virtual void CcpuCutL() = 0;
00066         
00075         virtual TBool CcpuCanCopy() const = 0;
00076 
00083         virtual void CcpuCopyL() = 0;
00084         
00093         virtual TBool CcpuCanPaste() const = 0;
00094 
00101         virtual void CcpuPasteL() = 0;
00102         
00111         virtual TBool CcpuCanUndo() const = 0;
00112         
00120         virtual void CcpuUndoL() = 0;
00121         };
00122 
00129 class CAknCcpuSupport : public CAknControl, public MEikMenuObserver
00130         {
00131 public:
00139         IMPORT_C CAknCcpuSupport(MEikCcpuEditor* aEditor);
00140         
00144         IMPORT_C ~CAknCcpuSupport();
00145         
00151         IMPORT_C void ConstructL();
00152 
00157         IMPORT_C void HandleSelectionChangeL();
00158         
00163         IMPORT_C void HandleFocusChangeL();
00164 
00165         // from CCoeControl
00166     
00176         IMPORT_C TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent,TEventCode aType);
00177 
00185     IMPORT_C void HandlePointerEventL(const TPointerEvent& aPointerEvent);
00186 
00187         // from MEikMenuObserver
00188         
00197         IMPORT_C void DynInitMenuPaneL(TInt aResourceId,CEikMenuPane* aMenuPane);
00198 
00206         IMPORT_C void ProcessCommandL(TInt aCommandId);
00207 
00208 private:
00209         void UpdateCBALabelsL();
00210         TBool UpdateCBALabelL(TInt aPosition, TInt aCommandId, TInt aTextResId);
00211         void SetEmphasis(CCoeControl* aMenuControl,TBool aEmphasis);
00212 
00213 private:
00217     IMPORT_C void* ExtensionInterface( TUid aInterface );
00218 private:
00219         TBitFlags iFlags;
00220 
00221         // Owned
00222         CEikButtonGroupContainer* iCba;
00223 
00224         // Not owned
00225         CEikMenuBar* iMenu;
00226         MEikCcpuEditor* iEditor;
00227         };
00228 
00229 // EIKCCPU_H
00230 #endif

Copyright © Nokia Corporation 2001-2008
Back to top