textinput/peninputhwrtrui/inc/truishortcutsview.h
changeset 40 2cb9bae34d17
parent 31 f1bdd6b078d1
child 49 37f5d84451bd
equal deleted inserted replaced
31:f1bdd6b078d1 40:2cb9bae34d17
     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:  CTruiShortcutsView class of TrainingUI
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef C_TRUISHORTCUTSVIEW_H
       
    21 #define C_TRUISHORTCUTSVIEW_H
       
    22 
       
    23 #include <aknview.h>
       
    24 #include <akntoolbarobserver.h>
       
    25 
       
    26 class CTruiShortcutsContainer;
       
    27 class CTruiTextSettingPageContainer;
       
    28 
       
    29 // UID of view
       
    30 const TUid KTruiShortcutsViewId = {2};
       
    31 
       
    32 /**
       
    33  *  CTruiShortcutsView view class.
       
    34  *
       
    35  *  @code
       
    36  *    CTruiShortcutsView* view = CTruiShortcutsView::NewLC(); 
       
    37  *    AddViewL( view );
       
    38  *    CleanupStack::Pop();
       
    39  *  @endcode
       
    40  *
       
    41  */
       
    42 class CTruiShortcutsView : public CAknView, public MAknToolbarObserver
       
    43     {
       
    44 public:
       
    45 
       
    46     /** 
       
    47      * Two phase construction.
       
    48      * 
       
    49      * @return Pointer to CTruiShortcutsView's instance
       
    50      */    
       
    51     static CTruiShortcutsView* NewL();
       
    52 
       
    53     /** 
       
    54      * Two phase construction.
       
    55      * 
       
    56      * @return Pointer to CTruiShortcutsView's instance
       
    57      */
       
    58     static CTruiShortcutsView* NewLC();    
       
    59 
       
    60     /**
       
    61     * Destructor.
       
    62     */    
       
    63     virtual ~CTruiShortcutsView();
       
    64 
       
    65 // from base class CAknView
       
    66     /**
       
    67     * From CAknView
       
    68     * Returns views id.
       
    69     *
       
    70     * @return id for this view.
       
    71     */
       
    72     TUid Id() const;    
       
    73     
       
    74     /**
       
    75      * From CAknView 
       
    76      * Command handling function. 
       
    77      *
       
    78      * @param aCommand ID of the command to respond to. 
       
    79      */    
       
    80     void HandleCommandL( TInt aCommand );
       
    81 
       
    82 private:
       
    83 
       
    84     CTruiShortcutsView();
       
    85     
       
    86     void ConstructL();
       
    87     
       
    88     /**
       
    89     * From CAknView
       
    90     * Called by the framework when view is activated.
       
    91     *
       
    92     * @param aPrevViewId This is not used now.
       
    93     * @param aCustomMessage This is not used now.
       
    94     * @param aCustomMessage This is not used now.
       
    95     */
       
    96     void DoActivateL( const TVwsViewId& aPrevViewId,
       
    97                       TUid aCustomMessageId,
       
    98                       const TDesC8& aCustomMessage );   
       
    99     
       
   100     /**
       
   101     * From CAknView
       
   102     * Called by the framework when view is deactivated.
       
   103     *
       
   104     */
       
   105     void DoDeactivate();
       
   106 
       
   107 // from MEikMenuObserver    
       
   108     /**
       
   109      * Dynamically initialises a menu pane.
       
   110      *
       
   111      * @param aResourceId The resource Id.
       
   112      * @param aMenuPane The in-memory representation of the menu pane.     
       
   113      */    
       
   114     void DynInitMenuPaneL( TInt aResourceId, CEikMenuPane* aMenuPane );
       
   115     
       
   116     /**
       
   117      * Dynamically initialises a menu bar.
       
   118      *
       
   119      * @param aResourceId The resource Id.
       
   120      * @param aMenuPane The in-memory representation of the menu bar.     
       
   121      */ 
       
   122     void DynInitMenuBarL( TInt aResourceId, CEikMenuBar *aMenuBar );
       
   123     
       
   124 // from MAknToolbarObserver
       
   125     /**     
       
   126      * Handles toolbar events for a certain toolbar item.
       
   127      *
       
   128      * @param aCommand The command ID of some toolbar item.
       
   129      */
       
   130     void OfferToolbarEventL( TInt aCommand );
       
   131     /** 
       
   132      * From CAknView. This function processes user commands.  
       
   133      * @param aCommand ID of the command to respond to. 
       
   134      */        
       
   135     void ProcessCommandL( TInt aCommand );    
       
   136     
       
   137 private: // data
       
   138 
       
   139     /**
       
   140      * Pointer to the component control
       
   141      * own.  
       
   142      */
       
   143     CTruiShortcutsContainer* iContainer; 
       
   144     };
       
   145     
       
   146 #endif // C_TRUISHORTCUTSVIEW_H
       
   147