deviceencryption/DevEncUi/inc/DevEncUiDecrViewContainer.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 decryption 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 CDevEncUiDecrViewContainer : 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 CDevEncUiDecrViewContainer* NewL(const TRect& aRect, CAknView& aOwningView);
       
    46     /**
       
    47      * @function NewL
       
    48      * @abstract Creates a CDevEncUiEncrViewContainer object, which will draw
       
    49      * itself to aRect
       
    50      * @param aRect A rectangle that defines the size and location of the
       
    51      * displayable area for the view
       
    52      * @param aDocument the document
       
    53      **/
       
    54     static CDevEncUiDecrViewContainer* NewLC(const TRect& aRect, CAknView& aOwningView);
       
    55 
       
    56     /**
       
    57      * Destructor.
       
    58      **/
       
    59     ~CDevEncUiDecrViewContainer();
       
    60 
       
    61     // from MEikListBoxObserver
       
    62     void HandleListBoxEventL( CEikListBox* aListBox,
       
    63                               TListBoxEvent aEventType );
       
    64 
       
    65     /**
       
    66      * From CCoeControl. Called by the framework in compound controls
       
    67      * @return The number of controls in this CSimpleListContainer
       
    68      */
       
    69     TInt CountComponentControls() const;
       
    70 
       
    71     /**
       
    72      * From CCoeControl. Called by the framework in compound controls
       
    73      * @param The index of the control to return
       
    74      * @return The control for aIndex
       
    75      */
       
    76     CCoeControl* ComponentControl( TInt aIndex ) const;
       
    77 
       
    78     /**
       
    79      * Called by the framework to draw this control.  Clears the area in
       
    80      * aRect.
       
    81      * @param aRect in which to draw
       
    82      */
       
    83     void Draw( const TRect& aRect ) const;
       
    84 
       
    85     /**
       
    86      * Called by the framework whenever a key event occurs.
       
    87      * @param aKeyEvent the Key event which occured, e.g. select key pressed
       
    88      * @param aType the type of Key event which occurred, e.g. key up, key down
       
    89      * @return TKeyResponse EKeyWasNotConsumed if the key was not processed,
       
    90      * EKeyWasConsumed if it was
       
    91      */
       
    92     TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent,
       
    93                                  TEventCode aType );
       
    94     /**
       
    95      * Called by framework when the view size is changed.  Resizes the
       
    96      * iLabel accordingly.
       
    97      */
       
    98      void SizeChanged();
       
    99 
       
   100 private:
       
   101     /**
       
   102      * @function CDevEncUiEncrViewContainer
       
   103      * @abstract Performs the first stage construction
       
   104      * @param aOwningView the view that owns this container
       
   105      **/
       
   106     CDevEncUiDecrViewContainer(CAknView& aOwningView/*CDevEncUiDocument* aDocument*/);
       
   107 
       
   108     /**
       
   109      * @function ConstructL
       
   110      * @abstract Performs the second phase construction, setting the bounding
       
   111      * rectangle to aRect
       
   112      * @param aRect the display area for the view
       
   113      **/
       
   114     void ConstructL(const TRect& aRect);
       
   115 
       
   116     /**
       
   117      * Constructs the iListBox, setting its window.
       
   118      */
       
   119     void CreateListL();
       
   120 
       
   121 private:
       
   122 	CAknView& iOwningView;
       
   123     CAknDoubleStyle2ListBox* iListBox;
       
   124 };
       
   125 
       
   126 
       
   127 #endif // __DEVENCUI_GRAPHIC_VIEW_CONTAINER_H__