deviceencryption/DevEncUi/inc/DevEncUiEncrViewContainer.h
changeset 0 6a9f87576119
equal deleted inserted replaced
-1:000000000000 0:6a9f87576119
       
     1 /*
       
     2 * Copyright (c) 2005 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:  Container for the encryption view.
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef __DEVENCUI_GRAPHIC_VIEW_CONTAINER_H__
       
    19 #define __DEVENCUI_GRAPHIC_VIEW_CONTAINER_H__
       
    20 
       
    21 //INCLUDES
       
    22 
       
    23 //System Includes
       
    24 #include <coecntrl.h>
       
    25 #include <aknview.h>
       
    26 #include <eiklbo.h>
       
    27 
       
    28 //User Includes
       
    29 
       
    30 //FORWARD DECLARATIONS
       
    31 class CAknDoubleStyle2ListBox;
       
    32 
       
    33 class CDevEncUiEncrViewContainer : public CCoeControl,
       
    34                                    public MEikListBoxObserver
       
    35     {
       
    36 public:
       
    37     /**
       
    38      * @function NewLC
       
    39      * @abstract Creates a CDevEncUiEncrViewContainer object, which will
       
    40      * draw itself to aRect
       
    41      * @param aRect A rectangle that defines the size and location of the
       
    42      * displayable area for the view
       
    43      * @param aDocument the document
       
    44     **/
       
    45     static CDevEncUiEncrViewContainer* NewL(const TRect& aRect, CAknView& aOwningView);
       
    46 
       
    47     /**
       
    48      * @function NewL
       
    49      * @abstract Creates a CDevEncUiEncrViewContainer object, which will draw
       
    50      * itself to aRect
       
    51      * @param aRect A rectangle that defines the size and location of the
       
    52      * displayable area for the view
       
    53      * @param aDocument the document
       
    54      **/
       
    55     static CDevEncUiEncrViewContainer* NewLC( const TRect& aRect,
       
    56                                               CAknView& aOwningView );
       
    57 
       
    58     /**
       
    59      * Destructor.
       
    60      **/
       
    61     ~CDevEncUiEncrViewContainer();
       
    62 
       
    63     // from MEikListBoxObserver
       
    64     void HandleListBoxEventL( CEikListBox* aListBox,
       
    65                               TListBoxEvent aEventType );
       
    66 
       
    67     /**
       
    68      * From CCoeControl. Called by the framework in compound controls 
       
    69      * @return The number of controls in this CSimpleListContainer
       
    70      */
       
    71     TInt CountComponentControls() const;
       
    72 
       
    73     /**
       
    74      * From CCoeControl. Called by the framework in compound controls 
       
    75      * @param The index of the control to return
       
    76      * @return The control for aIndex
       
    77      */
       
    78     CCoeControl* ComponentControl( TInt aIndex ) const;
       
    79 
       
    80     /**
       
    81      * Called by the framework to draw this control.  Clears the area in
       
    82      * aRect.
       
    83      * @param aRect in which to draw
       
    84      */
       
    85     void Draw( const TRect& aRect ) const;
       
    86 
       
    87     /**
       
    88      * Called by the framework whenever a key event occurs. 
       
    89      * @param aKeyEvent the Key event which occured, e.g. select key pressed
       
    90      * @param aType the type of Key event which occurred, e.g. key up, key down
       
    91      * @return TKeyResponse EKeyWasNotConsumed if the key was not processed,
       
    92      * EKeyWasConsumed if it was
       
    93      */
       
    94     TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent,
       
    95                                  TEventCode aType );
       
    96     /**
       
    97      * Called by framework when the view size is changed.  Resizes the
       
    98      * iLabel accordingly.
       
    99      */
       
   100      void SizeChanged();
       
   101      
       
   102 private: 
       
   103     /**
       
   104      * @function CDevEncUiEncrViewContainer
       
   105      * @abstract Performs the first stage construction
       
   106      * @param aOwningView the view that owns this container
       
   107      **/
       
   108     CDevEncUiEncrViewContainer( CAknView& aOwningView/*CDevEncUiDocument* aDocument*/);
       
   109 
       
   110     /**
       
   111      * @function ConstructL  
       
   112      * @abstract Performs the second phase construction, setting the bounding 
       
   113      * rectangle to aRect
       
   114      * @param aRect the display area for the view
       
   115      **/
       
   116     void ConstructL( const TRect& aRect );
       
   117 
       
   118     /**
       
   119      * Constructs the iListBox, setting its window.
       
   120      */
       
   121     void CreateListL();
       
   122     
       
   123 private:
       
   124 	CAknView& iOwningView;
       
   125     CAknDoubleStyle2ListBox* iListBox;
       
   126 };
       
   127 
       
   128 
       
   129 #endif // __DEVENCUI_GRAPHIC_VIEW_CONTAINER_H__