emailuis/uicomponents/inc/fstreeplainrootvisualizer.h
changeset 0 8466d47a6819
child 18 6b8f3b30d0ec
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:  A visualizer for empty tree root's data.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef FSTREEPLAINROOTVISUALIZER_H_
       
    20 #define FSTREEPLAINROOTVISUALIZER_H_
       
    21 
       
    22 
       
    23 #include <e32base.h>
       
    24 //<cmail> removed __FS_ALFRED_SUPPORT flag
       
    25 //#include <fsconfig.h>
       
    26 //</cmail> removed __FS_ALFRED_SUPPORT flag
       
    27 
       
    28 #include "fstreenodevisualizerbase.h"
       
    29 
       
    30 class CAlfTextVisual;
       
    31 
       
    32 class MFsTreeItemData;
       
    33 class CFsTreeList;
       
    34 class CFsLayoutManager;
       
    35 
       
    36 /**
       
    37  * CFsTreePlainRootVisualizer is a visualizer for the empty tree root's data.
       
    38  *
       
    39  * Thic class is a concrete implementation for the MFsTreeNodeVisualizer 
       
    40  * interface. It provides visualization for the empty tree root's data. This 
       
    41  * visualizer is used when the list is empty. The list may for example display
       
    42  * "empty" text then.
       
    43  * 
       
    44  * @code
       
    45  *
       
    46  * @endcode
       
    47  *
       
    48  * @lib 
       
    49  */
       
    50 NONSHARABLE_CLASS( CFsTreePlainRootVisualizer ): 
       
    51                                             public CFsTreeNodeVisualizerBase
       
    52     {
       
    53 public:
       
    54 
       
    55     /**
       
    56      * Two-phased constructor
       
    57      * 
       
    58      * @param aOwnerControl Owner control.
       
    59      */
       
    60     IMPORT_C static CFsTreePlainRootVisualizer* NewL( 
       
    61                                                   CAlfControl& aOwnerControl);
       
    62     
       
    63     /**
       
    64     * C++ destructor
       
    65     */
       
    66     virtual ~CFsTreePlainRootVisualizer();
       
    67     
       
    68     
       
    69     /**
       
    70      * Returns the type of the item's visualizer.
       
    71      */
       
    72     virtual TFsTreeItemVisualizerType Type() const;
       
    73 
       
    74 
       
    75 public: // from base class MFsTreeItemVisualizer
       
    76 
       
    77     
       
    78     /**
       
    79      * From MFsTreeItemVisualizer.
       
    80      * A call to this function means that the visualization of empty root 
       
    81      * becomes visible and should draw itself within specified parent layout. 
       
    82      * Data to be visualized is passed as an argument. 
       
    83      * 
       
    84      * Parameter descriptions will be added when the final function prototype
       
    85      * is ready.
       
    86      */
       
    87     virtual void ShowL( CAlfLayout& aParentLayout,
       
    88             const TUint aTimeout = 0 );
       
    89 
       
    90     /**
       
    91     * A call to this function means that the item is requested to update its
       
    92     * visual content.
       
    93     */
       
    94     virtual void UpdateL( const MFsTreeItemData& aData,
       
    95                   TBool aFocused,
       
    96                   const TUint aLevel,
       
    97                   CAlfTexture*& aMarkIcon,
       
    98                   CAlfTexture*& aMenuIcon,                
       
    99                   const TUint aTimeout = 0,
       
   100                   TBool aUpdateData = ETrue);
       
   101     
       
   102     /**
       
   103      * From MFsTreeItemVisualizer.
       
   104      * A call to this function means that the the empty root visualization 
       
   105      * should become hidden.The visualizer should destroy all its visuals to 
       
   106      * save memory.
       
   107      */
       
   108     virtual void Hide( const TInt aTimeout = 0 );
       
   109     
       
   110     /**
       
   111      * From MFsTreeItemVisualizer.
       
   112      * This method marquees the text in tree item if it is too long.
       
   113      * 
       
   114      * @param aMarqueeType Type of marquee.
       
   115      * @param aMarqueeSpeed Speed of marquee in pixels per second.
       
   116      * @param aMarqueeStartDelay Marquee's start delay in miliseconds.
       
   117      * @param aMarqueeCycleStartDelay Marquee cycle's start delay.
       
   118      * @param aMarqueeRepetitions Number of marquee's cycles.
       
   119      */
       
   120     virtual void MarqueeL(const TFsTextMarqueeType aMarqueeType,
       
   121                           const TUint aMarqueeSpeed,
       
   122                           const TInt aMarqueeStartDelay,
       
   123                           const TInt aMarqueeCycleStartDelay,
       
   124                           const TInt aMarqueeRepetitions);
       
   125 
       
   126 
       
   127 protected:
       
   128 
       
   129     /**
       
   130      * C++ constructor
       
   131      * 
       
   132      * @param aOwnerControl Owner control.
       
   133      */
       
   134     CFsTreePlainRootVisualizer( CAlfControl& aOwnerControl );
       
   135     
       
   136     /**
       
   137      * Second phase constructor
       
   138      *
       
   139      */
       
   140     void ConstructL( );
       
   141     
       
   142 private:
       
   143     
       
   144     /**
       
   145      * Updates the layout metrics using layout manager that was set by 
       
   146      * tree visualizer. 
       
   147      * 
       
   148      * @param aLayoutManager Reference to the layout manager.
       
   149      */
       
   150     virtual void UpdateLayout( );
       
   151 
       
   152 private: // member data
       
   153     
       
   154     
       
   155     /**
       
   156      * Text visual.
       
   157      * Own.
       
   158      */
       
   159     CAlfTextVisual* iTextVisual;  
       
   160 
       
   161     };
       
   162 
       
   163 #endif /*FSTREEPLAINROOTVISUALIZER_H_*/