mmsharing/mmshui/inc/musuibackgroundviewcontainer.h
branchRCL_3
changeset 33 bc78a40cd63c
parent 0 f0cf47e981f9
child 38 ac48f0cc9f9c
equal deleted inserted replaced
32:73a1feb507fb 33:bc78a40cd63c
       
     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:  The MUS application's UI class.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef MUSUIBACKGROUNDVIEWCONTAINER_H
       
    21 #define MUSUIBACKGROUNDVIEWCONTAINER_H
       
    22 
       
    23 #include <coecntrl.h>                // Control base class
       
    24 
       
    25 class MAknsControlContext;
       
    26 
       
    27 /**
       
    28  * This class handles ordinal position two plain window.
       
    29  *
       
    30  *
       
    31  * @lib musui.exe
       
    32  */
       
    33 class CMusUiBackgroundViewContainer : public CCoeControl,
       
    34                                       public MCoeControlObserver
       
    35     {
       
    36 public:  // Constructors and destructor
       
    37 
       
    38     static CMusUiBackgroundViewContainer* NewL( 
       
    39         const TRect& aRect, 
       
    40         TInt aOrdinalPosition );
       
    41     
       
    42     ~CMusUiBackgroundViewContainer();
       
    43 
       
    44 
       
    45 public:
       
    46 
       
    47     /**
       
    48      * Refreshes the view.  Called after the mode has been changed
       
    49      * from portrait to landscape or vice versa.
       
    50      */
       
    51     void RefreshView();
       
    52 
       
    53     /**
       
    54      * Sets the windows group ordinal position which is supplied
       
    55      * at construction phase
       
    56      */ 
       
    57     void SetOrdinalPosition();
       
    58     
       
    59     /**
       
    60      * Sets the windows group ordinal position for this container
       
    61      * @aOrdianlPosition : Ordinal Position
       
    62      */    
       
    63     void SetOrdinalPosition( TInt aOrdianlPosition);
       
    64     
       
    65     /**
       
    66      * Increase/decrease the windows group ordinal position which is supplied
       
    67      * at construction phase based on aUp.
       
    68      * @aUp : ETrue to increment else EFalse.
       
    69      */ 
       
    70     void UpdateOrdinalPositionValue( TBool aUp );
       
    71     
       
    72 private: // Construction
       
    73     
       
    74     CMusUiBackgroundViewContainer( TInt aOrdinalPosition );
       
    75     
       
    76     void ConstructL( const TRect& aRect );
       
    77     
       
    78 private: // from base class CCoeControl
       
    79 
       
    80    /**
       
    81     * From CoeControl,SizeChanged.
       
    82     */
       
    83     void SizeChanged();
       
    84 
       
    85     /**
       
    86      * Returns the number of control contained by this class.
       
    87      *
       
    88      * @return           Number of controls contained
       
    89      */
       
    90     TInt CountComponentControls() const;
       
    91 
       
    92     /**
       
    93      * Returns handle to control pointed by aIndex.
       
    94      *
       
    95      * @param aIndex     Wanted control's index [0..n]
       
    96      * @return           Handle to wanted control
       
    97      */
       
    98     CCoeControl* ComponentControl( TInt aIndex ) const;
       
    99 
       
   100     /**
       
   101      * Gets called by the application framework when drawing is
       
   102      * needed.
       
   103      *
       
   104      * @param aRect The rectangle that needs to be drawn.
       
   105      */
       
   106     void Draw( const TRect& aRect ) const;
       
   107 
       
   108     /**
       
   109     * From MCoeControlObserver
       
   110     * Acts upon changes in the hosted control's state.
       
   111     *
       
   112     * @param    aControl    The control changing its state
       
   113     * @param    aEventType  The type of control event
       
   114     */
       
   115     void HandleControlEventL(CCoeControl* aControl,TCoeEvent aEventType);
       
   116 
       
   117     /**
       
   118      * Handles key events.
       
   119      *
       
   120      * @param aEvent  The event that occured.
       
   121      * @param aType   Type of key event: EEventKey, EEventKeyUp, or
       
   122      *                EEventKeyDown.
       
   123      * @return  The container's response to event: either
       
   124      *          EKeyWasNotConsumed or EKeyWasConsumed.
       
   125      */
       
   126     TKeyResponse OfferKeyEventL( const TKeyEvent& aEvent, TEventCode aType );
       
   127 
       
   128     /**
       
   129      *
       
   130      */
       
   131     TTypeUid::Ptr MopSupplyObject( TTypeUid aId );
       
   132 
       
   133 
       
   134 private: // data
       
   135 
       
   136     /**  Background skin control context */
       
   137     MAknsControlContext* iBackGround;
       
   138 
       
   139     /**
       
   140     * Created window group identifier
       
   141     */
       
   142     TInt iGroupIdentifier;
       
   143 
       
   144     /**
       
   145     * Ordinal Postion for windows group
       
   146     */
       
   147     TInt iOrdinalPosition;
       
   148 
       
   149     };
       
   150 
       
   151 
       
   152 #endif // MUSUILIVESHARINGVIEWCONTAINER_H
       
   153 
       
   154 // end of file