meetingrequest/mrgui/inc/cmrnaviarrow.h
branchRCL_3
changeset 12 4ce476e64c59
equal deleted inserted replaced
11:0396474f30f5 12:4ce476e64c59
       
     1 /*
       
     2 * Copyright (c) 2009 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:  Navigation arrows used to replace the navipane.
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef CMRNAVIARROW_H_
       
    19 #define CMRNAVIARROW_H_
       
    20 
       
    21 #include <coecntrl.h>
       
    22 
       
    23 class CGulIcon;
       
    24 class CAknButton;
       
    25 class MESMRNaviArrowEventObserver;
       
    26 
       
    27 
       
    28 NONSHARABLE_CLASS( CMRNaviArrow ) : 
       
    29         public CCoeControl
       
    30     {
       
    31 public:
       
    32 	enum TArrowType {
       
    33 		EMRArrowLeft,
       
    34 		EMRArrowRight
       
    35 		};
       
    36 public:
       
    37     /**
       
    38      * Two-phased constructor.
       
    39      */
       
    40 	static CMRNaviArrow* NewL( const CCoeControl* aParent, TArrowType aType,
       
    41                                MESMRNaviArrowEventObserver* aObserver,
       
    42                                TSize aIconSize );
       
    43 
       
    44     /**
       
    45      * Destructor.
       
    46      */
       
    47     virtual ~CMRNaviArrow();
       
    48     
       
    49 private:
       
    50     /**
       
    51      * Default c++ constuctor
       
    52      */
       
    53     CMRNaviArrow( MESMRNaviArrowEventObserver* aObserver, TArrowType aType, TSize aIconSize );
       
    54     /**
       
    55      * Second phase constructor
       
    56      */
       
    57     void ConstructL( const CCoeControl* aParent );
       
    58     
       
    59 public: // From CCoeControl
       
    60     TInt CountComponentControls() const;
       
    61     CCoeControl* ComponentControl( TInt aInd ) const;
       
    62     void SizeChanged();
       
    63     void HandlePointerEventL(
       
    64             const TPointerEvent &aPointerEvent );
       
    65     void Draw(const TRect& aRect) const;
       
    66     
       
    67 public:
       
    68     /**
       
    69      * Set the navi arrow's visibility.
       
    70      * @param aVisible  Indicate if the arrow visible
       
    71      */
       
    72     void SetNaviArrowStatus( TBool aVisible );
       
    73     
       
    74 private:
       
    75     /**
       
    76      * Init the navi arrow buttons.
       
    77      */
       
    78     void InitNaviArrowsL();
       
    79     /**
       
    80      * Create a semi-transparent Icon.
       
    81      * @param aBitMap  The bitmap source
       
    82      * @param aBitMapMask The bitmap mask source
       
    83      */
       
    84     CGulIcon* CreateSemiTransparentIconL(  CFbsBitmap* aBitMap, 
       
    85                                       CFbsBitmap* aBitMapMask);
       
    86     
       
    87 private:
       
    88     /// Own: Left arrow button
       
    89     CAknButton* iArrow;
       
    90     /// Ref: Navi arrow event observer
       
    91     MESMRNaviArrowEventObserver* iObserver;
       
    92     /// Own: Left arrow visibility status
       
    93     TBool iArrowVisibility;
       
    94     /// Own: Store the type of such arrow
       
    95     TArrowType iArrowType;
       
    96     /// Own: Store the size of such arrow
       
    97     TSize iIconSize;
       
    98     };
       
    99 
       
   100 #endif /* CMRNAVIARROW_H_ */