vtuis/videotelui/inc/CVtUiContextControl.h
branchRCL_3
changeset 25 779871d1e4f4
equal deleted inserted replaced
24:f15ac8e65a02 25:779871d1e4f4
       
     1 /*
       
     2 * Copyright (c) 2004, 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:  Context pane control for Video Telephone application.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef CVTUICONTEXTCONTROL_H
       
    21 #define CVTUICONTEXTCONTROL_H
       
    22 
       
    23 //  INCLUDES
       
    24 #include    <AknWsEventObserver.h>
       
    25 #include    "cvtuivideocontrolbase.h"
       
    26 
       
    27 // FORWARDS
       
    28 class CVtUiAppUi;
       
    29 class TVtUiStates;
       
    30 
       
    31 /**
       
    32 *  Context pane control for Video Telephone application.
       
    33 *
       
    34 *  @since Series 60 2.6
       
    35 */
       
    36 class CVtUiContextControl : public CVtUiVideoControlBase,
       
    37     public MAknWsEventObserver
       
    38     {
       
    39 
       
    40     public: // Constructors and destructor
       
    41 
       
    42         /**
       
    43         * C++ constructor.
       
    44         * @param aBitmapManager bitmap manager.
       
    45         * @param aLargeViewfinder ETrue if large viewfinder wanted.
       
    46         * @param aAppUi application UI.
       
    47         * @param aUiStates UI states.
       
    48         */
       
    49         static CVtUiContextControl* NewL(
       
    50             CVtUiBitmapManager& aBitmapManager,
       
    51             CVtUiAppUi& aAppUi,
       
    52             TVtUiStates& aUiStates );
       
    53 
       
    54         /**
       
    55         * C++ destructor.
       
    56         */
       
    57         ~CVtUiContextControl();
       
    58 
       
    59         /**
       
    60         * LayoutRemoteVideo
       
    61         */
       
    62        void LayoutRemoteVideo();
       
    63        
       
    64     public: // from CCoeControl
       
    65 
       
    66         /**
       
    67         * @see CCoeControl::HandlePointerEventL
       
    68         */
       
    69         void HandlePointerEventL( const TPointerEvent& aPointerEvent );
       
    70 
       
    71     private: // from CVtUiVideoControlBase
       
    72 
       
    73         /**
       
    74         * @see CVtUiVideoControlBase::HandleSizeChanged
       
    75         */
       
    76         void HandleSizeChanged();
       
    77 
       
    78         /**
       
    79         * @see CVtUiVideoControlBase::DrawColoredBackground
       
    80         */
       
    81         void DrawColoredBackground( CWindowGc& aGc ) const;
       
    82 
       
    83         /**
       
    84         * @see CVtUiVideoControlBase::StreamBlitPosition
       
    85         */
       
    86         TPoint StreamBlitPosition() const;
       
    87 
       
    88         /**
       
    89         * @see CVtUiVideoControlBase::StreamBlitPosition
       
    90         */
       
    91         TRect StreamClippingRect() const;
       
    92 
       
    93         /**
       
    94         * @see CVtUiVideoControlBase::BlindImage
       
    95         */
       
    96         CFbsBitmap* BlindImage() const;
       
    97 
       
    98         /**
       
    99         * @see CVtUiVideoControlBase::BlindMask
       
   100         */
       
   101         CFbsBitmap* BlindMask() const;
       
   102 
       
   103         /**
       
   104         * @see CVtUiVideoControlBase::BlindBlitPosition
       
   105         */
       
   106         TPoint BlindBlitPosition() const;
       
   107 
       
   108     public: // from MAknWsEventObserver
       
   109 
       
   110         /**
       
   111         * @see MAknWsEventObserver::HandleWsEventL
       
   112         */
       
   113         void HandleWsEventL( const TWsEvent& aEvent,
       
   114             CCoeControl* aDestination );
       
   115 
       
   116     private:
       
   117 
       
   118         /**
       
   119         * C++ constructor.
       
   120         */
       
   121         CVtUiContextControl(
       
   122             CVtUiBitmapManager& aBitmapManager,
       
   123             CVtUiAppUi& aAppUi,
       
   124             TVtUiStates& aUiStates );
       
   125 
       
   126         /**
       
   127         * Symbian constructor.
       
   128         */
       
   129         void ConstructL();
       
   130 
       
   131     private:
       
   132 
       
   133         // Background icon identifier.
       
   134         TVtUiBitmapPoolId iBackgroundId;
       
   135 
       
   136         // Blind icon identifier.
       
   137         TVtUiBitmapPoolId iBlindId;
       
   138 
       
   139         // Blind icon mask identifier.
       
   140         TVtUiBitmapPoolId iBlindMaskId;
       
   141 
       
   142         // Reference to application UI.
       
   143         CVtUiAppUi& iAppUi;
       
   144 
       
   145         // Reference to UI states.
       
   146         TVtUiStates& iUiStates;
       
   147 
       
   148         // Background bitmap layout.
       
   149         TAknLayoutRect iBackGround;
       
   150 
       
   151         // Blind icon rect
       
   152         TRect iBlindRect;
       
   153 
       
   154         // Stream rect
       
   155         TRect iStreamRect;
       
   156 
       
   157         // ETrue if it is ok to swap images on button up
       
   158         TBool iOkToSwapOnButtonUp;
       
   159 
       
   160         // ETrue if the pointer down inside of context control window
       
   161         TBool iPointerButton1DownInside;
       
   162 
       
   163     };
       
   164 
       
   165 #endif      // CVTUICONTEXTCONTROL_H
       
   166 
       
   167 // End of File