uifw/AvKon/inc/akndiscreetpopupdrawer.h
changeset 14 3320e4e6e8bb
parent 0 2f259fa3e83a
child 56 d48ab3b357f1
equal deleted inserted replaced
0:2f259fa3e83a 14:3320e4e6e8bb
   121      * @return Popup rect.
   121      * @return Popup rect.
   122      */
   122      */
   123     TRect LayoutPopup();
   123     TRect LayoutPopup();
   124 
   124 
   125     /**
   125     /**
   126      * Draws popup to given graphics context.
   126      * Provides popup bitmap.
   127      * 
   127      * Does not transfer ownership.
   128      * @param aGc Graphics context.
   128      *
   129      * @param aRect Rectangle where popup is drawn to.
   129      * @param aSize Requested popup bitmap size.
   130      */
   130      * @return Popup bitmap.
   131     void Draw( CWindowGc& aGc, const TRect& aRect ) const;
   131      */
       
   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 );
   132 
   144 
   133 private:
   145 private:
   134 
   146 
   135     /**
   147     /**
   136      * C++ constructor.
   148      * C++ constructor.
   148                      const TDesC& aBitmapFile,
   160                      const TDesC& aBitmapFile,
   149                      const TInt& aBitmapId,
   161                      const TInt& aBitmapId,
   150                      const TInt& aMaskId );
   162                      const TInt& aMaskId );
   151 
   163 
   152     /**
   164     /**
       
   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     /**
   153      * Draws the texts.
   179      * Draws the texts.
   154      *
   180      *
   155      * @param aGc Graphics context.
   181      * @param aGc Bitmap graphics context.
   156      */
   182      */
   157     void DrawTexts( CWindowGc* aGc ) const;
   183     void DrawTexts( CFbsBitGc* aGc );
   158 
   184 
   159     /**
   185     /**
   160      * Resolves popup layout type.
   186      * Resolves popup layout type.
   161      */
   187      */
   162     void ResolvePopupLayout();
   188     void ResolvePopupLayout();
   164     /**
   190     /**
   165      * Provides control eikon env.
   191      * Provides control eikon env.
   166      *
   192      *
   167      * @return Control eikon env.
   193      * @return Control eikon env.
   168      */
   194      */
   169     CEikonEnv* EikonEnv() const;
   195     CEikonEnv* EikonEnv();
   170 
   196 
   171     /**
   197     /**
   172      * Returns ETrue if title text needs wrapping.
   198      * Returns ETrue if title text needs wrapping.
   173      * 
   199      * 
   174      * @param aLayoutType Current popup layout type. 
   200      * @param aLayoutType Current popup layout type. 
   182     void WrapTitleTextL();
   208     void WrapTitleTextL();
   183 
   209 
   184     /**
   210     /**
   185      * Draws aText to aGc (in bidi enabled text rect location).
   211      * Draws aText to aGc (in bidi enabled text rect location).
   186      *
   212      *
   187      * @param aGc Graphics context.
   213      * @param aGc Bitmap graphics context.
   188      * @param aTextData Text data.
   214      * @param aTextData Text data.
   189      * @param aText Text to be drawn.
   215      * @param aText Text to be drawn.
   190      */
   216      */
   191     void DrawBidiEnabledText(
   217     static void DrawBidiEnabledText(
   192             CWindowGc* aGc,
   218             CFbsBitGc* aGc,
   193             const TAknDiscreetPopupTextData& aTextData,
   219             TAknDiscreetPopupTextData& aTextData,
   194             const TDesC& aText ) const;
   220             const TDesC& aText );
   195 
   221 
   196     /**
   222     /**
   197      * Creates icon of given parameters.
   223      * Creates icon of given parameters.
   198      *
   224      *
   199      * @param aSkinId Icon skin id.
   225      * @param aSkinId Icon skin id.
   289      * Own.
   315      * Own.
   290      */
   316      */
   291     CGulIcon* iIcon;
   317     CGulIcon* iIcon;
   292 
   318 
   293     /**
   319     /**
       
   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     /**
   294      * Popup layout type.
   332      * Popup layout type.
   295      */
   333      */
   296     TInt iPopupLayoutType;
   334     TInt iPopupLayoutType;
   297 
   335 
   298     /**
   336     /**