uifw/AvKon/aknhlist/inc/akntree.h
branchRCL_3
changeset 19 aecbbf00d063
parent 7 08e69e956a8c
child 20 d48ab3b357f1
equal deleted inserted replaced
18:fcdfafb36fe7 19:aecbbf00d063
    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>
       
    26 
    25 
    27 #include "akntreenode.h"
    26 #include "akntreenode.h"
    28 #include "akntreeobserver.h"
    27 #include "akntreeobserver.h"
    29 
    28 
    30 class CAknTreeList;
    29 class CAknTreeList;
    62  *  several tree items.
    61  *  several tree items.
    63  *
    62  *
    64  *  @lib aknhlist.lib
    63  *  @lib aknhlist.lib
    65  *  @since S60 v3.2
    64  *  @since S60 v3.2
    66  */
    65  */
    67 NONSHARABLE_CLASS( CAknTree ) : public CAknTreeNode, public MAknSmileyObserver
    66 NONSHARABLE_CLASS( CAknTree ) : public CAknTreeNode
    68     {
    67     {
    69 
    68 
    70 public:
    69 public:
    71 
    70 
    72     /** Pre-defined IDs for the icons constructed by the tree. */
    71     /** Pre-defined IDs for the icons constructed by the tree. */
   866      * From CAknTreeNode.
   865      * From CAknTreeNode.
   867      * Changes the state of the whole tree, that is, every node, to collapsed.
   866      * Changes the state of the whole tree, that is, every node, to collapsed.
   868      */
   867      */
   869     void Collapse();
   868     void Collapse();
   870 
   869 
   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 
       
   915 private:
   870 private:
   916 
   871 
   917     /**
   872     /**
   918      * Constructor.
   873      * Constructor.
   919      *
   874      *
  1038     /**
   993     /**
  1039      * Flags for tree settings.
   994      * Flags for tree settings.
  1040      */
   995      */
  1041     TBitFlags32 iFlags;
   996     TBitFlags32 iFlags;
  1042 
   997 
  1043     /**
       
  1044      * Smiley manager. owned
       
  1045      */
       
  1046     CAknSmileyManager* iSmileyMan;
       
  1047 
       
  1048     /**
       
  1049      * Smiley icon size     
       
  1050      */
       
  1051     TSize iSmileySize;
       
  1052     };
   998     };
  1053 
   999 
  1054 
  1000 
  1055 #endif // C_AKNTREE_H
  1001 #endif // C_AKNTREE_H