textinput/peninputhwrtrui/inc/truishortcuteditview.h
changeset 27 694fa80c203c
parent 24 fc42a86c98e3
child 35 0f326f2e628e
equal deleted inserted replaced
24:fc42a86c98e3 27:694fa80c203c
     1 /*
       
     2 * Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0""
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  CTruiShortcutEditView class of TrainingUI
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef C_TRUISHORTCUTEDITVIEW_H
       
    21 #define C_TRUISHORTCUTEDITVIEW_H
       
    22 
       
    23 #include <aknview.h>
       
    24 #include <akntoolbarobserver.h>
       
    25 
       
    26 class CTruiShortcutEditContainer;
       
    27 
       
    28 // UID of view
       
    29 const TUid KTruiShortcutEditViewId = {3};
       
    30 
       
    31 /**
       
    32  *  CTruiShortcutEditView view class.
       
    33  *
       
    34  *  @code
       
    35  *    CTruiShortcutEditView* view = CTruiShortcutEditView::NewLC(); 
       
    36  *    AddViewL( view );
       
    37  *    CleanupStack::Pop();
       
    38  *  @endcode
       
    39  *
       
    40  */
       
    41 class CTruiShortcutEditView : public CAknView, public MAknToolbarObserver
       
    42     {
       
    43 public:
       
    44 
       
    45     /** 
       
    46      * Two phase construction.
       
    47      * 
       
    48      * @return Pointer to CTruiShortcutEditView's instance
       
    49      */        
       
    50     static CTruiShortcutEditView* NewL();
       
    51 
       
    52     /** 
       
    53      * Two phase construction.
       
    54      * 
       
    55      * @return Pointer to CTruiShortcutEditView's instance
       
    56      */
       
    57     static CTruiShortcutEditView* NewLC();    
       
    58 
       
    59     /**
       
    60     * Destructor.
       
    61     */    
       
    62     virtual ~CTruiShortcutEditView();
       
    63     
       
    64     inline const TVwsViewId& PreviousViewId() const
       
    65         {
       
    66         return iPreViewId;
       
    67         };
       
    68 
       
    69 // from base class CAknView
       
    70 
       
    71     /**
       
    72     * Returns views id.
       
    73     *
       
    74     * @return id for this view.
       
    75     */
       
    76     TUid Id() const;
       
    77     
       
    78     /**
       
    79      * Command handling function. 
       
    80      *
       
    81      * @param aCommand ID of the command to respond to. 
       
    82      */    
       
    83     void HandleCommandL( TInt aCommand );
       
    84    
       
    85 private:
       
    86 
       
    87    /**
       
    88     * Constructor.
       
    89     */     
       
    90     CTruiShortcutEditView();
       
    91     
       
    92    /**
       
    93     * Perform the second phase construction of a CTruiShortcutEditView object.
       
    94     */     
       
    95     void ConstructL();
       
    96 
       
    97 // From CAknView
       
    98     /**
       
    99     * Called by the framework when view is activated.
       
   100     *
       
   101     * @param aPrevViewId This is not used now.
       
   102     * @param aCustomMessage This is not used now.
       
   103     * @param aCustomMessage This is not used now.
       
   104     */
       
   105     void DoActivateL( const TVwsViewId& aPrevViewId,
       
   106                       TUid aCustomMessageId,
       
   107                       const TDesC8& aCustomMessage );
       
   108 
       
   109     /**    
       
   110     * Called by the framework when view is deactivated.
       
   111     *
       
   112     */
       
   113     void DoDeactivate();
       
   114     
       
   115 // MAknToolbarObserver
       
   116     /**
       
   117      * Handles toolbar events for a certain toolbar item.
       
   118      * @param aCommand The command ID of some toolbar item.
       
   119      */
       
   120     void OfferToolbarEventL( TInt aCommand );
       
   121 
       
   122 private: // data
       
   123 
       
   124     /**
       
   125      * Pointer to the component control
       
   126      * own.  
       
   127      */
       
   128     CTruiShortcutEditContainer* iContainer;    
       
   129     
       
   130     /**
       
   131      * The previous view id     
       
   132      */
       
   133     TVwsViewId iPreViewId;
       
   134     };
       
   135     
       
   136 #endif // C_TRUISHORTCUTEDITVIEW_H
       
   137