textinput/peninputhwrtrui/inc/truiappui.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:  UI class of TrainingUI
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef C_TRUIAPPUI_H
       
    20 #define C_TRUIAPPUI_H
       
    21 
       
    22 #include <aknViewAppUi.h>
       
    23 #include <AknTabObserver.h>
       
    24 
       
    25 // Forward reference
       
    26 class CTruiMainView;
       
    27 class CTruiShortcutsView;
       
    28 class CTruiShortcutEditView;
       
    29 class CAknNavigationDecorator;
       
    30 class CTruiEngine;
       
    31 class CTruiShortcutEditTextView;
       
    32 class CTruiInfoMessageView;
       
    33 
       
    34 /**
       
    35  *  Instance of CTruidemoAppUi is the User Interface part of the AVKON
       
    36  *  application framework for the TrainingUI application
       
    37  *
       
    38  *  @code
       
    39  *   CEikAppUi* appUi = new (ELeave) CTruiAppUi;
       
    40  *  @endcode
       
    41  *
       
    42  *  @lib avkon.lib eikcore.lib eiksrv.lib
       
    43  */
       
    44 class CTruiAppUi : public CAknViewAppUi, public MAknTabObserver 
       
    45     {
       
    46 public:
       
    47     /**
       
    48      * Perform the second phase construction of a CTruiAppUi object 
       
    49      */
       
    50     void ConstructL();
       
    51 
       
    52     /** 
       
    53      * Perform the first phase of two phase construction.
       
    54      */
       
    55     CTruiAppUi();
       
    56 
       
    57     /**  
       
    58      * Destroy the object and release all memory objects
       
    59      */
       
    60     ~CTruiAppUi();
       
    61     
       
    62     /**  
       
    63      * Get hand writing engine
       
    64      *
       
    65      * @return Pointer to CTruiEngine's instance
       
    66      */
       
    67     CTruiEngine* HwrEngine() const;
       
    68     
       
    69     /**  
       
    70      * Get hand Navigation Decorator
       
    71      *
       
    72      * @return The pointer to navigation pane.
       
    73      */
       
    74     CAknNavigationDecorator* GetNaviDecorator() const;
       
    75 
       
    76     /**  
       
    77      * Close the navi pane
       
    78      */
       
    79     void CloseNaviPaneL();
       
    80 
       
    81     /**  
       
    82      * Show the navi pane
       
    83      */
       
    84     void ShowNaviPaneL();
       
    85     
       
    86     /**  
       
    87      * Show the title pane
       
    88      *
       
    89      * @param aTitle: The text to be displayed in Tilte pane     
       
    90      */
       
    91     void ShowTitlePaneL( const TDesC& aTitle );
       
    92     
       
    93 // from CAknViewAppUi
       
    94 
       
    95     /**
       
    96      * Handle user menu selections
       
    97      *
       
    98      * @param aCommand the enumerated code for the option selected
       
    99      */
       
   100     void HandleCommandL( TInt aCommand );
       
   101     
       
   102     // from MAknTabObserver    
       
   103     /**
       
   104      * Handle active tab changed
       
   105      *
       
   106      * @param aIndex the index of active tab.
       
   107      */
       
   108     void TabChangedL( TInt aIndex );      
       
   109                 
       
   110 private:
       
   111 
       
   112     /**
       
   113      * Create navigation pane.
       
   114      *
       
   115      * @param aResourceId The resource Id.
       
   116      * @return The pointer to navigation pane.
       
   117      *      
       
   118      */    
       
   119     CAknNavigationDecorator* CreateNavigationTabL( const TInt aResourceId,
       
   120                                                    const TInt aDefaultActive );            
       
   121 
       
   122 private: // data
       
   123     /**
       
   124      * iMainView is the view that allows user to train HWR engine to
       
   125      * recognize user's own writing style
       
   126      * Own
       
   127      */
       
   128     CTruiMainView* iMainView;
       
   129     
       
   130     /**
       
   131      * iShortcutsView is the view that allows user to manage the shortcuts
       
   132      * Own
       
   133      */
       
   134     CTruiShortcutsView* iShortcutsView;
       
   135     
       
   136     /**
       
   137      * iShortcutEditView is the view that allows user to edit the shortcuts
       
   138      * Own
       
   139      */
       
   140     CTruiShortcutEditView* iShortcutEditView;
       
   141     
       
   142     /**
       
   143      * Pointer to shortcut edit text view 
       
   144      * on which users can alter shortcut's text.
       
   145      * Own
       
   146      */
       
   147     CTruiShortcutEditTextView* iShortcutEditTextView;
       
   148     
       
   149     /**
       
   150      * Pointer to info message view for shortcut wizard.     
       
   151      * Own
       
   152      */
       
   153     CTruiInfoMessageView* iInfoMessageView;
       
   154     
       
   155     /**
       
   156      * iNaviDecorator is navigation pane.
       
   157      * Allow users to switch views between main view and shortcut main view.
       
   158      * Own
       
   159      */    
       
   160     CAknNavigationDecorator* iNaviDecorator;
       
   161     
       
   162     CAknNavigationDecorator* iEmptyNaviDecorator;
       
   163     
       
   164     /**  
       
   165      * hand writing engine
       
   166      * Own
       
   167      */
       
   168     CTruiEngine* iEngine;
       
   169     };
       
   170 
       
   171 
       
   172 #endif // C_TRUIAPPUI_H
       
   173