messagingappbase/msgeditor/viewinc/MsgCaptionedHighlight.h
changeset 0 72b543305e3a
equal deleted inserted replaced
-1:000000000000 0:72b543305e3a
       
     1 /*
       
     2 * Copyright (c) 2002 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:  MsgCaptionedHighlight  declaration
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef INC_MSGCAPTIONEDHIGHLIGHT_H
       
    21 #define INC_MSGCAPTIONEDHIGHLIGHT_H
       
    22 
       
    23 // ========== INCLUDE FILES ================================
       
    24 
       
    25 #include <coecntrl.h>
       
    26 #include <AknUtils.h>
       
    27 
       
    28 // ========== CONSTANTS ====================================
       
    29 
       
    30 // ========== MACROS =======================================
       
    31 
       
    32 // ========== DATA TYPES ===================================
       
    33 
       
    34 // ========== FUNCTION PROTOTYPES ==========================
       
    35 
       
    36 // ========== FORWARD DECLARATIONS =========================
       
    37 
       
    38 class CMsgHeader;
       
    39 
       
    40 // ========== CLASS DECLARATION ============================
       
    41 
       
    42 class CMsgCaptionedHighlight : public CCoeControl
       
    43     {
       
    44     public:
       
    45         static CMsgCaptionedHighlight* NewL( const CMsgHeader& aParent );
       
    46 
       
    47     public: //From CCoeControl
       
    48         /**
       
    49          * For handling dynamic layout switch.
       
    50          */
       
    51         void HandleResourceChange( TInt aType );
       
    52 
       
    53     protected: // from CCoeControl
       
    54         IMPORT_C void Draw( const TRect& aRect ) const;
       
    55 
       
    56     private:
       
    57         CMsgCaptionedHighlight( const CMsgHeader& aParent );
       
    58         void ConstructL();
       
    59         void ResolveLayouts();
       
    60         void DrawFrame( CWindowGc& aGc, const TRect& aRect ) const;
       
    61         
       
    62         /**
       
    63         * Updates the text color from currently used skin.
       
    64         */
       
    65         void UpdateTextColor();
       
    66         
       
    67     private:
       
    68         const CMsgHeader& iParent;
       
    69         TAknLayoutRect iFrame;
       
    70         TAknLayoutRect iVertBar;
       
    71         TAknLayoutText iText;
       
    72         TInt iTextBaselineOffset;
       
    73         TInt iTextGap;
       
    74         
       
    75         /** Offset from main pane top to data pane top. */
       
    76         TInt iBaseLineOffset;
       
    77         
       
    78         /** Current text color. */
       
    79         TRgb iTextColor;
       
    80     };
       
    81 
       
    82 #endif
       
    83 
       
    84 // End of File