messagingappbase/smartmessaging/msgeditorutils/inc/MsgDetailWindow.h
branchRCL_3
changeset 27 7fdbb852d323
parent 0 72b543305e3a
equal deleted inserted replaced
26:ebe688cedc25 27:7fdbb852d323
       
     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:  
       
    15 *     Container for CRichbio.
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 
       
    21 #ifndef CMSGDETAILWINDOW_H
       
    22 #define CMSGDETAILWINDOW_H
       
    23 
       
    24 // INCLUDES
       
    25 
       
    26 #include <coecntrl.h>
       
    27 
       
    28 class CRichBio;
       
    29 
       
    30 // CLASS DECLARATION
       
    31 
       
    32 /**
       
    33 * This class is a window owning container, which is used to hold 
       
    34 * richbio control.
       
    35 */
       
    36 class CMsgDetailWindow : public CCoeControl
       
    37     {
       
    38 
       
    39     public: // Construction and destruction
       
    40 
       
    41         /**
       
    42         * Create a new detailwindow.
       
    43         * @return a pointer to the new object.
       
    44         */
       
    45         IMPORT_C static CMsgDetailWindow* NewL();
       
    46         
       
    47         /**
       
    48         * Destructor.
       
    49         * Deletes the child control.
       
    50         */
       
    51         IMPORT_C ~CMsgDetailWindow();
       
    52 
       
    53     public: // New
       
    54 
       
    55         /**
       
    56         * Set the control to be the detail window child.
       
    57         * @param aRichBio pointer to the richbio, ownership is changed.
       
    58         */
       
    59         IMPORT_C void SetControlL( CRichBio* aRichBio );
       
    60         
       
    61         /**
       
    62         * Get the reference to the owned control.
       
    63         * @return a reference to the richbio owned by detail window.
       
    64         */
       
    65         IMPORT_C CRichBio& Control() const;
       
    66   
       
    67         /**
       
    68         * Show the detail window.
       
    69         */
       
    70         IMPORT_C void Show();
       
    71 
       
    72         /**
       
    73         * Hide the detail window.
       
    74         */
       
    75         IMPORT_C void Hide();
       
    76     
       
    77     public: // from CCoeControl
       
    78 
       
    79         /**
       
    80         * Get the subcontrol count.
       
    81         * @return Count of controls in this component.
       
    82         */
       
    83         TInt CountComponentControls() const;
       
    84 
       
    85         /**
       
    86         * Get the desired child control.
       
    87         * @return pointer to component in question.  
       
    88         */
       
    89         CCoeControl* ComponentControl( TInt aIndex ) const;
       
    90         
       
    91         /**
       
    92         * Called when the control size is changed.
       
    93         */
       
    94         void SizeChanged();
       
    95 
       
    96         /**
       
    97         * Handle key event.
       
    98         * @param aKeyEvent event.
       
    99         * @param aType key event type.
       
   100         */
       
   101         TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent, 
       
   102             TEventCode aType );
       
   103 
       
   104     protected: // from CCoeControl
       
   105 
       
   106         /**
       
   107         * Called when the focus has changed.
       
   108         * @param aDrawNow indicates a redraw.
       
   109         */
       
   110         void FocusChanged(TDrawNow aDrawNow);
       
   111 
       
   112     private:
       
   113 
       
   114         /**
       
   115         * Constructor.
       
   116         */
       
   117         CMsgDetailWindow();
       
   118         
       
   119         /**
       
   120         * Do the construction.
       
   121         */
       
   122         void ConstructL();
       
   123         
       
   124         /**
       
   125         * Clears the window area.
       
   126         */
       
   127         void Draw(const TRect& aRect) const;
       
   128 
       
   129     private:
       
   130     
       
   131         /// Pointer to the richbio.
       
   132         CRichBio* iRichBio;          
       
   133     };
       
   134 
       
   135 #endif // CMSGDETAILWINDOW_H
       
   136 
       
   137 // End of file