uifw/AvKon/aknhlist/inc/akntree.h
branchRCL_3
changeset 15 08e69e956a8c
parent 0 2f259fa3e83a
child 55 aecbbf00d063
equal deleted inserted replaced
10:9f56a4e1b8ab 15:08e69e956a8c
    20 #define C_AKNTREE_H
    20 #define C_AKNTREE_H
    21 
    21 
    22 
    22 
    23 #include <AknIconUtils.h> // TScaleMode
    23 #include <AknIconUtils.h> // TScaleMode
    24 #include <babitflags.h>
    24 #include <babitflags.h>
       
    25 #include <AknSmileyUtils.h>
    25 
    26 
    26 #include "akntreenode.h"
    27 #include "akntreenode.h"
    27 #include "akntreeobserver.h"
    28 #include "akntreeobserver.h"
    28 
    29 
    29 class CAknTreeList;
    30 class CAknTreeList;
    61  *  several tree items.
    62  *  several tree items.
    62  *
    63  *
    63  *  @lib aknhlist.lib
    64  *  @lib aknhlist.lib
    64  *  @since S60 v3.2
    65  *  @since S60 v3.2
    65  */
    66  */
    66 NONSHARABLE_CLASS( CAknTree ) : public CAknTreeNode
    67 NONSHARABLE_CLASS( CAknTree ) : public CAknTreeNode, public MAknSmileyObserver
    67     {
    68     {
    68 
    69 
    69 public:
    70 public:
    70 
    71 
    71     /** Pre-defined IDs for the icons constructed by the tree. */
    72     /** Pre-defined IDs for the icons constructed by the tree. */
   865      * From CAknTreeNode.
   866      * From CAknTreeNode.
   866      * Changes the state of the whole tree, that is, every node, to collapsed.
   867      * Changes the state of the whole tree, that is, every node, to collapsed.
   867      */
   868      */
   868     void Collapse();
   869     void Collapse();
   869 
   870 
       
   871     /**
       
   872      * Init smiley manager in this tree.
       
   873      * @since S60 5.2
       
   874      */
       
   875     void InitSmiley();
       
   876 
       
   877     /**
       
   878      * Draw smiley icon when aText contains simely text, otherwise it is as same
       
   879      * as @c DrawText.
       
   880      *
       
   881      * @param aGc Graphics context.
       
   882      *
       
   883      * @param aRect Parent rectangle for the text layout.
       
   884      *
       
   885      * @param aTextLayout Text layout.
       
   886      *
       
   887      * @param aText Text.
       
   888      *
       
   889      * @param aFont Font. @c NULL if the font defined in layout is used.
       
   890      *
       
   891      * @param aFocused @c ETrue, if the text is drawn for focused tree list
       
   892      *      item, otherwise @c EFalse.
       
   893      *
       
   894      * @since S60 5.2
       
   895      */
       
   896     void DrawSmiley( CWindowGc& aGc, const TRect& aRect, 
       
   897                      const TAknTextComponentLayout& aTextLayout, 
       
   898                      const TDesC& aText, const CFont* aFont, 
       
   899                      TBool aFocused );
       
   900     
       
   901     /**
       
   902      * Use smiley manager to convert smiley text to placehodler. 
       
   903      *
       
   904      * @param aText Text to be processed.
       
   905      * @return How many smiley icon found in aText. Or leave code if there is 
       
   906      *         any problem.
       
   907      * @since S60 5.2
       
   908      */
       
   909     TInt ConvertTextToSmiley( TDes& aText );
       
   910 
       
   911 private: // from MAknSmileyObserver
       
   912     void SmileyStillImageLoaded( CAknSmileyIcon* aSmileyIcon );
       
   913     void SmileyAnimationChanged( CAknSmileyIcon* aSmileyIcon );
       
   914 
   870 private:
   915 private:
   871 
   916 
   872     /**
   917     /**
   873      * Constructor.
   918      * Constructor.
   874      *
   919      *
   993     /**
  1038     /**
   994      * Flags for tree settings.
  1039      * Flags for tree settings.
   995      */
  1040      */
   996     TBitFlags32 iFlags;
  1041     TBitFlags32 iFlags;
   997 
  1042 
       
  1043     /**
       
  1044      * Smiley manager. owned
       
  1045      */
       
  1046     CAknSmileyManager* iSmileyMan;
       
  1047 
       
  1048     /**
       
  1049      * Smiley icon size     
       
  1050      */
       
  1051     TSize iSmileySize;
   998     };
  1052     };
   999 
  1053 
  1000 
  1054 
  1001 #endif // C_AKNTREE_H
  1055 #endif // C_AKNTREE_H