textinput/peninputhwrtrui/inc/truiinfomessagecontainer.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:  CTruiInfoMessageContainer class of TrainingUI
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef C_TRUIINFOMESSAGECONTAINER_H
       
    20 #define C_TRUIINFOMESSAGECONTAINER_H
       
    21 
       
    22 #include <AknLayout2Def.h>
       
    23 #include "truicontainerbase.h"
       
    24 
       
    25 class CAknsBasicBackgroundControlContext;
       
    26 class CEikButtonGroupContainer;
       
    27 class CEikLabel;
       
    28 class CTruiRadioButton;
       
    29 class CEikEdwin;
       
    30 
       
    31 /**
       
    32  *  CTruiInfoMessageContainer container control
       
    33  *  Used as the component to shortcut main view
       
    34  *
       
    35  *  @code
       
    36  *      iContainer = CTruiInfoMessageContainer::NewL( ClientRect() );
       
    37  *      iContainer->SetMopParent( this );
       
    38  *      AppUi()->AddToStackL( *this, iContainer );
       
    39  *  @endcode
       
    40  *
       
    41  */
       
    42  
       
    43 class CTruiInfoMessageContainer : public CTruiContainerBase
       
    44     {
       
    45 public:    
       
    46     /**
       
    47      * Two-phased constructor.
       
    48      * @param aRect The rectangle that defines the control's extent. 
       
    49      *              The rectangle's origin is relative to the origin
       
    50      *              of its associated window.
       
    51      * @return Pointer to the component control
       
    52      */
       
    53     static CTruiInfoMessageContainer* NewL( const TRect& aRect );
       
    54     
       
    55     /**
       
    56      * Two-phased constructor.
       
    57      * @param aRect The rectangle that defines the control's extent. 
       
    58      *              The rectangle's origin is relative to the origin
       
    59      *              of its associated window.
       
    60      * @return Pointer to the component control
       
    61      */
       
    62     static CTruiInfoMessageContainer* NewLC( const TRect& aRect );
       
    63     
       
    64     /**
       
    65      * Destructor.
       
    66      */
       
    67     virtual ~CTruiInfoMessageContainer();
       
    68     
       
    69     /**
       
    70      * Do something before exit
       
    71      */
       
    72     void PrepareToExitL();
       
    73     
       
    74 private:
       
    75 
       
    76     /**
       
    77      * Constructor.
       
    78      */
       
    79     CTruiInfoMessageContainer();
       
    80 
       
    81     /**
       
    82      * Two-phased constructor. Second phase
       
    83      * @param aRect The rectangle that defines the control's extent. 
       
    84      *              The rectangle's origin is relative to the origin
       
    85      *              of its associated window.
       
    86      */
       
    87     void ConstructL( const TRect& aRect );
       
    88     
       
    89     /**
       
    90      * Create controls to be displayed in this container.
       
    91      */
       
    92     void InitializeControlsL();
       
    93 
       
    94     /**
       
    95      * Create label and display it in the container.
       
    96      *    
       
    97      * @param aParent The parent of the control.
       
    98      * @return The pointer to the label.
       
    99      */
       
   100     CEikLabel* CreateLabelL( const CCoeControl* aParent );
       
   101     
       
   102 
       
   103 
       
   104 // from base class CCoeControl    
       
   105      /**
       
   106      * Draw the screen.
       
   107      * @param aRect the rectangle of this view that needs updating
       
   108      */
       
   109     void Draw( const TRect& aRect ) const;
       
   110 
       
   111     /**
       
   112      * From CoeControl.
       
   113      * Responds to changes to the size and position of the contents of this control.
       
   114      */
       
   115     void SizeChanged();
       
   116     
       
   117     /**
       
   118      * From CoeControl.
       
   119      * Handles a change to the control's resources.
       
   120      *
       
   121      * @param aType A message UID value.
       
   122      */
       
   123     void HandleResourceChange( TInt aType );
       
   124 
       
   125 private: // data
       
   126 
       
   127     /**
       
   128      * Pointer to background
       
   129      * Own
       
   130      */
       
   131     CAknsBasicBackgroundControlContext*	iBackGround;
       
   132 
       
   133     /**
       
   134      * Pointer to the label text
       
   135      * Own
       
   136      */
       
   137     HBufC* iLabelText;
       
   138     
       
   139     /**
       
   140      * Pointer to the radio button
       
   141      * Own
       
   142      */
       
   143     CTruiRadioButton* iRadioButtonContainer;
       
   144     
       
   145     /**
       
   146      * Pointer to the edwin text
       
   147      * Own
       
   148      */
       
   149     CEikEdwin* iEdwin;    
       
   150     
       
   151     /**
       
   152      * MultilineLayout for edwin
       
   153      * 
       
   154      */
       
   155     TAknMultiLineTextLayout iMultilineLayout;
       
   156     
       
   157     /**
       
   158      * TRect of instruct pane for edwin
       
   159      * 
       
   160      */
       
   161     TRect iInstructPaneRect;
       
   162     };
       
   163 
       
   164 #endif // C_TRUIINFOMESSAGECONTAINER_H
       
   165