emailuis/emailui/inc/cmailcustomstatuspaneindicators.h
branchRCL_3
changeset 25 3533d4323edc
equal deleted inserted replaced
24:d189ee25cf9d 25:3533d4323edc
       
     1 /*
       
     2 * Copyright (c) 2008 - 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: Defines class CCustomStatuspaneIndicators.
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef CCUSTOMSTATUSPANEINDICATORS_H_
       
    19 #define CCUSTOMSTATUSPANEINDICATORS_H_
       
    20 
       
    21 // INCLUDES
       
    22 #include <coecntrl.h>
       
    23 #include <eikspane.h>  		// CEikStatusPane
       
    24 #include "ncsconstants.h" 	// TMsgPriority
       
    25 
       
    26 // FORWARD DECLARATIONS
       
    27 class CFbsBitmap;
       
    28 class CEikImage;
       
    29 
       
    30 /**
       
    31  * Navi pane handler for the email.
       
    32  */
       
    33 class CCustomStatuspaneIndicators : public CCoeControl
       
    34 	{
       
    35 public:
       
    36 	CCustomStatuspaneIndicators( );
       
    37 	virtual ~CCustomStatuspaneIndicators();
       
    38 	
       
    39     /**
       
    40      * Creates new CCustomStatuspaneIndicators object. Ownership
       
    41      * is transferred to caller.
       
    42      * @param aStatusPane pointer to aplications status pane
       
    43      * @return Pointer to created object,
       
    44      */
       
    45     static CCustomStatuspaneIndicators* NewL( CEikStatusPane* aStatusPane );
       
    46     
       
    47     /**
       
    48      * Set priority flag given as parameter into status pane
       
    49      */
       
    50     void SetPriorityFlag( TMsgPriority aFlagType );
       
    51     
       
    52     /**
       
    53      * Set followup flag ON or OFF in status pane
       
    54      */
       
    55     enum TFollowUpFlagType { EFollowUp, EFollowUpComplete, EFollowUpNone };
       
    56     void SetFollowUpFlag( TFollowUpFlagType aFlagType );
       
    57     
       
    58     /**
       
    59      * Clears flags from pane
       
    60      */
       
    61     void ClearStatusPaneFlags();
       
    62     
       
    63     /**
       
    64      * Hide all status pane flags
       
    65      */
       
    66     void HideStatusPaneIndicators();
       
    67     
       
    68     /**
       
    69      * Show status pane flags, whan called flags are sett OFF
       
    70      */
       
    71     void ShowStatusPaneIndicators();
       
    72 
       
    73 private:
       
    74     /**
       
    75      * Construction
       
    76      * @param aStatusPane pointer to aplications status pane
       
    77      */
       
    78     void ConstructL( CEikStatusPane* aStatusPane );
       
    79 
       
    80     /**
       
    81      * Read icon graphic controls from the texture manager
       
    82      */     
       
    83 	void ConstructControlsL();
       
    84 	
       
    85     /**
       
    86      * Get topmost navi pane decorator and check if scroll buttons are visible
       
    87      */     
       
    88 	TBool CheckScrollButtonState();
       
    89 
       
    90 	/**
       
    91 	 * Sets this control's window rect
       
    92 	 */
       
    93 	void DoSetRectL();
       
    94 
       
    95     /**
       
    96      * Draws itself by clearing with KRgbTransparent color.
       
    97      * Usefull for removing prority icon
       
    98      */
       
    99     void Draw( const TRect& aRect ) const;
       
   100 
       
   101 public:  // From CCoeControl
       
   102     TSize MinimumSize();
       
   103     TInt CountComponentControls() const;
       
   104     CCoeControl* ComponentControl( TInt aIndex ) const;
       
   105     
       
   106 private:  // From CCoeControl
       
   107     void SizeChanged();
       
   108     void HandleResourceChange( TInt aType );
       
   109 
       
   110 private: // Data
       
   111 	CEikStatusPane* iStatusPane;
       
   112 	// Icons which are shown in navi pane
       
   113     CEikImage* iPriorityIconLow;
       
   114     CEikImage* iPriorityIconHigh;
       
   115   	CEikImage* iFollowUpIcon;
       
   116     /// Own: Pointers to the bitmaps. Icons are created using these bitmaps
       
   117     CFbsBitmap* iBitmapPriorityLow;
       
   118     CFbsBitmap* iBitmapMaskPriorityLow;
       
   119     CFbsBitmap* iBitmapPriorityHigh;
       
   120     CFbsBitmap* iBitmapMaskPriorityHigh;
       
   121     CFbsBitmap* iBitmapFollowUp;
       
   122     CFbsBitmap* iBitmapFollowUpMask;
       
   123     CFbsBitmap* iBitmapFollowUpComplete;
       
   124     CFbsBitmap* iBitmapFollowUpCompleteMask;
       
   125 	};
       
   126 
       
   127 #endif /* CCUSTOMSTATUSPANEINDICATORS_H_ */