emailuis/uicomponents/inc/fstextinputvisual.h
changeset 0 8466d47a6819
equal deleted inserted replaced
-1:000000000000 0:8466d47a6819
       
     1 /*
       
     2 * Copyright (c) 2007 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:  Declaration of CFsTextInputVisual class
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef C_FSTEXTINPUTVISUAL_H
       
    21 #define C_FSTEXTINPUTVISUAL_H
       
    22 
       
    23 //<cmail> removed __FS_ALFRED_SUPPORT flag (other places in this file not tagged!)
       
    24 //#include <fsconfig.h>
       
    25 //#ifdef __FS_ALFRED_SUPPORT
       
    26 #include <alf/alfvisual.h>
       
    27 /*#else // !__FS_ALFRED_SUPPORT
       
    28 #include <huivisual.h>
       
    29 #endif // __FS_ALFRED_SUPPORT*/
       
    30 //</cmail> removed __FS_ALFRED_SUPPORT flag (other places in this file not tagged!)
       
    31 
       
    32 //Forward declarations
       
    33 class CCoeControl;
       
    34 class CAlfControl;
       
    35 class CAlfLayout;
       
    36 class CAlfGc;
       
    37 class MAlfVisualOwner;
       
    38 
       
    39 /**
       
    40  * CFsTextInputVisual is responsible for controlling the
       
    41  * TRect and redrawing of the CCoeControl. The text input
       
    42  * field inherits from CEikRichTextEditor which inherits form
       
    43  * CCoeControl (not directly).
       
    44  *
       
    45  */
       
    46 
       
    47 NONSHARABLE_CLASS(CFsTextInputVisual) : public CAlfVisual
       
    48     {
       
    49 public:
       
    50     /**
       
    51      * Creates instance of Text Input Visual and adds it to the HuiControl.
       
    52      *
       
    53      * @param aOwnerControl HuiControl which will own the visual
       
    54      * @param aCoeControl CoeConotrol of which the TRect will be managed.
       
    55      * @param aParentLayout Parent layout to which the visual will be appended.
       
    56      * @return Pointer to istance of the Text Input Visual
       
    57      */
       
    58     static CFsTextInputVisual* AddNewL( CAlfControl& aOwnerControl,
       
    59                                         CCoeControl& aCoeControl,
       
    60                                         CAlfLayout* aParentLayout = 0);
       
    61     /**
       
    62      * Virtual destructor
       
    63      */
       
    64     virtual ~CFsTextInputVisual();
       
    65     
       
    66     /**
       
    67      * From CHuiVisual. Invoked to redraw its content.
       
    68      *
       
    69      * @param aGc Graphic Context
       
    70      * @param aDisplayRect in which the control should be drawn.
       
    71      */
       
    72     virtual void DrawSelf( CAlfGc& aGc, const TRect& aDisplayRect ) const;
       
    73     
       
    74     /**
       
    75      * Cotrols the visibility status of the text input field.
       
    76      * @param aVisibility Visbility status to be set.
       
    77      */
       
    78     void SetVisibility( TBool aVisibility );
       
    79     
       
    80 private:
       
    81     /**
       
    82      * Constructor
       
    83      *
       
    84      * @param aOwnerControl HuiControl which will own the visual.
       
    85      * @param aCoeControl CoeConotrol of which the TRect will be managed.
       
    86      */
       
    87     CFsTextInputVisual( CAlfControl& aOwner, 
       
    88                         CCoeControl& aCoeControl );
       
    89 
       
    90 
       
    91     void ConstructL( CAlfControl& aOwner );
       
    92 
       
    93 private: //data
       
    94     /**
       
    95      * Text input field - CoeControl.
       
    96      * Must be mutable becouse it is changed in the DrawSelf method.
       
    97      * DrawSelf method must be const becouse it's inherited from 
       
    98      * CHuiVisual class.
       
    99      * Not owned.
       
   100      */
       
   101     mutable CCoeControl& iCoeControl;
       
   102     
       
   103     /**
       
   104      * Visibility status
       
   105      */
       
   106     TBool iVisible;
       
   107     };
       
   108 
       
   109 
       
   110 #endif //C_FSTEXTINPUTVISUAL_H