uifw/AvKon/inc/akndiscreetpopupdrawer.h
branchRCL_3
changeset 56 d48ab3b357f1
parent 55 aecbbf00d063
equal deleted inserted replaced
55:aecbbf00d063 56:d48ab3b357f1
   121      * @return Popup rect.
   121      * @return Popup rect.
   122      */
   122      */
   123     TRect LayoutPopup();
   123     TRect LayoutPopup();
   124 
   124 
   125     /**
   125     /**
   126      * Provides popup bitmap.
   126      * Draws popup to given graphics context.
   127      * Does not transfer ownership.
   127      * 
   128      *
   128      * @param aGc Graphics context.
   129      * @param aSize Requested popup bitmap size.
   129      * @param aRect Rectangle where popup is drawn to.
   130      * @return Popup bitmap.
   130      */
   131      */
   131     void Draw( CWindowGc& aGc, const TRect& aRect ) const;
   132     CFbsBitmap* PopupBitmap( const TSize& aSize );
       
   133 
       
   134     /**
       
   135      * Provides transparent mask for a bitmap.
       
   136      * Does not transfer ownership.
       
   137      *
       
   138      * @param aSize Bitmap size.
       
   139      * @param aAlpha Alpha factor.
       
   140      * @return Transparent mask.
       
   141      */
       
   142     CFbsBitmap* TransparentMask( const TSize& aSize, 
       
   143                                  const TInt& aAlpha );
       
   144 
   132 
   145 private:
   133 private:
   146 
   134 
   147     /**
   135     /**
   148      * C++ constructor.
   136      * C++ constructor.
   160                      const TDesC& aBitmapFile,
   148                      const TDesC& aBitmapFile,
   161                      const TInt& aBitmapId,
   149                      const TInt& aBitmapId,
   162                      const TInt& aMaskId );
   150                      const TInt& aMaskId );
   163 
   151 
   164     /**
   152     /**
   165      * Creates popup bitmap.
       
   166      *
       
   167      * @param aRect Popup rect.
       
   168      */
       
   169     void CreatePopupBitmapL( const TRect& aRect );
       
   170     
       
   171     /**
       
   172      * Creates transparent mask for popup bitmap.
       
   173      *
       
   174      * @param aRect Popup rect.
       
   175      */
       
   176     void CreateTransparentMaskL( const TRect& aRect );
       
   177 
       
   178     /**
       
   179      * Draws the texts.
   153      * Draws the texts.
   180      *
   154      *
   181      * @param aGc Bitmap graphics context.
   155      * @param aGc Graphics context.
   182      */
   156      */
   183     void DrawTexts( CFbsBitGc* aGc );
   157     void DrawTexts( CWindowGc* aGc ) const;
   184 
   158 
   185     /**
   159     /**
   186      * Resolves popup layout type.
   160      * Resolves popup layout type.
   187      */
   161      */
   188     void ResolvePopupLayout();
   162     void ResolvePopupLayout();
   190     /**
   164     /**
   191      * Provides control eikon env.
   165      * Provides control eikon env.
   192      *
   166      *
   193      * @return Control eikon env.
   167      * @return Control eikon env.
   194      */
   168      */
   195     CEikonEnv* EikonEnv();
   169     CEikonEnv* EikonEnv() const;
   196 
   170 
   197     /**
   171     /**
   198      * Returns ETrue if title text needs wrapping.
   172      * Returns ETrue if title text needs wrapping.
   199      * 
   173      * 
   200      * @param aLayoutType Current popup layout type. 
   174      * @param aLayoutType Current popup layout type. 
   208     void WrapTitleTextL();
   182     void WrapTitleTextL();
   209 
   183 
   210     /**
   184     /**
   211      * Draws aText to aGc (in bidi enabled text rect location).
   185      * Draws aText to aGc (in bidi enabled text rect location).
   212      *
   186      *
   213      * @param aGc Bitmap graphics context.
   187      * @param aGc Graphics context.
   214      * @param aTextData Text data.
   188      * @param aTextData Text data.
   215      * @param aText Text to be drawn.
   189      * @param aText Text to be drawn.
   216      */
   190      */
   217     static void DrawBidiEnabledText(
   191     void DrawBidiEnabledText(
   218             CFbsBitGc* aGc,
   192             CWindowGc* aGc,
   219             TAknDiscreetPopupTextData& aTextData,
   193             const TAknDiscreetPopupTextData& aTextData,
   220             const TDesC& aText );
   194             const TDesC& aText ) const;
   221 
   195 
   222     /**
   196     /**
   223      * Creates icon of given parameters.
   197      * Creates icon of given parameters.
   224      *
   198      *
   225      * @param aSkinId Icon skin id.
   199      * @param aSkinId Icon skin id.
   315      * Own.
   289      * Own.
   316      */
   290      */
   317     CGulIcon* iIcon;
   291     CGulIcon* iIcon;
   318 
   292 
   319     /**
   293     /**
   320      * Popup bitmap.
       
   321      * Own.
       
   322      */
       
   323     mutable CFbsBitmap* iPopupBitmap;
       
   324 
       
   325     /**
       
   326      * Transparent mask for popup bitmap.
       
   327      * Own.
       
   328      */
       
   329     mutable CFbsBitmap* iTransparentMask;
       
   330 
       
   331     /**
       
   332      * Popup layout type.
   294      * Popup layout type.
   333      */
   295      */
   334     TInt iPopupLayoutType;
   296     TInt iPopupLayoutType;
   335 
   297 
   336     /**
   298     /**